Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 333379 - sys-kernel/gentoo-sources 2.6.34-r1 and 2.6.35-r1: drivers/platform/x86/dell-wmi.c : Some hotkeys on Studio 155x aren't supported by dell-wmi.c
Summary: sys-kernel/gentoo-sources 2.6.34-r1 and 2.6.35-r1: drivers/platform/x86/dell-...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL: http://git.kernel.org/?p=linux/kernel...
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2010-08-19 04:42 UTC by Mark Smith
Modified: 2010-08-20 18:41 UTC (History)
1 user (show)

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


Attachments
Patch fixes poorly detected hotkeys on Studio 1557 (dell-wmi.c.patch,339 bytes, patch)
2010-08-19 04:45 UTC, Mark Smith
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Smith 2010-08-19 04:42:15 UTC
The Battery (F3), Keyboard Backlight(F6), and Eject(Not an F#) keys do not function, and throw an error in dmesg: 
dell-wmi: Unknown key 0 pressed


The Keyboard Backlight still changes when F6 is pressed, but does not report an event in xev.  Eject and Battery do nothing except report the error in dmesg, and do not produce an event in xev.
There is a patch that resolves the issue, but it doesn't seem to be in upstream.  Ubuntu seems to have this working correctly in 2.6.32 on Ubuntu 10.04, but it regresses in 10.10 on kernel 2.6.34 and 2.6.35, so I don't think the patch went upstream.

Reproducible: Always

Steps to Reproduce:
1. Press Eject Key, Keyboard Backlight Key, or Battery Key
2. Examine dmesg for error.

Actual Results:  
Pressing the eject key, battery key, and keyboard backlight key produced the above error in dmesg (or /var/log/messages), and did not generate keypress events.

Expected Results:  
dell-wmi.c interprets the keys and assigns them to keycodes for eject, battery, etc.

There is a simple patch for this.  It just needs to be applied to the kernel before it is compiled.  The patch works on both versions of the gentoo-sources I tried (2.6.34-gentoo-r1 and 2.6.35-gentoo-r1), as well as ubuntu kernel sources and any vanilla kernel sources I have seen >= 2.6.32 that had dell-wmi.c.

--- dell-wmi.c	2010-08-01 18:11:14.000000000 -0400
+++ ./drivers/platform/x86/dell-wmi.c	2010-08-17 23:11:18.597904666 -0400
@@ -221,7 +221,7 @@
 			return;
 		}
 
-		if (dell_new_hk_type)
+		if (dell_new_hk_type || buffer_entry[1] == 0x0)
 			reported_key = (int)buffer_entry[2];
 		else
 			reported_key = (int)buffer_entry[1] & 0xffff;
Comment 1 Mark Smith 2010-08-19 04:45:26 UTC
Created attachment 243529 [details, diff]
Patch fixes poorly detected hotkeys on Studio 1557

If the buffer_entry[1] is empty (0x0), the actual hotkey value is in buffer_entry[2], so use that reported_key instead.
Comment 2 Mark Smith 2010-08-19 04:47:42 UTC
Output from emerge --info

Portage 2.1.8.3 (default/linux/x86/10.0/desktop/gnome, gcc-4.4.3, glibc-2.11.2-r0, 2.6.35-gentoo-r1 i686)
=================================================================
System uname: Linux-2.6.35-gentoo-r1-i686-Intel-R-_Core-TM-_i7_CPU_Q_720_@_1.60GHz-with-gentoo-1.12.13
Timestamp of tree: Wed, 18 Aug 2010 17:15:02 +0000
app-shells/bash:     4.0_p37
dev-java/java-config: 2.1.11
dev-lang/python:     2.6.5-r3, 3.1.2-r4
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 1.12.13
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.65
sys-devel/automake:  1.9.6-r3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.3-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="* -@EULA"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=core2 -mtune=core2 -msse4 -mcx16 -mpopcnt -msahf -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=core2 -mtune=core2 -msse4 -mcx16 -mpopcnt -msahf -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.osuosl.org/ http://gentoo.mirrors.tds.net/gentoo http://gentoo.netnitco.net"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j9"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync21.us.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa berkdb bluetooth branding bzip2 cairo cdr clamav cli consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr eds emboss encode evo exif fam ffmpeg firefox flac fortran gdbm gdu gif gnome gnome-keyring gpm gps gstreamer gtk hal iconv ipv6 java javscript jpeg lame lcms ldap libnotify libwww lm_sensors mad matroska mikmod mime mng modules mono motif mp3 mp4 mpeg msn mudflap musicbrainz mysql nautilus ncurses networkmanager nls nptl nptlonly ogg opengl openmp oscar pam pango pcre pdf perl png policykit ppds pppd python qt3support qt4 quicktime radius readline reflection scanner sdl session smp speex spell spl ssl startup-notification svg symlink sysfs taglib tcl tcpd theora threads tiff tk truetype unicode usb v4l v4l2 vcd vim-syntax vorbis wavpack wifi win32codes wxwidgets x264 x86 xattr xcb xinerama xinetd xml xorg xulrunner xv xvid yahoo zeroconf zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="radeon" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 3 Mike Pagano gentoo-dev 2010-08-20 00:16:02 UTC
Will be included in next 2.6.34 and 2.6.35 release
Comment 4 Mike Pagano gentoo-dev 2010-08-20 18:41:37 UTC
Release in gentoo-sources-2.6.34-r6 and 2.6.35-r2