Bug 218789 - ucsi_acpi USBC000:00: ucsi_acpi_dsm: failed to evaluate _DSM 2 in logs
Summary: ucsi_acpi USBC000:00: ucsi_acpi_dsm: failed to evaluate _DSM 2 in logs
Status: RESOLVED PATCH_ALREADY_AVAILABLE
Alias: None
Product: ACPI
Classification: Unclassified
Component: EC (show other bugs)
Hardware: AMD Linux
: P3 normal
Assignee: acpi_ec
URL:
Keywords:
: 218788 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-04-29 09:27 UTC by webcaptcha
Modified: 2024-06-06 19:59 UTC (History)
5 users (show)

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


Attachments
dmesg-log (87.71 KB, text/plain)
2024-04-29 09:27 UTC, webcaptcha
Details
system-info (13.57 KB, text/plain)
2024-04-29 09:27 UTC, webcaptcha
Details
acpi.dump (1.38 MB, text/plain)
2024-04-29 11:41 UTC, webcaptcha
Details
dmesq-with-patch-logs (87.13 KB, text/plain)
2024-05-11 15:26 UTC, webcaptcha
Details
acpi-with-patch.dump (1.38 MB, text/plain)
2024-05-11 15:27 UTC, webcaptcha
Details
Using ec->handle rather ACPI_ROOT_OBJECT (1.14 KB, patch)
2024-06-06 19:59 UTC, VitaliiT
Details | Diff

Description webcaptcha 2024-04-29 09:27:03 UTC
Every single boot I observe error in the journalctl logs

"kernel: ucsi_acpi USBC000:00: ucsi_acpi_dsm: failed to evaluate _DSM 2"

My devices specs and dmesg log are in the attachments.

Is there a way to get out of the error?

If I have to provide additional info please tell me
Comment 1 webcaptcha 2024-04-29 09:27:35 UTC
Created attachment 306237 [details]
dmesg-log
Comment 2 webcaptcha 2024-04-29 09:27:55 UTC
Created attachment 306238 [details]
system-info
Comment 3 Artem S. Tashkinov 2024-04-29 09:41:01 UTC
*** Bug 218788 has been marked as a duplicate of this bug. ***
Comment 4 Heikki Krogerus 2024-04-29 11:24:08 UTC
This looks like a symptom caused by an issue in the EC driver. The complete error in your dmesg:

...
[   12.563832] ACPI Error: No handler for Region [ECSI] (000000007b8176ee) [EmbeddedControl] (20230628/evregion-130)
[   12.564906] ACPI Error: Region EmbeddedControl (ID=3) has no handler (20230628/exfldio-261)
[   12.566187] ACPI Error: Aborting method \_SB.UBTC.ECRD due to previous error (AE_NOT_EXIST) (20230628/psparse-529)
[   12.567909] ACPI Error: Aborting method \_SB.UBTC._DSM due to previous error (AE_NOT_EXIST) (20230628/psparse-529)
[   12.569254] ACPI: \_SB_.UBTC: failed to evaluate _DSM c298836f-a47c-e411-ad36-631042b5008f (0x6)
[   12.569259] ucsi_acpi USBC000:00: ucsi_acpi_dsm: failed to evaluate _DSM 2
...

The handler for the EC operation region is missing, which is very odd, because the EC driver (drivers/acpi/ec.c) has clearly been loaded successfully based on your the same dmesg output.

Can you also attach the acpidump output:

 % acpidump -o my_acpi.dump

The ACPI guys should take a look at this. I think this is to core issue here:
"ACPI Error: Region EmbeddedControl (ID=3) has no handler"
Comment 5 Heikki Krogerus 2024-04-29 11:30:05 UTC
This issue has been reported earlier (indirectly):
https://bugzilla.kernel.org/show_bug.cgi?id=216438.
Comment 6 webcaptcha 2024-04-29 11:41:11 UTC
Created attachment 306240 [details]
acpi.dump
Comment 7 Heikki Krogerus 2024-04-29 13:42:50 UTC
Thanks! I can see that "ECSI" EmbeddedControl OpRegion inside the scope of the UCSI device in your tables, which should be fine.

I don't think we have a global handler for the EC OpRegion in Linux, which I'm quite certain we really should have - just like we have for the other types: SystemMemory, SystemIO, PCI_Config, etc.

This may actually be a missing feature in ACPICA, so other operating systems may also be affected.

I'll see if I can get the ACPI/ACPICA guys to take a look at this.
Comment 8 webcaptcha 2024-04-29 15:29:52 UTC
@Heikki Krogerus,
Thank you for joining to this report. Appreciate it
Comment 9 Rafael J. Wysocki 2024-05-10 14:28:07 UTC
Patch has been posted:

https://lore.kernel.org/linux-acpi/4926735.31r3eYUQgx@kreacher/

Any chance to try it and see if it helps?
Comment 10 webcaptcha 2024-05-11 14:58:13 UTC
Hi Rafael J. Wysocki

Thank you for joining.

Looks like the patch did actually help to fix errors in journalctl. Woohoo!

With the help of one guy (@loqs) from the Arch forum I was able to get a kernel build (6.8.9) with this patch included,

source=(
   https://cdn.kernel.org/pub/linux/kernel/v${pkgver%%.*}.x/${_srcname}.tar.{xz,sign}
   $url/releases/download/$_srctag/linux-$_srctag.patch.zst{,.sig}
  '4926735.31r3eYUQgx@kreacher.patch::https://lore.kernel.org/linux-acpi/4926735.31r3eYUQgx@kreacher/raw'
   config  # the main kernel config file

With this custom Kernel I don't see errors anymore and at the first look everything is working as it should be.

Many thanks to you folks @Rafael J. Wysocki, @Heikki Krogerus

Looking forward to see this patch in a main Kernel branch. (hope I expressed myself correctly).
Comment 11 webcaptcha 2024-05-11 15:18:09 UTC
Feel free if I need to test something specially
Comment 12 webcaptcha 2024-05-11 15:26:29 UTC
Created attachment 306285 [details]
dmesq-with-patch-logs
Comment 13 webcaptcha 2024-05-11 15:27:05 UTC
Created attachment 306286 [details]
acpi-with-patch.dump
Comment 14 webcaptcha 2024-05-11 15:27:45 UTC
I have added logs with patch included in case you want to take a look. Thanks!
Comment 15 Rafael J. Wysocki 2024-05-15 19:48:24 UTC
Thanks for testing, much appreciated!

However, note that the patch you tested has been replaced with:

https://lore.kernel.org/linux-acpi/6046110.lOV4Wx5bFT@kreacher

due to concerned related to the handling of some specific cases.

Can you please test this one too, just to verify that it still helps?
Comment 16 VitaliiT 2024-06-06 19:51:52 UTC
This patch actually breaks battery and ac on asus gu605. AC reports as always on even if on battery. 
Not sure if  ACPI_ROOT_OBJECT is actually handle since it's defined statically in the header (I might be wrong), and not sure that it must be used when ec == first_ec.
In any case, making scope_handle  value as it was before recovers battery and ac on gu605.
Comment 17 VitaliiT 2024-06-06 19:59:39 UTC
Created attachment 306431 [details]
Using ec->handle rather ACPI_ROOT_OBJECT

That patch restores battery and ac readings in sysfs for gu605.

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