LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   Brightness/Dim setting lost on reboot (https://www.linuxquestions.org/questions/ubuntu-63/brightness-dim-setting-lost-on-reboot-4175558011/)

mfoley 11-04-2015 09:21 PM

Brightness/Dim setting lost on reboot
 
Problem: I can dim my screen using System Settings > Brightness & lock, and sliding the Brightness slider. That works. The problem is that the setting is lost when I reboot and the brightness goes to max. How can I fix this?

I have a HP 2000 Notebook PC running Ubuntu 14.04.3. I have both Unity and Cinnamon desktops.

jamison20000e 11-04-2015 09:50 PM

Bad joke using this light icon...
 
:D
Hi.

Do you have a Fn key for that?

You could try setting up
Code:

xbacklight
or
Code:

xrandr
or like to run on boot? :)

mfoley 11-05-2015 01:28 AM

Thanks! The xbacklight did nothing and the /sys/class/backlight/ didn't seem to do anything. I didn't try the `setpci -s 00:02.0 F4.B=80` or `xgamma -gamma .75` suggestions. The xrandr did work!

I tried setting this up in rc.local for boot time, but it doesn't work yet. the `xrandr -q` command produces no output in rc.local. My guess is that the X system is not up yet. Do you know how to check for this? I've done some searching (and will continue), but I've turned up nothing so far.

jamison20000e 11-05-2015 11:19 AM

I did not play with /etc/rc.local much after failing my first couple of attempts... vi /etc/init.d/myscript looks promising tho? I used a GUI "System Settings" \ "Startup and Shutdown (Autostart, Service Manager, Session Management)" and it worked fine for me. All tho in KDE?

mjolnir 11-05-2015 03:00 PM

I'm running 14.04.3 on an old ThinkPad and Fn + Home raises and lowers brightness levels on mine, and sticks with reboots.

jamison20000e 11-05-2015 03:08 PM

Off topic:
 
I've got a T20 and T420 both dirt cheep, think' ;) I like the T20 more? :hattip:

mfoley 11-05-2015 10:38 PM

Quote:

Originally Posted by mjolnir (Post 5445231)
I'm running 14.04.3 on an old ThinkPad and Fn + Home raises and lowers brightness levels on mine, and sticks with reboots.

Well, maybe it's an idiosyncrasy with my HP 2000, dunno.

Turns out the xrandr doesn't work in a boot script because it never finds a display. Even after the system is up and running with a desktop showing. I tested this by having rc.local launch a script in the background that runs the `xrandr -q` command every 10 seconds for 5 minutes. I can tail the log it creates after the system is up and I've logged in and started a terminal session. It just keeps giving the message "no display found".

The other suggestion from that link did work.

Code:

$ ls /sys/class/backlight/
acpi_video0  radeon_bl0

$ cat /sys/class/backlight/acpi_video0/max_brightness
10

$ echo 7 > /sys/class/backlight/acpi_video0/max_brightness

I have 2 displays, so I had to experiment to determine which one was the laptop display (acpi_video0). I put that last `echo` command into my /etc/rc.local and it finally works on reboot!

Thanks for the help on this one!


All times are GMT -5. The time now is 04:16 AM.