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: https://forums.gentoo.org/viewtopic-t-994070-highlight-laptopmodetools.html 2) By the Arch/Manjaro crowd https://forum.manjaro.org/index.php?topic=15779.0 You can see the changes the author made since the 1.65 release: https://github.com/rickysarraf/laptop-mode-tools/compare/1.65...lmt-upstream 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 (http://mailman.samwel.tk/pipermail/laptop-mode/2014-August/000731.html), 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
Created attachment 383028 [details, diff] laptop-mode-tools-1.65-r1.patch Patch for laptop-mode-tools-1.65.ebuild, recommend to bump to -r1
Created attachment 383030 [details, diff] laptop-mode-tools-1.65-usb-autosuspend.patch Backported fixes
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. laptop-mode-tools-1.65-r1
Created attachment 383980 [details, diff] laptop-mode-tools-1.65-usb-autosuspend.patch