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

Backlight color preferences reset on reboot, suspend/resume. #38

Open
bryanpaget opened this issue Dec 23, 2019 · 0 comments
Open

Backlight color preferences reset on reboot, suspend/resume. #38

bryanpaget opened this issue Dec 23, 2019 · 0 comments

Comments

@bryanpaget
Copy link

bryanpaget commented Dec 23, 2019

The color settings on the Darter Pro keyboard do not persist across reboots and suspend/resume cycles.

I've made a hack that works (most of the time). I made a systemd sleep script:

bryan@pop-os:~/bin$ cat /lib/systemd/system-sleep/lights 
#!/bin/sh

case $1/$2 in
	pre/*)
		echo "Saving Backlight Color!"
		head -n 1 /sys/class/leds/system76_acpi::kbd_backlight/color > /var/log/color
		echo 0 > /sys/class/leds/system76_acpi\:\:kbd_backlight/brightness
		;;
	post/*)
		echo "Restoring Backlight Color!"
		color=$(head -n 1 /var/log/color)
		echo $color > /sys/class/leds/system76_acpi\:\:kbd_backlight/color
		echo 100 > /sys/class/leds/system76_acpi\:\:kbd_backlight/brightness
		;;
esac

And for reboots I have a systemd service that runs the following script:

#!/bin/bash

echo 0 > /sys/class/leds/system76_acpi\:\:kbd_backlight/brightness
color=$(head -n 1 /var/log/color)
echo $color > /sys/class/leds/system76_acpi\:\:kbd_backlight/color
echo 100 > /sys/class/leds/system76_acpi\:\:kbd_backlight/brightness

But this does not work all the time for some reason... and it does not stop the backlight from flashing blue once before taking on the correct color.

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

1 participant