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
  DietPi OS for Pinebook MichaIng 3 5,146 03-11-2024, 05:02 PM
Last Post: oxoocoffee
  Slarm64 on Pinebook [Slackware Arm - 64 bit] KRT 46 59,559 09-26-2023, 03:18 PM
Last Post: mara
  Broke pinebook GUI, what to do, fix or install new? acruhl 2 775 07-13-2023, 05:43 PM
Last Post: acruhl
  Orignal PineBook jwp1000 1 606 07-10-2023, 07:44 AM
Last Post: tophneal
  Pinebook no longer boots rjtanner 12 3,242 04-13-2023, 01:09 PM
Last Post: tophneal
  Stock Debian on original Pinebook moonwalkers 1 3,115 01-29-2022, 10:37 PM
Last Post: cel
  Write image to eMMC - Pinebook 11.6" irongarment 4 3,665 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 5,083 05-07-2021, 10:20 AM
Last Post: tophneal
  pinebook.kde.org.uk no longer has release file?? supermassive 1 3,714 01-20-2021, 11:18 AM
Last Post: tophneal
Question Ran apt update on my Pinebook.. ford442 0 2,735 12-25-2020, 04:40 PM
Last Post: ford442

Forum Jump:


Users browsing this thread: 1 Guest(s)