Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Broken resume on battery. Help to bisect it needed.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2401

PostPosted: Tue Sep 17, 2024 5:24 pm    Post subject: Broken resume on battery. Help to bisect it needed. Reply with quote

Hello,

Recently I found my laptop unable to resume on battery when suspended plugged in. As I keep my laptop mostly plugged in, I don't know when did that happen. What I know is it works with 6.1.90 and it doesn't with 6.1.106, 6.6, 6.10.

Using SysRq commands I sometimes can switch to a FB console and reboot, but I don't see anything.

What I need is help to pinpoint which commit broke it. I think it might be related to AMDGPU unable to resume, but I can't say for sure. I have hybrid graphics with NVIDIA and my CPU's integrated graphic card which I think is Vega. I tried disabling the NVIDIA chip with udev rule but it didn't make a difference.

How should I go about it?

Best Regards,
Georgi


Last edited by logrusx on Thu Sep 19, 2024 5:14 pm; edited 1 time in total
Back to top
View user's profile Send private message
sublogic
Apprentice
Apprentice


Joined: 21 Mar 2022
Posts: 269
Location: Pennsylvania, USA

PostPosted: Wed Sep 18, 2024 2:44 am    Post subject: Reply with quote

https://wiki.gentoo.org/wiki/Kernel_git-bisect

This is tedious work because you can't automate the test in a script. Instead, you have to boot the test kernel, suspend and attempt to resume.

When I had a similar problem, I saved some time by
  1. running git bisect and building the test kernels on a (faster) desktop computer;
  2. scp-ing the test kernels to the laptop;
  3. rebooting the test kernels to single-user mode;
Maybe you can find similar tricks. Good luck.
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2401

PostPosted: Wed Sep 18, 2024 4:02 pm    Post subject: Reply with quote

sublogic wrote:
https://wiki.gentoo.org/wiki/Kernel_git-bisect


Thank you! I had forgotten there was a wiki page on that.

sublogic wrote:
This is tedious work because you can't automate the test in a script. Instead, you have to boot the test kernel, suspend and attempt to resume.


I will try to find which kernel versions are unaffected first and then I'll dig into history related to AMDGPU to narrow it further and try to verify my suspicion it's AMDGPU driver that causes it indeed. I think it is because on one of the unsuccessful resumes I actually managed to login to a fb console and blindly issue a restart of GDM, which flooded the log with Xorg entries. This means GDM was unable to start a Wayland session.

sublogic wrote:
When I had a similar problem, I saved some time by
  1. running git bisect and building the test kernels on a (faster) desktop computer;
  2. scp-ing the test kernels to the laptop;
  3. rebooting the test kernels to single-user mode;
Maybe you can find similar tricks. Good luck.


Luckily I bough a gaming laptop so it can compile Gentoo fast. And it does :)

Best Regards,
Georgi
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2401

PostPosted: Thu Sep 19, 2024 1:58 pm    Post subject: Reply with quote

So far I was able to identify it was indeed AMDGPU. It actually turned out to be fairly simple - just disable the iGPU. With nvidia it worked. Also I found a bunch of AMDGPU related suspend/resume bugs. That'll simplify the job a lot once I identify the minimal version of the kernel it doesn't work. I'll go oved AMDGPU history only.

Best Regards,
Georgi
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2401

PostPosted: Thu Sep 19, 2024 6:05 pm    Post subject: Reply with quote

I've identified the problematic version in 6.1 line, but for 6.6 it's more complicated than that.

I've identified 2 commits for AMDGPU/DRM between 6.1.91 - the last working version and 6.1.92, which are merged in 6.6.32 as well but 6.6.31 and 6.6.30 also fail. I see, up to this point there are more commits than in 6.1 and they maybe contribute to the issue in other way.

The likely problematic commits in 6.1.92 are:

https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.92&id=91402e0e5de9124a3108db7a14163fcf9a6d322f
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.92&id=92cb363d16ac1e41c9764cdb513d0e89a6ff4915

However I'm not able to confirm that something else isn't responsible, which would explain why 6.1.31 and 30 also break despite not having those commits.

Best Regards,
Georgi
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum