# can't switch to tty2 ... tty6; Ctrl-Alt-F1...F7 [solved?]

## rsa4046

Somehow I've lost the ability to switch to another tty console from tty1 after logging in on console: Hitting Control-Alt-F2 ... Control-Alt-F6 does nothing. However, the ttys are running:

```
# ps ax                                           

  PID TTY      STAT   TIME COMMAND                            

    1 ?        Ss     0:00 init [3]                           

    2 ?        S<     0:00 [kthreadd]                         

    3 ?        S<     0:00 [migration/0]                      

    4 ?        S<     0:00 [ksoftirqd/0]                      

    5 ?        S<     0:00 [migration/1]                      

    6 ?        S<     0:00 [ksoftirqd/1]                      

    7 ?        S<     0:00 [cpuset]                           

    8 ?        S<     0:00 [events/0]                         

    9 ?        S<     0:00 [events/1]                         

   10 ?        S<     0:00 [work_on_cpu/0]                    

   11 ?        S<     0:00 [work_on_cpu/1]                    

   12 ?        S<     0:00 [khelper]                          

  146 ?        S<     0:00 [kblockd/0]                        

  147 ?        S<     0:00 [kblockd/1]                        

  150 ?        S<     0:00 [kacpid]                           

  151 ?        S<     0:00 [kacpi_notify]                     

  218 ?        S<     0:00 [cqueue]                           

  222 ?        S<     0:00 [ata/0]                            

  223 ?        S<     0:00 [ata/1]                            

  224 ?        S<     0:00 [ata_aux]                          

  225 ?        S<     0:00 [ksuspend_usbd]                    

  230 ?        S<     0:00 [khubd]                            

  233 ?        S<     0:00 [kseriod]                          

  294 ?        S      0:00 [pdflush]                          

  295 ?        S      0:00 [pdflush]                          

  296 ?        S<     0:00 [kswapd0]                          

  343 ?        S<     0:00 [aio/0]                            

  344 ?        S<     0:00 [aio/1]                            

  361 ?        S<     0:00 [nfsiod]                           

 <snip>

 3428 ?        Ss     0:00 /usr/sbin/ntpd -p /var/run/ntpd.pid                                    

 3469 ?        Ss     0:00 /usr/sbin/sshd                                                         

 3487 ?        Ss     0:00 /usr/sbin/cron                                                         

 3508 tty2     Ss+    0:00 /sbin/agetty 38400 tty2 linux                                          

 3509 tty3     Ss+    0:00 /sbin/agetty 38400 tty3 linux                                          

 3510 tty4     Ss+    0:00 /sbin/agetty 38400 tty4 linux                                          

 3511 tty5     Ss+    0:00 /sbin/agetty 38400 tty5 linux                                          

 3512 tty6     Ss+    0:00 /sbin/agetty 38400 tty6 linux                                          

 3558 tty1     Ss     0:00 /bin/login --                                                          

 3559 tty1     S      0:00 -bash                                                                  

 3592 ?        Ss     0:00 ssh-agent                                                              

 3618 ?        Ss     0:00 gpg-agent --daemon

<snip>

 
```

But none of these other consoles are accessible via the usual keystrokes, regardless of whether X is running. The screen doesn't switch, blink, flash, etc., doesn't seem to even hear the keystroke.  What would interfere with this functionality?

Edit, added: Control-Alt-Backspace DOES kill X, however, so that combo works.Last edited by rsa4046 on Thu May 21, 2009 2:50 am; edited 1 time in total

----------

## mikegpitt

After updating to xorg-server-1.5 I ran into this problem on one of my machines.  After a lot of head scratching, what fixed it for me was re-emerging xf86-input-keyboard, xkeyboard-config, and xkbcomp.

I think the issue was that one of those packages was either not updated or was emerged in the wrong order, so it wasn't properly built against the new xorg server.

----------

## rsa4046

 *mikegpitt wrote:*   

> After updating to xorg-server-1.5 I ran into this problem on one of my machines.  After a lot of head scratching, what fixed it for me was re-emerging xf86-input-keyboard, xkeyboard-config, and xkbcomp.
> 
> I think the issue was that one of those packages was either not updated or was emerged in the wrong order, so it wasn't properly built against the new xorg server.

 

Thanks for this, will give it a shot and post back. Cheers--

----------

## rsa4046

OK, I tried rebuilding first

```
[ebuild   R   ] x11-base/xorg-server-1.5.3-r6  USE="hal ipv6 nptl xorg (-3dfx) -debug -dmx -kdrive -minimal -sdl -tslib" INPUT_DEVICES="evdev keyboard mouse -acecad -aiptek -calcomp -citron -digitaledge -dmc -dynapro -elo2300 -elographics -fpit -hyperpen -jamstudio -joystick -magellan -microtouch -mutouch -palmax -penmount -spaceorb -summa -synaptics -tek4957 -tslib -ur98 -virtualbox -vmmouse -void -wacom" VIDEO_CARDS="fbdev nvidia vesa -apm -ark -ast -chips -cirrus -dummy -epson -fglrx (-geode) -glint -i128 (-i740) (-impact) (-imstt) -intel -mach64 -mga -neomagic (-newport) -nv -r128 -radeon -radeonhd -rendition -s3 -s3virge -savage -siliconmotion -sis -sisusb (-sunbw2) (-suncg14) (-suncg3) (-suncg6) (-sunffb) (-sunleo) (-suntcx) -tdfx -tga -trident -tseng -v4l (-vermilion) -via -virtualbox -vmware -voodoo (-xgi)" 0 kB

```

then

```
[ebuild   R   ] x11-apps/xkbcomp-1.0.5  USE="-debug" 0 kB

[ebuild   R   ] x11-misc/xkeyboard-config-1.5  0 kB

[ebuild   R   ] x11-drivers/xf86-input-keyboard-1.3.2  USE="-debug" 0 kB
```

but to no avail, tty switching still seems broken. Does anyone have any other suggestions as to what might be going on? TIA

----------

## coolsnowmen

does chvt work?

----------

## entrophie

As I remeber, I had exactly the same problem -> ctrl-alt-backspace works, but I cannot switch to another console. All of the problems was due to xorg.conf configuration (improper XKbRules).

----------

## rsa4046

Thanks people, with try chvt (hadn't heard of this   :Very Happy:   ) and fiddle with xorg.conf.

Cheers!

----------

## mikegpitt

 *rsa4046 wrote:*   

> Thanks people, with try chvt (hadn't heard of this    ) and fiddle with xorg.conf.
> 
> Cheers!

 With the new xorg-server you can remove the device sections (keyboard, mouse, etc.) from your xorg.conf if you have build xorg with hal support (default option) and you have installed the evdev input drivers.  If you have done both those things remove the device sections from your xorg.conf to ensure they aren't conflicting with anything.

----------

## coolsnowmen

Good Good.

chvt is a usefull test to see if you are having bigger problems than keyboard/Xkb configuration

----------

## rsa4046

OK, chvt does indeed force a change of virtual terminal, although only as root; as user it responds with

```
chvt: VT_ACTIVATE: Operation not permitted 
```

So that seems to work   :Very Happy:  . My xorg.conf is pretty straightforward

```
Section "ServerLayout"

    Identifier     "X.org Configured"

    Screen      0  "Screen0" 0 0     

    InputDevice    "Mouse0" "CorePointer"

    InputDevice    "Keyboard0" "CoreKeyboard"

EndSection                                   

Section "Files"

    ModulePath      "/usr/lib64/xorg/modules"

    FontPath        "/usr/share/fonts/misc/" 

    FontPath        "/usr/share/fonts/TTF/"  

    FontPath        "/usr/share/fonts/OTF"   

    FontPath        "/usr/share/fonts/Type1/"

    FontPath        "/usr/share/fonts/100dpi/"

    FontPath        "/usr/share/fonts/75dpi/" 

EndSection                                    

Section "Module"

    Load           "dbe"

    Load           "extmod"

    Load           "glx"   

    Load           "record"

    Load           "xtrap" 

EndSection                 

Section "InputDevice"

    Identifier     "Keyboard0"

    Driver         "kbd"      

EndSection                    

Section "InputDevice"

    Identifier     "Mouse0"

    Driver         "mouse" 

    Option         "Protocol" "auto"

    Option         "Device" "/dev/input/mice"

    Option         "ZAxisMapping" "4 5 6 7"  

EndSection                                   

Section "Monitor"

    Identifier     "Monitor0"

    VendorName     "Monitor Vendor"

    ModelName      "Monitor Model" 

EndSection                         

Section "Device"          

    Identifier     "Card0"                                           

    Driver         "nvidia"                                          

    VendorName     "nVidia Corporation"                              

    BoardName      "GeForce 8600 GT"                                 

EndSection                                                           

Section "Screen"

    Identifier     "Screen0"

    Device         "Card0"

    Monitor        "Monitor0"

    Option         "AllowGLXWithComposite" "True"

    Option         "RenderAccel" "True"          

    Option         "AddARGBGLXVisuals" "True"    

    SubSection     "Display"

        Viewport    0 0

        Depth       24

    EndSubSection

EndSection

Section "Extensions"

    Option         "Composite" "Enable"

EndSection
```

Is there anything obvious missing? There are no other video problems. I have  x11-drivers/nvidia-drivers-180.51. TIA

----------

## coolsnowmen

 *rsa4046 wrote:*   

> OK, chvt does indeed force a change of virtual terminal, although only as root; as user it responds with
> 
> ```
> chvt: VT_ACTIVATE: Operation not permitted 
> ```
> ...

 

Yeah, because otherwise any user could change the vt displayed.  That would be hell on the user actually at the desk.

----------

## mikegpitt

Your xorg.conf looks fine, but I would still comment out or remove your InputDevice sections and see if that helps.

----------

## rsa4046

 *coolsnowmen wrote:*   

>  *rsa4046 wrote:*   OK, chvt does indeed force a change of virtual terminal, although only as root; as user it responds with
> 
> ```
> chvt: VT_ACTIVATE: Operation not permitted 
> ```
> ...

 That would be troublesome ...  :Laughing: 

 *mikegpitt wrote:*   

> Your xorg.conf looks fine, but I would still comment out or remove your InputDevice sections and see if that helps.

 

Thanks for the tip, I did remove InputDevice sections and rebooted for good measure, but same result.   :Crying or Very sad:  Could this be a kernel issue -- i.e., some option I've unwittingly nixed (and have just now noticed)?

----------

## mikegpitt

 *rsa4046 wrote:*   

> Thanks for the tip, I did remove InputDevice sections and rebooted for good measure, but same result.   Could this be a kernel issue -- i.e., some option I've unwittingly nixed (and have just now noticed)?

 I'm not really sure...  I suppose it could be a kernel issue, but I'm still betting something is going wrong with xorg.

One thing we haven't looked at yet is your INPUT_DEVICES variable from your make.conf.  Can you post it?

Another thing I might try as a last resort is to do an `emerge -e xorg-server` to ensure all the packages have been built against the newest xorg-server.

----------

## albright

 *Quote:*   

> I'm not really sure... I suppose it could be a kernel issue, but I'm still betting something is going wrong with xorg.

 

In the first post, the OP said that console switching did not work

whether or not X was running. Is that right?

You should remove xdm from your runlevel (if it's in there) and boot

to pure console. Am I right to say that even when you do that you

can't use CTRL-ALT-Fn to switch consoles? If so, this is not an X

problem.

----------

## rsa4046

 *albright wrote:*   

>  *Quote:*   I'm not really sure... I suppose it could be a kernel issue, but I'm still betting something is going wrong with xorg. 
> 
> In the first post, the OP said that console switching did not work
> 
> whether or not X was running. Is that right?
> ...

 

Thanks for the kind responses, people. I will check this at console tomorrow AM. Relevant part of make.conf reads

```
ALSA_CARDS="hda-intel usb-audio"

VIDEO_CARDS="nvidia fbdev vesa vga"

INPUT_DEVICES="evdev keyboard mouse"
```

IIRC console swtiching didn't work even if xdm wasn't started after a fresh boot. Will check in AM. Cheers, Rolf

----------

## rsa4046

OK, I confirmed that console-switching does NOT work if the machine boots into console only (X never started) ...

----------

## coolsnowmen

If chvt works, but keyboard doesn't.  Consider trying a different keyboard? Or a known good kernel (like a boot cd).

----------

## mikegpitt

Sorry for leading you astray there... I didn't realise that this was happening outside of X.  Perhaps it's a keymap issue???

----------

## rsa4046

OK, found the problem, thanks for all the suggestions, people. I have a Logitech S510 wireless kb+mouse. I tried identical keyboards (but leaving the transmitter connections untouched) and a boot CD with the same result (i.e., no switching). I noticed that although the mouse side of the wireless transmitter plugs into a ps2 mouse port, with the keyboard you have the option of plugging into either the ps2 port with an adapter, or plugging directly into a USB port. I had it in the latter config: keyboard --> USB. I know, I should have looked here first.   :Embarassed: 

Plugged the kb into ps2 with the adapter, and voila, switching is active again. But if I put the kb lead back into its original USB connection, it still works   :Question:   And, what's even odder, now I can't reproduce the dysfunctionality, booting with the keyboard in ps2 versus usb position now makes no difference, it works both ways. So, I guess this is solved, although I don't understand what aspect failed originally ..

----------

## Fitzcarraldo

 *mikegpitt wrote:*   

> After updating to xorg-server-1.5 I ran into this problem on one of my machines.  After a lot of head scratching, what fixed it for me was re-emerging xf86-input-keyboard, xkeyboard-config, and xkbcomp.
> 
> I think the issue was that one of those packages was either not updated or was emerged in the wrong order, so it wasn't properly built against the new xorg server.

 

Thanks! That fixed it for me after I updated to xorg-server-1.8.2

----------

