On Wed, Jul 24, 2024 at 7:45 PM Barnabás Pőcze <pobrn@xxxxxxxxxxxxxx> wrote: > > 2024. július 24., szerda 4:39 keltezéssel, Liam Howlett <howlett@xxxxxxxxx> írta: > > > On Tue, Jul 23, 2024 at 10:19 PM Armin Wolf <W_Armin@xxxxxx> wrote: > > > > > > Am 24.07.24 um 01:35 schrieb Liam Howlett: > > > > > > > Just to follow this up, it's not (just?) an acpi issue, the driver > > > > isn't doing what it needs to do - if there is a driver for the > > > > hardware at all. I'm still looking into what is necessary. > > > > > > > > I did write the value to the CMMD variable, but calling the _Q2E > > > > function does not cause the ^HKEY.MHKQ (0x60C0) to be sent. If I > > > > understand this correctly, that's what should happen. > > > > > > > > Thanks, > > > > Liam > > > > > > > Hi, > > > > > > can you share the output of "acpidump"? This will make it easier to figure > > > out what the ACPI code is doing. > > > > Sure, see attached (I hope gmail doesn't mess this up on me..) > > > > What makes me think it's not just an acpi issue is that the iio device > > doesn't seem to have an indicator for the rotation of hinge angle of > > the screen: > > ls /sys/bus/iio/devices/iio\:device0 > > buffer buffer0 current_timestamp_clock dev in_accel_hysteresis > > in_accel_offset in_accel_sampling_frequency in_accel_scale > > in_accel_x_raw in_accel_y_raw in_accel_z_raw name power > > scan_elements subsystem trigger uevent > > Hi > > > I am not sure if this will be useful but I have a Lenovo YOGA 520-14IKB. And on that > machine the hinge rotation angle seems to be reported via a custom HID sensor based > on reverse engineering and experimentation. > > You might want to check under /sys/bus/platform/drivers/hid_sensor_custom/. In my > case there is one. > > $ pwd > /sys/bus/platform/drivers/hid_sensor_custom/HID-SENSOR-2000e1.3.auto > $ cat feature-b-200306/feature-b-200306-value > 76 0 101 0 110 0 111 0 118 0 111 0 32 0 89 0 111 0 103 0 97 0 > I believe the Lenovo YOGA uses another driver for a sensor the Thinkpad Yogas don't have. $ ls /sys/bus/platform/drivers/ ac amd_pmc byt_crystal_cove_pmic cht_crystal_cove_pmic clk-pmc-atom efi-framebuffer i8042 pcspkr soc-audio thinkpad_hwmon acpi-ged amd_sdw_manager byt_gpio cht_dollar_cove_ti_pmic coreboot_table geminilake-pinctrl icelake-pinctrl reg-dummy sp5100-tco tigerlake-pinctrl acpi-wmi axp288_pmic_acpi cannonlake-pinctrl cht_whiskey_cove_pmic crystal_cove_pwm gpio-clk intel_rapl_msr serial8250 sunrisepoint-pinctrl tpm_tis alarmtimer broxton-pinctrl cedarfork-pinctrl clk-fch denverton-pinctrl hid_sensor_accel_3d lewisburg-pinctrl simple-framebuffer syscon ucsi_acpi amd_gpio bxt_whiskey_cove_pmic cherryview-pinctrl clk-lpss-atom dw-apb-uart i2c_designware parport_pc snd-soc-dummy thinkpad_acpi vesa-framebuffer So the only sensor seems to be the hid_sensor_accel_3d, and it has no hinge properties in my case. Although, it might be one of the other items here so I will explore this area. Thanks! > The above feature (property-sensor-model) spells out "Lenovo Yoga" in UTF-16. > As far as I remember this is how the windows service finds the correct sensor. > Under the various inputs, the sensor seems to report the hinge rotation angle, > as well as the angles between the keyboard and screen, and the ground level. > > If the situation is similar in your case, then there is already infrastructure > to expose the angles to user space in iio sensors. See hid-sensor-custom and > hid-sensor-custom-intel-hinge. No such lock, no hinge is returned with a find command in that directory. Thanks, Liam ...