Bug 214026

Summary: When multiple keyboard layouts specified in xorg.conf it is not possible to switch to console
Product: [Fedora] Fedora Reporter: Adam Pribyl <covex>
Component: xkeyboard-configAssignee: Kristian Høgsberg <krh>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 6CC: cervajs, eduard.vopicka, lkundrak, mcepl, mcepl, vasekd, xgl-maint
Target Milestone: ---Keywords: EasyFix, Patch
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-12-10 09:55:49 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Adam Pribyl 2006-11-04 20:27:53 UTC
Description of problem:
After installation of FC6 I add second keyboard layout to 
Section "InputDevice"                                                          
                                             
        Identifier  "Keyboard0"                                                
                                             
        Driver      "kbd"                                                      
                                             
        Option      "XkbModel" "pc105"                                         
                                             
#        Option      "XkbLayout" "us"                                          
                                              
       Option "XkbLayout" "us, cz_qwerty"                                      
                                            
                                                                               
                                           EndSection

But this causes that when you restart Xorg you can not switch to console thru
Ctrl+Atl+F1 etc.

Setting back single layout, switching to console works fine.


Version-Release number of selected component (if applicable):
xorg-x11-drv-keyboard-1.1.0-2.1

How reproducible:
always

Steps to Reproduce:
1. Change XkbLayout to "us, cz_qwerty" 
2. Ctrl+Alt+Backspace to restart X
3. Try to switch to console with Ctrl+Alt+F1
  
Actual results:
Nothing happens.

Expected results:
Should switch like usuall.

Additional info:

Comment 1 Adam Pribyl 2006-11-11 20:54:22 UTC
This is valid when on login screen. When I start gnome desktop I can not switch
to console anymore again. Opening gnome-terminal and pressing Ctrl+Alt+F1 shows
letter "P", F2 is "Q" etc. I really do not understand what's going on..

Comment 2 Adam Pribyl 2006-11-18 13:19:01 UTC
I found today that when multiple layouts are defined it is also not possible to
use Alt+<something> shortcuts in xterm with any application (e.g. mc)

How to reproduce:
1. set multiple kbd layouts
2. xinit 
3. start mc in xterm, try to press e.g. Alt+s

nothing happens.

If you remove multiple layouts, everything works OK.


Comment 3 Jiri Hodal - Monte 2006-12-07 07:21:23 UTC
I am using multiple keyboards too. If I moved the "US English" (in Gnome
settings of keyboard layout) from top (1st position) down (to other position),
switching to the console started work fine immediatly (without X restart!).

Comment 4 Eduard Vopicka 2006-12-13 07:53:45 UTC
I can only confirm that the bug is still present in fully patched of 32 bit
version FC6 in P4 machine. The relevant section of xorg.conf is attached below.

I have just simply changed
        Option      "XkbLayout" "us"
to 
        Option      "XkbLayout" "us,cz"
        Option      "XkbVariant" ",qwerty"
has triggered the bug.

Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "kbd"
        Option      "CoreKeyboard"
        Option      "XkbModel" "pc105"
        Option      "XkbLayout" "us,cz"
        Option      "XkbVariant" ",qwerty"
        Option      "XkbOptions" "grp:shift_toggle,grp_led:scroll"
EndSection

Please consider to fix this ASAP. I have found a working workaround "chvt 1"
"chvt 2" etc. which works well for myself, but this is not adequate solution for
some of our users who are forced to use customized application-only desktop with
no xterm (and thus no chance to run "chvt 1"), but they like to swith to vty,
log in an run curses based aplication just on pure vty instead of in X-window.


Comment 5 cervajs 2007-01-18 14:38:36 UTC
i have same problem

Comment 6 Adam Pribyl 2007-01-29 16:01:46 UTC
I am just surprised that nobody is hitting this problem also for other
languages, but it is present and fairly easy to reproduce just by selecting ANY
second layout in gnome keyboard properties. Function that one want to switch to
console is one of the very used. This also has impact on Alt+something shortcuts
so you can not use e.g. keyboard shortcuts for desktop effects with AIGLX. Is
there any other bug about this?

Comment 7 Hedayat Vatankhah 2007-02-11 07:12:12 UTC
Hi,
well, yes. I've this problem too. When I use this settings:
Option "XkbLayout" "us,ir"
Option "XkbOptions" "grp:alt_shift_switch,grp:win_switch,grp_led:scroll"

Then, I cannot use Alt+Ctrl+Fx to switch to the text mode. Also, using Alt+Shift
either in the xorg.conf or in the Gnome keyboard settings causes the Alt key to
stop working!



Comment 8 Eduard Vopicka 2007-02-11 08:50:06 UTC
Hello!

Please is anyone working on this bug resolution?

With this bug improtant functions are not working !!!

Thank you,

Eduard Vopicka

Comment 9 Adam Pribyl 2007-02-12 07:39:37 UTC
I asked on fedoraforums if anybody is able to reproduce, but there was very weak
response:
http://forums.fedoraforum.org/showthread.php?t=146073&highlight=switch+console
saying it works. English/US guys are really not interested in this kind of
bugs.. as usuall. It may be, this is triggered by more than this. E.g. you need
to have also set LANG to anything else then en_US. 

As the only workaround that works for me is removing the keyboard definition
from xorg.conf, set keyboard in gnome menu and switch the order - shift your
layout to be first. Even if you leave the US as default, now default will be the
first layout. Another bug probably or I missunderstand the functionality of default.


Comment 10 Václav Dovrtěl 2007-02-26 09:33:35 UTC
You can repair this by change this file " /usr/share/X11/xkb/symbols/cz ".
Change there:
include "level3(ralt_switch)"
to
//    include "level3(ralt_switch)"
on line 77.

It help, but right alt switch modifikator will be not working.
It repair everything mentioned problems.


Comment 11 Václav Dovrtěl 2007-02-26 11:28:27 UTC
Excuse me, I fixed it without condition. (with working right alt modificator)
[Opravil jsem to tak, aby to fungovalo i s pravym alt, jako modifikatorem]

You must make change in file " /usr/share/X11/xkb/symbols/level3 "

change line 20:

modifier_map Mod5   { <RALT> };

to

modifier_map Mod5   { ISO_Level3_Shift };

and all will be function.....

!!! P.S. Don't make change in " /usr/share/X11/xkb/symbols/cz ". !!!
!!! Comment #10 is wrong, because right alt modificator will be not working.!!!

Comment 12 Adam Pribyl 2007-03-02 08:43:10 UTC
Confirming thid\s fix works for me. Are you sure it does not break anything
else? What this change means? Thnx.

Comment 13 Emil Jerabek 2007-03-02 10:50:56 UTC
(In reply to comment #11)

Man, you're a genius. I confirm it fixes the problem for me, and strangely
enough, it also fixes *another* problem which I've been struggling with
recently: numerical prefix arguments not working in xdvi.

Comment 14 Václav Dovrtěl 2007-03-02 10:58:10 UTC
(In reply to comment #12)
I'm not sure that this fix don't break anything else.

This fix means that you can't use right alt in second cz keyboard as ALT on LEVEL 1.
With this in cz keyboard right ALT is function only as AltGr.

But I  undergo this restriction when I'll have function cz keyboard, because I
don't use right Alt as an Alt on the LEVEL 1. 

For example when you want use right combination RALt+RShift to change keyboard,
don't make this change.

Comment 15 Lubomir Kundrak 2007-08-13 13:36:37 UTC
krh: Raising priority to high -- this substantially limits the usability of at
least czech/slovak national keyboard layouts. Any plans to fix this in meantime?

Comment 16 Hedayat Vatankhah 2007-09-10 22:35:14 UTC
Unfortunately, this problem still exists in Fedora 7!
And as I've said before, it does occur when using Iranian keyboard layout too.

This small problem is really annoying.

Finally, the suggested change in /usr/share/X11/xkb/symbols/level3 works for me
too. 

Comment 17 Matthias Clasen 2007-09-14 23:44:22 UTC
In the light of comment #14 it is probably best to file this bug upstream at
http:/bugs.freedesktop.org against xkeyboard-config to bring it to the attention
of svu.

Comment 18 Matěj Cepl 2007-09-21 16:00:46 UTC
Reporter, would you do the filing upstream described in comment 17, please?

Comment 20 Adam Pribyl 2007-09-24 10:30:38 UTC
In upstream they say it should be fixed at their side. Where is the problem
then? Is Fedora having own configuration? Could it be that this is because this
xkeyboard-config-0.8-7.fc6 RPM is still from FC6?

Comment 21 Eduard Vopicka 2007-09-24 16:49:04 UTC
Hello!

Upstream says:

> In ChangeLog:
> 
> 2006-10-16  Sergey Udaltsov
> 
>         * symbols/level3: assigning mods to keycodes (reverding earlier wrong
>         fix), closing https://bugs.freedesktop.org/show_bug.cgi?id=8670

"rpm -qi xkeyboard-config" on up-to-date F7 says:

Name        : xkeyboard-config             Relocations: (not relocatable)
Version     : 0.8                               Vendor: Red Hat, Inc.
Release     : 7.fc6                         Build Date: Fri 01 Sep 2006 12:55:41

If i correctly compare rpm's build date against bugfix date from upstream, .rpm
is older...

Now I am only curious if has been really fixed in upstream about one year ago.

Hope there will be new version of xkeyboard-config available soon for testing.


Comment 22 Kristian Høgsberg 2007-09-24 19:57:41 UTC
Is this solved by the rawhide version of xkeyboard-config? (1.0-1.rfc8)

Comment 23 Matěj Cepl 2007-09-24 20:56:33 UTC
Yes, exactly tried to reproduced reporter's original scenario with F7 (sorry, I
don't have FC6 handy) and package rebuild from Rawhide source rpm (you can find
it here http://koji.fedoraproject.org/koji/buildinfo?buildID=17902). The result
could be find on http://matej.ceplovi.cz/progs/rpms/xkeyboard* and I cannot
reproduce the reporter's problem here. Will try tomorrow with brew but could
somebody rebuild any of these src.rpm on FC6 and try it?

Comment 24 Eduard Vopicka 2007-09-24 23:01:05 UTC
keyboard-config-1.0-1.fc7.noarch.rpm downloaded from the above URL fixes
<Ctrl><Alt><Fn> (actually tested with F1-F10 annd F12, there are X on F11 )
problem for me on up-to-date F7. Here is an excerpt from my xorg.conf:

Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "kbd"
        Option      "CoreKeyboard"
        Option      "XkbModel" "pc105"
        Option      "XkbLayout" "us,cz"
        Option      "XkbVariant" ",qwerty"
        Option      "XkbOptions" "grp:shift_toggle,grp_led:scroll"
EndSection

I did not check if this fixes other problems mentioned herein. Especially not
for the Gnome part because of I am using fvwm.


Comment 25 Matěj Cepl 2007-09-25 07:50:24 UTC
Adam, are you able to reproduce this bug with the latest package from the above
URL (don't forget to remove your workaround from comment 10)? I have tried even
mc in xterm and it looks like working fine.

Comment 26 Lubomir Kundrak 2007-09-25 08:20:41 UTC
I tried xkeyboard-config-1.0-1 on both FC6 and FC7. My configuration was Slovak
QWERTY keyboard and default one, tried both possible orders in Gnome.

I can confirm it colved all the problems I was able to reproduce before
(Alt+Shift not working (though Shift+Alt was), switching VTs with Alt+Fx).

I was unable to reproduce problem mentioned in comment #2 even with the old
package. Probably Adam used Czech keyboard -- Adam: is this problem fixed by the
new package?

I didn't attempt to reproduce comment #6 problem (My wife's X server sits on DRI
and I can't restart it without agreeing with her :), though I can confirm I havd
the problem with the old package.

Thanks for the package, Kristian!

Comment 27 Adam Pribyl 2007-09-25 13:55:43 UTC
F7 confirming fixed. FC6 not yet tested. Does anybody checked the differences to
actual configuration, so this does not break anything else what users are used
to in Fedora?

Comment 28 Matěj Cepl 2007-09-25 14:41:03 UTC
Testing package for FC6 is available at
http://www.ceplovi.cz/matej/progs/rpms/xkeyboard-config-1.0-1.fc6.noarch.rpm

Comment 29 Lubomir Kundrak 2007-09-25 17:07:06 UTC
I confirm FC6 works alright (except for I couldn't test the xterm/mc issue, as
it worked for me even without the updated package).

Comment 30 Adam Jackson 2007-09-25 18:09:03 UTC
Removing from the F8 blocker list, since this appears to be resolved in rawhide.
 Presumably this bug is only still open for FC6 or F7 updates.

Comment 31 Lubomir Kundrak 2007-09-27 07:40:31 UTC
I have configured Shift+Ctrl+Alt+left and Shift+Ctrl+Alt+right in Gnome to
switch windows between workspaces. Seems like it does not work with the new
package. Anyone else observed such behavior? (FC7)

Comment 32 Adam Pribyl 2007-09-27 11:50:26 UTC
This is standard configuration and it works here OK (F7). What does it do in
terminal - Does it write a letters (ABCD)?


Comment 33 Lubomir Kundrak 2007-09-27 12:04:53 UTC
Ok, I've spotted the problem -- it's configuration specific; I use alt+shift as
keyboard switcher, and that prevents alt+shift+ctrl+arrow from working as
windows switcher.

Otherwise this update seems very fine.

Kristian: could you please proceed pushing for FC6 and FC7?

Comment 34 Lubomir Kundrak 2007-10-08 14:28:06 UTC
Kristian: Ping. What is the state od the updates?

Comment 35 Matěj Cepl 2007-12-10 09:21:34 UTC
Fedora Core 6 is no longer supported, could you please reproduce this with the
updated version of the currently supported distribution (Fedora 7, 8, or
Rawhide)? If this issue turns out to still be reproducible, please let us know
in this bug report. If after a month's time we have not heard back from you, we
will have to close this bug as CANTFIX.

Setting status to NEEDINFO, and awaiting information from the reporter.

[This is mass-filed message to all open Fedora Core 6 bugs related to Xorg or
Gecko. If you see any other reason, why this bug shouldn't be closed, please,
comment on it here.]

Comment 36 Lubomir Kundrak 2007-12-10 09:55:49 UTC
This is fixed in Fedora 8.