k290-fnkeyctl
k290-fnkeyctl copied to clipboard
Multimedia keys behaviour reverted after resume (the 20-k290.sh script does not run on Ubuntu as pm-utils are not used anymore)
Hello,
After my machine resumes from suspend, the F-keys are reverted back to their default multimedia behaviour. This is because the /etc/pm/sleep.d/20-k290.sh
script is not executed anymore. This is because Ubuntu switched to systemd and no longer uses pm-utils (not sure in which version of Ubuntu this happened). I fixed it by putting a script with the following content:
#!/bin/bash
case "$1" in
post)
/usr/local/sbin/k290_fnkeyctl > /dev/null
;;
esac
exit 0
in /lib/systemd/system-sleep
and making it executable. I suspect there is probably more proper way to do it, but this worked for me.
Thank you for the report! I personally don't use Ubuntu so didn't know that they had changed to systemd as well. I'll adapt the packaging script accordingly!
On 28 December 2015 14:28:46 CET, "Adam Cigánek" [email protected] wrote:
Hello,
After my machine resumes from suspend, the F-keys are reverted back to their default multimedia behaviour. This is because the
/etc/pm/sleep.d/20-k290.sh
script is not executed anymore. This is because Ubuntu switched to systemd and no longer uses pm-utils (not sure in which version of Ubuntu this happened). I fixed it by putting a script with the following content:#!/bin/bash case "$1" in post) /usr/local/sbin/k290_fnkeyctl > /dev/null ;; esac exit 0
in
/lib/systemd/system-sleep
and making it executable. I suspect there is probably more proper way to do it, but this worked for me.
Reply to this email directly or view it on GitHub: https://github.com/milgner/k290-fnkeyctl/issues/16
Cool! Let me know if you need someone to test it.
I just realized that I didn't add any packaging for Ubuntu yet. The install.sh
script just checks for the existence of /etc/pm/sleep.d
and /usr/lib/systemd/system-sleep/
respectively. So if you installed from a repository clone, you may just need to run it again and it should install the systemd-script. You can remove the script in /etc/pm/sleep.d
then, too.
I just ran into this too: The systemd files do not work on Ubuntu because it patches systemd to look for scripts only in /lib/systemd/system-sleep/
instead of /usr/lib/systemd/system-sleep/
Fix is in #13
Worked fine for me (Mint 18.1, based on Xenial).
I've used Spone's fork which have @arichardson's commits already merged and it worked fine for me. By the way I'm using Debian but the problem still affected me.