You are not logged in.

#1 2012-06-26 04:57:44

thesequel
Member
Registered: 2012-06-26
Posts: 19

[SOLVED] Can Not Switch Virtual Terminals Using Keyboard Shortcuts

I hope I'm posting this in the correct board.

My problem is pretty self-explanatory. I can enter a virtual terminal from X (I'm runing XFCE fwiw), but I can't switch VTs once I'm in a VT (using keyboard shortcuts). I've tried booting into runlevel 3, instead of runlevel 5, but I still could not switch VTs.

The terminals are started at boot

alejandro@vaccus ~ % ps -ef | grep agetty
root      1042     1  0 21:40 tty1     00:00:00 /sbin/agetty -8 -s 38400 tty1 linux
root      1043     1  0 21:40 tty2     00:00:00 /sbin/agetty -8 -s 38400 tty2 linux
root      1044     1  0 21:40 tty3     00:00:00 /sbin/agetty -8 -s 38400 tty3 linux
root      1045     1  0 21:40 tty4     00:00:00 /sbin/agetty -8 -s 38400 tty4 linux
root      1046     1  0 21:40 tty5     00:00:00 /sbin/agetty -8 -s 38400 tty5 linux
root      1047     1  0 21:40 tty6     00:00:00 /sbin/agetty -8 -s 38400 tty6 linux
1000      1777  1657  0 21:44 pts/0    00:00:00 grep --color=auto agetty

I've googled this problem and it's been suggested that I might have something set in my xorg.conf, but I never generated/created a xorg.conf file.

I have not made any major changes to my inittab file

#
# /etc/inittab
#

#  Runlevels:
#    0    Halt
#    1(S)	Single-user
#    2    Not used
#    3    Multi-user
#    4    Not used
#    5    X11
#    6    Reboot

## Only one of the following two lines can be uncommented!
# Boot to console
#id:3:initdefault:
# Boot to X11
id:5:initdefault:

rc::sysinit:/etc/rc.sysinit
rs:S1:wait:/etc/rc.single
rm:2345:wait:/etc/rc.multi
rh:06:wait:/etc/rc.shutdown
su:S:wait:/sbin/sulogin -p

# -8 options fixes umlauts problem on login
c1:2345:respawn:/sbin/agetty -8 -s 38400 tty1 linux
c2:2345:respawn:/sbin/agetty -8 -s 38400 tty2 linux
c3:2345:respawn:/sbin/agetty -8 -s 38400 tty3 linux
c4:2345:respawn:/sbin/agetty -8 -s 38400 tty4 linux
c5:2345:respawn:/sbin/agetty -8 -s 38400 tty5 linux
c6:2345:respawn:/sbin/agetty -8 -s 38400 tty6 linux

# Serial Virtual Console for KVM and others VMs
#s0:2345:respawn:/sbin/agetty -8 -s 9600 ttyS0 linux

# Hypervisor Virtual Console for Xen and KVM
#h0:2345:respawn:/sbin/agetty -8 -s 38400 hvc0 linux

ca::ctrlaltdel:/sbin/shutdown -t3 -r now

# Example lines for starting a login manager
#x:5:respawn:/usr/bin/xdm -nodaemon
x:5:respawn:/usr/sbin/gdm -nodaemon
#x:5:respawn:/usr/bin/kdm -nodaemon
#x:5:respawn:/usr/bin/slim >/dev/null 2>&1

# End of file

Other keyboard shortcuts seem to work while in a VT (ctrl+alt+del reboots the system). I can switch VTs if I run chvt n. However I cannot return to X from a VT (I tried running chvt 7). Does anyone have any suggestions? Anyone know where the alt+fn shortcuts are defined (my google-fu is lacking)?

This hasn't been working ever since I installed Arch (didn't work in Fedora either fwiw). Sorry if this a newbie mistake.

Last edited by thesequel (2012-06-27 00:52:12)

Offline

#2 2012-06-26 05:57:23

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [SOLVED] Can Not Switch Virtual Terminals Using Keyboard Shortcuts

Please include details of your video card and driver.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2012-06-26 06:05:40

thesequel
Member
Registered: 2012-06-26
Posts: 19

Re: [SOLVED] Can Not Switch Virtual Terminals Using Keyboard Shortcuts

I'm using a T420 (sans Optimus): Intel HD 3000 with i915 driver.

I didn't think to include video information, my bad.

Last edited by thesequel (2012-06-26 06:06:00)

Offline

#4 2012-06-26 09:36:42

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: [SOLVED] Can Not Switch Virtual Terminals Using Keyboard Shortcuts

You need to use Ctrl+Alt+F1/F2/F3/.../F6. Not the "Fn" key.

Ctrl+Alt+F7 will return you to X.


If it doesn't work, maybe they're set to something else in Xfce. Or at least one of them, or a combination like Alt+F1. Hmmm... Do you have media functions (play, pause, volume, etc) on the F keys? Because you may need to use a different keyboard layout in X, one that uses a different key than "Ctrl" or "Alt" for those functions.

Last edited by DSpider (2012-06-26 09:42:13)


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#5 2012-06-26 12:03:09

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,507
Website

Re: [SOLVED] Can Not Switch Virtual Terminals Using Keyboard Shortcuts

If the problem persists in runlevel 3, then everything X-related can be ruled out as neither X nor XFCE are running.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#6 2012-06-26 12:15:15

PReP
Member
From: Sweden
Registered: 2010-06-13
Posts: 359
Website

Re: [SOLVED] Can Not Switch Virtual Terminals Using Keyboard Shortcuts

Are you on a laptop, and does it have a single key called "Fn"?

Because on my girlfriends sony-vaoi laptop, they have replaced all the default F1,2,3 and so on-keys, with some stupid media default functions.
So on hers, one needs to first press "Fn" once, and then one can use an F1 to F12 key as usual
Like: First press fn, then do CTRL+ALT+F2/3/4 and so on. and one needs to press "Fn" before every time one needs the usual F1,2,3 key functions.

I do not know if that is the irritating case for you too?


. Main: Intel Core i5 6600k @ 4.4 Ghz, 16 GB DDR4 XMP, Gefore GTX 970 (Gainward Phantom) - Arch Linux 64-Bit
. Server: Intel Core i5 2500k @ 3.9 Ghz, 8 GB DDR2-XMP RAM @ 1600 Mhz, Geforce GTX 570 (Gainward Phantom) - Arch Linux 64-Bit
. Body: Estrogen @ 90%, Testestorone @ 10% (Not scientific just out-of-my-guesstimate-brain)

Offline

#7 2012-06-26 16:38:10

thesequel
Member
Registered: 2012-06-26
Posts: 19

Re: [SOLVED] Can Not Switch Virtual Terminals Using Keyboard Shortcuts

@DSpider I was not using the Fn key.
@PReP Thanks for the suggestion, I'll give it a try. And yes I am on a laptop.

Offline

#8 2012-06-26 22:51:41

thesequel
Member
Registered: 2012-06-26
Posts: 19

Re: [SOLVED] Can Not Switch Virtual Terminals Using Keyboard Shortcuts

The Fn suggestion didn't work (c wut i did thar).

But maybe my keyboard isn't mapped correctly. How can I check what my keyboard is sending to my computer. I know I can check this while running X by running the xev command. Is there a way for me to get information similar to xev's output, but from init 3?

EDIT: The equivalent of xev is showkey.

I compared the keycodes of F1-12 from X to the keycodes of F1-12 while in console.

CONSOLE:
F1-10 keycodes are 59-68
F11 and F12's keycodes are 87 and 88

X:
F1-F10 keycodes are 67-76
F11 and F12 are 95 and 96

Does anyone know if this discrepancy might be what is causing me problems? Could someone please post a dump of the output of showkey of the function keys while in a console?

UPDATE: This probably isn't the problem; I googled for a keycode table and the keycodes I get while in console are the correct values. I'm not sure what I should try next.

I found this in the output of xmodmap -pke

keycode  67 = F1 F1 F1 F1 F1 F1 XF86Switch_VT_1
keycode  68 = F2 F2 F2 F2 F2 F2 XF86Switch_VT_2
keycode  69 = F3 F3 F3 F3 F3 F3 XF86Switch_VT_3
keycode  70 = F4 F4 F4 F4 F4 F4 XF86Switch_VT_4
keycode  71 = F5 F5 F5 F5 F5 F5 XF86Switch_VT_5
keycode  72 = F6 F6 F6 F6 F6 F6 XF86Switch_VT_6
keycode  73 = F7 F7 F7 F7 F7 F7 XF86Switch_VT_7
keycode  74 = F8 F8 F8 F8 F8 F8 XF86Switch_VT_8
keycode  75 = F9 F9 F9 F9 F9 F9 XF86Switch_VT_9
keycode  76 = F10 F10 F10 F10 F10 F10 XF86Switch_VT_10

So apprently keycode 68 switches to tty2. According to showkey, that would be f10. I tried alt+f10, nothing happenned. At least I feel like I've made progress.

Another edit (this post is getting pretty long), I found this in my dumpkeys output:

keycode  59 = F1               F13              Console_13       F25             
        alt     keycode  59 = Console_1       
        control alt     keycode  59 = Console_1       
keycode  60 = F2               F14              Console_14       F26             
        alt     keycode  60 = Console_2       
        control alt     keycode  60 = Console_2       
keycode  61 = F3               F15              Console_15       F27             
        alt     keycode  61 = Console_3       
        control alt     keycode  61 = Console_3       
keycode  62 = F4               F16              Console_16       F28             
        alt     keycode  62 = Console_4       
        control alt     keycode  62 = Console_4       
keycode  63 = F5               F17              Console_17       F29             
        alt     keycode  63 = Console_5       
        control alt     keycode  63 = Console_5       
keycode  64 = F6               F18              Console_18       F30             
        alt     keycode  64 = Console_6       
        control alt     keycode  64 = Console_6       
keycode  65 = F7               F19              Console_19       F31             
        alt     keycode  65 = Console_7       
        control alt     keycode  65 = Console_7       
keycode  66 = F8               F20              Console_20       F32             
        alt     keycode  66 = Console_8       
        control alt     keycode  66 = Console_8       
keycode  67 = F9               F21              Console_21       F33             
        alt     keycode  67 = Console_9       
        control alt     keycode  67 = Console_9       
keycode  68 = F10              F22              Console_22       F34             
        alt     keycode  68 = Console_10      
        control alt     keycode  68 = Console_10      

Last edited by thesequel (2012-06-27 00:11:08)

Offline

#9 2012-06-27 00:51:49

thesequel
Member
Registered: 2012-06-26
Posts: 19

Re: [SOLVED] Can Not Switch Virtual Terminals Using Keyboard Shortcuts

So, after rage-rebooting, I tried PReP's suggestion again. And it worked. This pissed me off way too much. Fucking solved ._.

I also noticed that only the alt button on the left side of the keyboard lets me switch terminals.

Last edited by thesequel (2012-06-27 01:13:39)

Offline

#10 2012-06-27 07:32:02

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: [SOLVED] Can Not Switch Virtual Terminals Using Keyboard Shortcuts

That's because the right Alt is called "Alt Gr". The combination is "Ctrl+Alt+F1", and not "Ctrl+Alt Gr+F1".

http://wiki.answers.com/Q/What_is_the_d … n_keyboard
http://en.wikipedia.org/wiki/AltGr_key


Xev reports:

Alt - keycode 64
Alt Gr - keycode 108

I guess it varies, depending on the keyboard.


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

Board footer

Powered by FluxBB