Start a Conversation

Unsolved

1 Rookie

 • 

2 Posts

241

June 15th, 2024 10:09

XPS 13 9300, Linux and S0ix (Modern Standby) not working

I've found the battery life on my XPS 13 9300 poor recently, and especially when in standby, so I thought I'd look into it. I'm running Linux on this with a very recent kernel, and apart from the battery life, it's an amazing Linux developer machine.

I started digging into what the issue might be, and stumbled my way into the deep hole that is Modern Standby (also known as S0ix). I had only really looked into C-States previously, but S0ix is a whole new thing to me.

I've been following this great Intel blog post about troubleshooting, and I think I'm at a dead end. The link to the article is here:

  https://web.archive.org/web/20230614200306/https://01.org/blogs/qwang59/2020/linux-s0ix-troubleshooting

I've managed to confirm the machine does support S0ix and that the processor does spend plenty of time in the PC10 state, and the Intel GPU is working in the RC6 state, so that's all good.

Following the troubleshooting guide then leads me to testing the Power Gating and the Latency Tolerance Report (LTR).

What I think is happening is that something is up the Southport C, which I believe is one of the PCIe controllers. Checking its latency tolerance report, it's always got some value there, while the others are all 0

# cat /sys/kernel/debug/pmc_core/ltr_show | grep SOUTHPORT
0 PMC0:SOUTHPORT_A     LTR: RAW: 0x0                Non-Snoop(ns): 0                Snoop(ns): 0              
1 PMC0:SOUTHPORT_B     LTR: RAW: 0x0                Non-Snoop(ns): 0                Snoop(ns): 0              
8 PMC0:SOUTHPORT_C     LTR: RAW: 0x90039003         Non-Snoop(ns): 3145728          Snoop(ns): 3145728         
12 PMC0:SOUTHPORT_D     LTR: RAW: 0x0                Non-Snoop(ns): 0                Snoop(ns): 0              
13 PMC0:SOUTHPORT_E     LTR: RAW: 0x0                Non-Snoop(ns): 0                Snoop(ns): 0  

Also, when looking at the Power Gating status, I can see that it's always "On" while the others are off.

# cat /sys/kernel/debug/pmc_core/pch_ip_power_gating_status | grep SP[A-F]
PMC0:PCH IP: 4  - SPA      State: Off
PMC0:PCH IP: 5  - SPB      State: Off
PMC0:PCH IP: 6  - SPC      State: On
PMC0:PCH IP: 13 - SPD      State: Off
PMC0:PCH IP: 21 - SPE      State: Off
PMC0:PCH IP: 54 - SPF      State: Off

I have gone into the BIOS and disabled as many of the attached devices that may have been connected to the PCIe controller as I could, with no difference.

Whatever I do, checking the counter for how long the machine has been in an S0ix state always shows 0:

# cat /sys/kernel/debug/pmc_core/slp_s0_residency_usec
0


It could potentially have something to do with the NVMe device SK hynix PC611 NVMe Solid State Drive with ASPM, but I'm not yet sure how I can confirm.

This really should be working out of the box with new kernels.

Any help would be appreciated.

10 Elder

 • 

28.7K Posts

June 15th, 2024 10:58

Before delving into sleep states, this is a 2020 model, meaning the battery is four years old.  If the decline in runtime is recent, it's more likely a battery that's nearing the end of its life than a sleep issue.

1 Rookie

 • 

2 Posts

June 16th, 2024 22:29

@ejn63​ You're right, it does have a few years on it now. Having said that, I did replace the battery last year after its health dropped to something like 63%. Right now I'm really looking at power consumption here rather than raw battery life.

No Events found!

Top