23

When I am using my laptop, I continually adjust the screen's brightness based on the lighting conditions in the room (e.g. how much light is coming in from windows, etc.). But if I unplug the laptop or plug it back in, Windows looks at the default brightness setting in the power profile for "on battery" or "plugged in" and changes the brightness accordingly. This is a jarring experience and then I have to hunt down the ideal brightness for my current situation again, rather than getting on with my work.

I would like to make it so that plugging or unplugging the battery is not a trigger that adjusts the screen brightness at all. The screen brightness should only change when I adjust it myself. Does anybody know how this might be accomplished?

Edit: I have encountered this issue in both Windows Vista and Windows 7.

Nomad
  • 331

7 Answers7

8

Ok, after few hours of brain excercies i have made this powershell script..here it is

while($true)
{

$a = Get-WmiObject -ns root/wmi -class wmiMonitorBrightNess
$a1 = $a.Currentbrightness

$b = Get-WmiObject -ns root/wmi -class batterystatus
$b1 = $b.poweronline

start-sleep 1

$b = Get-WmiObject -ns root/wmi -class batterystatus
$b2 = $b.poweronline

If ($b2 -ne $b1)
{
$c = Get-WmiObject -ns root/wmi -class wmiMonitorBrightNessMethods
$c.WmiSetBrightNess(0,$a1)
}

}

Copy in notepad and save with ".ps1" extension.

What it does is, it frequently checks for the power state plugged in or not. If power state is changed it will restore the previous brightness value.

I have tested this in my laptop with Win8.1, works fine.

  • You can adjust the responsiveness by modifying start-sleep value (currently it is 1 second)

  • To run this script Powershell execution policy must be changed from default.

  • This script is only theoretical example, in practice the powershell windows will remain open, may be problematic for some. I am not discussing the ways to hide the window.

DrNT007
  • 93
4

I was getting mad with the same problem as Nomad's and DrNT007's solution worked great.

I searched a bit on the net in order to hide the powershell window and came to this thread and found user2656928's solution the best suiting for me: just add the following code at the top of DrNT007's script and the powershell window will momentarily show and then vanish:

$t = '[DllImport("user32.dll")] public static extern bool ShowWindow(int handle, int state);'
add-type -name win -member $t -namespace native
[native.win]::ShowWindow(([System.Diagnostics.Process]::GetCurrentProcess() | Get-Process).MainWindowHandle, 0)

Then, I wanted to put the script in the windows startup folder but it gave me an error. I'm definitely a noob and solved this problem just by trial and error: I found out that the script name (and its path, i presume) must NOT contain spaces but, still, I can't understand why it gives error if directly put in the startup window... Anyway, i have put it in the windows folder and shortcutted it in the startup folder. This way, in Windows 8.1, works like a charm.

0

windows 7,

look in the Control Panel\Hardware and Sound\Power Options\Edit Plan Settings\

On Battery or Plugged In

Logman
  • 3,660
-2

Open Power Options > Change Plan Settings (for the power plan that has the radio button selected) > Change Advanced Power Settings > Display > Display Brightness

Set "On Battery" to the same percentage as "plugged in" by left clicking the "on battery" text

enter image description here

Moab
  • 58,769
-2

Below dimmed display brightness should be enable adaptive brightness. Turn that off and it will stay the same brightness whether it's bright or dark.

-2

For me (on an HP EliteBook 8570w), I had to change a graphics card power settings:

Control Panel -> Power Options -> Edit Plan Settings -> Change advanced power settings -> ATI Graphics Power Settings -> ATI Powerplay Settings -> On battery to "Maximize Performance" instead of “Maximize Battery Life”

You will also, of course, want to make sure the Display Brightness on battery is set to 100% as others have mentioned.

caleb
  • 212
  • 2
  • 4
-2

For all HP/Compaq Laptops could this be working: - look at section "Adjust the LCD brightness using the function keys" http://h10025.www1.hp.com/ewfrf/wc/document?cc=us&lc=en&docname=c00832191

I unplugged the AC adapter/charger and pressed Fn+F8 (2-3 times should get to 100%) to bright up the display; Fn+F7 to lower the brightness. I had to plug in the AC adapter and unplug it so the changes I made, would show.

Using the Control Panel -> "Video Driver Name"[*] -> Display Settings -> Power Settings -> Intel Display Power Saving Technology -> Maximum Quality vs. Maximum Battery => Didn't do anything to me, but maybe was necessary a computer restart...

[*] (mine is Intel GMA Driver for Mobile) and it could be ATI, etc. as well.

Jawa
  • 3,679