6
sign up log in tour help Take the 2minute tour × Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required. Desktop doesn't remember brightness settings after a reboot Every time I reboot my machine the brightness goes back to 100% in Gnome. I wish it would keep the last setting. Is there anyway? gnome brightness edited Dec 31 '11 at 20:33 Jorge Castro 21.9k 65 285 503 asked Sep 8 '10 at 1:53 Decio Lira 2,298 6 21 34 have you tried gnome-session-save? Hellola Sep 8 '10 at 2:55 Sorry, but there is no slider. Also in Ubuntu 11.04 i had the problem, that the brightness slider was not there, when booting up with AC connected. When I booted up on battery the slider was there. I hoped that this was fixed but now i still have a nearly dark screen, when booting up. user31707 Nov 1 '11 at 13:29 Anyone coming here with the same problem, check out @dolhow's answer below. That's the one that works. its_me Jan 19 '12 at 4:53 There is a bug report for this here: bugs.launchpad.net/ubuntu/+source/gnome-settings-daemon/+bug/… WarriorIng64 Nov 11 '12 at 19:30 1 In my case with Ubuntu 13.04 running over Acer 4752-6600 the correct param was: echo 976 > /sys/class/backlight/intel_backlight/brightness mlacunza Oct 15 '13 at 19:31 10 Answers This is supposed to be configurable in the energy options, set the brightness to the desired level and it will always be used. If you use a laptop you will also need to configure the level for battery mode as well... I found that Gnome has some issues about lcd panel brightness, e.g. if I run on battery mode and set the brightness manually to a given level and leave the laptop unattended for 10 seconds it will go back to the preset brightness when I take control back. Same goes when on A/C mode except it takes longer so goes unnoticed more easily. I believe all those settings should be saved somewhere and restored - at least for A/C mode. EDIT: For gnome3 this does not work (at least for me). edited Dec 21 '11 at 21:41 answered Sep 8 '10 at 2:06 levesque 1,165 1 11 23 I was hoping for something that automatically remembers my changes via keyboard shortcuts, but I guess you are right. Decio Lira Sep 8 '10 at 17:38 4 So the answer is...? Changing it in Screen settings doesn't save it for the next session, and there's nothing in Power options. seanmonstar Nov 10 '11 at 23:09 As far as I remember, the setting is supposed to be restored/saved between sessions. It has been a while since I last toyed with those settings and I don't have access to a machine running the latest Ubuntu at the moment, maybe this is a new bug? levesque Nov 11 '11 at 15:38 The file /etc/rc.local should look like this: #!/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. Ubuntu Community Ask! Developer Design Discourse Hardware Shop More

Ask brigjtness ubuntu not working

Embed Size (px)

Citation preview

Page 1: Ask brigjtness ubuntu not working

      

sign up log in tour help 

 Take the 2­minute tour ×Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Desktop doesn't remember brightness settings after a reboot

Every time I reboot my machine the brightness goes back to 100% in Gnome. I wish it would keep the last setting. Is

there anyway?

gnome brightness

edited Dec 31 '11 at 20:33

Jorge Castro

21.9k 65 285 503

asked Sep 8 '10 at 1:53

Decio Lira

2,298 6 21 34

– have you tried gnome-session-save? Hellola Sep 8 '10 at 2:55

Sorry, but there is no slider. Also in Ubuntu 11.04 i had the problem, that the brightness slider was not there,

when booting up with AC connected. When I booted up on battery the slider was there. I hoped that this was

fixed but now i still have a nearly dark screen, when booting up. user31707 Nov 1 '11 at 13:29

Anyone coming here with the same problem, check out @dolhow's answer below. That's the one that works.

its_me Jan 19 '12 at 4:53

There is a bug report for this here: bugs.launchpad.net/ubuntu/+source/gnome-settings-daemon/+bug/…

WarriorIng64 Nov 11 '12 at 19:30

1

In my case with Ubuntu 13.04 running over Acer 4752-6600 the correct param was: echo 976 >

/sys/class/backlight/intel_backlight/brightness mlacunza Oct 15 '13 at 19:31

10 Answers

This is supposed to be configurable in the energy options, set the brightness to the desired level

and it will always be used. If you use a laptop you will also need to configure the level for battery

mode as well...

I found that Gnome has some issues about lcd panel brightness, e.g. if I run on battery mode and set

the brightness manually to a given level and leave the laptop unattended for 10 seconds it will go

back to the preset brightness when I take control back. Same goes when on A/C mode except it

takes longer so goes unnoticed more easily. I believe all those settings should be saved somewhere

and restored - at least for A/C mode.

EDIT: For gnome3 this does not work (at least for me).

edited Dec 21 '11 at 21:41 answered Sep 8 '10 at 2:06

levesque

1,165 1 11 23

I was hoping for something that automatically remembers my changes via keyboard shortcuts, but I guess you are

right. Decio Lira Sep 8 '10 at 17:38

4

So the answer is...? Changing it in Screen settings doesn't save it for the next session, and there's nothing in

Power options. seanmonstar Nov 10 '11 at 23:09

As far as I remember, the setting is supposed to be restored/saved between sessions. It has been a while since I

last toyed with those settings and I don't have access to a machine running the latest Ubuntu at the moment,

maybe this is a new bug? levesque Nov 11 '11 at 15:38

The file /etc/rc.local should look like this:

#!/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.

Ubuntu Community Ask! Developer Design Discourse Hardware Shop More ›

Page 2: Ask brigjtness ubuntu not working

# bits.## By default this script does nothing.echo 0 > /sys/class/backlight/acpi_video0/brightnessexit 0

Per @zerdo: In my dell studio 1558 the brightness setting is stored in

. Just change the path if your computer doesn't use

the acpi_video0 folder.

/sys/class/backlight/intel_backlight/brightness

Also, per @Nick : If this is the only answer you read, note that the 0 in is going to be your

default brightness setting. I had set this up and it was driving me crazy for a long time : every time I

booted up, it would set it to the lowest brightness setting. I prefer mine to start at max brightness,

so I used instead. Your hardware might vary in brightness scale.

echo 0

echo 10

edited Mar 21 '13 at 16:25

belacqua

8,793 9 45 78

answered Oct 17 '11 at 13:59

dolhow

169 1 2

– This one works!!! its_me Jan 19 '12 at 4:53

1

In my dell studio 1558 the brightness setting is stored in /sys/class/backlight/intel_backlight/brightness, just

change the path if your computer doesn't use the acpi_video0 folder zurdo Feb 2 '12 at 16:59

If this is the only answer you read, note that the in is going to be your default brightness setting. I

had set this up and it was driving me crazy for a long time that every time I booted up, it would set it to the

lowest brightness setting. I prefer mine to start at max brightness, so I used instead. Your hardware

might vary in brightness scale.

0 echo 0

echo 10

Nick Feb 21 '13 at 15:28

This function, the backlight control, is dependent on your bios and kernel version.

Try these four things.

Kernel (boot) options

When you boot, at the grub screen, hit e to edit. To the kernel line add

Some hardware may work with different options.

nomodeset

acpi_backlight=vendor

Intel - Acer - or even

.

nomodeset acpi_backlight=intel acpi_backlight=acer_acpi acpi_osi=Linux

acpi_backlight=legacy

As you can see, you may need to google search for your settings.

quiet splash nomodeset acpi_backlight=vendor

If that works, edit and add those options to the default options./etc/default/grub

# command linesudo -e /etc/default/grub

# graphicalgksu gedit /etc/default/grub

Edit the "GRUB_CMDLINE_LINUX_DEFAULT" line so it looks like this

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset acpi_backlight=vendor"

Save your edit, update grub

sudo update-grub

Command line

If that does not work, you can try to manually set the brightness.

Path may vary with hardware / kernel version, may be , you may need to

browse the /proc/acpi directory to find the brightness setting and adjust the following commands

accordingly.

Note: /proc/acpi/video0 ...

cat /proc/acpi/video/VGA/LCD/brightness

The output of that command varies a bit with hardware, 1 -> 10 , 1 -> 12 , 1 -> 100 ??? Choose a value

and set it (choose the value for your hardware).

sudo echo 80 > /proc/acpi/video/VGA/LCD/brightness

If that works, add it to /etc/rc.local

# command linesudo -e /etc/rc.local

# graphicalgksu gedit /etc/rc.local

Page 3: Ask brigjtness ubuntu not working

Add in your setting above "exit 0"

echo 80 > /proc/acpi/video/VGA/LCD/brightness

xbacklight

You can also try xbacklight

sudo apt-get install xbacklight

You then adjust with the command line

# For 80 % brightnessxbacklight -set 80

Again, add that to /etc/rc.local

# command linesudo -e /etc/rc.local

# graphicalgksu gedit /etc/rc.local

Add in, above "exit 0"

xbacklight -set 80

setpci

You can try to set your brightness with setpci

The general syntax is

sudo setpci -s <address> f4.B=your_setting

You identify your pci bus address with

sudo lspci | grep VGA

Example

00:02.0 VGA compatible controller: Cirrus Logic GD 5446

setpci -s 00:02.0 F4.B=80

If you get your setting wrong, most likely you will just loose your display, and have to reboot. As this

is a hardware setting, you really need to identify your hardware and research the settings first.

Examples

Intel - https://bbs.archlinux.org/viewtopic.php?id=74914

Toshiba - http://www.linlap.com/wiki/toshiba+satellite+t130

Acer extensa - https://bugs.launchpad.net/ubuntu/+source/linux/+bug/518002

Ubuntu man page setpci

edited Dec 21 '11 at 23:48 answered Dec 21 '11 at 22:54

bodhi.zazen

32.6k 2 54 146

1

You should never, ever set 'acpi_osi=Linux'. The kernel ACPI code is carefully written to be compatible with

Windows, and therefore by default advertises itself at Windows so that the same BIOS functions are used. If you

override this, you are doomed to a grab bag of bugs in untested code paths that will never be fixed. Even if you

find that acpi_osi=Linux fixes your immediate symptom, you are going to end up with an unsupported mess.

slangasek May 30 '12 at 0:37

Here is a quick workaround for that :- edit the /etc/rc.local file by typing sudo gedit /etc/rc.local in

terminal comment out the by adding # in the begining such that it looks like this :-exit 0

#!/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.

#exit 0

Page 4: Ask brigjtness ubuntu not working

this is necessary otherise it wont work !

after this add the following line in the file

echo 0 > /sys/class/backlight/acpi_video0/brightness

such that it looks like this :-

#!/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.

#exit 0echo 0 > /sys/class/backlight/acpi_video0/brightness

replace 0 with the required brightness value ( ranges from 0 to 10 )

save the file and exit.

now try testing the setting by typing this command in terminal

echo 0 > /sys/class/backlight/acpi_video0/brightness

if the brightness changes to minimum , you have got it right ! reboot to see the changes.

Note :- you may have to replace acpi_video0 with your device code if you have a different one ( its

mostly acpi_video0 ). Most of u wont need to do so.

edited Oct 16 '11 at 9:55 answered Oct 16 '11 at 9:44

vasishath

119 1 3

– This should also work since has been commented out.exit 0 its_me Jan 19 '12 at 4:55

2 – But I don't think commenting out is the right thing to do.exit 0 its_me Jan 19 '12 at 5:09

To adjust screen brightness in 11.10, you will need to access the "System Settings":

1. Right-click directly to the right of your username in the toolbar in the upper-right corner of

your screen.

2. Select "System Settings."

3. Select "Screen".

4. Drag the slider with your mouse to adjust screen brightness.

If Ubuntu isn't remembering your adjustment, you may use an application or you may need to use

the workaround for GNOME: Brightness setting not saved in Ubuntu 11.10

edited Oct 24 '11 at 3:32 answered Oct 24 '11 at 2:39

KaitlinM

139 6

2

Okay, So i attempted to do this and it did not remember it. so after modifying the script I then enter the

command "echo 0 > /sys/class/backlight/acpi_video0/brightness" but that does not work, because

my/sys/class/backlight directory contains a dell_backlight and a intel_backlight philipballew Nov 2 '11 at 5:08

– I have the same issue, this parameter is not remembered between sessions. levesque Dec 21 '11 at 21:40

Here is a great work around I found, credit and thanks to thaelim on Ubuntu forum

just download the script edit

the perimeters at the beginning of the script and save it when your done to your home folder. Heres

the download of the full script

How to get

effective display brightness management under Unity/Gnome Shell

brightmanager.py

These are the variable perimeters to change to your desired settings, as you can see I like mine at 20

all the time with no idle timeout.

IDLE_DIM_TIME = 0IDLE_DIM_AC = False

IDLE_DIM_BATTERY = False

Page 5: Ask brigjtness ubuntu not working

IDLE_DIM_BATTERY = False

IDLE_BRIGHT = 20BRIGHT_BATTERY = 20BRIGHT_AC = 20

After saving then open a terminal and enter

chmod +x brightmanager.py

Then open up startup applications from the dash, click on the add button, name your start up

application, and enter your command as:

python /home/david/brightmanager.py

replacing "david" with your home folders name, then add a description and click add, logout, and

back in, and your done, you now have brightness settings for battery, AC, and idle.

You will want to do this for each user and each user should have their own copy of the script in their

home folder with their own desired settings in the beginning of the script.

answered Nov 11 '12 at 17:24

dginsd

190 6

There seems to be a bug report abaout this:

https://bugs.launchpad.net/ubuntu/+source/upower/+bug/840707

For me, it has worked to place:

echo 0 > /sys/class/backlight/acpi_video0/brightness

in /etc/rc.local.

Or, as others suggested,

echo 5 > /sys/class/backlight/*/brightness

might work.

answered Dec 29 '11 at 22:06

duli

19 2

1 – Nice find, but I don't think that's exactly the right bug. I think is.this one WarriorIng64 Nov 11 '12 at 19:30

The "Screen" option of "System Settings" works OK, and in

the option also change accordingly, but the problem is

that nothing happens with the real brightness.

/sys/class/backlight/acpi_video0/brightness

I found the solution to my problem:

Add the next option under your "Device" section in and restart:/etc/X11/xorg.conf

Option "RegistryDwords" "EnableBrightnessControl=1"

This worked for my NVIDIA card (Ubuntu 11.10 x64 on Toshiba Satellite L745-SP4142CL)

Page 6: Ask brigjtness ubuntu not working

edited Apr 5 '12 at 9:06

fossfreedom♦93.2k 15 200 252

answered Apr 4 '12 at 16:44

Jorge

29 1

If use nVidia just open dash home and type "NVIDIA X server setting".

Then click "X Server Color Correction" under X Screen O.

Reduce the Brightness level.

Click "Confirm current changes" before the time runs out.

Choose Quit to save the change.

It worked for me with the following spesifications:

Toshiba Satellite L745

Intel Core i3

NVidia GeForce with CUDA

RAM 6 GB

edited Jul 14 '12 at 3:48

Eliah Kagan

31.6k 9 84 172

answered Apr 13 '12 at 18:32

Chuaka

19 1

Run

echo 2 > /sys/class/backlight/acpi_video0/brightness

edited Oct 20 '11 at 17:22

Kris Harper

5,207 7 23 54

answered Oct 20 '11 at 13:20

Suresh Kumar Pakalapati

7 1

by protected Community♦Nov 1 '11 at 19:26

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an

answer now requires 10 on this site.

Would you like to answer one of these instead?

reputation

unanswered questions