Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] No display after switch from Nvidia to AMD GPU
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
flying_tacos
n00b
n00b


Joined: 08 Mar 2022
Posts: 12

PostPosted: Fri Apr 19, 2024 9:03 pm    Post subject: [SOLVED] No display after switch from Nvidia to AMD GPU Reply with quote

Hello wonderful world!

I have a PC that has been running Gentoo for a few years now with an old Nvidia GeForce GT 620. I use the proprietary driver to be able to play games. Even if the driver for this card is not supported anymore, everything is fine as long as I stick to kernel 6.1.

Recently I was given a slightly less old Radeon HD 7570 card (I like to think it's less old, but they came out at the same time actually...). I swapped it in yesterday and followed the wiki to make the changes required to use it, but it's not working.

Following this table on the wiki, I set
Code:
VIDEO_CARDS="radeon r600"
in /etc/portage/make.conf. Also I uninstalled the nvidia driver, unmasked the more recent kernels, and re-emerged everything. This led to the following situation.

Symptoms:
When the PC starts, the manufacturer's logo appears, then the Grub menu, then this text is displayed at the top:
Code:

  Booting `Gentoo GNU/Linux'

Loading Linux 6.6.21-gentoo ...
Loading initial ramdisk ...
_

And this text, more towards the center:
Code:
EFI stub: Loaded initrd from LINUX_EFI_INITRD_MEDIA_GUID device path

Normally, the kernel would then start printing stuff and the boot sequence would continue, but now nothing else changes on the screen. However I'm able to ssh into the machine, play music on the speakers, etc.

More information:
Code:

$ lspci -nnk
...
01:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Turks PRO [Radeon HD 7570] [1002:675d]
   Subsystem: Pegatron Turks PRO [Radeon HD 7570] [1b0a:90bd]
01:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Turks HDMI Audio [Radeon HD 6500/6600 / 6700M Series] [1002:aa90]
   Subsystem: Pegatron Turks HDMI Audio [Radeon HD 6500/6600 / 6700M Series] [1b0a:aa90]
   Kernel driver in use: snd_hda_intel
...

I just noticed that snd_hda_intel is loaded for the card's sound. Could it be that?

Here are the parts of my kernel's config related to graphics: https://bpa.st/WEBA

Thank you in advance for your help!


Last edited by flying_tacos on Sat Apr 20, 2024 5:58 pm; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54276
Location: 56N 3W

PostPosted: Fri Apr 19, 2024 9:18 pm    Post subject: Reply with quote

flying_tacos,

Code:
CONFIG_DRM_RADEON=y

Its probably not loading firmware.

Be sure the linux-firmware is installed and flip that option to loadable module.

Code:
CONFIG_FB_RADEON=y
must be off too as it interferes with DRM_RADEON above.

If there is still a problem, make friends with wgetpaste and share your entire .config file.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
flying_tacos
n00b
n00b


Joined: 08 Mar 2022
Posts: 12

PostPosted: Sat Apr 20, 2024 2:27 am    Post subject: Reply with quote

Amazing, it works! Thank you Neddy!
(Well, X doesn't work, but that's a subject for another topic if I cannot figure it out)

I think what made the difference was to compile DRM_RADEON as a module, because I did try with and without FB_RADEON during my tests.

Now there is only one thing that is strange. During the boot sequence, this gets printed:
Code:

 * Loading module nvidia ...
modprobe: FATAL: Module nvidia not found in directory /lib/modules/6.6.21-gentoo

I thought I removed everything related to Nvidia from my system, but it seems I forgot to do something. However I cannot find where this is coming from. Do you have any idea?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54276
Location: 56N 3W

PostPosted: Sat Apr 20, 2024 10:41 am    Post subject: Reply with quote

flying_tacos,

There is some science behind it.

CONFIG_DRM_RADEON requires to load firmware as part of the initalisation. For you its at least
Code:
$ ls /lib/firmware/radeon | grep -i turks
TURKS_mc.bin
TURKS_me.bin
TURKS_pfp.bin
TURKS_smc.bin
see the Radeon page on the wiki.

With =Y, module initialisation happens before root is mounted, so /lib/firmware cannot be read. Instead the firmware must be included in the kernel binary by using CONFIG_EXTRA_FIRMWARE= and CONFIG_EXTRA_FIRMWARE_DIR=
You didn't show those .config entries in your pastebin.

Code:
 * Loading module nvidia ...
modprobe: FATAL: Module nvidia not found in directory /lib/modules/6.6.21-gentoo

Somewhere is /etc you will have a configuration file trying to load the nvidia kernel module.

Try
Code:
grep -i nvidia -R /etc
to locate the entry add -Bx where X is some integer to discover the directory.
-Bx means show x lines Before.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
flying_tacos
n00b
n00b


Joined: 08 Mar 2022
Posts: 12

PostPosted: Sat Apr 20, 2024 5:58 pm    Post subject: Reply with quote

I wanted to paste my whole .config, but it said files could not be bigger than 512 KiB, even though it was only 124 KiB... Not sure what happened. Anyway, that's a clear explanation, thank you. For reference, the only line in my .config that contains EXTRA_FIRMWARE is CONFIG_EXTRA_FIRMWARE=""

For the nvidia module, you were completely right: /etc/modules-load.d/video.conf contained nvidia. I removed it and the error message is now gone. Thank you a lot!
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54276
Location: 56N 3W

PostPosted: Sat Apr 20, 2024 7:06 pm    Post subject: Reply with quote

flying_tacos,

Different pastebins have different size limits.

Run wgetpaste -h to see a list of commands.
One of them lists sites. Try each in turn until one works.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
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