How to Configure Screen Brightness in mate on pinebook via terinal?
#7
Thank you for the great advice @MarkHaysHarris777!
To get this work on my Pinebook (1080p - Arch image with i3) I had to change the file from  /sys/class/backlight/lcd0/brightness to /sys/class/backlight/backlight/brightness, the top value from 100 to 10  and the stepping to single digits. I'm not sure if this is due to the hardware or the os or both.

To get the max possible value: `cat /sys/class/backlight/backlight/max_brightness`

The script to raise the brightness then looks like this:


Code:
#!/bin/bash

LCDVALUE=`cat /sys/class/backlight/backlight/brightness`
NEWVALUE=$(( $LCDVALUE + 1 ))

if [ $NEWVALUE -le 10 ]
then
  echo $NEWVALUE > /sys/class/backlight/backlight/brightness
  echo $NEWVALUE
else
  echo $LCDVALUE
fi

and the one to decrease it (careful - this can completely dim the screen when the value gets to 0):


Code:
#!/bin/bash

LCDVALUE=`cat /sys/class/backlight/backlight/brightness`
NEWVALUE=$(( $LCDVALUE - 1 ))

if [ $NEWVALUE -ge 0 ]
then
  echo $NEWVALUE > /sys/class/backlight/backlight/brightness
  echo $NEWVALUE
else
  echo $LCDVALUE
fi

More info: https://wiki.archlinux.org/index.php/backlight


Messages In This Thread
RE: How to Configure Screen Brightness in mate on pinebook via terinal? - by mikee3000 - 12-02-2018, 05:37 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Irradium (based on crux linux) Pinebook A64 (aarch64) mara 1 597 01-05-2025, 11:46 PM
Last Post: tllim
  DietPi OS for Pinebook MichaIng 3 8,593 03-11-2024, 05:02 PM
Last Post: oxoocoffee
  Slarm64 on Pinebook [Slackware Arm - 64 bit] KRT 46 77,751 09-26-2023, 03:18 PM
Last Post: mara
  Broke pinebook GUI, what to do, fix or install new? acruhl 2 2,162 07-13-2023, 05:43 PM
Last Post: acruhl
  Orignal PineBook jwp1000 1 1,605 07-10-2023, 07:44 AM
Last Post: tophneal
  Pinebook no longer boots rjtanner 12 7,678 04-13-2023, 01:09 PM
Last Post: tophneal
  Stock Debian on original Pinebook moonwalkers 1 4,306 01-29-2022, 10:37 PM
Last Post: cel
  Write image to eMMC - Pinebook 11.6" irongarment 4 5,555 01-04-2022, 09:22 PM
Last Post: irongarment
  E: The repository 'http://pinebook.kde.org.uk bionic Release' no longer has a Release pixelpaperyarn 3 6,664 05-07-2021, 10:20 AM
Last Post: tophneal
  pinebook.kde.org.uk no longer has release file?? supermassive 1 4,738 01-20-2021, 11:18 AM
Last Post: tophneal

Forum Jump:


Users browsing this thread: 1 Guest(s)