Open JosephFerano opened 2 years ago
This driver does not provide a lid switch event device. You can always try the upstream driver instead (it's part of the latest kernels) and check whether it supports this. But last time I checked, it did not either. I have no clue, how the tablet mode detection works on Windows. Since there does not yet seem to be support for this on Linux, I wrote the script you linked to, so that I can do this manually.
The reason I was investigating this driver was because on the windows side, I found a driver called AMD Sensor Hub which I uninstalled and reinstalled and subsequently the lid switch functionality stopped then resumed working. The device id for that driver is ACPI\AMDI0080
which I can see from the Linux side as well. So I figured that I should investigate ACPI drivers instead of the asus-wmi
one. However, in light of your response, I'll start investigating that driver as a potential way to fix this, as apparently it's helping other Asus laptops unlock this functionality.
I also suspected, that the AMD SFH driver on windows maybe provides two independent accelerometers (one in the lid and one in the chassis) so one can calculate the lid position from their difference in angle. However, when I was in contact with the devs from AMD when the upstream driver was initially developed, I got no response on this issue (they neither confirmed, nor denied that the SFH provides two independent accelerometers to calculate the lid angle). Alas, I have the same issue as you on my HP Envy x360 13".
@JosephFerano I found way to get full-featured sw_tablet_mode support on asus rog flow x13. You can download patch here This patch a bit ugly, but it works!
Awesome. Thanks. I'll try to merge this into my driver over the weekend. I think that it'll be appreciated, if you also submit this patch upstream.
Hi, first thank you for your work. I would appreciate some assistance with the lid flip functionality to detect the tablet mode. My current expectation is to be able to receive an event that has detected that the lid has been flipped more than 180 degrees. On the Win10 side, if the lid is folded past the 180 degrees, windows detects that the tablet has entered tablet mode.
My system:
Asus ROG Flow X13 (non eGPU) 5.14.9-arch1-g14 (This is a kernel provided by the Asus Linux group)
Here is the current status of what's working;
The accelerometer is working and when I run
monitor-sensor
it correctly detects orientation changes. I also enabled the ambient light sensor with the sensor_mask. However this is with includedamd-sfh
module in my kernel, not the one provided here.When I try to install this module, all sensors stop working. Only thing I get from
dmesg
is the followingGoing back to the default module in the kernel, I can see that it's detecting other iio devices as well;
dmesg
does not show any entries forsfh
Here's a higly abbreviated
tree
that hints as to what each sensor is, and they do seem to change in order on reboot;Which sensor do you think is the one most likely to be responsible for emitting the lid flip event? I grabbed your python script from here and tried playing around trying to read data from them, however, nothing happened when folding the lid. When pointing to the right accelerometer device it does show the orientation changes though.
This is what I have so far. I'm pretty new to this so if you have suggestions on how to reverse engineer those sensors to try and read the events they emit, I would great appreciate it.
Thank you for your time.