* [REGRESSION] libata: SATA LPM forcibly disabled on Intel Jasper Lake since Linux 6.13 @ 2025-12-14 15:26 Bernard Drozd 2025-12-15 1:36 ` Damien Le Moal 2025-12-15 1:44 ` Damien Le Moal 0 siblings, 2 replies; 6+ messages in thread From: Bernard Drozd @ 2025-12-14 15:26 UTC (permalink / raw) To: linux-ide, linux-kernel; +Cc: damien.lemoal Hello, I am reporting a power-management regression in libata affecting Intel Jasper Lake platforms, introduced after Linux 6.12. Hardware: - CPU / SoC: Intel Jasper Lake (Elkhart Lake class) - SATA controller: Intel Jasper Lake SATA AHCI Controller (PCI ID 8086:4d03) - Drives tested: SATA SSD + SATA HDD (multiple vendors) - Distribution: Debian 13 (Trixie) - Kernel versions tested: - 6.12.x → OK - 6.17.x → REGRESSION Problem description: Since kernel >= 6.13, SATA Link Power Management (LPM) is forcibly disabled. The sysfs interface still exists but only reports: /sys/class/scsi_host/host*/link_power_management_policy = max_performance Attempts to change it fail silently or are ignored: echo 'med_power_with_dipm' > '/sys/class/scsi_host/host0/link_power_management_policy' echo 'med_power_with_dipm' > '/sys/class/scsi_host/host1/link_power_management_policy' This worked correctly on kernel 6.12.x and earlier. Observed effects: - SATA devices never enter partial/slumber - CPU package C-states are limited (system mostly stuck in PC2 (before the change i had C10)) - Idle power consumption increases by ~5 W - powertop shows SATA LPM tunables as permanently "Bad" Relevant dmesg output (6.17.x): ata1: SATA link power management disabled due to platform quirk ata2: SATA link power management disabled due to platform quirk This appears to be caused by the libata change disabling LPM on Intel platforms without a per-platform whitelist. Jasper Lake does not exhibit instability with LPM enabled and worked reliably on previous kernels. Expectation: - Either re-enable LPM for Intel Jasper Lake - Or provide a kernel parameter to override the forced LPM disable (e.g. libata.allow_lpm=1) This regression significantly impacts low-power systems and fanless mini-PCs based on Jasper Lake. Please let me know if additional logs or testing are needed. Best regards, bern ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [REGRESSION] libata: SATA LPM forcibly disabled on Intel Jasper Lake since Linux 6.13 2025-12-14 15:26 [REGRESSION] libata: SATA LPM forcibly disabled on Intel Jasper Lake since Linux 6.13 Bernard Drozd @ 2025-12-15 1:36 ` Damien Le Moal 2025-12-15 1:44 ` Damien Le Moal 1 sibling, 0 replies; 6+ messages in thread From: Damien Le Moal @ 2025-12-15 1:36 UTC (permalink / raw) To: Bernard Drozd, linux-ide, linux-kernel; +Cc: Niklas Cassel +Niklas On 12/15/25 00:26, Bernard Drozd wrote: > Hello, > > I am reporting a power-management regression in libata affecting Intel > Jasper Lake platforms, introduced after Linux 6.12. > > Hardware: > - CPU / SoC: Intel Jasper Lake (Elkhart Lake class) > - SATA controller: Intel Jasper Lake SATA AHCI Controller (PCI ID 8086:4d03) > - Drives tested: SATA SSD + SATA HDD (multiple vendors) > - Distribution: Debian 13 (Trixie) > - Kernel versions tested: > - 6.12.x → OK > - 6.17.x → REGRESSION > > Problem description: > Since kernel >= 6.13, SATA Link Power Management (LPM) is forcibly disabled. > The sysfs interface still exists but only reports: > > /sys/class/scsi_host/host*/link_power_management_policy = max_performance That is normal if either the device connected to this host or the adapter itself is identified as not supporting LPM. > Attempts to change it fail silently or are ignored: > > echo 'med_power_with_dipm' > > '/sys/class/scsi_host/host0/link_power_management_policy' > echo 'med_power_with_dipm' > > '/sys/class/scsi_host/host1/link_power_management_policy' Again, normal in the context described above. > This worked correctly on kernel 6.12.x and earlier. Which was a horrible bug: the ata subsystem was identifying the device or adapter as not supporting LPM, but the sysfs knob was left open for chnages, and systemd would happily set whatever power management policy it wanted, even if the device or adapter did not support it. So this "worked correctly" is actually "that was a really nasty bug". The problem here is to understand why you adapter/device is identified as not supporting LPM, even though it seems to do support it. > Observed effects: > - SATA devices never enter partial/slumber > - CPU package C-states are limited (system mostly stuck in PC2 (before > the change i had C10)) > - Idle power consumption increases by ~5 W > - powertop shows SATA LPM tunables as permanently "Bad" Yes, all normal if LPM is disabled and you are stuck with max performance policy. > Relevant dmesg output (6.17.x): > ata1: SATA link power management disabled due to platform quirk > ata2: SATA link power management disabled due to platform quirk Please send everything that scsi/ahci/ata prints. That is not nearly enough to understand what is going on here. Looking at the ahci driver, I do not see any special quirks for PCI ID 8086:4d03. So we need all the messages from the latest kernel to understand this. > This appears to be caused by the libata change disabling LPM on Intel > platforms > without a per-platform whitelist. Jasper Lake does not exhibit > instability with > LPM enabled and worked reliably on previous kernels. There is no quirk applied to the adapter PCI ID 8086:4d03 that I can see. So it will be initialized with board_ahci, meaning that LPM will be allowed, but only if we detect that the adapter report that as supported. If the adapter does not have the right bits set reporting LPM support, especially DIPM/HIPM, then LPM will be disabled. Please send the full dmesg so that we can check. > Expectation: > - Either re-enable LPM for Intel Jasper Lake > - Or provide a kernel parameter to override the forced LPM disable > (e.g. libata.allow_lpm=1) > > This regression significantly impacts low-power systems and fanless mini-PCs > based on Jasper Lake. > > Please let me know if additional logs or testing are needed. > > Best regards, > bern > > -- Damien Le Moal Western Digital Research ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [REGRESSION] libata: SATA LPM forcibly disabled on Intel Jasper Lake since Linux 6.13 2025-12-14 15:26 [REGRESSION] libata: SATA LPM forcibly disabled on Intel Jasper Lake since Linux 6.13 Bernard Drozd 2025-12-15 1:36 ` Damien Le Moal @ 2025-12-15 1:44 ` Damien Le Moal 2025-12-15 4:28 ` Bernard Drozd 1 sibling, 1 reply; 6+ messages in thread From: Damien Le Moal @ 2025-12-15 1:44 UTC (permalink / raw) To: Bernard Drozd, linux-ide, linux-kernel; +Cc: Niklas Cassel On 12/15/25 00:26, Bernard Drozd wrote: > Hello, > > I am reporting a power-management regression in libata affecting Intel > Jasper Lake platforms, introduced after Linux 6.12. > > Hardware: > - CPU / SoC: Intel Jasper Lake (Elkhart Lake class) > - SATA controller: Intel Jasper Lake SATA AHCI Controller (PCI ID 8086:4d03) Byt the way, I see this: ahci.c: /* Elkhart Lake IDs 0x4b60 & 0x4b62 https://sata-io.org/product/8803 not tested yet */ ahci.c: { PCI_VDEVICE(INTEL, 0x4b63), board_ahci_pcs_quirk }, /* Elkhart Lake AHCI */ So the same "Elkhart Lake", but different PCI ID. Looking at PCI IDs databases, I do not find anything with ID 8086:4d03. Can you please check your PCI ID ? Though board_ahci_pcs_quirk does not disable LPM... > - Drives tested: SATA SSD + SATA HDD (multiple vendors) > - Distribution: Debian 13 (Trixie) > - Kernel versions tested: > - 6.12.x → OK > - 6.17.x → REGRESSION > > Problem description: > Since kernel >= 6.13, SATA Link Power Management (LPM) is forcibly disabled. > The sysfs interface still exists but only reports: > > /sys/class/scsi_host/host*/link_power_management_policy = max_performance > > Attempts to change it fail silently or are ignored: > > echo 'med_power_with_dipm' > > '/sys/class/scsi_host/host0/link_power_management_policy' > echo 'med_power_with_dipm' > > '/sys/class/scsi_host/host1/link_power_management_policy' > > This worked correctly on kernel 6.12.x and earlier. > > Observed effects: > - SATA devices never enter partial/slumber > - CPU package C-states are limited (system mostly stuck in PC2 (before > the change i had C10)) > - Idle power consumption increases by ~5 W > - powertop shows SATA LPM tunables as permanently "Bad" > > Relevant dmesg output (6.17.x): > ata1: SATA link power management disabled due to platform quirk > ata2: SATA link power management disabled due to platform quirk > > This appears to be caused by the libata change disabling LPM on Intel > platforms > without a per-platform whitelist. Jasper Lake does not exhibit > instability with > LPM enabled and worked reliably on previous kernels. > > Expectation: > - Either re-enable LPM for Intel Jasper Lake > - Or provide a kernel parameter to override the forced LPM disable > (e.g. libata.allow_lpm=1) > > This regression significantly impacts low-power systems and fanless mini-PCs > based on Jasper Lake. > > Please let me know if additional logs or testing are needed. > > Best regards, > bern > > -- Damien Le Moal Western Digital Research ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [REGRESSION] libata: SATA LPM forcibly disabled on Intel Jasper Lake since Linux 6.13 2025-12-15 1:44 ` Damien Le Moal @ 2025-12-15 4:28 ` Bernard Drozd 2025-12-15 6:47 ` Damien Le Moal 0 siblings, 1 reply; 6+ messages in thread From: Bernard Drozd @ 2025-12-15 4:28 UTC (permalink / raw) To: Damien Le Moal, linux-ide, linux-kernel; +Cc: Niklas Cassel Hi Damien, Thank you for the explanation – I understand now that pre-6.13 behaviour was relying on a bug allowing userspace to override unsupported LPM. I have collected full diagnostics comparing a *working* kernel (6.12) and a *regressed* kernel (6.17), both tested with **no SATA devices connected**. Important correction: The correct SATA controller PCI ID is: Intel Jasper Lake SATA AHCI Controller [8086:4dd3] This was mistakenly reported earlier as 4d03. Key observation: The LPM disable happens even with no SATA devices attached, so this appears to be a **platform-level decision**, not device capability. Data provided: 1) Full dmesg, Linux 6.12 (LPM works, CPU reaches PC10): https://www.dropbox.com/scl/fi/pwc0bfgoqgb607babczg9/dmesg-6.12-full.txt?rlkey=o8j88lzeq3rw3cbx2q65oyblv&st=u4dwqv0p&raw=1 2) Full dmesg, Linux 6.17 (LPM forced to max_performance, CPU stuck in PC2): https://www.dropbox.com/scl/fi/twbyjm7h5ewgmllit02h8/dmesg-6.17-full.txt?rlkey=p3b97lli6ruo5ypg4c2d4jnc2&st=3o3xo47m&raw=1 3) AHCI/SATA diagnostics, Linux 6.12 (no disks attached): https://www.dropbox.com/scl/fi/mve88utfnrzdilut364p1/6.12.txt?rlkey=zz7x8nqafdslvfjovinzbw26d&st=h0n95d75&raw=1 4) AHCI/SATA diagnostics, Linux 6.17 (no disks attached): https://www.dropbox.com/scl/fi/viedk35gor5mry49qlkby/6.17.txt?rlkey=fmp4zaizbl22hd2fh6jg4rx8w&st=alwlux85&raw=1 Summary of difference: - 6.12: lpm-pol = 0 link_power_management_policy = med_power_with_dipm ahci.mobile_lpm_policy=3 works - 6.17: lpm-pol = 1 ext link_power_management_policy = max_performance (write rejected) ahci.mobile_lpm_policy ignored CPU package cannot enter deep C-states This results in ~5W higher idle power on fanless Jasper Lake systems. Please let me know: - which capability/quirk check changed after 6.12 - and whether a kernel parameter or quirk override could be used for testing Best regards, Bernard On 15/12/2025 02:44, Damien Le Moal wrote: > On 12/15/25 00:26, Bernard Drozd wrote: >> Hello, >> >> I am reporting a power-management regression in libata affecting Intel >> Jasper Lake platforms, introduced after Linux 6.12. >> >> Hardware: >> - CPU / SoC: Intel Jasper Lake (Elkhart Lake class) >> - SATA controller: Intel Jasper Lake SATA AHCI Controller (PCI ID 8086:4d03) > Byt the way, I see this: > > ahci.c: /* Elkhart Lake IDs 0x4b60 & 0x4b62 https://sata-io.org/product/8803 not > tested yet */ > ahci.c: { PCI_VDEVICE(INTEL, 0x4b63), board_ahci_pcs_quirk }, /* Elkhart Lake > AHCI */ > > So the same "Elkhart Lake", but different PCI ID. Looking at PCI IDs databases, > I do not find anything with ID 8086:4d03. Can you please check your PCI ID ? > > Though board_ahci_pcs_quirk does not disable LPM... > > >> - Drives tested: SATA SSD + SATA HDD (multiple vendors) >> - Distribution: Debian 13 (Trixie) >> - Kernel versions tested: >> - 6.12.x → OK >> - 6.17.x → REGRESSION >> >> Problem description: >> Since kernel >= 6.13, SATA Link Power Management (LPM) is forcibly disabled. >> The sysfs interface still exists but only reports: >> >> /sys/class/scsi_host/host*/link_power_management_policy = max_performance >> >> Attempts to change it fail silently or are ignored: >> >> echo 'med_power_with_dipm' > >> '/sys/class/scsi_host/host0/link_power_management_policy' >> echo 'med_power_with_dipm' > >> '/sys/class/scsi_host/host1/link_power_management_policy' >> >> This worked correctly on kernel 6.12.x and earlier. >> >> Observed effects: >> - SATA devices never enter partial/slumber >> - CPU package C-states are limited (system mostly stuck in PC2 (before >> the change i had C10)) >> - Idle power consumption increases by ~5 W >> - powertop shows SATA LPM tunables as permanently "Bad" >> >> Relevant dmesg output (6.17.x): >> ata1: SATA link power management disabled due to platform quirk >> ata2: SATA link power management disabled due to platform quirk >> >> This appears to be caused by the libata change disabling LPM on Intel >> platforms >> without a per-platform whitelist. Jasper Lake does not exhibit >> instability with >> LPM enabled and worked reliably on previous kernels. >> >> Expectation: >> - Either re-enable LPM for Intel Jasper Lake >> - Or provide a kernel parameter to override the forced LPM disable >> (e.g. libata.allow_lpm=1) >> >> This regression significantly impacts low-power systems and fanless mini-PCs >> based on Jasper Lake. >> >> Please let me know if additional logs or testing are needed. >> >> Best regards, >> bern >> >> > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [REGRESSION] libata: SATA LPM forcibly disabled on Intel Jasper Lake since Linux 6.13 2025-12-15 4:28 ` Bernard Drozd @ 2025-12-15 6:47 ` Damien Le Moal 2025-12-15 9:30 ` Bernard Drozd 0 siblings, 1 reply; 6+ messages in thread From: Damien Le Moal @ 2025-12-15 6:47 UTC (permalink / raw) To: Bernard Drozd, linux-ide, linux-kernel; +Cc: Niklas Cassel On 12/15/25 13:28, Bernard Drozd wrote: > Hi Damien, > Thank you for the explanation – I understand now that pre-6.13 behaviour > was relying on a bug allowing userspace to override unsupported LPM. > I have collected full diagnostics comparing a *working* kernel (6.12) > and a *regressed* kernel (6.17), both tested with **no SATA devices > connected**. > > Important correction: > The correct SATA controller PCI ID is: > Intel Jasper Lake SATA AHCI Controller [8086:4dd3] > This was mistakenly reported earlier as 4d03. > > Key observation: > The LPM disable happens even with no SATA devices attached, so this > appears to be a **platform-level decision**, not device capability. > > Data provided: > 1) Full dmesg, Linux 6.12 (LPM works, CPU reaches PC10): > https://www.dropbox.com/scl/fi/pwc0bfgoqgb607babczg9/dmesg-6.12-full.txt?rlkey=o8j88lzeq3rw3cbx2q65oyblv&st=u4dwqv0p&raw=1 > > 2) Full dmesg, Linux 6.17 (LPM forced to max_performance, CPU stuck in PC2): > https://www.dropbox.com/scl/fi/twbyjm7h5ewgmllit02h8/dmesg-6.17-full.txt?rlkey=p3b97lli6ruo5ypg4c2d4jnc2&st=3o3xo47m&raw=1 Got it: your AHCI adapter has: ahci 0000:00:17.0: AHCI vers 0001.0301, 32 command slots, 6 Gbps, SATA mode ahci 0000:00:17.0: 2/2 ports implemented (port mask 0x3) ahci 0000:00:17.0: flags: 64bit ncq sntf pm led clo only pio slum part deso sadm sds Partial and slumber are supported, so all good. BUT ! your ports are... ata1: SATA max UDMA/133 abar m2048@0x80102000 port 0x80102100 irq 142 lpm-pol 1 ext ata2: SATA max UDMA/133 abar m2048@0x80102000 port 0x80102180 irq 142 lpm-pol 1 ext ...external. That is, the adapter is saying that these are external/hot-pluggable ports, and for these, power management is a bad idea/should be disabled, which we do. The reason is that otherwise, we cannot catch hot-plug/unplug events (IRQs). So to enable low-power policies, you need to go into your BIOS settings and disable the hot-plugging capability for the ports. Many BIOSes have such setting for SATA ports. If your BIOS does not have this, yu can use the mask_port_ext AHCI module parameter. Simply add: ahci.mask_port_ext=0x3 to your kernel command line and the "ext" flag of the ports will be ignored and LPM enabled. -- Damien Le Moal Western Digital Research ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [REGRESSION] libata: SATA LPM forcibly disabled on Intel Jasper Lake since Linux 6.13 2025-12-15 6:47 ` Damien Le Moal @ 2025-12-15 9:30 ` Bernard Drozd 0 siblings, 0 replies; 6+ messages in thread From: Bernard Drozd @ 2025-12-15 9:30 UTC (permalink / raw) To: Damien Le Moal, linux-ide, linux-kernel; +Cc: Niklas Cassel Hi Damien, thank you for the detailed explanation – that was exactly the missing piece. You were absolutely right: the issue was caused by all SATA ports being reported by the BIOS as external (hot-pluggable). In my BIOS (AMI Aptio), all SATA ports had Hot Plug enabled by default: https://www.dropbox.com/scl/fi/9gi68rlxg1mcd37yrwcva/Hot_PLUG_SATA.jpg?rlkey=cse0i5j7qr4va0xjw9o7fv6r4&st=dn6r6q0k&raw=1 After disabling Hot Plug for the SATA ports, LPM works correctly again. Results: - Kernel: 6.17.8-1~bpo13+1 - link_power_management_policy can now be set to: med_power_with_dipm - SATA links enter partial/slumber - CPU package reaches deep C-states again (PC10) - Idle power consumption back to ~2.5 W (same as with 6.12) So this was not a kernel regression, but a correct behavior exposed by the libata fix after 6.12, combined with an unfortunate BIOS default. Thanks again for the clear analysis and for pointing out ahci.mask_port_ext as a fallback – very helpful. Best regards, Bernard On 15/12/2025 07:47, Damien Le Moal wrote: > On 12/15/25 13:28, Bernard Drozd wrote: >> Hi Damien, >> Thank you for the explanation – I understand now that pre-6.13 behaviour >> was relying on a bug allowing userspace to override unsupported LPM. >> I have collected full diagnostics comparing a *working* kernel (6.12) >> and a *regressed* kernel (6.17), both tested with **no SATA devices >> connected**. >> >> Important correction: >> The correct SATA controller PCI ID is: >> Intel Jasper Lake SATA AHCI Controller [8086:4dd3] >> This was mistakenly reported earlier as 4d03. >> >> Key observation: >> The LPM disable happens even with no SATA devices attached, so this >> appears to be a **platform-level decision**, not device capability. >> >> Data provided: >> 1) Full dmesg, Linux 6.12 (LPM works, CPU reaches PC10): >> https://www.dropbox.com/scl/fi/pwc0bfgoqgb607babczg9/dmesg-6.12-full.txt?rlkey=o8j88lzeq3rw3cbx2q65oyblv&st=u4dwqv0p&raw=1 >> >> 2) Full dmesg, Linux 6.17 (LPM forced to max_performance, CPU stuck in PC2): >> https://www.dropbox.com/scl/fi/twbyjm7h5ewgmllit02h8/dmesg-6.17-full.txt?rlkey=p3b97lli6ruo5ypg4c2d4jnc2&st=3o3xo47m&raw=1 > Got it: your AHCI adapter has: > > ahci 0000:00:17.0: AHCI vers 0001.0301, 32 command slots, 6 Gbps, SATA mode > ahci 0000:00:17.0: 2/2 ports implemented (port mask 0x3) > ahci 0000:00:17.0: flags: 64bit ncq sntf pm led clo only pio slum part deso sadm sds > > Partial and slumber are supported, so all good. > > BUT ! your ports are... > > ata1: SATA max UDMA/133 abar m2048@0x80102000 port 0x80102100 irq 142 lpm-pol 1 ext > ata2: SATA max UDMA/133 abar m2048@0x80102000 port 0x80102180 irq 142 lpm-pol 1 ext > > ...external. That is, the adapter is saying that these are > external/hot-pluggable ports, and for these, power management is a bad > idea/should be disabled, which we do. The reason is that otherwise, we cannot > catch hot-plug/unplug events (IRQs). > > So to enable low-power policies, you need to go into your BIOS settings and > disable the hot-plugging capability for the ports. Many BIOSes have such setting > for SATA ports. If your BIOS does not have this, yu can use the mask_port_ext > AHCI module parameter. Simply add: > > ahci.mask_port_ext=0x3 to your kernel command line and the "ext" flag of the > ports will be ignored and LPM enabled. > > ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-12-15 9:30 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-12-14 15:26 [REGRESSION] libata: SATA LPM forcibly disabled on Intel Jasper Lake since Linux 6.13 Bernard Drozd 2025-12-15 1:36 ` Damien Le Moal 2025-12-15 1:44 ` Damien Le Moal 2025-12-15 4:28 ` Bernard Drozd 2025-12-15 6:47 ` Damien Le Moal 2025-12-15 9:30 ` Bernard Drozd
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox