On 16/02/16(Tue) 20:46, Mark Kettenis wrote: > > Date: Wed, 10 Feb 2016 20:10:41 +0100 > > From: Martin Pieuchot <m...@openbsd.org> > > > > On 09/02/16(Tue) 21:06, Christian Weisgerber wrote: > > > On 2016-02-09, Martin Pieuchot <m...@openbsd.org> wrote: > > > > > > > Since brightness support has been added to acpithinkpad(4) I can easily > > > > trigger a regression on my x220: > > > > > > > > - Switching to the first virtual console just after xdm starts using the > > > > Ctrl+Alt+F1 key combination turns my screen dark. > > > > - Killing X just after xdm start, by using Ctrl+Alt+Del, also turns my > > > > screen Dark. > > > > > > Yes, I also see this on my X230. > > > > > > > The problem seems to be a race related to multiple events, diff below > > > > fixes that for me. > > > > > > With that diff the brightness is stuck at 100%. > > > > The diff is broken. > > > > I couldn't spot a way to fix this. Maybe it's a bug in the firmware? > > Does the following diff work?
Sadly not. This diff is roughly equivalent to the one I sent using arg1 to pass the value to set, no? Note that on my machine calling the "PBLS" triggers an event so there's no need to write sc_brightness directly. Actually doing so might create a race. Can you reproduce the bug on your x220?