Re: Tablet mode on L13 Yoga Gen 3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

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.


Regards,
Barnabás Pőcze


> 
> It is difficult to figure out if it's supposed to be the iio device
> that is supposed to make this happen - there's some talk of intel
> virtual buttons, but that seems wrong on an amd laptop and I don't see
> the necessary details in the dsdt table.  Any idea on where the data
> is supposed to come from would also be helpful.  The fact that it
> remains 0 after boot does seem to indicate that the device isn't
> writing anything to acpi - which fits with the missing module or
> module logic for whatever hardware is supposed to be doing this.
> 
> I will say that the rotation of the display is detected and works,
> it's just the "laptop/tablet mode" that does not (0x60c0 is never
> emitted and so the keyboard and touchpad remain active).
> 
> Although, I don't have a working screen rotating laptop, so I'm not
> entirely sure if that's necessary?
> 
> >
> > Thanks,
> > Armin Wolf
> >
> > (Also, please do not top-post, thank you).
> >
> 
> Sorry, I generally don't use gmail form development and haven't set up
> mutt for this address.  Thank you for look at this issue.
> 
> Thanks,
> Liam
> 
> ...





[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux