# [solved] media keys don't send a KeyRelease event

## Sujao

Since the last xorg-x11 update (not certain if it was exactly this package but around this time) my media keys stopped working.

The problem is that the keys don't produce a KeyRelease event (checked with xev) and thus the autorepeat repeats them all the time. As soon as I press another key the repeat loop is aborted and the other key works normally...or not if it's a media key. I deactivated auto repeat in xorg.conf and kde to test this and the key press was not repeated as expected. 

I was going to file a bug report but perhaps it's due to a misconfiguration.

/etc/X11/xorg.conf

```
# **********************************************************************

# Module section -- this  section  is used to specify

# which dynamically loadable modules to load.

# **********************************************************************

#

Section "Module"

# This loads the DBE extension module.

    Load        "dbe"     # Double buffer extension

# This loads the miscellaneous extensions module, and disables

# initialisation of the XFree86-DGA extension within that module.

    SubSection  "extmod"

      Option    "omit xfree86-dga"   # don't initialise the DGA extension

    EndSubSection

# This loads the font modules

#    Load        "type1"

    Load        "freetype"

#    Load        "xtt"

# This loads the GLX module

    Load       "glx"

# This loads the DRI module

#    Load       "dri"

EndSection

# **********************************************************************

# Files section.  This allows default font and rgb paths to be set

# **********************************************************************

Section "Files"

# The location of the RGB database.  Note, this is the name of the

# file minus the extension (like ".txt" or ".db").  There is normally

# no need to change the default.

#    RgbPath   "/usr/share/X11/rgb"

# Multiple FontPath entries are allowed (which are concatenated together),

# as well as specifying multiple comma-separated entries in one FontPath

# command (or a combination of both methods)

# 

# 

    FontPath   "/usr/share/fonts/misc/"

#    FontPath   "/usr/share/fonts/TTF/"

#    FontPath   "/usr/share/fonts/OTF"

    FontPath   "/usr/share/fonts/Type1/"

    FontPath   "/usr/share/fonts/100dpi/"

    FontPath   "/usr/share/fonts/75dpi/"

#    FontPath   "/usr/lib/X11/fonts/local/"

#    FontPath   "/usr/lib/X11/fonts/misc/"

#    FontPath   "/usr/lib/X11/fonts/75dpi/:unscaled"

#    FontPath   "/usr/lib/X11/fonts/100dpi/:unscaled"

#    FontPath   "/usr/lib/X11/fonts/Speedo/"

#    FontPath   "/usr/lib/X11/fonts/Type1/"

#    FontPath   "/usr/lib/X11/fonts/TrueType/"

#    FontPath   "/usr/lib/X11/fonts/freefont/"

#    FontPath   "/usr/lib/X11/fonts/75dpi/"

#    FontPath   "/usr/lib/X11/fonts/100dpi/"

# The module search path.  The default path is shown here.

#    ModulePath "/usr/lib/modules"

EndSection

# **********************************************************************

# Server flags section.

# **********************************************************************

Section "ServerFlags"

# Uncomment this to cause a core dump at the spot where a signal is 

# received.  This may leave the console in an unusable state, but may

# provide a better stack trace in the core dump to aid in debugging

#    Option "NoTrapSignals"

# Uncomment this to disable the <Ctrl><Alt><Fn> VT switch sequence

# (where n is 1 through 12).  This allows clients to receive these key

# events.

#    Option "DontVTSwitch"

# Uncomment this to disable the <Ctrl><Alt><BS> server abort sequence

# This allows clients to receive this key event.

    Option "DontZap"

# Uncomment this to disable the <Ctrl><Alt><KP_+>/<KP_-> mode switching

# sequences.  This allows clients to receive these key events.

#    Option "Dont Zoom"

# Uncomment this to disable tuning with the xvidtune client. With

# it the client can still run and fetch card and monitor attributes,

# but it will not be allowed to change them. If it tries it will

# receive a protocol error.

#    Option "DisableVidModeExtension"

# Uncomment this to enable the use of a non-local xvidtune client. 

#    Option "AllowNonLocalXvidtune"

# Uncomment this to disable dynamically modifying the input device

# (mouse and keyboard) settings. 

#    Option "DisableModInDev"

# Uncomment this to enable the use of a non-local client to

# change the keyboard or mouse settings (currently only xset).

#    Option "AllowNonLocalModInDev"

    Option "BlankTime" "0"

    Option "StandbyTime" "0"

    Option "SuspendTime" "0"

    Option "OffTime" "0"

   #evdev plus hal deaktivieren, weil es nicht geht

#   Option "AutoAddDevices" "false"

EndSection

# **********************************************************************

# Input devices

# **********************************************************************

#Section "InputDevice"

#    Identifier   "Keyboard1"

#    Driver   "evdev"

#    Option "XkbRules"   "xorg"

#    Option "XkbModel"   "cherryblueb"

#    Option "XkbLayout"   "de"

#EndSection

#Section "InputDevice"

#Identifier  "Mouse1"

#Driver      "evdev"

#Option      "Device" "/dev/input/by-id/usb-Logitech_USB_Gaming_Mouse-mouse"

#Option      "RelHWHEELOptions"      "invert"

#EndSection

#Section "InputDevice"

#Identifier  "Gamepad"

#Driver      "evdev"

#Option      "Device" "/dev/input/by-id/usb-ACRUX_RF_USB_GAMEPAD_8206-event-joystick"

#EndSection

#Section "InputDevice"

#Identifier  "GamepadFly"

#Driver      "evdev"

#Option      "Device" "/dev/input/by-id/usb-Code_Mercenaries_JoyWarrior24RC-event-joystick"

#EndSection

# **********************************************************************

# Monitor section

# **********************************************************************

# Any number of monitor sections may be present

Section "Monitor"

    Identifier  "Dell 2707"

# HorizSync is in kHz unless units are specified.

# HorizSync may be a comma separated list of discrete values, or a

# comma separated list of ranges of values.

# NOTE: THE VALUES HERE ARE EXAMPLES ONLY.  REFER TO YOUR MONITOR'S

# USER MANUAL FOR THE CORRECT NUMBERS.

#    HorizSync   30-110

#    HorizSync   30-64         # multisync

#    HorizSync   31.5, 35.2    # multiple fixed sync frequencies

#    HorizSync   15-25, 30-50  # multiple ranges of sync frequencies

# VertRefresh is in Hz unless units are specified.

# VertRefresh may be a comma separated list of discrete values, or a

# comma separated list of ranges of values.

# NOTE: THE VALUES HERE ARE EXAMPLES ONLY.  REFER TO YOUR MONITOR'S

# USER MANUAL FOR THE CORRECT NUMBERS.

#    VertRefresh 50-160

EndSection

# **********************************************************************

# Graphics device section

# **********************************************************************

Section "Device"

    Identifier   "Standard VGA"

    VendorName   "Unknown"

    BoardName   "Unknown"

    Driver     "vga"

EndSection

Section "Device"

    Identifier  "Leadtek Winfast PX8800 GTS 512"

    Driver      "nvidia"

    Option      "NoLogo" "true"

    #VideoRam    524288

    # Insert Clocks lines here if appropriate

EndSection

# **********************************************************************

# Screen sections

# **********************************************************************

Section "Screen"

    Identifier  "Screen 1"

    Device      "Leadtek Winfast PX8800 GTS 512"

    Monitor     "Dell 2707"

    DefaultDepth 24

    Subsection "Display"

        Depth       24

        Modes       "1920x1200"

        ViewPort    0 0

    EndSubsection

EndSection

Section "ServerLayout"

    Identifier  "Simple Layout"

    Screen "Screen 1"

#    InputDevice "Mouse1" "SendCoreEvents"

#    InputDevice "Keyboard1" "CoreKeyboard"

#    InputDevice "Gamepad"

#    InputDevice "GamepadFly"

EndSection

Section "Extensions"

   Option "Composite" "Enable"

EndSection

```

# emerge -va x11-base/xorg-server x11-base/xorg-drivers x11-drivers/xf86-input-mouse x11-drivers/xf86-input-keyboard x11-drivers/xf86-input-evdev

```
These are the packages that would be merged, in order:

Calculating dependencies... done!

[ebuild   R   ] x11-base/xorg-server-1.7.6  USE="hal nptl sdl xorg -debug -dmx -ipv6 -kdrive -minimal -tslib" 0 kB

[ebuild   R   ] x11-drivers/xf86-input-mouse-1.5.0  USE="-debug" 0 kB

[ebuild   R   ] x11-drivers/xf86-input-keyboard-1.4.0  USE="-debug" 0 kB

[ebuild   R   ] x11-drivers/xf86-input-evdev-2.3.2  USE="-debug" 0 kB

[ebuild   R   ] x11-base/xorg-drivers-1.7  INPUT_DEVICES="evdev joystick keyboard mouse -acecad -aiptek -penmount -synaptics -tslib -virtualbox -vmmouse -void -wacom" VIDEO_CARDS="nv nvidia vesa -apm -ark -ast -chips -cirrus -dummy -epson -fbdev -fglrx (-geode) -glint -i128 (-i740) (-impact) -intel -mach64 -mga -neomagic (-newport) -r128 -radeon -radeonhd -rendition -s3 -s3virge -savage -siliconmotion -sis -sisusb (-sunbw2) (-suncg14) (-suncg3) (-suncg6) (-sunffb) (-sunleo) (-suntcx) -tdfx -tga -trident -tseng -v4l -via -virtualbox -vmware (-voodoo) (-xgi)" 0 kB
```

emerge --info

```
Portage 2.1.8.3 (default/linux/amd64/10.0/desktop/kde, gcc-4.3.4, glibc-2.10.1-r1, 2.6.33-zen1 x86_64)

=================================================================

System uname: Linux-2.6.33-zen1-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q9300_@_2.50GHz-with-gentoo-1.12.13

Timestamp of tree: Wed, 05 May 2010 10:45:01 +0000

ccache version 2.4 [disabled]

app-shells/bash:     4.0_p37

dev-java/java-config: 2.1.10

dev-lang/python:     2.6.4-r1

dev-util/ccache:     2.4-r7

dev-util/cmake:      2.6.4-r3

sys-apps/baselayout: 1.12.13

sys-apps/sandbox:    1.6-r2

sys-devel/autoconf:  2.13, 2.63-r1

sys-devel/automake:  1.7.9-r2, 1.9.6-r3, 1.10.3, 1.11.1

sys-devel/binutils:  2.18-r3

sys-devel/gcc:       4.3.4

sys-devel/gcc-config: 1.4.1

sys-devel/libtool:   2.2.6b

virtual/os-headers:  2.6.30-r1

ACCEPT_KEYWORDS="amd64"

ACCEPT_LICENSE="* -@EULA"

CBUILD="x86_64-pc-linux-gnu"

CFLAGS="-march=nocona -O2 -pipe -ggdb"

CHOST="x86_64-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config /var/lib/hsqldb"

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 /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"

CXXFLAGS="-march=nocona -O2 -pipe -ggdb"

DISTDIR="/usr/portage/distfiles"

FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms splitdebug strict unmerge-logs unmerge-orphans userfetch"

GENTOO_MIRRORS="ftp://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/"

LC_ALL="en_US.utf8"

LDFLAGS="-Wl,-O1"

LINGUAS="en de"

MAKEOPTS="-j5"

PKGDIR="/usr/portage/packages"

PORTAGE_CONFIGROOT="/"

PORTAGE_RSYNC_EXTRA_OPTS="-v -v"

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://rsync.de.gentoo.org/gentoo-portage"

USE="7zip X a52 aac acl acpi ada addbookmarks alsa amd64 amrnb amrwb bash-completion berkdb bluetooth branding bzip2 cairo cdda cddb cdio cdparanoia cdr cli consolekit cracklib crypt css cups custom-optimization cxx dbus device-mapper divx dmraid doc dri dts dv dvd dvdr emboss enca encode exif fam fat fbcon ffmpeg firefox flac fortran gdbm gif gimp gnutls gpm gtk hal hddtemp iconv icq id3tag imap jabber java javascript jpeg jpeg2k kate kcal kde kipi lcms ldap libass libcaca libnotify libv4l2 lirc live lm_sensors lzma lzo mad matroska mikmod mmx mmxext mng modules mozilla mp2 mp3 mp4 mpeg mplayer mudflap multilib musepack musicbrainz ncurses nls nptl nptlonly nsplugin ntfs nvidia offensive ogg openal opengl openmp pam pango pcre pdf perl plasma png ppds pppd python qt3support qt4 readline reflection rtc sasl schroedinger sdl semantic-desktop session slang sound speex spell spl srt sse sse2 ssl ssse3 startup-notification svg sysfs taglib tcpd tetex theora threads tiff truetype type1 unicode usb v4l v4l2 vcd vdpau videos vim vim-syntax vim-with-x vorbis wifi wxwindows x264 xcb xfs xml xorg xulrunner xv xvid xvmc zlib zvbi" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci 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 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="keyboard mouse evdev joystick" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en de" LIRC_DEVICES="hauppauge" RUBY_TARGETS="ruby18" SANE_BACKENDS="snapscan" USERLAND="GNU" VIDEO_CARDS="nv nvidia vesa" 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, LANG, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTDIR_OVERLAY
```

Last edited by Sujao on Sat Oct 30, 2010 3:09 am; edited 1 time in total

----------

## kiksen

It seems (from bugs.gentoo.org) that xorg-server-1.7.6 has problems. Any chance you could upgrade to 1.8? (it's in ~, but is running fine for me and many others)

/kiksen

----------

## PaulBredbury

It's a bug in xorg-server.

----------

## Sujao

I installed xorg/server-1.8.0 and the problem is still there. Still no KeyRelease.

```
$ emerge -va --pretend xorg-server

These are the packages that would be merged, in order:

Calculating dependencies... done!

[ebuild   R   ] x11-base/xorg-server-1.8.0  USE="doc hal nptl udev xorg -dmx -ipv6 -kdrive -minimal -static-libs -tslib" 0 kB
```

----------

## Sujao

Just for completeness, although this thread is old. Media keys are working fine with xorg-server-1.7.7-r1

----------

