clockworkpi

Changing Brightness (Terminal)

You can change the brightness of your DevTerm in the terminal. To do so, just echo a new value into the brightness file which lives @ /sys/class/backlight/backlight@0. In this folder, you’ll find some useful files, such as: actual_brightness, brightness & max_brightness.

This was tested and accomplished on the DevTerm running raspbian.

How

To change brightness, you can change brightness to anything between 0 and 9. 0 being backlight off, and 9 being brightest. The device defaults to 5.

To change brightness, type in (changing N for brightness 0 thru 9):

echo N > /sys/class/backlight/backlight@0/brightness

Take Note

  • For quicker access to changing brightness, see @guu’s solution for adjustment via FN keys.
  • Setting brightness to 0 turns off the backlight and makes the display near impossible to view.
  • This command may require you to elevate your terminal session to root using su, or
sudo bash -c "echo 5 > /sys/class/backlight/backlight@0/brightness"
5 Likes

Good

there is a deb for this job,too

sudo apt update && sudo apt install devterm-backlight-rpi 
sudo reboot

then we can use FN+< > to adjust the backlight

I made this deb after the CM3 shippment,so …

10 Likes

incredible, thank you; it’s a shame the keycaps don’t include notations for this.

Does this publish to a global variable? one of my wishlist mods for my devterm is to backlight the keyboard, syncing to the screen brightness would be ideal

2 Likes

Oh this is even more usable than doing it through term!
Thanks for sharing.

Good luck with that. Not impossible, but not going to be easy

could you please upload the source of package 'devterm-backlight-rpi ’ on github?
I prefer to use console mode (multiuser.target), but the function does not work in the mode.
Thanks

here is the source code, very tiny code

I used xbindkeys with this modified rpi-backlight to do the brightness control

2 Likes

Looking at the source, I think it can be applied to other parts. Thank you.

I figured I’d ask this here, instead of starting a new thread; can anyone point me in the right direction for the screen timeout/turn off value? I didn’t think there was one until i walked away from mine and came back, thought it had powered off but a flick of the trackball brought it back to life. Is this the “sleep” mode referenced in the manual (eg don’t pull the batteries in sleep mode)? I initially thought the power button was sending it to a light sleep, until i noticed that the same command line scrolled past as when i used sudo shutdown

2 Likes