Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Keymap not correctly loaded on X startup
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
Nsd
n00b
n00b


Joined: 22 May 2005
Posts: 27

PostPosted: Mon Jul 28, 2008 1:28 pm    Post subject: Keymap not correctly loaded on X startup Reply with quote

Hi!
I've just installed a new Gentoo system on a laptop. My keymap (fr - french) seems not correctly loaded at X startup (in console mode the french keymap is loaded and works fine)... I had the same problem on an other laptop, and had no time to fix it... (I used kcontrol to set keymap, but it was only loaded after kde start...)
Here is what's in my /etc/X11/xorg.conf :
Code:
...
Section "InputDevice"
    Identifier  "Keyboard1"
    Driver      "kbd"
    Option "AutoRepeat" "500 30"
    Option "XkbRules"   "xorg"
    Option "XkbModel" "pc104"
    Option "XkbLayout"  "fr"
EndSection
....

Is there an other file to edit?
Thanks!
Back to top
View user's profile Send private message
sphinx
n00b
n00b


Joined: 28 Jul 2008
Posts: 1

PostPosted: Mon Jul 28, 2008 3:57 pm    Post subject: Reply with quote

I think that you forget to set the system keymap to "fr".
Edit the /etc/conf.d/keymaps file, and put fr in this section :
Code:
KEYMAP="fr"
.

That should work.
Back to top
View user's profile Send private message
Nsd
n00b
n00b


Joined: 22 May 2005
Posts: 27

PostPosted: Mon Jul 28, 2008 4:05 pm    Post subject: Reply with quote

Thanks... No, KEYMAP ist set to fr in /etc/conf.d and keymap is correctly loaded in console mode, so /etc/init.d/keymaps do its job...
Back to top
View user's profile Send private message
nixnut
Bodhisattva
Bodhisattva


Joined: 09 Apr 2004
Posts: 10974
Location: the dutch mountains

PostPosted: Mon Jul 28, 2008 5:13 pm    Post subject: Reply with quote

Moved from Installing Gentoo to Desktop Environments.
Not about getting gentoo installed, so moved here.
_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered

talk is cheap. supply exceeds demand
Back to top
View user's profile Send private message
anz
Apprentice
Apprentice


Joined: 05 Feb 2003
Posts: 279
Location: Vienna

PostPosted: Tue Jul 29, 2008 7:47 am    Post subject: Reply with quote

same troube here - starting kde or another X11-wm and the keybord definition in xorg.conf is ignored - here mine:
Code:
Section "InputDevice"
        Identifier      "Keyboard0"
        Driver  "kbd"
        Option  "CoreKeyboard"
        Option  "XkbRules" "xorg"
        Option  "XkbModel" "pc105"
        Option  "XkbVariant" ",winkeys"
        Option  "XkbLayout"  "de"
EndSection


the /etc/conf.d/keymap
Code:
KEYMAP="de-latin1-nodeadkeys"
SET_WINDOWKEYS="no"
EXTENDED_KEYMAPS="backspace keypad euro"
DUMPKEYS_CHARSET=""


interesting the output of the Xorg.0.log:
more /var/log/Xorg.0.log | grep XkbLay
Code:
(**) Option "XkbLayout" "de"
(**) Keyboard0: XkbLayout: "de"
(**) Option "XkbLayout" "us"
(**) Option "XkbLayout" "us"

... seems that something is overwritten (where the hell is the question mark on that germanenglished keyboard)

Normal text console - without X11 - works with the de-keymap as defined in the /etc/conf.d/keymap
_________________
Greetings from Vienna
Back to top
View user's profile Send private message
xenon
Guru
Guru


Joined: 25 Dec 2002
Posts: 432
Location: Europe

PostPosted: Tue Jul 29, 2008 8:04 am    Post subject: Reply with quote

I believe you guys met another HAL - Xorg issue: config files are increasingly ignored in favor of automagical work by HAL which (as of now) is no too magical nor "auto". Anyway, take a look at this, for example: HAL 0.5.10 keyboard layout.
Back to top
View user's profile Send private message
anz
Apprentice
Apprentice


Joined: 05 Feb 2003
Posts: 279
Location: Vienna

PostPosted: Tue Jul 29, 2008 8:28 am    Post subject: Reply with quote

Thanks, Dear xenon,

hmm - now I put a following into the (empty) file /etc/hal/fdi/policy/10-x11-input.fdi

Code:
<?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- -->
<match key="info.capabilities" contains="input.keyboard">
        <merge key="input.x11_driver" type="string">keyboard</merge>
        <merge key="input.xkb.layout" type="string">de<merge>
        <merge key="input.xkb.model" type="string">pc105</merge>
        <merge key="input.xkb.rules" type="string">xorg</merge>
</match>


rebooted - same result - no german keymap with kde
(the lenovo/ibm track point is also not working correctly)
_________________
Greetings from Vienna
Back to top
View user's profile Send private message
VoidMage
Watchman
Watchman


Joined: 14 Oct 2006
Posts: 6196

PostPosted: Tue Jul 29, 2008 9:45 am    Post subject: Reply with quote

The answer is simple: those settings are incorrect.
Quoting you, it should be:

Code:

<?xml version="1.0" encoding="UTF-8"?>
<deviceinfo version="0.2">
  <device>
    <match key="info.capabilities" contains="input.keys">
        <merge key="input.xkb.layout" type="string">de<merge>
        <merge key="input.xkb.rules" type="string">evdev</merge>
    </match>
  </device>
</deviceinfo>


well, at least something very similar works for me.
Encoding change may not be needed, I simply like to keep it that way.
Back to top
View user's profile Send private message
Nsd
n00b
n00b


Joined: 22 May 2005
Posts: 27

PostPosted: Tue Jul 29, 2008 10:48 am    Post subject: Reply with quote

Hal was the problem! Now it works, my keymap is correctly loaded in KDM!
Thanks a lot!

It could be a good idea to document this in the Xorg Howto no?
Back to top
View user's profile Send private message
anz
Apprentice
Apprentice


Joined: 05 Feb 2003
Posts: 279
Location: Vienna

PostPosted: Tue Jul 29, 2008 2:13 pm    Post subject: Reply with quote

hmm - hal file edited, but it does not work.

Here some interesting lines of Xorg.0.log:

here the part from the xorg.conf(?)
Code:
...
(II) intel(0): Setting screen physical size to 246 x 185
(**) Option "CoreKeyboard"
(**) Keyboard0: always reports core events
(**) Option "Protocol" "standard"
(**) Keyboard0: Protocol: standard
(**) Option "AutoRepeat" "500 30"
(**) Option "XkbRules" "xorg"
(**) Keyboard0: XkbRules: "xorg"
(**) Option "XkbModel" "pc105"
(**) Keyboard0: XkbModel: "pc105"
(**) Option "XkbLayout" "de"
(**) Keyboard0: XkbLayout: "de"
(**) Option "XkbVariant" ",winkeys"
(**) Keyboard0: XkbVariant: ",winkeys"
(**) Option "CustomKeycodes" "off"
(**) Keyboard0: CustomKeycodes disabled
(**) Option "Protocol" "ExplorerPS/2"
(**) PS/2 Mouse: Device: "/dev/input/mice"
(**) PS/2 Mouse: Protocol: "ExplorerPS/2"
(**) Option "AlwaysCore"
(**) PS/2 Mouse: always reports core events
(**) Option "Device" "/dev/input/mice"
(**) Option "Emulate3Buttons" "on"
(**) Option "Emulate3Timeout" "50"
(**) PS/2 Mouse: Emulate3Buttons, Emulate3Timeout: 50
(**) Option "ZAxisMapping" "4 5"
(**) PS/2 Mouse: ZAxisMapping: buttons 4 and 5
(**) Option "EmulateWheel" "on"
...


and here the overwritten lines by the hal file
Code:
...
(II) LoadModule: "evdev"
(II) Loading /usr/lib/xorg/modules/input//evdev_drv.so
(II) Module evdev: vendor="X.Org Foundation"
        compiled for 1.4.2, module version = 1.1.0
        Module class: X.Org XInput Driver
        ABI class: X.Org XInput driver, version 2.0
(II) evdev brain: Rescanning devices (1).
(**) ThinkPad Extra Buttons-thinkpad_acpi/input0: always reports core events
(**) Option "XkbModel" "evdev"
(**) Option "XkbLayout" "us"
(II) XINPUT: Adding extended input device "ThinkPad Extra Buttons-thinkpad_acpi/input0" (type: KEYBOARD)
(II) ThinkPad Extra Buttons-thinkpad_acpi/input0: Init
(II) ThinkPad Extra Buttons-thinkpad_acpi/input0: On
(II) evdev brain: Rescanning devices (2).
(**) TPPS/2 IBM TrackPoint-isa0060/serio1/input0: always reports core events
(II) TPPS/2 IBM TrackPoint-isa0060/serio1/input0: Found 2 relative axes.
(II) TPPS/2 IBM TrackPoint-isa0060/serio1/input0: Configuring as pointer.
(II) TPPS/2 IBM TrackPoint-isa0060/serio1/input0: Found 3 mouse buttons
(**) TPPS/2 IBM TrackPoint-isa0060/serio1/input0: Configuring 2 relative axes.
(II) TPPS/2 IBM TrackPoint-isa0060/serio1/input0: Configured 3 mouse buttons
(II) XINPUT: Adding extended input device "TPPS/2 IBM TrackPoint-isa0060/serio1/input0" (type: MOUSE)
(**) TPPS/2 IBM TrackPoint-isa0060/serio1/input0: 2 valuators.
(**) evdev_btn.c (166): Registering 3 buttons.
(II) TPPS/2 IBM TrackPoint-isa0060/serio1/input0: Init
(II) TPPS/2 IBM TrackPoint-isa0060/serio1/input0: On
(II) evdev brain: Rescanning devices (3).
(**) AT Translated Set 2 keyboard-isa0060/serio0/input0: always reports core events
(**) Option "XkbModel" "evdev"
(**) Option "XkbLayout" "us"
(II) XINPUT: Adding extended input device "AT Translated Set 2 keyboard-isa0060/serio0/input0" (type: KEYBOARD)
...


... which results in a us keyboard layout ...

... i am searching around ...

here soma further information:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=465810

I will emerge xorg-server with USE="-hal" to avoid that great hal-hell-nightmare ...
_________________
Greetings from Vienna
Back to top
View user's profile Send private message
anz
Apprentice
Apprentice


Joined: 05 Feb 2003
Posts: 279
Location: Vienna

PostPosted: Tue Jul 29, 2008 3:43 pm    Post subject: Reply with quote

Aha - in the directory
/usr/share/hal/fdi/policy/10osvendor/
there are alots example fdi files. I copied 10-keymap.fdi
to /etc/hal/fdi/policy
edited the layout line to "de":
Code:
<merge key="input.xkb.layout" type="string">de</merge>

rebooted - and de layout works again ...
... now i have to gamble around with the track ball and the ibm/lenovo keys (i habe a nice x61) ...

and here the working 10-keymap.fdi
Code:
<?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- -->
<deviceinfo version="0.2">
  <device>
    <match key="info.capabilities" contains="input.keymap">
      <append key="info.callouts.add" type="strlist">hal-setup-keymap</append>
    </match>

    <match key="info.capabilities" contains="input.keys">
      <merge key="input.xkb.rules" type="string">base</merge>

      <!-- If we're using Linux, we use evdev by default (falling back to
           keyboard otherwise). -->
      <merge key="input.xkb.model" type="string">keyboard</merge>
      <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
             string="Linux">
        <merge key="input.xkb.model" type="string">evdev</merge>
      </match>

      <merge key="input.xkb.layout" type="string">de</merge>
      <merge key="input.xkb.variant" type="string" />
    </match>
  </device>
</deviceinfo>


There are some more usefull example fdi files in:
/usr/share/hal/fdi/information/

(why using that ugly xml instead of the xorg.conf?)
_________________
Greetings from Vienna


Last edited by anz on Wed Jul 30, 2008 8:48 am; edited 2 times in total
Back to top
View user's profile Send private message
albright
Advocate
Advocate


Joined: 16 Nov 2003
Posts: 2588
Location: Near Toronto

PostPosted: Tue Jul 29, 2008 4:19 pm    Post subject: Reply with quote

Quote:
(why using that ugly xml instead of the xorg.conf?)


It's the new linux way - I understand the long term goal
is to duplicate all the qualities of the windows registry :twisted:
_________________
.... there is nothing - absolutely nothing - half so much worth
doing as simply messing about with Linux ...
(apologies to Kenneth Graeme)
Back to top
View user's profile Send private message
anz
Apprentice
Apprentice


Joined: 05 Feb 2003
Posts: 279
Location: Vienna

PostPosted: Tue Jul 29, 2008 4:25 pm    Post subject: Reply with quote

another question:
is it necessary to add the following line in the /etc/X11/xorg.conf
in the Section "ServerFlags":
Code:
Option  "AutoEnableDevices" "True"

to get a working x11-hal?

Sorry for that silly question ... i found that somewhere in a forum ...
_________________
Greetings from Vienna
Back to top
View user's profile Send private message
anz
Apprentice
Apprentice


Joined: 05 Feb 2003
Posts: 279
Location: Vienna

PostPosted: Tue Jul 29, 2008 7:47 pm    Post subject: Reply with quote

aehem - and another question:
i am using kdm - when closing a kde session, the system should go to the kdm-screen. But instead of that, it stalls ... the only i can see is a black screen and a not movable mouse courser ... only to do is to restart the computer.
_________________
Greetings from Vienna
Back to top
View user's profile Send private message
VoidMage
Watchman
Watchman


Joined: 14 Oct 2006
Posts: 6196

PostPosted: Tue Jul 29, 2008 8:39 pm    Post subject: Reply with quote

That may be graphic card related.
Any chance you're using ati-drivers ?
Back to top
View user's profile Send private message
anz
Apprentice
Apprentice


Joined: 05 Feb 2003
Posts: 279
Location: Vienna

PostPosted: Tue Jul 29, 2008 8:52 pm    Post subject: Reply with quote

Dear VoidMage,

Quote:
That may be graphic card related.
Any chance you're using ati-drivers ?

No - the "only" changes where the hal updates and using the 10-keymap.fdi from the example directory.

My notebook has a 965GM graphic card, which works with the kernel module i915 very well:
Code:
glxinfo | grep render
direct rendering: Yes
OpenGL renderer string: Mesa DRI Intel(R) 965GM 4.1.3002 x86/MMX/SSE2

I am using following kernel:
2.6.24-tuxonice-r9

... I will reemerge every (kde) package that has a USE="hal" flag ... may be ...

The strange is, that there is no error message in the kdm.log nor in the Xorg.0.log ...
after "ending the current session" kdm tries to restart and the xorg hangs ... only pressing the shutdown button works.
But after killing the X-session (kde) with Strg-Alt-Entf (Ctr-Alt-Del) kdm still goes on with the login screen.

I think something between the xorg.conf and the new hal does not work (deleting the fdi file does not help)
_________________
Greetings from Vienna
Back to top
View user's profile Send private message
anz
Apprentice
Apprentice


Joined: 05 Feb 2003
Posts: 279
Location: Vienna

PostPosted: Wed Jul 30, 2008 10:20 am    Post subject: Reply with quote

its getting more strange ...
... i have remarked all input devices from the xorg.conf and after rebooting searching for XkbLayout in the Xorg.0.log
gives:
Code:
   more /var/log/Xorg.0.log | grep XkbLay
(**) Option "XkbLayout" "us"
(**) <default keyboard>: XkbLayout: "us"
(**) Option "XkbLayout" "de"
(**) Option "XkbLayout" "de"

... why (and from which process - ?xorg?) the <default keyboard> is set, which is overwritten by hal?

And - surprise, surprise - resuming after hibernate is not working (worked before with the old hal version). It stalls when trying to start xorg - similar to the problem with kdm above.
_________________
Greetings from Vienna
Back to top
View user's profile Send private message
anz
Apprentice
Apprentice


Joined: 05 Feb 2003
Posts: 279
Location: Vienna

PostPosted: Wed Jul 30, 2008 11:03 am    Post subject: Reply with quote

ok - lets finalize:

    *) hal - track point: I really do not know, how to generate a fdi for it.
    *) kdm does not restart after closing a kde session (xorg hangs)
    *) resuming after hibernate does not work - only pressing the restart button helps (resuming after suspeding to ram works),
    after putting ehci_hcd in the /etc/hibernate/blacklisted-module xorg does not stall, but resuming is ignored - the system restarts normally


emerging xorg-server without hal - and everything is working again.
(very very frustrating)
_________________
Greetings from Vienna
Back to top
View user's profile Send private message
albright
Advocate
Advocate


Joined: 16 Nov 2003
Posts: 2588
Location: Near Toronto

PostPosted: Wed Jul 30, 2008 11:42 am    Post subject: Reply with quote

I have very similar problems as Anz. After emerging the
new hal:

removing a usb mouse crashes KDE - returns to KDM greeter
keymaps is modified so that xbindkeys won't function (If
I use xmodmap, it works once then returns errors)
exiting KDE crashes X hard (need sysrq reboot)

Reverting to old hal and everything works.

Incidentally, putting a non-empty 10-x11-input.fdi
(as per other posts) does not fix the problem. (Also,
when installing the new hal it "installs" an empty
10-x11-input.fdi file).
_________________
.... there is nothing - absolutely nothing - half so much worth
doing as simply messing about with Linux ...
(apologies to Kenneth Graeme)
Back to top
View user's profile Send private message
VoidMage
Watchman
Watchman


Joined: 14 Oct 2006
Posts: 6196

PostPosted: Wed Jul 30, 2008 1:50 pm    Post subject: Reply with quote

As I stated in many other posts, when using hal/evdev,
relevant (for keyboard) is not xorg.conf, but the output of
`hal-device <device name>` on devices listed by `hal-find-by-capability --capability input.keys`

For reference, my packages:
sys-apps/hal-0.5.11
app-misc/hal-info-20080508
x11-base/xorg-server-1.4.2
x11-drivers/xf86-input-evdev-1.2.0

but I have only a simple PS2 mouse and a standard keyboard
and I don't use hibernate.
Though, IIRC, I read awhile something on xorg mailing list about similar freezes (but no solution).
One more thing, right now it's only possible to setup keyboard with fll options using only hal,
but the git of xorg-server shows, that in 1.5 they added possibility to pass other options
through fdi files.
I think that some of the commits listed here may help with the hibernate crash
(starting with '2008-01-28 Peter Hutterer config: add a debug message'), earlier are already in 1.4.2).
Back to top
View user's profile Send private message
anz
Apprentice
Apprentice


Joined: 05 Feb 2003
Posts: 279
Location: Vienna

PostPosted: Wed Jul 30, 2008 3:42 pm    Post subject: Reply with quote

just played alittle bit with xorg-server and USE="hal" with hibernating.

When trying to resume the system crashes while trying to load the tuxonice-fbsplash ... after reemerging xorg-server with hal flag, switching to another desktop breakes xorg starting (as usual).
(I also renamed the xorg.conf to see what the autoconfiguration does - it does not find the graphic card.)

Thanks alot for the link!!!
_________________
Greetings from Vienna


Last edited by anz on Thu Jul 31, 2008 11:43 am; edited 1 time in total
Back to top
View user's profile Send private message
punloh
n00b
n00b


Joined: 29 Mar 2008
Posts: 23

PostPosted: Wed Jul 30, 2008 4:20 pm    Post subject: Reply with quote

Option "AutoAddDevices" "False" in the ServerFlags section helps with the xorg-hall-hell making xorg obey the xorg.conf. Credit goes to http://www.opennet.ru/tips/info/1628.shtml
Back to top
View user's profile Send private message
VoidMage
Watchman
Watchman


Joined: 14 Oct 2006
Posts: 6196

PostPosted: Wed Jul 30, 2008 5:04 pm    Post subject: Reply with quote

"AutoAddDevices" "False" is not really a solution for
usb keyboard/mouse users.
As it goes for autoconfiguration, try `Xorg -configure`,
and add your grafic card options to the generated file (as those need to be changed in most cases).

Please, specify: is that crash you're talking about happening during restoring the console or xserver ?
Back to top
View user's profile Send private message
anz
Apprentice
Apprentice


Joined: 05 Feb 2003
Posts: 279
Location: Vienna

PostPosted: Wed Jul 30, 2008 6:26 pm    Post subject: Reply with quote

Quote:
Please, specify: is that crash you're talking about happening during restoring the console or xserver ?

During restoring the xserver - I will test it tomorrow again to be sure and update here.

---Update---
resuming after hibernate without x11 works (with USE="hal" emerge xorg-server) - so restoring the console works.
_________________
Greetings from Vienna
Back to top
View user's profile Send private message
albright
Advocate
Advocate


Joined: 16 Nov 2003
Posts: 2588
Location: Near Toronto

PostPosted: Wed Jul 30, 2008 10:41 pm    Post subject: Reply with quote

For what it is worth, I too found that building xorg-server
without hal support solved the keymap, usb mouse unplugging,
kde exit problems ...

but the system won't recover from hibernation.

Reverting to old hal, and xorg-server with hal support solves
*all* problems (i.e. hibernation works again as it should).

But from the lack of posts about this, it seems that it is
rare for there be new-hal problems. Maybe my notebook
is just getting too old ... :?
_________________
.... there is nothing - absolutely nothing - half so much worth
doing as simply messing about with Linux ...
(apologies to Kenneth Graeme)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum