Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multimedia keys behaviour reverted after resume (the 20-k290.sh script does not run on Ubuntu as pm-utils are not used anymore) #16

Open
madadam opened this issue Dec 28, 2015 · 7 comments

Comments

@madadam
Copy link

madadam commented Dec 28, 2015

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.

@milgner
Copy link
Owner

milgner commented Dec 28, 2015

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" notifications@github.com 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:
#16

@madadam
Copy link
Author

madadam commented Dec 28, 2015

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

@milgner
Copy link
Owner

milgner commented Dec 29, 2015

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.

@arichardson
Copy link

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 added a commit to arichardson/k290-fnkeyctl that referenced this issue Nov 10, 2016
@arichardson
Copy link

Fix is in #13

@Deleetdk
Copy link

Deleetdk commented Jun 1, 2017

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

@nuqz
Copy link

nuqz commented May 6, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants