Bug 211837 - AHCI SATA controller not suspending despite no devices - AMD Ryzen 5 4500U with Radeon Graphics
Summary: AHCI SATA controller not suspending despite no devices - AMD Ryzen 5 4500U wi...
Status: ASSIGNED
Alias: None
Product: IO/Storage
Classification: Unclassified
Component: Serial ATA (show other bugs)
Hardware: x86-64 Linux
: P1 normal
Assignee: Tejun Heo
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-18 19:40 UTC by Alexander Monakov
Modified: 2021-03-04 15:08 UTC (History)
1 user (show)

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


Attachments
complete dmesg (66.93 KB, text/plain)
2021-03-04 12:06 UTC, Alexander Monakov
Details

Description Alexander Monakov 2021-02-18 19:40:18 UTC
I have a laptop where there are two unusable AHCI SATA controllers on PCI:

00:08.2/04:00.0 SATA controller: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] (rev 81)
00:08.2/04:00.1 SATA controller: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] (rev 81)

Since they are unused, I would like them to go to runtime suspend (allowing the PCI bridge they are behind to suspend also). I have the following udev rule:

ACTION=="add", SUBSYSTEM=="pci", TEST=="power/control", ATTR{power/control}="auto"

Unfortunately, they do not autosuspend:

/sys/devices/pci0000:00/0000:00:08.2/0000:04:00.0 $ cat power/runtime_status
active

There is a 'ata1' subnode for which runtime PM is not enabled:

/sys/devices/pci0000:00/0000:00:08.2/0000:04:00.0 $ cat ata1/power/control
on

ata1/uevent is empty, so there doesn't seem to be ab obvious way to modify power/control for this node via udev rules.

Why is runtime PM disabled for this node, and what's the proper way to enable it?
Comment 1 Zhang Rui 2021-03-04 05:26:18 UTC
re: /sys/devices/pci0000:00/0000:00:08.2/0000:04:00.0 $ cat ata1/power/control
on

can we set it to auto manually? if yes, can we enable the SATA controller runtime PM then?

please attach the dmesg output after boot.
Comment 2 Alexander Monakov 2021-03-04 12:06:28 UTC
Created attachment 295643 [details]
complete dmesg
Comment 3 Alexander Monakov 2021-03-04 12:08:00 UTC
(In reply to Zhang Rui from comment #1)
> re: /sys/devices/pci0000:00/0000:00:08.2/0000:04:00.0 $ cat
> ata1/power/control
> on
> 
> can we set it to auto manually? if yes, can we enable the SATA controller
> runtime PM then?

Yes, writing 'auto' in that file works, and after that SATA controller is able to enter runtime autosuspend.
 
> please attach the dmesg output after boot.

Attached.
Comment 4 Alexander Monakov 2021-03-04 14:51:31 UTC
You edited the bug title to mention the CPU model, but as far as I can tell this is not specific to AMD. On Intel-based systems I have access to, it's the same: ata1/power/control is 'on' after boot. Isn't it the same for all AHCI controllers?

You left the bug in NEEDINFO state, is there something else I need to provide?
Comment 5 Zhang Rui 2021-03-04 15:08:58 UTC
(In reply to Alexander Monakov from comment #4)
> You edited the bug title to mention the CPU model, but as far as I can tell
> this is not specific to AMD. On Intel-based systems I have access to, it's
> the same: ata1/power/control is 'on' after boot. Isn't it the same for all
> AHCI controllers?

Usually, I always prefer to add the laptop/cpu model as part of the bug report title.
It sometimes remind me what the problem is about.

> 
> You left the bug in NEEDINFO state, is there something else I need to
> provide?

No.

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