Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I do not want my laptop to change brightness when my laptop power is plugged in or unplugged. I set my brightness based on how bright my surroundings are. If I am in a dark room, I set my brightness very low and when I plug my laptop in the brightness gets set to maximum which feels like sticking my eyes in boiling lava.

In System SettingsBrightness and Lock the Dim screen to save power checkbox is unchecked.

My laptop is an HP Mini 110

In case it is an acpi issue I have put my acpi-support file here

share|improve this question
Are you still using ACPI events? – pschmidt May 16 '12 at 22:31
How can I check? – DavidW May 26 '12 at 15:18

I tested a solution that works fine for me. One solution is to add a script file in /etc/pm/power.d/

Just creates a file

sudo vi /etc/pm/power.d/

Then writes this code into this file :

case "${1}" in
    true) #battery_mode
        xinput set-int-prop 12 277 8 2 3 0 0 1 3 2
        echo 4000 > /sys/class/backlight/intel_backlight/brightness
    false) #ac_mode
        xinput set-int-prop 12 277 8 2 3 0 0 1 3 2
        echo 4000 > /sys/class/backlight/intel_backlight/brightness

Now, you need to give execution rights to this file by typing

sudo chmod +x /etc/pm/power.d/

Now it should work fine, just test to plug/unplug your computer. Note that you can do similar things after a suspend (/etc/pm/sleep.d/, that's how I found out this solution... You will find information on the web...

Note that xinput is just a command for my trackpad to set the middle button working... You should skip the two lines xinput if not needed (or adapt ). For the value 4000, it may be diffrent for each screen, you should first see what is your max value with the command cat /sys/class/backlight/intel_backlight/max_brightness

Hope this helps, and that the moderator will not delete this post since this is an answer and not a question. Thanks

share|improve this answer
This is a super-complicated answer for such a simple question! Try looking at the other answers for a something simpler. – Chris Nash Jun 8 '14 at 20:12
What if there is no directory power.d? – Pithikos Jan 11 '15 at 20:16
@Albin For me, the script couldn't be run but manually (yes, I marked it as executable). – LogicStuff Jul 19 at 12:31

Just ran into the same problem on my Dell Vostro. Here's the solution that worked for me:

It turned out that Ubuntu just saves brightness level set by fn+brightness keys on my laptop. Different levels for different states: plugged and unpluged. So, I just had to set up my brightness level twice :)

I know it's super easy, but I still had to Google a bit before I came up to this. Maybe it will help someone else.

share|improve this answer

For me (with Lenovo X61s) the unwanted display dimming when unplugging from line power was apparently not related to power management software or similar, but rather due to a BIOS setting for screen brightness in Config-Display. Via that BIOS setting it was possible to avoid the dimming.

share|improve this answer

Under "brightness and lock" in the system settings, remove the checkbox from "Dim screen to save power".

This will keep your screen at the same brightness all the time, instead of dimming it when running on battery power and making it brighter when it's on mains power.

You should still be able to adjust the screen brightness manually as you desire in order to save power or when you need more light.

If your "brightness and lock" settings do not have this option, then you have a different issue, so let us know.

share|improve this answer
The checkbox "Dim screen to save power" is not checked. – DavidW May 24 '12 at 14:24
In that case you may want to add this information to your question, as well as information about which laptop you have. – thomasrutter May 24 '12 at 23:26
Thanks, information has been added. – DavidW May 26 '12 at 15:18

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.