LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-08-2024, 10:46 AM   #1
fsLeg
Member
 
Registered: Dec 2013
Location: Moscow, Russia
Distribution: Slackware, EndeavourOS
Posts: 91

Rep: Reputation: Disabled
5.15.160 kernel breaks amdgpu driver


I have a laptop with AMD integrated graphics and Nvidia discrete GPU that runs Slackware 15. I use amdgpu driver for graphics and Nvidia for 3D stuff like games.

A few days ago Pat released 5.15.160 kernel that fixed a whole bunch of vulnerabilities, including CVE-2024-1086 (the netfilter one) everyone was talking about, so today I finally upgraded the kernel. But when I rebooted as usual (after creating initrd and copying it and the new generic kernel to EFI partition) I was greeted with a black screen with not even a blinking cursor. The system seemed unresponsive, no Ctrl+Alt+Delete or REISUB were working; SSH worked, however, so I was able to reinstall 5.15.145 kernel and boot with it if needed. At first I thought that Nvidia GPU was somehow used as the primary one, but blacklisting it didn't do anything. After I added nomodeset kernel parameter I was able to login into the system (no graphical session, of course) and inspect dmesg output. It turned out amdgpu driver was acting up:

Code:
...
amdgpu: HMM registered 2048MB device memory
[   13.181724] amdgpu: Topology: Add APU node [0x15d8:0x1002]
[   13.181732] kfd kfd: amdgpu: added device 1002:15d8
[   13.181755] kfd kfd: amdgpu: Failed to resume IOMMU for device 1002:15d8
[   13.181777] amdgpu 0000:05:00.0: amdgpu: amdgpu_device_ip_init failed
[   13.181794] amdgpu 0000:05:00.0: amdgpu: Fatal error during GPU init
...
And then there were a bunch of errors and some call traces.

I managed to find the issue as well as a solution: https://lists.freedesktop.org/archiv...ne/109478.html

Basically, one of the patches that wasn't supposed to be in 5.15 was accidentally ported anyway, so the solution is to revert this (use with patch -R):

Code:
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c	2023-12-23 12:42:00.000000000 +0300
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c	2024-05-25 17:20:19.000000000 +0300
@@ -2486,10 +2487,6 @@
 	if (r)
 		goto init_failed;
 
-	r = amdgpu_amdkfd_resume_iommu(adev);
-	if (r)
-		goto init_failed;
-
 	r = amdgpu_device_ip_hw_init_phase1(adev);
 	if (r)
 		goto init_failed;
@@ -2528,6 +2525,10 @@
 	if (!adev->gmc.xgmi.pending_reset)
 		amdgpu_amdkfd_device_init(adev);
 
+	r = amdgpu_amdkfd_resume_iommu(adev);
+	if (r)
+		goto init_failed;
+
 	amdgpu_fru_get_product_info(adev);
 
 init_failed:
I did just that, recompiled the module using this command (so I wouldn't have to recompile everything which takes ages):

Code:
make modules SUBDIRS=drivers/gpu/drm/amd/amdgpu
moved the resulting amdgpu.ko to its proper place, rebooted - and everything works again, so I don't have to downgrade back to 5.15.145 kernel.

Just thought I'd share in case I'm not the only one. Hopefully, the next 5.15 kernel fixes the issue.
 
Old 06-08-2024, 11:07 AM   #2
cesarion76
Member
 
Registered: Nov 2009
Location: Rosario, Argentina
Distribution: Slackware
Posts: 57

Rep: Reputation: 3
I can confirm the same problem. Black screen when loading driver. Using huge kernel or initrd same thing. I've had to revert to kernel 5.15.145

My system:
Quote:
Linux darkstar.example.net 5.15.145 #1 SMP PREEMPT Sun Dec 24 00:07:06 CST 2023 x86_64 AMD Ryzen 5 3400G with Radeon Vega Graphics AuthenticAMD GNU/Linux

Last edited by cesarion76; 06-08-2024 at 11:09 AM.
 
Old 06-08-2024, 02:45 PM   #3
the3dfxdude
Member
 
Registered: May 2007
Posts: 741

Rep: Reputation: 367Reputation: 367Reputation: 367Reputation: 367
I checked this on two of my systems, one is also an APU, and did not see this issue. I think this is only happening on Ryzen level chips.

The message between Alex and that other AMD fellow on what went wrong is not confidence inspiring.
 
Old 06-08-2024, 06:40 PM   #4
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 4,687

Rep: Reputation: 1803Reputation: 1803Reputation: 1803Reputation: 1803Reputation: 1803Reputation: 1803Reputation: 1803Reputation: 1803Reputation: 1803Reputation: 1803Reputation: 1803
Pat has uploaded a fix for this
 
2 members found this post helpful.
Old 06-09-2024, 03:05 AM   #5
fsLeg
Member
 
Registered: Dec 2013
Location: Moscow, Russia
Distribution: Slackware, EndeavourOS
Posts: 91

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by willysr View Post
Pat has uploaded a fix for this
Yup, saw that. I'll mark the thread as solved for this reason.
 
  


Reply

Tags
amdgpu, black screen, kernel


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] amdgpu 0000:05:00.0: amdgpu: SECUREDDISPLAY: query secureddisplay T a failed. ret 0x0 on DEBIAN 12 naarter Debian 1 06-14-2023 05:55 AM
Force breaks to avoid eye strain (typing breaks) upnort Slackware 12 09-19-2019 03:43 PM
LXer: Open Source AMDGPU Driver Now Detects All Linux Kernel Supported AMD Radeon GPUs LXer Syndicated Linux News 0 09-16-2016 05:44 AM
LXer: Parted Magic 2016_01_06 Live CD Gets Support for the AMDGPU Driver, Linux Kernel 4.3 LXer Syndicated Linux News 0 01-08-2016 08:02 AM
how to configure sound in GNU/debian sarge kernel 2.6 for toshiba satellite m30x-160 manda-chuva Linux - Laptop and Netbook 1 04-13-2005 08:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration