Solved display brightness resets to 100% after blanking

Hi
I use i915kms driver for my intel gpu and graphics/intel-backlight to control brightness. I've included the brightness command in my ~/.xinitrc and everything is ok. Except when the screensaver kicks in and display goes blank. After I move my mouse again, the brightness goes back to 100% and I have to enter intel_backlight command again to decrease it.
 
I don't have a desktop environment, only a window manager (bspwm), so it's just the default screensaver mechanism that comes with X (xset dpms, blank). maybe screensaver is not the correct word for this?

By the way, I've tried to follow the trail of dpms man page and saw this in acpi(4):

hw.acpi.reset_video
Enables calling the VESA reset BIOS vector on the resume path.
This can fix some graphics cards that have problems such as LCD
white-out after resume. Default is 0 (disabled).

So I tried to change that value to 1 with sysctl but it didn't change the behavior of the display, even after putting it in loader.conf and restarting. Not sure if that's related at all
 
Unfortunately i have not yet dealt much in the screensaver area.

Since you had to set your backlight variable manually and it is changed by default, you have to tell the xscreensaver somehow to set the correct variable again or something like that.

I would now simply install xfce4-screensaver and start the screensaver manually a command and then attach the command for the backlight to it. Example: xfce4-screensaver && Your-back-light-command
 
I don't think screensaver is the right word because the screen just goes blank, there's nothing being displayed on the screen. Not sure but I think this happens even with tty after you install Xorg. In any case, don't want to change that behavior, I want it to just go blank, not show anything. I just want the brightness not to reset.
by the way, I had xfce on 11.4 version and I had the same problem with it. xfce uses xfce-screensaver by default. I doubt it'd be different with my current version (12.1)
 
I don't have a desktop environment, only a window manager (bspwm), so it's just the default screensaver mechanism that comes with X (xset dpms, blank). maybe screensaver is not the correct word for this?

By the way, I've tried to follow the trail of dpms man page and saw this in acpi(4):



So I tried to change that value to 1 with sysctl but it didn't change the behavior of the display, even after putting it in loader.conf and restarting. Not sure if that's related at all
Are you sure the problem has to do with the driver, not with your bspwm manager? BTW, how did you come by it? On its page it mentions a support IRC channel, maybe ask them about your problem, too?
 
I don't know if the problem is with the driver, I only searched where I could. Like I said, I've had the same issue with xfce and even without any extra DE or WM, using X's own default x11-wm/twm. I came across bspwm on unix porn subreddit for the first time
 
Do you have acpi.video sysctls?

If I remember correctly, acpi.video.<device>.brightness resets to either acpi.video.<device>.fullpower or acpi.video.<device>.economy (depending on power supply) after the screensaver wakes up.

I use /etc/sysctl.conf to set default values.
 
My sysctl.conf is empty. I'd read acpi_video() before but couldn't figure out what to replace <device> with. It turns out I didn't have the driver loaded, so I did kldload acpi_video (don't know how to automate this), and now when I do sysctl -a | grep hw.acpi.video, this is what I get:

Code:
hw.acpi.video.crt0.levels: 100 30 10 20 30 40 50 60 70 80 90 100
hw.acpi.video.crt0.economy: 30
hw.acpi.video.crt0.fullpower: 100
hw.acpi.video.crt0.brightness: 100
hw.acpi.video.crt0.active: 0
hw.acpi.video.lcd0.active: 1

Which looks weird to me cause I'm using a laptop. crt0 isn't active so changing its values doesn't do anything. I can't activate it, cause if I try, it says: hw.acpi.video.crt0.active: 0 -> 0. And I can't tune lcd0 variables cause it doesn't have any.
 
Hmm ok.

Actually, the port x11/xscreensaver has an options to run commands once the screen turns on again.

For example, suppose you want to run a program that turns down the volume on your machine when the screen blanks, and turns it back up when the screen un-blanks. You could do that by running a Perl program like the following in the background. The following program tracks the output of the -watch command and reacts accordingly: ...

See the "-watch" option in xscreensaver-command(1).
I would try that.
 
Back
Top