Index | Thread | Search

From:
Lucas Gabriel Vuotto <lucas@sexy.is>
Subject:
Re: acpithinkpad: don't unmask brightness events on version 2 machines
To:
Jonathan Matthew <jonathan@d14n.org>
Cc:
tech@openbsd.org
Date:
Thu, 22 May 2025 04:18:23 +0000

Download raw body.

Thread
On Mon, May 19, 2025 at 06:43:23PM +1000, Jonathan Matthew wrote:
> On my X13 gen 1, the screen brightness down button sets the screen to
> minimum brightness, which is not very pleasant.  This turns out to be
> because both acpithinkpad(4) and acpivout(4) are processing these events,
> even though this is a 'version 2' machine where acpithinkpad declines to
> take control of screen brightness.
> 
> The diff below resolves this by only unmasking the brightness up/down
> events on version 1 machines.  Without these events unmasked, only
> acpivout is trying to apply screen brightness changes, and everything
> works properly.
> 
> Has anyone seen this problem on other thinkpads?  Could this change
> cause problems anywhere else?

Not the same problem, but problems nevertheless. Quoting
https://marc.info/?l=openbsd-misc&m=168377287112603&w=2

> Suspend and hibernate works. Lidaction works. Internal mic doesn't work
> but audio recording does work with a headset. Webcam works. vmm works.
> 
> Turning down the screen brightness with the keyboard does turn the whole
> screen black for an instant when getting at low values:
> 
> display.brightness=100.00%
> display.brightness=75.39%
> display.brightness=57.13%
> display.brightness=42.46%
> display.brightness=32.14%
> display.brightness=23.41%
> display.brightness=17.06%
> display.brightness=12.30%
> display.brightness=8.72%
> display.brightness=5.95%
> display.brightness=4.76%
> display.brightness=3.97% # single black screen blink starts here
> display.brightness=2.77%
> display.brightness=1.98%
> display.brightness=0.79%
> display.brightness=0.00%

That went away with this patch. As a nice side-effect, my screen doesn't
jump to full brightness the very first time I use any brightness button
and I have more brightness levels:

display.brightness=100.00%
display.brightness=95.00%
display.brightness=90.00%
display.brightness=85.01%
display.brightness=80.01%
display.brightness=75.01%
display.brightness=70.02%
display.brightness=65.02%
display.brightness=60.02%
display.brightness=55.03%
display.brightness=50.03%
display.brightness=45.03%
display.brightness=40.04%
display.brightness=35.04%
display.brightness=30.04%
display.brightness=25.05%
display.brightness=20.05%
display.brightness=15.05%
display.brightness=10.06%
display.brightness=5.06%
display.brightness=0.06%
display.brightness=0.00%

	Lucas