Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 520124 - app-laptop/laptop-mode-tools-1.65 has broken usb-autosuspend modules
Summary: app-laptop/laptop-mode-tools-1.65 has broken usb-autosuspend modules
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Alon Bar-Lev (RETIRED)
Depends on:
Reported: 2014-08-17 10:18 UTC by Ted Tanberry
Modified: 2014-08-30 19:07 UTC (History)
2 users (show)

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

laptop-mode-tools-1.65-r1.patch (laptop-mode-tools-1.65-r1.patch,890 bytes, patch)
2014-08-17 10:23 UTC, Ted Tanberry
Details | Diff
laptop-mode-tools-1.65-usb-autosuspend.patch (laptop-mode-tools-1.65-usb-autosuspend.patch,1.18 KB, patch)
2014-08-17 10:24 UTC, Ted Tanberry
Details | Diff
laptop-mode-tools-1.65-usb-autosuspend.patch (laptop-mode-tools-1.65-usb-autosuspend.patch,1.09 KB, patch)
2014-08-30 19:07 UTC, Alon Bar-Lev (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ted Tanberry 2014-08-17 10:18:22 UTC
For app-laptop/laptop-mode-tools-1.65 the author chose to completely deprecate the usb-autosuspend module in favour of incorporating all the functionality into the runtime-pm module. In the process of doing so, he forgot numerous changes and failed to remove a number of files. In effect, the 1.65 is somewhat broken. This effect has been documented in multiple places:

1) By Fitzcarraldo (and also me on my Lenovo X220) in our Gentoo forums:

2) By the Arch/Manjaro crowd

You can see the changes the author made since the 1.65 release:

He mainly forgot to change the following files:
1) modify /etc/rules/99-laptop-mode.rules
2) delete /etc/laptop-mode/conf.d/usb-autosuspend.conf and /usr/share/laptop-mode-tools/modules/usb-autosuspend
3) remove mention of usb-autosuspend in /etc/laptop-mode/laptop-mode.conf

I have collected all these details and backported them for laptop-mode-tools-1.65.ebuild. In addition, even when fully patched, the behaviour is still braindead: It defaults to autosuspending EVERY USB device. The author is aware of this (, but continues to believe in USB HID autosuspending being a good idea.

Anyhoo, I've taken the liberty to blacklist all USB HID and USB storage drivers, the latter of which is up for debate. Autosuspending HID every 2 seconds is pointless - even if it's the device's fault for not properly implementing autosuspend - it will break way too many setups. We should be conservative here and do like in 1.64, i.e. not autosuspending HID. Attached are my patches. Feedback and comments welcome.

Reproducible: Always
Comment 1 Ted Tanberry 2014-08-17 10:23:54 UTC
Created attachment 383028 [details, diff]

Patch for laptop-mode-tools-1.65.ebuild, recommend to bump to -r1
Comment 2 Ted Tanberry 2014-08-17 10:24:49 UTC
Created attachment 383030 [details, diff]

Backported fixes
Comment 3 Alon Bar-Lev (RETIRED) gentoo-dev 2014-08-30 19:07:11 UTC
I do not want to divert from upstream too much.

I applied the change to udev rule and disable the usb-autosuspend per default.

I agree with upstream that because there are invalid devices it does not mean that we should auto disable the good ones, so I did no blacklisted hid.

Comment 4 Alon Bar-Lev (RETIRED) gentoo-dev 2014-08-30 19:07:47 UTC
Created attachment 383980 [details, diff]