-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Help with getting SW_TABLET_MODE reporting working on the MSI Summit E16 Flip ? #77
Comments
The user was me Hans 👍 (You got the hotkeys working btw! this will surely help other people too!!) If i may, a while ago i also tried getting some help with other 2 people in order to solve this issue and others (battery thresholds): @ThePBone https://github.com/ThePBone/msi-ec-modern This may be useful. In the meantime i have been using MControlCenter, all the features work in my laptop! Kudos to dmitry! Edit: this may be useful too: @musikid https://github.com/musikid/acpi_ec |
So im still trying to find a way to fix this issue, i managed to install windows 11 on a separate ssd and i'm using this tool: https://github.com/ThePBone/MsiEcRamEditor Im trying to see if i can find anything in the right column when i flip the screen but when then list updates it usually shows 3 or 4 new entries so i don't know which corresponds with the screen flip. |
@rottenpants466 That's probably caused by the real-time CPU & GPU info that is updated constantly in EC memory and litters the whole log on the right side. You can click on 'Log options > Exclude addresses' in the program and enter those addresses containing the real-time data to prevent the log from getting spammed with irrelevant data. |
I can say for sure that those that update even when you don't flip your screen are not what we're looking for E.g. 0x68 is CPU temp |
They're subsequent so I think they may be related in some way Looking at this picture I see that 0xEE had its bit1 flipped and 0xED has 2 flipped bits
|
Rotation sensor works fine in Linux Tried a couple of times ED only shows up like 80% of the time. EE always shows up. In the picture above the first ED/EE entries in red appeared when i flipped to tablet mode, the second ED/EE entries in red when i flipped back to "normal" mode |
Hans wrote:
He mentioned some 0x84 event and in the picture 0xED is getting set to 0x84 (in the second red pair) In this issue in my EC table repo we figured out that 0xED gets changed when some sort of events are emitted (e.g. brightness up or down, USB-C connection)
I think 0xED is set to 0x84 when the screen is flipped. It doesn't show up all the time because the right column shows changes, so 0xED needs to first be set to some other value by another event for it to show up there |
CONV is compared to 0x03 and One (which I suppose means 0x01) EC's 0xEE address is set to 0x03 and 0x01 when screen is flipped back and forth |
@rottenpants466 can you please check if 0xED and/or 0xEE are changed in Linux when flipping the screen? Specifically, you need to look for 0x84 in [0xED] and 0x01/0x03 in [0xEE] |
Will check Thank you 👍 |
Also since i'm testing this stuff on windows do you want me to test something else regarding the ec drivers @teackot ? cheer |
I think we got all of your values on Linux, though you can test a couple more things: check if switching mute LED triggers the [0x2C] and if mic mute triggers [0x2B] Also switching webcam should trigger [0x2E] |
Is there a specific area where i should look for 0x84 in [0xED] and 0x01/0x03 in [0xEE] and the leds/webcam? There were some special keys that didn't do anything but hans managed to get that fixed: https://bugzilla.kernel.org/show_bug.cgi?id=216824 Edit: It doesn't seem to trigger anything when flipping the screen in Linux |
It seems that other newer laptops might have the same problem and are using some new sensor still not supported in Linux: https://discussion.fedoraproject.org/t/sw-tablet-mode-on-yoga-l13-undetected-switch-manually/60935 https://github.com/alesya-h/linux_detect_tablet_mode https://lwn.net/Articles/910415/ Is there a way to find the sensor in windows and extract information from it? Edit: some more info that might be useful: I also found this windows app Sensor Explorer https://learn.microsoft.com/en-us/windows-hardware/drivers/sensors/testing-sensor-explorer will play around with it to see if i find anything relevant Hans also tried to help me with that issue a while back: https://gitlab.freedesktop.org/libinput/libinput/-/issues/822 |
@teackot i did an experiment where i reinstalled windows 11 on the other nvme drive. Booted to desktop without an internet connection with a fresh install and noticed a few things. By default with no drivers or anything else installed, no internet, the laptop is missing a few things:
Next i downloaded all the drivers from the MSI Website into a usb stick in fedora. After that i booted windows again and installed the drivers one at a time and checked the tablet mode detection and keys each time. By the end with all the drivers installed Windows still couldn't detect tablet mode when flipping the screen, some function keys didn't work and leds also did not work either. Next i connected to the internet and updated everything with Windows Update, some remaining drivers were also available. After everything was installed i then tested again, tablet mode/function keys/leds were still not working. Finally i installed MSI Center Pro and on the next restart and all of the sudden tablet mode was working as well the function keys and their leds. Tested again with the app closed and with no auto start on reboot and everything was still working. So it seems MSI Center Pro is really necessary for a lot of functionalities :| |
@teackot @jwrdegoede @ThePBone @dmitry-s93 I was checking this bug report on gitlab and there is a user who is working on a workaround to try to fix this issue on their Lenovo laptops: https://lore.kernel.org/all/CAG4kvq9US=-NjyXFMzJYu2zCJryJWtOc7FGZbrewpgCDjdAkbg@mail.gmail.com/ The actual patch:
Can something like this be used on our MSI laptops? i tried to apply this patch but then realised this might only work on Lenovo laptops. cheers |
Here i am again :) In Windows there's this app from microsoft where i can check all the supported sensors on this device (check sensor attachments). I tested all of the available sensors and it seems there's no sensor that detects tablet mode directly (like 0 or 1, On or OFF). I think in this particular case the tablet mode info comes from the orientation/inclination of the laptop itself and the screen itself (it seems there are at least 2 inclination sensors one on the laptop and the other one on the screen). |
If there are indeed 2 accelerometers then this is a known problem. We need someone to add support for this setup to iio-sensor-proxy, this is being tracked here: https://gitlab.freedesktop.org/hadess/iio-sensor-proxy/-/issues/216 |
Can something like this be used in our 2 in 1 MSI laptops? https://github.com/lukas-w/yoga-usage-mode From what i could gather, it creates a SW_TABLET_MODE device that then sends input to user-space. |
Short self introduction I'm a Linux developer mostly working on hw-enablement for Linux laptops. I'm also the subsystem maintainer for kernel drivers under: drivers/platform/x86
I have been working with a user to get SW_TABLET_MODE reporting working on their MSI Summit E16 Flip A12UCT: https://gitlab.freedesktop.org/libinput/libinput/-/issues/822
Looking at the ACPI tables of that model, their is an intel-hid ACPI device (check for HIDD in dsdt.dsl) which should report if the 2-in-1 is folded into tablet-mode or being used in laptop mode. Specifically the bit of ACPI code below should cause 0xcc / 0xcd ACPI notifies to be send which should then get picked up by the https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/platform/x86/intel/hid.c code and translated into SW_TABLET_MODE input events:
But it seems that for some reason the EC is never sending 0x84 events, so this code never gets executed by the kernel's ACPI interpreter and we never get the 0xCC / 0xCD notifies on the ACPI HIDD device.
@dmitry-s93 since you have quite a bit of experience with the MSI EC on these devices, I wonder if you have any insights in this?
The text was updated successfully, but these errors were encountered: