screen brightness bug after unplugging external monitor

Please post suggestions for improvement of Cinnamon on:
https://github.com/linuxmint/Cinnamon
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
rotanibod
Level 1
Level 1
Posts: 27
Joined: Tue Dec 18, 2012 4:26 am

screen brightness bug after unplugging external monitor

Post by rotanibod »

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
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
rotanibod
Level 1
Level 1
Posts: 27
Joined: Tue Dec 18, 2012 4:26 am

Re: screen brightness bug after unplugging external monitor

Post by rotanibod »

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

Re: screen brightness bug after unplugging external monitor

Post by mivil »

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.
Locked

Return to “Cinnamon”