Brightness settings reset

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post please read this

Brightness settings reset

Postby AndrewAmmerlaan on Thu Jan 16, 2014 10:35 am

I got a small problem, every time I restart my computer the brightness settings reset, Linux boots with brightness to the max (which is really bright) this means I have to adjust the brightness manually, is there a way to get linux remembering my brightness settings, I am using Linux Mint 16 Cinnamon.
AndrewAmmerlaan
Level 1
Level 1
 
Posts: 29
Joined: Thu Jan 09, 2014 12:55 pm
Location: The Netherlands

Linux Mint is funded by ads and donations.
 

Re: Brightness settings reset

Postby karlzap2 on Fri Jan 17, 2014 12:19 pm

I also have this problem, though in my case it is a matter of excessive dimness. I set the brightness right and then on reboot the setting is forgotten.
karlzap2
Level 1
Level 1
 
Posts: 22
Joined: Fri Jan 17, 2014 11:19 am

Re: Brightness settings reset

Postby AndrewAmmerlaan on Fri Jan 17, 2014 12:30 pm

I think this is a Cinnamon bug, I don't have this problem in Mate
AndrewAmmerlaan
Level 1
Level 1
 
Posts: 29
Joined: Thu Jan 09, 2014 12:55 pm
Location: The Netherlands

Re: Brightness settings reset

Postby AndrewAmmerlaan on Fri Jan 17, 2014 3:49 pm

I found this on the internet
Code: Select all
sudo vim /etc/rc.local


and just right before the exit line add this line

Code: Select all
echo 9 > /sys/class/backlight/acpi_video0/brightness

you can change the 9 to anything between 0 and 15, i changed it to 7 because it's almost 50% brightness instead of the default 100%
AndrewAmmerlaan
Level 1
Level 1
 
Posts: 29
Joined: Thu Jan 09, 2014 12:55 pm
Location: The Netherlands

Re: Brightness settings reset

Postby karlzap2 on Sat Jan 18, 2014 10:20 am

AndrewAmmerlaan wrote:I found this on the internet
Code: Select all
sudo vim /etc/rc.local


and just right before the exit line add this line

Code: Select all
echo 9 > /sys/class/backlight/acpi_video0/brightness

you can change the 9 to anything between 0 and 15, i changed it to 7 because it's almost 50% brightness instead of the default 100%

Thank you for the reply.

Unfortunatley, this does not work for me.

I noticed in the directory " /sys/class/backlight/acpi_video0/" was a file called "max_brightness". Catting it revealed a contents of "100". Aha: the max is not 15, but 100. I edited the command in the rc.local to set it to 50 (half brightness seemed a good testing value) and then rebooted. Nope.

Saw that the backlight directory also had a intel_backlight directory off of it. Now, I *do* have an intel card but as far as I know the installer for Mint 16 ignored it. Nonetheless, I thought it a good idea to take a look a this directory. I found it had a similar layout within it. Found that its max_brightness was 5015. Added this to my r.local:
Code: Select all
echo 4800 > /sys/class/backlight/intel_backlight/brightness


Rebooted. Nope. Still no effect.

Checked that my rc.local had its execute bit set. Yup. Command is being run, then, just not having any effect.
karlzap2
Level 1
Level 1
 
Posts: 22
Joined: Fri Jan 17, 2014 11:19 am

Re: Brightness settings reset

Postby karlzap2 on Fri Jan 24, 2014 11:40 am

After a few days ... the problem fixed itself. That was a surprise. Not sure if I should be happy that it fixed itself, or if I should be wary that it will un-fix itself in a similar random way in the future.
Last edited by karlzap2 on Sun Jan 26, 2014 7:31 pm, edited 1 time in total.
karlzap2
Level 1
Level 1
 
Posts: 22
Joined: Fri Jan 17, 2014 11:19 am

Re: Brightness settings reset

Postby kurotsugi on Fri Jan 24, 2014 1:53 pm

Code: Select all
echo 9 > /sys/class/backlight/acpi_video0/brightness
this command have few limitation.
1. you need to put 'chmod 777 /sys/class/backlight/acpi_video0/brightness' above that command.
2. it doesn't work if the system isn't using acpi to control the brightness. take a look into /sys/class/backlight. if acpi_video0 didn't exist it means your system isn't using acpi to control brightness, thus, this trick won't work.

a complete content of rc.local using this trick would be something like this
Code: Select all
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

#brightness setting
chmod 777 /sys/class/backlight/acpi_video0/brightness
echo 5 > /sys/class/backlight/acpi_video0/brightness

exit 0


Unfortunatley, this does not work for me.

I noticed in the directory " /sys/class/backlight/acpi_video0/" was a file called "max_brightness". Catting it revealed a contents of "100". Aha: the max is not 15, but 100. I edited the command in the rc.local to set it to 50 (half brightness seemed a good testing value) and then rebooted. Nope.

Saw that the backlight directory also had a intel_backlight directory off of it. Now, I *do* have an intel card but as far as I know the installer for Mint 16 ignored it. Nonetheless, I thought it a good idea to take a look a this directory. I found it had a similar layout within it. Found that its max_brightness was 5015. Added this to my r.local:
as expected, it doesn't work. max_brightness file do nothing with the screen brightness. anything you do won't affect your screen brightness. unfortunately, this command, echo 4800 > /sys/class/backlight/intel_backlight/brightness isn't enough. you need additional permission to rewrite the value of that file. the correct one should be
Code: Select all
chmod 777 /sys/class/backlight/intel_backlight/brightness
chmod echo 2400 > /sys/class/backlight/intel_backlight/brightness


I have tried both this trick and both of them are working. if it doesn't work you can try another trick by using xbacklight and run it at startup.
kurotsugi
Level 5
Level 5
 
Posts: 702
Joined: Fri Jan 25, 2013 3:54 am

Linux Mint is funded by ads and donations.
 

Return to Other topics

Who is online

Users browsing this forum: No registered users and 5 guests