FS#28573 - laptop-mode: failed - udev not active? [but udevd is fine]

Attached to Project: Arch Linux
Opened by cfr (cfr42) - Wednesday, 22 February 2012, 00:20 GMT
Last edited by Tom Gundersen (tomegun) - Tuesday, 13 March 2012, 23:40 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Tom Gundersen (tomegun)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 3
Private No

Details

Description:

Following recent updates to udev, maybe laptop-mode, maybe more, (expected) messages such as these from messages.log:

Feb 20 21:19:02 localhost laptop-mode: Laptop mode
Feb 20 21:19:02 localhost laptop-mode: enabled,
Feb 20 21:19:02 localhost laptop-mode: not active [unchanged]
Feb 20 21:19:06 localhost laptop-mode: Laptop mode
Feb 20 21:19:06 localhost laptop-mode: enabled, not active

are accompanied by (unexpected) messages such as these in errors.log:

Feb 20 21:19:07 localhost laptop-mode: failed - udev not active?
Feb 20 21:19:07 localhost laptop-mode: failed - udev not active?
Feb 20 21:19:07 localhost laptop-mode: failed - udev not active?
Feb 20 21:19:07 localhost laptop-mode: failed - udev not active?
Feb 20 21:19:07 localhost laptop-mode: failed - udev not active?
Feb 20 21:19:07 localhost laptop-mode: failed - udev not active?
Feb 20 21:19:07 localhost laptop-mode: failed - udev not active?
Feb 20 21:19:07 localhost laptop-mode: failed - udev not active?

But udevd is definitely running:

$ ps ax | grep udev
160 ? Ss 0:02 /lib/udev/udevd --daemon

Additional info:

extra/laptop-mode-tools 1.60-1
core/udev 181-2
core/linux 3.2.6-2

A forum thread discussing this is at https://bbs.archlinux.org/viewtopic.php?id=135665.

Steps to reproduce:

Use laptop-mode-tools and make sure udev is at 181. Then look in the logs. At least, that seems to be what is common to those reporting in the thread.

Note that it is not necessarily obvious that anything is wrong unless you examine the logs. Indeed, it isn't clear whether anything is wrong except what's in the logs. I'm also not clear whether this is a problem with laptop-mode-tools, udev or laptop-mode itself.
This task depends upon

Closed by  Tom Gundersen (tomegun)
Tuesday, 13 March 2012, 23:40 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed in udev.
Comment by Dave Reisner (falconindy) - Thursday, 23 February 2012, 02:38 GMT
Sure, because laptop-mode-tools is doing stupid things and hardcoding the path to udevadm in some places, but not others:

$ grep -rn udevadm
usr/share/laptop-mode-tools/modules/hdparm:29: if [ -x /sbin/udevadm ]; then
usr/share/laptop-mode-tools/modules/hdparm:30: eval "$(udevadm info -q env -n $1 | egrep '(ID_TYPE=|ID_BUS=)' )"
usr/share/laptop-mode-tools/modules/hdparm:141:if [ -x "$(which udevadm 2> /dev/null)" ]; then
usr/share/laptop-mode-tools/modules/hdparm:142: UDEVVERSION=$(udevadm info -V)
usr/share/laptop-mode-tools/modules/hdparm:145: [a-z]) UDEVVERSION=$(udevadm info -V | awk '{print $3}')
usr/share/laptop-mode-tools/modules/hdparm:154: log "VERBOSE" "udevadm info present but version not > 070, not using udev"

In particular, that first instance is where this error comes from.

Loading...