Hello

On Tue, Dec 9, 2014 at 5:29 PM, Garreau, Alexandre <galex-713@galex-713.eu> wrote:
Oh wait, sorry if I only get the thread here and I lost the beginning,
but, does that mean you found how to make screen position (tablet or
laptop mode) finally detectable through ACPI? ’cos I still didn’t
understand why it didn’t.

Yes, I did. Never give up, never surrender.

It's hackish but it works. It didn't before, because there is a missing entry in the DSDT : MKHG, which thinkpad-acpi test if it exists before reporting the screen position event.

Many such entries are missing (ex: GBDC to control bluetooth from within thinkpad-acpi) but now there are ways around most of them - cf the rfkill message.

However, that doesn't mean the DSDT is clean, as Windows still can't be booted. It's a good test because it's picky about DSDTs. It will be a good milestone to reach. FYI, the x201 can boot windows from coreboot according to the wiki.
 
If you want screen position ACPI events, I suggest you flash the latest libreboot (it includes φcoder original patch), and edit the thinkpad-acpi file from the kernel as suggested to comment this one line. It is a module in debian, so you only need to recompile it, not the whole kernel.

There are various kernel compilation guide for debian that can help you recompile the modules after editing the source file - it's very straightforward. If you are member of a LUG, they can help you too.

If you are confortable editing grub config file to deploy a new bzImage, I can send you my kernel binaries and modules (I use 3.14.25), but I believe that would be more complex. I would not recommand that.

If it’s the case, how much time it could take to have needed changes
arriving to Debian testing? is there any way not implying to recompile
the whole kernel to have them before?

Debian uses standard OS components, and I'm sure such an ugly patch would never be accepted. Most people don't use coreboot and don't want spare ACPI events.

Like most of things I do, it's just a hack, an experiment, to test an hypothesis about the cause of the problem, and see if it can be made to work.

The proper way to support that would be to add the MKHG field to coreboot DSDT, it would be instantaneous when you reboot after having flashed this new version.

I believe the following should be enough:

                        Method (MHKG, 0, NotSerialized)
                        {
                            Store (Zero, Local0)
                            ShiftLeft (TMOD, 0x03, Local0)
                            Return (Local0)
                        }


Unfortunately, I won't be able to do more test until the end of next week. Maybe someone else will want to try that and, if it works, submit a patch.

Charles