Bug 24336 - keyboard AutoRepeat option doesn't work
Summary: keyboard AutoRepeat option doesn't work
Status: RESOLVED WONTFIX
Alias: None
Product: xorg
Classification: Unclassified
Component: Input/evdev (show other bugs)
Version: 7.4 (2008.09)
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Peter Hutterer
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-05 15:09 UTC by Grygoriy I. Fuchedzhy
Modified: 2014-01-09 18:59 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Grygoriy I. Fuchedzhy 2009-10-05 15:09:41 UTC
After upgrade to new stable xorg-server-1.6.3.901-r2 default autorepeat
settings seem to be changed. I've tried to set it to my custom values via hal
like this:

<?xml version="1.0" encoding="UTF-8"?>
<deviceinfo version="0.2">
  <device>
    <!-- Keyboard -->
    <match key="info.capabilities" contains="input.keys">
      <merge key="input.x11_driver"             type="string">evdev</merge>
      <merge key="input.x11_options.XkbModel"   type="string">evdev</merge>
      <merge key="input.x11_options.XkbRules"   type="string">base</merge>
      <merge key="input.x11_options.XkbLayout"  type="string">us,ru</merge>
      <merge key="input.x11_options.XkbOptions"
type="string">ctrl:nocaps,grp:toggle,terminate:ctrl_alt_bksp</merge>
      <merge key="input.x11_options.AutoRepeat" type="string">180 30</merge>
    </match>
  </device>
</deviceinfo>

But it doesn't work. All keyboard settings works for me except AutoRepeat one.

If I try to type:
> callisto ~ $ xset r rate 180 30
> Xlib:  extension "XFree86-Misc" missing on display ":0.0".
it works.

Here is part of Xorg.0.log related to keyboard:
>(II) config/hal: Adding input device AT Translated Set 2 keyboard
>(II) LoadModule: "evdev"
>(II) Loading /usr/lib64/xorg/modules/input//evdev_drv.so
>(II) Module evdev: vendor="X.Org Foundation"
>	compiled for 1.6.3.901, module version = 2.2.5
>	Module class: X.Org XInput Driver
>	ABI class: X.Org XInput driver, version 4.0
>(**) AT Translated Set 2 keyboard: always reports core events
>(**) AT Translated Set 2 keyboard: Device: "/dev/input/event3"
>(II) AT Translated Set 2 keyboard: Found keys
>(II) AT Translated Set 2 keyboard: Configuring as keyboard
>(II) XINPUT: Adding extended input device "AT Translated Set 2 keyboard" (type: KEYBOARD)
>(**) Option "xkb_rules" "evdev"
>(**) Option "xkb_model" "evdev"
>(**) Option "xkb_layout" "us,ru"
>(**) Option "xkb_options" "ctrl:nocaps,grp:toggle,terminate:ctrl_alt_bksp"
There is nothing about AutoRepeat.

Hal seem to set this option normally:
>callisto ~ $ lshal | grep -i autorepeat
>  input.x11_options.AutoRepeat = '180 30'  (string)

I'm not running any DE, just x11-wm/awesome, so this should not be interference
with DE's settings.

So it seems like evdev's issue.

Here is initial bug report on gentoo's bugzilla:
http://bugs.gentoo.org/show_bug.cgi?id=287477
Comment 1 Chí-Thanh Christopher Nguyễn 2009-10-05 15:58:00 UTC
see bug 17925 comment 38 for a possible workaround
Comment 2 Vlad Glagolev 2009-12-03 08:51:25 UTC
(In reply to comment #1)
> see bug 17925 comment 38 for a possible workaround
> 

This workaround doesn't work for evdev+hal. Tested with xorg-server 1.7.1 and xf86-input-evdev 2.3.0.
Comment 3 Vlad Glagolev 2009-12-05 11:55:38 UTC
Tested again with xorg-server 1.7.3 and xf86-input-evdev 2.3.1 -- no luck :(
Comment 4 Petr Machata 2009-12-10 07:21:55 UTC
I see this problem too.  I set a crazy repeat values:

# lshal | sed -n '/input.product.*Keyboard/,+5p'
  input.product = 'Dell Dell USB Keyboard'  (string)
  input.x11_driver = 'evdev'  (string)
  input.x11_options.AutoRepeat = '1000 250'  (string)
  input.xkb.layout = 'us,cz,ru'  (string)
  input.xkb.model = 'evdev'  (string)
  input.xkb.options =
'terminate:ctrl_alt_bksp,grp:switch,grp:alt_shift_toggle,grp_led:scroll' 
(string)

... yet the keyboard, when unplugged and re-plugged, has some sort of default
repeat ratio.

I took a peek in the sources.  config/hal.c:device_added doesn't name that
option explicitly (it does so for layout, model, etc.), but it sticks it into
its option array anyway.  NewInputDeviceRequest then adds all these options to
IDevRec::commonOptions.  hw/xfree86/common/xf86Option.c:xf86CollectInputOptions
then copies this over to InputInfoPtr::config.  Then I gave up, `config' is
mentioned in too many places for me to sift through.

That's all on Fedora 12, but has been the case since Fedora 11.  Versions of packages that strike me as relevant:
 xorg-x11-server-common-1.7.1-7.fc12.x86_64
 xorg-x11-server-Xorg-1.7.1-7.fc12.x86_64
 xorg-x11-drv-keyboard-1.4.0-2.fc12.x86_64
 xorg-x11-drv-evdev-2.3.1-2.fc12.x86_64
 xorg-x11-xkb-utils-7.4-6.fc12.x86_64
I hope you guys can apply educated guesses to match these to your components and their versions, I have very little idea how X packaging works.
Comment 5 Petr Machata 2009-12-10 07:23:34 UTC
(In particular, the problem is that X doesn't get these settings after the computer wakes up from suspend.  I can use xset just fine, but that doesn't apply the setting for new keyboards, and after suspend, all keyboards are essentially considered new.)
Comment 6 Grygoriy I. Fuchedzhy 2009-12-10 07:39:22 UTC
(In reply to comment #5)
> ...after the computer wakes up from suspend...
> 

Suspend to ram/wake up doesn't modify keyboard rate on my machine.
Comment 7 Peter Hutterer 2010-06-17 21:50:10 UTC
this option was only present in the keyboard driver and was removed before the keyboard-1.4.0 release.
this option is simply uninterpreted now. for keyboard repeat settings, you need the session to set it for you, we now completely rely on the server for repeat keys, not on the driver hacks. sorry.
Comment 8 Grygoriy I. Fuchedzhy 2010-06-18 10:48:09 UTC
(In reply to comment #7)
> for keyboard repeat settings, you need the session to set it for you, we now
> completely rely on the server for repeat 
> keys, not on the driver hacks. sorry.

Ok, so what should I add to xorg.conf or xorg.conf.d/... to set keyboard rate to custom value? My current solution is 'xset r ...' in .xinitrc
Comment 9 Peter Hutterer 2010-06-20 15:43:42 UTC
(In reply to comment #8)
> Ok, so what should I add to xorg.conf or xorg.conf.d/... to set keyboard rate
> to custom value? My current solution is 'xset r ...' in .xinitrc

there is no xorg.conf option for this anymore, sorry. xset and whatever tools the desktop environment provide are the only option for now.
Comment 10 sworddragon2 2014-01-09 18:56:52 UTC
> this option was only present in the keyboard driver and was removed before the > keyboard-1.4.0 release.
> this option is simply uninterpreted now. for keyboard repeat settings, you need > the session to set it for you, we now completely rely on the server for repeat > keys, not on the driver hacks. sorry.

Hasn't the server access to xorg.conf too? It would be really nice to have this option again if this would be technically possible in the way xorg is programmed. Otherwise I must look for another solution, likely with udev to catch even hotplug events.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.