-
Notifications
You must be signed in to change notification settings - Fork 7
Pinebook LCD Brightness script
Download the support script, place in /usr/local/bin
, and make sure it's executable (i.e. chmod +x
)!
sudo addgroup gpio
sudo usermod -aG gpio user-name
Download the systemd service file, place it in /etc/systemd/system
and run sudo systemctl enable pinebook-lcd-brightness-gpio
to enable it.
Add the permission changes to rc.local so they are persistent (add the following line before exit 0):
/usr/local/bin/pinebook_lcd-brightness.sh -b
Add permission changes to rc.local so they are persistent (add following lines before exit 0):
chown root:gpio /sys/class/backlight/lcd0/actual_brightness /sys/class/backlight/lcd0/max_brightness /sys/class/backlight/lcd0/brightness
chmod 664 /sys/class/backlight/lcd0/actual_brightness /sys/class/backlight/lcd0/max_brightness /sys/class/backlight/lcd0/brightness
xbindkeys is the hotkey 'glue', and xbindkeys-config is the GUI config editor.
sudo apt-get install -y xbindkeys xbindkeys-config
Run xbindkeys
- I needed to run some config initialisation command the first time I ran it...
Then run xbindkeys-config
. Basically, Click new to create a new binding. give your key binding a name e.g LCD Up, then choose a hotkey by pressing get key and pressing your prefered combination (eg Ctrl+Fn+UpArrow) and then enter the command as pinebook_lcd-brightness.sh -i 10
(change the number if you want smaller or bigger jumps in brightness). Then add another another one for the LCD down control, and use pinebook_lcd-brightness.sh -d 10
as the command. Click Save & Apply & Exit when you're done.
This is to allow changes to permissions and user group to take effect