What is the right way to remove a module before suspend with systemd?
I have buggy hardware that requires the psmouse module to be removed before the system is suspended in order to resume properly. With pm-utils pm-action you could put a file in /etc/pm/config.d which set a variable called SUSPEND_MODULES to remove the offending kernel module.
In Fedora 19, if I run pm-suspend, everything still works fine. But if I click the Suspend menu option in Gnome 3, or close the lid of the laptop, the system arrives at the systemd suspend.target (somehow) and the psmouse kernel module is not removed.
I see that I can put a script in /usr/lib/systemd/system-sleep that would be executed, but writing a script to load and unload psmouse via modprobe/rmmod seems... messy. Is there no clean way to do this, like in pm-utils?


Reply With Quote
