[systemd-devel] udev rule not applied after resume from sleep
Lennart Poettering
lennart at poettering.net
Tue Dec 10 15:05:49 PST 2013
On Tue, 10.12.13 23:59, Jason A. Donenfeld (Jason at zx2c4.com) wrote:
> Hi folks,
>
> I hope this is the right list to ask about udev. I've got a lenovo usb
> keyboard with a trackpoint on it -- essentially an external replica of
> the classic thinkpad keyboard. The trackpoint by default isn't very
> sensitive, so I've got a udev rule that applies the settings I like:
>
> zx2c4 at thinkpad ~ $ cat /etc/udev/rules.d/90-trackpoint.rules
> ACTION=="add", SUBSYSTEM=="hid", DRIVER=="lenovo_tpkbd", \
> ATTR{sensitivity}="230", \
> ATTR{press_to_select}="1"
>
> This works well and gets the job done. However, if my computer is in
> sleep mode, and then I plug in the keyboard, and then I resume my
> computer, the rule doesn't get applied. Likewise, if the rule is in
> effect, but then I put my computer to sleep, on resume, the rule isn't
> applied.
>
> Is this by design, and I need to add something to my rule to also
> active on resumption from sleep, or am I hitting some kind of bug?
This really sounds like something the lenovo_tpkbd driver should handle
internally: if the hw does not save its settings across suspend/resume
cycles, then the driver should do that instead...
udev rules are only executed when hw appears/disappears or "changes",
but not on resume/suspend... sorry...
My recommendation would be to file a bug against the driver in kernel
bugzilla...
Lennart
--
Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list