change screen brightness on battery and ac power on Sid

Kernels & Hardware, configuring network, installing services

change screen brightness on battery and ac power on Sid

Postby glarue » 2017-03-15 23:03

I was on Debian 8 (Jessie), and I believe the way I was controlling differential screen brightness on battery/ac power was through a short script in /etc/pm/power.d/ which looked like this:
Code: Select all
#!/bin/bash
case $1 in
   true) #on battery
      echo 250 > /sys/class/backlight/intel_backlight/brightness
      ;;
   false) #on ac
      echo 937 > /sys/class/backlight/intel_backlight/brightness
      ;;
esac


Now, I have switched to Debian Unstable, and it seems to have broken that functionality. I've identified "intel_backlight" as the correct device, and it changes if I use the following command:

Code: Select all
echo <int> | sudo tee /sys/class/backlight/intel_backlight/brightness


The script, however, no longer seems to have any effect. I've Googled around extensively but can't seem to find the right advice for the newer Debian sources.
glarue
 
Posts: 2
Joined: 2016-08-11 20:49

Re: change screen brightness on battery and ac power on Sid

Postby phenest » 2017-03-16 08:55

I have a Dell XPS 17 and the brightness control didn't work on Stretch, so I added this to the kernel boot parameters:
Code: Select all
acpi_backlight=video
NEC Spirit 550 P4 3.8GHz HT - 2GB RAM - nVidia 7600GT - Pioneer BDR-209DBK
ASUS Sabertooth P67 i7 3770K - 32GB RAM - 2x nVidia 660GTX SLI'd
User avatar
phenest
 
Posts: 1571
Joined: 2010-03-09 09:38
Location: The Matrix

Re: change screen brightness on battery and ac power on Sid

Postby debiman » 2017-03-17 20:02

glarue wrote:Now, I have switched to Debian Unstable, and it seems to have broken that functionality.

i'd suggest you use systemd functionality to get that working again.

the top results look relevant:
https://duckduckgo.com/?q="systemd"+screen+brightness+laptop+battery
User avatar
debiman
 
Posts: 1199
Joined: 2013-03-12 07:18


Return to System configuration

Who is online

Users browsing this forum: No registered users and 6 guests

fashionable