FS#12248 - "up" key invokes gnome-screenshot

Attached to Project: Arch Linux
Opened by Jarod Liu (jarod) - Wednesday, 26 November 2008, 14:07 GMT
Last edited by Jan de Groot (JGC) - Saturday, 06 December 2008, 11:55 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jan de Groot (JGC)
Architecture i686
Severity High
Priority Normal
Reported Version None
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 4
Private No

Details

Description:
My situation is identical to the link below:
https://bugs.launchpad.net/gnome-settings-daemon/+bug/255008/

This situation show up after a xserver package upgrade copule weeks ago. After that upgrade, my keyboard and mouse not work in X. Then, I install xf86-input-evdev package, my keyboard and mouse work again. But, from that time on, 'up' key mapped to screen print(invokes gnome-screenshot)

This task depends upon

Closed by  Jan de Groot (JGC)
Saturday, 06 December 2008, 11:55 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed in the latest version of xorg-server. Be sure to set your keyboard model to evdev when using the evdev driver, this is documented in the wiki now.
Comment by Pierre Schmitz (Pierre) - Wednesday, 26 November 2008, 14:39 GMT
I can confirm this. But this does only happen when using gdm and autologin. If you disable autologin (or don't use gdm) your keyboard should work as expected.
Comment by Jan de Groot (JGC) - Wednesday, 26 November 2008, 15:10 GMT
Is this problem still present with xkeyboard-config 1.4?
Comment by Jarod Liu (jarod) - Thursday, 27 November 2008, 00:39 GMT
@Pierre Schmitz
I think my situation worse. I just installed gdm, but I don't use it. I boot my machine in level 3, and run startx myself, the problem is there.
Comment by Jarod Liu (jarod) - Thursday, 27 November 2008, 00:49 GMT
@Jan de Groot
I think so. The xkeyboard-config package I installed is version 1.4.1(i686)
Comment by Jan de Groot (JGC) - Thursday, 27 November 2008, 09:26 GMT
When you go to system -> preferences -> keyboard, what does it list as model in the layout tab?
Comment by Jarod Liu (jarod) - Thursday, 27 November 2008, 11:36 GMT
Evdev-managed keyboard

And I tested both configuratins below in /etc/X11/xorg.conf, got the same result.

Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
EndSection

Section "InputDevice"
Identifier "Keyboard1"
Driver "evdev"
Option "evBits" "+1"
Option "keyBits" "~1-255 ~352-511"
Option "Pass" "3"
Option "Name" "AT Translated Set 2 keyboard"
Option "XkbModel" "evdev"
Option "XkbLayout" "us"
Option "1 2 3"
Option "AutoRepeat" "250 30"
EndSection
Comment by Jan de Groot (JGC) - Thursday, 27 November 2008, 11:55 GMT
input devices in xorg-server from testing are no longer taken from xorg.conf. If you didn't disable hotplugging, your kbd device is thrown away and the evdev device is likely to conflict with the autodetected one.
Comment by Lior David (liorda) - Thursday, 27 November 2008, 12:00 GMT
hi, I can confirm this one.

So what's the solution? :)
Comment by Jarod Liu (jarod) - Thursday, 27 November 2008, 13:26 GMT
you means I should remove all "InputDevice" sections and "InputDevice"s in ServerLayout section?
Comment by Jarod Liu (jarod) - Thursday, 27 November 2008, 13:59 GMT
My current xorg configuration file and log
Comment by Lior David (liorda) - Friday, 28 November 2008, 18:53 GMT
this bug is really annoying. even whan i set my keyboard to "105 keys generic keyboard", the functionality of some keys is messed up.
What should I do in order to get my up key functioning? :)
Comment by Jan de Groot (JGC) - Friday, 28 November 2008, 19:13 GMT
Try removing all input devices from xorg.conf and remove the AllowEmptyInput line, I think things are confused because both evdev and kbd are handling your keyboard at this moment.
Comment by Lior David (liorda) - Friday, 28 November 2008, 20:59 GMT
hi again, and thanks for helping.

there's no inputdevice section nor allowEmptyInput directive in my xorg.conf.

but look what i've found on /var/log/Xorg.0.log:
"
(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 AllowEmptyInput.
"

what should i do now?
Comment by Jan de Groot (JGC) - Friday, 28 November 2008, 21:08 GMT
That message is just an informational warning.
Comment by Jarod Liu (jarod) - Saturday, 29 November 2008, 03:41 GMT
[quote]
Try removing all input devices from xorg.conf and remove the AllowEmptyInput line, I think things are confused because both evdev and kbd are handling your keyboard at this moment.
[/quote]

nothing change.
Comment by Lior David (liorda) - Saturday, 29 November 2008, 19:36 GMT
hi all,
i've solved the problem by issuing the command: "gcontool-2 --recursive-unset /desktop/gnome/peripherals/keyboard" (without quotes) and logging out and in. gnome-keyboard-preferences dialog still displays the model as "evdev-managed keyboard".

since the problem got solved by deleting a key from gnome's registery, i guess this bug should be filed against gnome (and remains there until this issue is gone)

[solution taken from: https://bugs.launchpad.net/gnome-settings-daemon/+bug/255008/comments/94]

thanks :)
Comment by Lior David (liorda) - Saturday, 29 November 2008, 21:29 GMT
damn! reboot made this bug come again. I'm sorry for spamming this report, just trying to solve this problem.
Comment by Jan de Groot (JGC) - Sunday, 30 November 2008, 13:49 GMT
gnome-settings-daemon 2.24.1 contains 2 bugfixes for keymap handling, please test.
Comment by Jon Kristian Nilsen (jonkristian) - Sunday, 30 November 2008, 22:57 GMT
I can also confirm this. The solution did not work for me, and I am using gnome-settings-daemon 2.24.1
Comment by Jon Kristian Nilsen (jonkristian) - Sunday, 30 November 2008, 23:03 GMT
Try this, it worked here but be sure to choose Evdev managed keyboard.

"I went to system->keyboard preferences->layouts and then to keyboard model. Switched to generic->Evdev managed keyboard. Similar solution to KDE problem."
Taken from http://bbs.archlinux.org/viewtopic.php?id=59931
Comment by Jarod Liu (jarod) - Monday, 01 December 2008, 14:09 GMT
just upgraded to gnome-settings-daemon 2.24.1, no help to this problem
Comment by Jarod Liu (jarod) - Monday, 01 December 2008, 14:40 GMT
I found shomething interesting. After startx is run and before gnome load complete, if I press arrow-up key, then problem won't appear in gnome. If I do nothing, the problem come back again. I tested several times, confirmed this is a temporary solution...at least for my machine.
Comment by .FUF (FUF) - Monday, 01 December 2008, 18:36 GMT
same bug
Comment by Michał Gawron (mcv) - Monday, 01 December 2008, 20:31 GMT
Had the same ugly problem with me, solved it by changing keyboard type to "Evdev managed keyboard" in kcontrol/keyboard. And, well, IBM special keys still work, so I guess that's ok.
But I have another problem, with Wacom tablet. It worked before w/o problems, now it doesn't work at all.

X log says:

(II) LoadModule: "wacom"

(II) Loading /usr/lib/xorg/modules/input//wacom_drv.so
dlopen: /usr/lib/xorg/modules/input//wacom_drv.so: undefined symbol: xf86errno
(EE) Failed to load /usr/lib/xorg/modules/input//wacom_drv.so
(II) UnloadModule: "wacom"
(EE) Failed to load module "wacom" (loader failed, 7)

Someone from X.org seriously broke something…
Comment by Sebastian Frysztak (koralgol) - Tuesday, 02 December 2008, 18:48 GMT
I had the same problem. I have reconfigured xorg(sudo X -configure) and now everything works fine.
Comment by a172 (jumperpunk) - Tuesday, 02 December 2008, 23:17 GMT
[quote]
Someone from X.org seriously broke something…
[/quote]

from what i see, its not an x problem. i only have this issue in gnome. if i start X with xterm for fluxbox, everything works like expected. my issue may not be the same though, none of my arrow keys work, nor do any of the home/end set of keys nor print/scrlk/pause.

the only of the above mentioned suggestions that ive tried so far was reconfiguring X. that was before i realized that it seems to be a gnome issue, not an X issue. it should be mentioned that i just switched mirrors cause teh one i was using (vt.edu) was massively out of date. i had to reconfig X just to get X to not crash (prolly related to updating the kernel, gnome, X, and the nvidia drivers all at teh same time cause the mirror was so out of date... arg.)
Comment by a172 (jumperpunk) - Wednesday, 03 December 2008, 04:19 GMT
<warning>forgot to mention, for the most part, im a linux nub.</warning>
ok, so i changed my keyboard model to "Evdev-managed keyboard" (i have a ms digital media pro kb, it was previously set to a similar ms kb model).
this partially fixed the problem. the up key used to register as "Print" in the gnome keyboard shortcuts, now it accurately sees it as up. Likewise, the other messed up keys now work as expected. however, the up key still launches the screenshot tool. (and the print key does nothing...). alt + up also launches teh screenshot tool, taking a shot of just the active window, the expected behavior if i hit alt + print.
Comment by Sven-Hendrik Haase (Svenstaro) - Thursday, 04 December 2008, 02:53 GMT
The most viable workaround I've found so far is simply setting the "Take screenshot" shortcut in the keyboard shortcuts dialog to Ctrl+Print instead of just Print. After that, my "Up" key works alright without disabling any functionality.
Comment by a172 (jumperpunk) - Thursday, 04 December 2008, 04:06 GMT
@Svenstaro
That worked. i dont particularly care for workarounds, but thats not so bad. thanks for the tip!
Comment by Jan de Groot (JGC) - Thursday, 04 December 2008, 08:18 GMT
It seems there's something wrong with XKB and evdev. Pressing keys while X is starting up seems to resolve this issue. Fedora developed a patch for this, which works for devices hotplugged by hal (not for evdev devices setup in xorg.conf):

http://cvs.fedora.redhat.com/viewvc/devel/xorg-x11-server/xserver-1.5.0-force-SwitchCoreKeyboard-for-evdev.patch?revision=1.1

Can someone try to apply this to the xorg-server package and test if this patch solves this problem?
Comment by David Spicer (azleifel) - Thursday, 04 December 2008, 21:50 GMT
Bloody hah! Found a simple workaround for my desktop in http://bugs.gentoo.org/show_bug.cgi?id=153115#c4 from 2006! Adding "setxkbmap -keycodes evdev &" to ~/.xinitrc followed by a restart was all it took to get a properly mapped keyboard - up arrow actually does a cursor up etc. - in gnome.
Comment by Jan de Groot (JGC) - Thursday, 04 December 2008, 21:59 GMT
I would be happy if someone could test out this patch instead of trying out workarounds.
Comment by David Spicer (azleifel) - Thursday, 04 December 2008, 22:40 GMT
Oh, all right ;-) Built the xorg-server package (x86_64) with the Fedora force-SwitchCoreKeyboard-for-evdev patch, installed it, removed the workaround from ~/.xinitrc, rebooted and it works -> my keyboard is properly mapped.
Comment by Jan de Groot (JGC) - Friday, 05 December 2008, 08:00 GMT
Ok, thanks for testing. I will apply this patch later tonight.

Loading...