GNOME Bugzilla – Bug 557838
Changing brightness with function keys disables keyboard and makes menus unusable
Last modified: 2008-11-04 13:08:37 UTC
Please describe the problem: Originally Reported here: https://bugs.launchpad.net/ubuntu/+source/gnome-power-manager/+bug/285323 "On my Dell inspiron 9300 laptop under intrepid (hardy did not have this problem), when I type FN + Arrow keys to change the screen brightness, Most of mouse and keyboard keys stop working. For an example : I can't type any text anywhere, ALT + F4 does not close any window, mouse clicks "partially" opens the gnome-panel menus, isn't able to close windows with the right-top x, but mouse click is still able to move a window.. screencast : http://upload.leservicetechnique.com/bugs/mouse_keyboard_acpid.ogv This bug is reproducible under both metacity and compiz, and not caused by a BIOS password. A quick workaround to bring back things to normal is to switch to a VT and go back to Xorg with CTRL + ALT + F6 and CTRL + ALT + F7" Steps to reproduce: 1. Press Fn + Arrow key to change brightness 2a. Try to type in an application 2b. Try to open the menus Actual results: 2a. Nothing is typed 2b. The Menus are not opened Expected results: .. Does this happen every time? yes Other information: Many testers with Ubuntu have gotten this, I also tested with Fedora snapshot 1 and reproduced it as well. It seems to be specific to Dells.
Bug introduced (by my testing) with: https://launchpad.net/ubuntu/+source/gnome-power-manager/2.23.6-0ubuntu1 Changelog: * debian/patches/09_lid_always_blanks.patch: Update for new upstream * debian/control, added PolicyKit DBus and Grant to reflect changes in upstream configure files. * Updated upstream version (2.23.6) There are many many logs on the launchpad page. If you need more just ask.
This regression appeared with revision 2857 of gnome power manager which fixed another similar regression introduced by revision 2845. Revision 2845 caused "g", "k" and ";" keys to stop working. Revision 2857 : --- trunk/src/gpm-button.c 2008/07/29 01:31:15 2856 +++ trunk/src/gpm-button.c 2008/08/01 08:39:15 2857 @@ -166,11 +166,19 @@ * Return value: TRUE if we parsed and grabbed okay **/ static gboolean -gpm_button_xevent_key (GpmButton *button, guint keycode, const gchar *hal_key) +gpm_button_xevent_key (GpmButton *button, guint keysym, const gchar *hal_key) { gchar *key = NULL; gboolean ret; gchar *keycode_str; + guint keycode; + + /* convert from keysym to keycode */ + keycode = XKeysymToKeycode (GDK_DISPLAY (), keysym); + if (keycode == 0) { + gpm_warning ("could not map keysym %x to keycode", keysym); + return FALSE; + } /* is the key string already in our DB? */ keycode_str = g_strdup_printf ("0x%x", keycode);
This is a kernel problem that affects Dell laptops. It has been fixed upstream by Matthew Garrett. The issue is that some keys on a Dell laptop do not produce a key down, key up sequence when the button is pressed, and instead just produce key down and NOT key up. This confuses X greatly, as more and more keys are being pressed "together". This is fixed in 61579ba83934d397a4fa2bb7372de9ae112587d5 on 15th August in Linus' tree. Author: Matthew Garrett <mjg59@srcf.ucam.org> Date: Fri Aug 15 13:54:51 2008 -0400 Input: atkbd - expand Latitude's force release quirk to other Dells Dell laptops fail to send key up events for several of their special keys. There's an existing quirk in the kernel to handle this, but it's limited to the Latitude range. This patch extends it to cover all portable Dells. Signed-off-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru> diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c index 4474572..22016ca 100644 --- a/drivers/input/keyboard/atkbd.c +++ b/drivers/input/keyboard/atkbd.c @@ -834,10 +834,10 @@ static void atkbd_disconnect(struct serio *serio) } /* - * Most special keys (Fn+F?) on Dell Latitudes do not generate release + * Most special keys (Fn+F?) on Dell laptops do not generate release * events so we have to do it ourselves. */ -static void atkbd_latitude_keymap_fixup(struct atkbd *atkbd) +static void atkbd_dell_laptop_keymap_fixup(struct atkbd *atkbd) { const unsigned int forced_release_keys[] = { 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8f, 0x93, @@ -1451,13 +1451,13 @@ static int __init atkbd_setup_fixup(const struct dmi_system_id *id) static struct dmi_system_id atkbd_dmi_quirk_table[] __initdata = { { - .ident = "Dell Latitude series", + .ident = "Dell Laptop", .matches = { DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), - DMI_MATCH(DMI_PRODUCT_NAME, "Latitude"), + DMI_MATCH(DMI_CHASSIS_TYPE, "8"), /* Portable */ }, .callback = atkbd_setup_fixup, - .driver_data = atkbd_latitude_keymap_fixup, + .driver_data = atkbd_dell_laptop_keymap_fixup, }, { .ident = "HP 2133",