Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 335934 - bad keyboard mappings in display managers
Summary: bad keyboard mappings in display managers
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-04 09:18 UTC by jody
Modified: 2010-09-11 17:57 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge_info.txt,4.53 KB, text/plain)
2010-09-04 09:25 UTC, jody
Details
xorg.conf (xorg.conf,3.55 KB, text/plain)
2010-09-10 22:12 UTC, jody
Details
Xorg.0.log (Xorg.0.log,14.34 KB, text/plain)
2010-09-10 22:13 UTC, jody
Details
/etc/hal/fdi/policy/10-x11-input.fdi (10-x11-input.fdi,884 bytes, text/plain)
2010-09-10 22:14 UTC, jody
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jody 2010-09-04 09:18:05 UTC
Hi
This is probably the same as bug 317383 :
- after the keyboard settings are read, the keyboard behaves correctly (in the console).
- in the gnome login-screen, the keyboard behaves as if it were a us (qwerty) instead of swiss-german (qwertz)
- after login in gnome, the keyboard is working correctly again.

I tried the modified ebuild for libXi in comment #7 of bug 317383, as well as a modification of the gdm/Init/Default file from a poster on the gentoo forum (http://forums.gentoo.org/viewtopic-p-6410672.html#6410672)
I also installed the masked libXi 1.3.1, to no avail.
I didn't apply the patches suggested in comment #4 of bug 317383 because i don't know how this is done - i would like to try the patch.  can you tell me how i can safely apply it?

Thank You
  Jody
Comment 1 jody 2010-09-04 09:25:17 UTC
Created attachment 245941 [details]
emerge --info
Comment 2 Pacho Ramos gentoo-dev 2010-09-06 13:20:43 UTC
(In reply to comment #0)
> Hi
> This is probably the same as bug 317383 :
> - after the keyboard settings are read, the keyboard behaves correctly (in the
> console).
> - in the gnome login-screen, the keyboard behaves as if it were a us (qwerty)
> instead of swiss-german (qwertz)
> - after login in gnome, the keyboard is working correctly again.
> 
> I tried the modified ebuild for libXi in comment #7 of bug 317383, as well as a
> modification of the gdm/Init/Default file from a poster on the gentoo forum
> (http://forums.gentoo.org/viewtopic-p-6410672.html#6410672)
> I also installed the masked libXi 1.3.1, to no avail.
> I didn't apply the patches suggested in comment #4 of bug 317383 because i
> don't know how this is done - i would like to try the patch.  can you tell me
> how i can safely apply it?
> 

I explained it in http://bugs.gentoo.org/show_bug.cgi?id=317383#c7

But since it didn't seem to work for you, I don't know how could this be solved :-/, from when are you getting this failure?

Are you using gdm? What version?
Comment 3 jody 2010-09-06 16:47:49 UTC
I am not sure what you mean by "from when"...

I freshly installed gentoo and gnome with the settings visible in emerge --info.
Yes, I am using gnome-base/gdm 2.20.11.

Is there perhaps a log file which can show what is happening?

jody
Comment 4 Pacho Ramos gentoo-dev 2010-09-07 11:24:59 UTC
Do you get a proper keymap when using xdm or kdm instead?
Comment 5 jody 2010-09-07 19:26:37 UTC
I emerged xdm and tried it,
but i still have the bad keymapping at login.

I didn't try kdm, because i don't want to install
all the kde stuff.
Comment 6 Pacho Ramos gentoo-dev 2010-09-07 20:28:30 UTC
This looks to point to a X issue
Comment 7 Rémi Cardona (RETIRED) gentoo-dev 2010-09-08 07:19:21 UTC
This is a configuration issue: by default, X will set the keyboard with a US layout, unless you override it somehow.

Thus you need to tell your xorg.conf that you want another layout. Depending on whether you use HAL or not, there are various ways to change the default layout[1][2].

Once you've done this, GDM should have the correct layout, and then you can remove all your custom keyboard settings from your gnome session.

Thanks

[1] http://www.gentoo.org/proj/en/desktop/x/x11/xorg-server-1.5-upgrade-guide.xml
[2] http://www.gentoo.org/proj/en/desktop/x/x11/xorg-server-1.6-upgrade-guide.xml
Comment 8 jody 2010-09-09 19:11:51 UTC
@Remi:
I don't really understand. I am using HAL and i have a fdi-file which gives me a correct keyboar mapping once i am insode gnome. Also i have set my conf.d/keymap to give a correct keymap in th console. But in the links you provide i see no mention of anything that goes beyond that. Or have i missed something?

I have installed x11-drivers/xf86-input-evdev-2.4.0 and x11-base/xorg-drivers 1.7.

Comment 9 Rémi Cardona (RETIRED) gentoo-dev 2010-09-09 21:03:33 UTC
(In reply to comment #8)
> @Remi:
> I don't really understand. I am using HAL and i have a fdi-file which gives me
> a correct keyboar mapping once i am insode gnome.

Nope, a proper HAL config should already be working when GDM pops up. Or even no desktop environment.

Please head over to gnome's "Keyboard" preference panel, and reset the layout using the "Default" button. You should see how your keyboard is *really* configured.

> Also i have set my
> conf.d/keymap to give a correct keymap in th console. But in the links you
> provide i see no mention of anything that goes beyond that. Or have i missed
> something?

conf.d/keymap only changes the console keymap and has absolutely nothing to do with Xorg whatsoever.

You need to properly set up Xorg. /var/log/Xorg.0.log is a good place to start, it should tell you what Xorg is really seeing.

Thanks
Comment 10 jody 2010-09-10 12:52:24 UTC
When i open the keyboard preferences, it shows only "Switzerland German, eliminate dead keys". When i press "Reset to Defaults" only USA" is visible (and "Switzerland German..." disappears

In Xorg.0.conf i found:
(II) Cannot locate a core pointer device.
(II) Cannot locate a core keyboard device.
(II) The server relies on HAL to provide the list of input devices.
        If no devices become available, reconfigure HAL or disable AutoAddDevice
s.
and later (actually 5 times, after various other things) : 
(**) Option "xkb_rules" "evdev"
(**) Option "xkb_model" "evdev"
(**) Option "xkb_layout" "us"

So i guess this is the problem.
But where do i set the correct xkbd. Because i use hal, i removed the "Keyboard" (and "Mouse") sections. But it would be in there that i could do 
    Option     "XkbLayout"     "de"
    Option     "XkbVariant"    "nodeadkeys"

Comment 11 Rémi Cardona (RETIRED) gentoo-dev 2010-09-10 17:25:43 UTC
sigh...

Please attach your FULL xorg.conf and Xorg.0.log.

It'd be nice if you could even *try* reading the links I gave you and the more general Gentoo Desktop Handbook...
Comment 12 jody 2010-09-10 22:12:50 UTC
Created attachment 246767 [details]
xorg.conf
Comment 13 jody 2010-09-10 22:13:27 UTC
Created attachment 246768 [details]
Xorg.0.log
Comment 14 jody 2010-09-10 22:14:02 UTC
Created attachment 246770 [details]
/etc/hal/fdi/policy/10-x11-input.fdi
Comment 15 jody 2010-09-10 22:20:33 UTC
I really read the links you sent me.
In the first link in section 2 they tell about the fdi file, which i have already created.
In the second link they tell how to set Alt-Backspace to terminate X,
which i did not think to be relevant for me.

But thank you for having patience with me.
Comment 16 Chí-Thanh Christopher Nguyễn gentoo-dev 2010-09-11 00:11:18 UTC
    Option "AllowEmptyInput" "true"
    Option "AutoAddDevices" "true"
    Option "AutoEnableDevices" "true"
Those options can cause problems. Don't use them if input devices are to be enumerated by hal. Actually, you better get rid of your xorg.conf except for the device section (or generate a new one with nvidia-xconfig).
Comment 17 Rémi Cardona (RETIRED) gentoo-dev 2010-09-11 07:27:22 UTC
Like Chí-Thanh said, remove those options from your xorg.conf.

You should also use "lshal" to make sure your keyboard correctly picks up options from your fdi files. This is definitely not an X misconfiguration, but a HAL one.

Cheers
Comment 18 jody 2010-09-11 17:57:12 UTC
Hi all

Thank you for your comments.
I deleted the lines you mentioned, 
and even did a new xorg.conf as suggested,
but the behaviour is still the same (bad keyboard at login, ok afterwards).

lshal showed that HAL doesn't get what i say in
 /etc/hal/fdi/policy/10-x11-input.fdi
(i.e. layout "ch" and variant "de_nodeadkeys"):

  input.product = 'AT Translated Set 2 keyboard'  (string)
  input.x11_driver = 'evdev'  (string)
  input.xkb.layout = 'us'  (string)
  input.xkb.model = 'evdev'  (string)
  input.xkb.rules = 'base'  (string)
  input.xkb.variant = ''  (string)

So, I'll have to find out now why HAL ignores my fdi file.

Thanks again and sorry for the trouble.
  jody