Bug 212985 - ideapad_acpi: VPC2004:00: DYTC interface is not available. platform_profile interface is unavailable
Summary: ideapad_acpi: VPC2004:00: DYTC interface is not available. platform_profile i...
Status: NEW
Alias: None
Product: Platform Specific/Hardware
Classification: Unclassified
Component: x86-64 (show other bugs)
Hardware: x86-64 Linux
: P1 normal
Assignee: platform-driver-x86 mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-07 19:18 UTC by Tim S
Modified: 2023-11-28 18:51 UTC (History)
4 users (show)

See Also:
Kernel Version: 5.12.2
Subsystem:
Regression: No
Bisected commit-id:


Attachments
first 13 seconds of dmesg (75.92 KB, text/plain)
2021-05-07 19:18 UTC, Tim S
Details
ACPI: Dissassembly of dsdt.dat via iasl (363.18 KB, text/x-csrc)
2021-05-07 22:58 UTC, Tim S
Details

Description Tim S 2021-05-07 19:18:31 UTC
Created attachment 296691 [details]
first 13 seconds of dmesg

Device: Lenovo IdeaPad S340-15APITouch
Using latest UEFI firmware (AMCN29WW(V1.12))
Distro: Arch Linux (both latest 5.12.2 and LTS kernels)

It seems that the ideapad_acpi platform driver is not fully working on this laptop. The following (possibly relevant) errors are visible in dmesg on boot:

`
ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCI0.GPP2.BCM5], AE_NOT_FOUND (20210105/dswload2-162)
...
ideapad_acpi VPC2004:00: DYTC interface is not available
`
There are more ACPI-related messages. The full output from the boot can be seen in the attachment.

Result:

The platform_profile interface is not available at all (i.e., the file at /sys/firmware/acpi/platform_profile does not exist).

The conservation_mode interface is available but cannot be used. Attempting to run `sudo bash -c "echo 1 > /sys/bus/platform/drivers/ideapad_acpi/VPC2004:00/conservation_mode"` results in `echo: write error: Input/output error` The mode of 0 can be read from this file with `cat`, however.

To troubleshoot, I have tried updating the UEFI firmware, adding the ideapad_laptop module to initramfs, and using LTS kernel. The problem persists in these cases. I can provide more information if needed.
Comment 1 Barnabás Pőcze 2021-05-07 20:57:00 UTC
That message is not necessarily a bug. That interface is not available on all devices. Can you check if the VPC2004 ACPI device has a method named "DYTC"?

> The conservation_mode interface is available but cannot be used.

Sorry, that's on me. There is a glaring typo in the driver, I'll send a patch to fix it shortly.
Comment 2 Tim S 2021-05-07 22:56:45 UTC
Thanks a lot.

> Can you check if the VPC2004 ACPI device has a method named "DYTC"?

If I'm understanding correctly, you're saying to check the disassembled ACPI tables, right? The disassembled dsdt.dsl does appear to contain a DYTC method:

        Device (VPC0)
        {
            Name (_HID, "VPC2004")  // _HID: Hardware ID
            Name (_UID, Zero)  // _UID: Unique ID
            Name (_VPC, Zero)
            Name (VPCD, Zero)
            Method (_STA, 0, NotSerialized)  // _STA: Status
            {
                Return (0x0F)
            }

            Method (DYTC, 1, Serialized)
            {
                ITSV = Zero
                ITSM = Zero
                Local0 = Zero
                Local1 = (Arg0 & 0x01FF)
                Local2 = (Arg0 & 0xFFFFFE00)
                Switch (Local1)
                {
                    Case (Zero)

         ....

I'll attach the full file, in case it is needed.
Comment 3 Tim S 2021-05-07 22:58:22 UTC
Created attachment 296693 [details]
ACPI: Dissassembly of dsdt.dat via iasl
Comment 4 Barnabás Pőcze 2021-05-08 01:09:40 UTC
> If I'm understanding correctly, you're saying to check the disassembled ACPI
> tables, right?

Yes, exactly.

From this part:


            Method (DYTC, 1, Serialized)
            {
                ITSV = Zero
                ITSM = Zero
                Local0 = Zero
                Local1 = (Arg0 & 0x01FF)
                Local2 = (Arg0 & 0xFFFFFE00)
                Switch (Local1)
                {
                    Case (Zero)
                    {
                        If (!Local2)
                        {
                            Local0 |= One
                            Local0 |= 0x0100
                            Local0 |= Zero
                            Local0 |= 0x40000000
                        }
                        Else
                        {
                            Local0 |= Zero
                            Local0 |= 0x04
                        }
                    }


it **seems to me** that only DYTC v4 is supported on that model - although I'm not sure. The ideapad_acpi driver will only expose the platform_profile functionality if it finds DYTC v5 or newer. The code was adapted from the thinkpad_acpi driver, and the platform_profile support was contributed to that driver by Lenovo employee Mark Pearson. I cannot remember the exact reason why earlier versions are not supported, you could possibly write to the PDx86 mailing list (platform-driver-x86 at vger.kernel.org) and CC him if you want to know more; or search back on lore.kernel.org.
Comment 5 Tim S 2021-05-08 03:01:00 UTC
Okay, that makes sense. Thank you so much!
Comment 6 Luis O 2022-02-05 18:02:45 UTC
Sorry for bothering, but I noticed than in kernel 5.16.5 there's a new message:

[    8.069951] ideapad_acpi VPC2004:00: DYTC_VERSION is less than 4 or is not allowed: 4
[    8.069953] ideapad_acpi VPC2004:00: DYTC interface is not available

Note You need to log in before you can comment on or make changes to this bug.