k290-fnkeyctl icon indicating copy to clipboard operation
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)

Open madadam opened this issue 9 years ago • 7 comments

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.

madadam avatar Dec 28 '15 13:12 madadam

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

milgner avatar Dec 28 '15 13:12 milgner

Cool! Let me know if you need someone to test it.

madadam avatar Dec 28 '15 14:12 madadam

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.

milgner avatar Dec 29 '15 18:12 milgner

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/

arichardson avatar Nov 10 '16 13:11 arichardson

Fix is in #13

arichardson avatar Nov 10 '16 13:11 arichardson

Worked fine for me (Mint 18.1, based on Xenial).

Deleetdk avatar Jun 01 '17 13:06 Deleetdk

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.

nuqz avatar May 06 '19 14:05 nuqz