On Tue, Jun 15, 2021 at 11:40 AM Kryštof Černý <cleverline1mc@xxxxxxxxx> wrote: > > Hello, > > I have a Lenovo Yoga 720-15ikb device and I have found following > issues with the IdeaPad ACPI driver: > - "fan_mode" does not work according to documentation, always returns > 133 and can't be set to any other value from the documentation. > According to Maxim it worked on his old laptop, but Lenovo probably > changed it since. > - "camera_power" is always zero and can't be set to anything else. Are you sure your device supports this functionality? I.e. do you have fan mode control and camera power control under Windows, probably with some driver or application by Lenovo? > > Maxim asked me to provide a DSDT dump, so I did it: > link removed > I am willing to provide any additional information. I looked at your DSDT, specifically at this part: Method (VPCW, 2, Serialized) { If ((Arg0 == One)) { VCMD = Arg1 If ((Arg1 == 0x11)) { VDAT = 0x0B VCMD = Zero Return (Zero) } If ((Arg1 == 0x13)) { If ((OSYS < 0x07D6)) { Local0 = VDAT /* \_SB_.PCI0.LPCB.EC0_.VDAT */ Local0 += 0x02 ^^^^GFX0.AINT (One, DerefOf (PLV1 [Local0])) Return (Zero) } } } Else { VDAT = Arg1 } Return (Zero) } This is a method that the ideapad-laptop driver uses to control various things like backlight, wifi, touchpad, camera, fan. In my DSDT the VPCW method calls the XCMD method, which has more than 20 if statements for different commands. All code that handles commands is there, for example, setting fan mode modifies the SNBT field in the operation region of the embedded controller (EC). Your DSDT is different. As you see, your VPCW only handles two commands: 0x11 (read max backlight) and 0x13 (write current backlight). However, another difference is that in your DSDT VCMD and VDAT are defined in the operation region of the EC, so the EC itself probably handles all the commands on your device. Which means it's harder to reverse engineer what's going on on your device, because we can't look at the code, so I can't really tell why the command doesn't work for you. I also found two interesting methods called FANG and FANW, which I don't have in my DSDT. However, I'm not sure at all whether they are related to the fan or not. They look like FANG is a getter, and FANW is a setter, but the meaning of the first argument of both methods isn't clear to me. The driver doesn't use these methods. So, I'm sorry, but I can't really help here. Furthermore, it would be nice if the driver could somehow detect which features are supported by the firmware, but I can't suggest such a mechanism either. > Best regards, > Kryštof Černý > > > Sorry for the resend, I am trying to send again, because I got a reply > from MDS that my email contains a SPAM/virus.