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

Creating systemd integration to set desired color scheme at boot time #13

Closed
LeoniePhiline opened this issue Jun 9, 2019 · 5 comments · Fixed by #34
Closed

Creating systemd integration to set desired color scheme at boot time #13

LeoniePhiline opened this issue Jun 9, 2019 · 5 comments · Fixed by #34

Comments

@LeoniePhiline
Copy link

The default blue backlight colors are loaded on boot. Any changes applied through the aucc command are not permanent.

Since elevated privileges are necessary to communicate with the USB controller, placing an aucc script in your Desktop environment's start folder (e.g. .config/autostart-scripts/) is not comfortable, since you will be prompted for your sudo password each time your display manager starts up plasma or gnome (or whichever environment you prefer).

Instead, the following should happen:

  • The GUI or command line tool writes the desired color scheme (or aucc parameters) into a system configuration file, like /etc/aucc.conf.
  • A systemd service is created and enabled for auto-start during boot, which runs aucc with root privileges, applying the color scheme from /etc/aucc.conf to the USB keyboard controller.
@rodgomesc
Copy link
Owner

I believe the most comfortable way to do this is using crontab instead of systemd, as it would not be necessary to create a file either by simply typing crontab -e with elevated privileges, and adding:

@reboot aucc -c color -b brightness

this may be easier to understand for new users on linux

@LeoniePhiline
Copy link
Author

LeoniePhiline commented Jun 9, 2019

Do you know how @reboot handles suspend and hibernate?

Just now I tested hibernation (without crontab), and unfortunately the background lights do not 'survive' the hibernate-resume cycle. They are back to the default blue after resume.

Also, cron with @reboot does not seem to be so reliable: https://unix.stackexchange.com/a/109805

@rodgomesc
Copy link
Owner

hmmm, have you tried using systemD with timers? I'll do some tests

@rodgomesc
Copy link
Owner

when suspending the leds return to normal for me by pressing any key, already while hibernating, hibernation does not work very well on my laptop with fedora 30 silverblue, I believe it is some issue

@rodgomesc
Copy link
Owner

rodgomesc commented Jun 10, 2019

@LeoniePhiline

I do not know if you received my feedback on the donation, but I'll leave it here anyway:

coffe

rodgomesc added a commit that referenced this issue Dec 27, 2019
fix #13 #28 - now color changes are kept after reboot without additional configurations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants