screen brightness bug after unplugging external monitor

Please post suggestions for improvement of Cinnamon here
https://github.com/linuxmint/Cinnamon
Post Reply
rotanibod
Level 1
Level 1
Posts: 26
Joined: Tue Dec 18, 2012 4:26 am

screen brightness bug after unplugging external monitor

Post by rotanibod » Tue Sep 02, 2014 11:50 am

the following bug is reproducable on my Lenovo Thinkpad T420:
  • before connecting an external monitor adjusting screen brightness works fine, either via the panel applet or by using the laptop's hotkeys
  • then connect an external monitor, enable both displays and extend the desktop, so that do NOT mirror the same image
  • adjusting screen brightness still works fine
  • disconnect the external monitor -> cinnamon dims the laptops screen to a very low value BUT you can not adjust screen brightness anymore. when I open power settings, the brightness indicator still shows "full brightness" and adjusting it changes nothing. and when using the Thinkpad Hotkeys, nothing happens.
    i checked the following values:
    • /sys/class/backlight/acpi_video0/brightness -> still shows the maximum brightness value -> adjusting this value directly in the file changes nothing
    • /sys/class/backlight/intel_backlight/brightness -> shows a very low value -> adjusting this value directly works fine and the brightness comes back again
  • alternatively, when connecting the external monitor again, hotkeys and brightness controls in power settings work again

rotanibod
Level 1
Level 1
Posts: 26
Joined: Tue Dec 18, 2012 4:26 am

Re: screen brightness bug after unplugging external monitor

Post by rotanibod » Wed Sep 03, 2014 12:27 pm

the following workaround works for me to mitigate the bug, but it's no solution:

1) paste the following code into a text file and make it executable.

Code: Select all

#!/bin/bash

if [ `cat /sys/class/backlight/intel_backlight/max_brightness` -ne `cat /sys/class/backlight/intel_backlight/brightness` ]; then
 	cat /sys/class/backlight/intel_backlight/max_brightness | tee /sys/class/backlight/intel_backlight/brightness && echo "`date` had to fix screen brightness"
else 
	echo "`date` screen brightness ok"
fi
2) you can either execute the script by hand or you misuse cron to execute it on a regular basis, but be aware, that if using cron, the script always sets the brightness to it's maximum

mivil
Level 1
Level 1
Posts: 1
Joined: Tue Mar 10, 2015 5:42 am

Re: screen brightness bug after unplugging external monitor

Post by mivil » Tue Mar 10, 2015 5:46 am

I have the same problem on my Thinkpad T400. Different for me is, that this happens sporadically, not every time, and reconnecting an external monitor does not always fix the problem. The workaround rotanibod posted, works for me as well.
I'm on Mint 17 Cinnamon 64bit with an Intel Mobile 4 Integrated Graphics.

Post Reply

Return to “Cinnamon”