NVIDIA 3070 + AMD Graphics Card?

Ah, so switching to the video-hybrid-amd-nvidia-prime driver won’t be good enough?

Effectively video-hybrid-amd-nvidia-prime just sets no configs at all and therefore it always run with the radeon card as main and offloading can be done with prime-run.

Is that good for my use case?

I don’t want the graphics calculations for something like a game to be done on that really weak GPU.
Will that even merge the monitors?

Look: If nothing has been set, then the nvidia gpu will not be used for xorg, but xorg will configure the radeon card automatically.
That means: Only the outputs of the radeon card will be available, nvidia outputs will be effectively not there. The nvidia card can only be used for offloading.

No idea what you mean with “merge”, but with this config, the outputs of my iGPU (radeon) and my dGPU (nvdia) are working. That means: I can plugin a monitor on any output and it will display a picture.

That sounds interesting.

Does “offloading” include GPU calculations for other things such as games?

As I understand the second half of your post, offloading should include monitors plugged into the NVIDIA GPU as well right (essentially that “plug in monitor → OS recognizes and xorg can use” as you said)? Or would this require a xorg config profile to be written for it?

As I understood here:

  1. 3 monitors are plugged in on the nvidia card
  2. 3 monitors are plugged in on the radeon card.

Is that correct?

And as i see you have video-nvidia installed, then the radeon card’s outputs are offline. Correct?

Therefore you need to make the outputs of the radeon card active with the modsetting driver.

Offloading is ONLY for GPU calculation, not for the screen output. When running the radeon card as main and the nvidia is not configured, you can offload any application with prime-run <command>.

Nvidia must explicitly always be instructed to use the outputs through a configuration.

Ok maybe a bit more simple:

  1. If the nvidia driver is set in xorg, then all applications and screens are running through the nvidia card.
  2. modesetting in this case just passthrough the calculated screen through the CPU to the output of the radeon card. It just displays the screen, nothing more.

Ah, I see.

Thank you so much for this post, I feel that I learned a lot from it about how the drivers, and GPU interact.

I’m just curious as to how to construct your original post. What should i use to find a number like "“PCI:0:1:0”? lspci seems like a good start, but it gives 00.1 or a similar format.

For example I have this one:

01:00.0 VGA compatible controller: NVIDIA Corporation GP107 [GeForce GTX 1050 Ti] (rev a1)

01:00.0BusID "PCI:1:0:0"

I have something similar:

sarah@MidnightStarSign:~$ lspci | grep VGA
0a:00.0 VGA compatible controller: NVIDIA Corporation GA104 [GeForce RTX 3070] (rev a1)
0b:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Cape Verde PRO [Radeon HD 7750/8740 / R7 250E]

Shall I assume that 0a is hexadecimal for 10?
So the code would be: PCI:10:0:0?

Yes you can convert it like that or just say: PCI:A:0:0 and PCI:B:0:0

I tried the configuration that you recommended, but it led to a grey screen that didn’t load SDDM. So I reverted the changes by renaming the config files to .OLD and rebooted :slight_smile:
Here was the configuration at the time while the provisional session was running:

Ok, here was my 20-reverse-prime.conf:

Section "ServerLayout"
    Identifier "layout"
    Screen 0 "radeon"
    Inactive "nvidia"
    Option "AllowNVIDIAGPUScreens"
EndSection

Section "Device"
    Identifier "radeon"
    Driver "modesetting"
    BusID "PCI:B:0:0"
EndSection

Section "Screen"
    Identifier "radeon"
    Device "radeon"
EndSection

Section "Device"
    Identifier "nvidia"
    Driver "nvidia"
    BusID "PCI:A:0:0"
EndSection

Section "Screen"
    Identifier "nvidia"
    Device "nvidia"
EndSection

And here is my 21-prime.conf:

Section "ServerLayout"
    Identifier "layout"
    Screen 0 "nvidia"
    Inactive "radeon"
EndSection

Section "Device"
	Identifier	"nvidia"
	driver		"nvidia"
	BusID		"PCI:A:0:0"
EndSection

Section "Screen"
    Identifier     "nvidia"
    Device         "nvidia"
    Option "AllowEmptyInitialConfiguration"
EndSection

Section "Device"
	Identifier	"radeon"
	driver		"modesetting"
	BusID		"PCI:B:0:0"
EndSection

Section "Screen"
    Identifier     "radeon"

And they’re in the correct directory:

root@MidnightStarSign:/etc/X11/xorg.conf.d# ls 2*  
20-reverse-prime.conf  21-prime.conf

I have rebooted the system now, here are my graphics cards from lspci:

sarah@MidnightStarSign:~$ lspci | grep VGA
0a:00.0 VGA compatible controller: NVIDIA Corporation GA104 [GeForce RTX 3070] (rev a1)
0b:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Cape Verde PRO [Radeon HD 7750/8740 / R7 250E]

And my current driver configuration:

Did I do something wrong?

Maybe modesetting driver is not installed?

ls /lib/xorg/modules/drivers

Also, to be safe, keep sure you have added the nvidia and radeon driver to the initramfs:

Replace MODULES=() with:

MODULES=(radeon amdgpu nvidia nvidia_modeset nvidia_uvm nvidia_drm)

at /etc/mkinitcpio.conf with an editor.

Then run sudo mkinitcpio -P to update the initramfs.

Also explicitly set the mode for each driver at the kernel parameter:

file: /etc/default/grub

radeon.modeset=1 nvdia-drm.modeset=1

and run sudo update-grub.

or/and the late load:

file: /etc/modprobe.d/enable-kms.conf

options radeon modeset=1
options nvdia-drm modeset=1

If nothing helps, try run plasma with

startx /usr/bin/startplasma-x11

and if that failes, investigate the logs:

  • /var/log
  • ~/.local/share/xorg/

It appears to be:

sarah@MidnightStarSign:~$ ls /lib/xorg/modules/drivers    
amdgpu_drv.so  intel_drv.so        nouveau_drv.so  radeon_drv.so
ati_drv.so     modesetting_drv.so  nvidia_drv.so   vmware_drv.so

Modifications Done (I rebuilt the init file, but couldn’t figure out how to edit the grub file since update-grub returned an error. I opted to modify /etc/modprobe.d/enable-kms.conf instead):

I wasn’t able to set the modesetting driver in the grub default file and got the grey screen again. I ten tried to launch the X server using the command that you specified, but got this error (the log file was wiped, so I couldn’t copy it):

@Sarah Argh… I thought you are not a newbie on linux… ok well…

Please run this command on the terminal:

curl -s "https://gitlab.com/-/snippets/2174072/raw/main/gpu-report.sh" | bash

This collect all necessary configs and logs.

Script can be read here: GPU Report ($2174072) · Snippets · Snippets · GitLab

With that you can upload it and it will print a short link on the terminal:

curl -s "https://gitlab.com/-/snippets/2174072/raw/main/gpu-report.sh" | bash -s -- upload

It will upload it after quitting the view with Q.

Please post the link here.

I wouldn’t consider myself to be a newbie, but clearly your skill far exceeds my own :smiley:

https://0x0.st/-E3g.txt

  1. file: /etc/default/grub
GRUB_CMDLINE_LINUX="radeon.modeset=1 nvdia-drm.modeset=1"
  1. file: /etc/mkinitcpio.conf

Please don’t do it like that:

#MODULES=(piix ide_disk reiserfs)
MODULES=(radeon amdgpu nvidia nvidia_modeset nvidia_uvm nvidia_drm)
MODULES="crc32c"

:warning: If 2 variables with the same name are there, then the content of the last variable will overwrite the previous.

This is correct:

MODULES=(crc32c radeon amdgpu nvidia nvidia_modeset nvidia_uvm nvidia_drm)
  1. Your last error was clearly a parsing error:
[   294.125] Parse error on line 1 of section Screen in file /etc/X11/xorg.conf.d/30-touchpad.conf
	"Section" is not a valid keyword in this section.
[   294.125] (EE) Problem parsing the config file
[   294.125] (EE) Error parsing the config file
[   294.125] (EE) 

I guess because you missed the EndSection here:

And that is why when parsing 30-touchpad after reading 21-prime.conf, this error occurs. Please correct it.

I appled all the changes, and managed to avoid the “grey screen” graphics error, but the screen isn’t available for the OS to use despite being plugged in and wired to the AMD GPU (shows up when BIOS boots, but not during OS boot).

Here is the most recent log that i just took: https://0x0.st/-6Fw.txt

Your configs 20-reverse-prime.conf and 21-prime.conf are not gathered with the script. Set another priority like: 99-reverse-prime.conf and 99-prime.conf, so that 90-mhwd-gpu.conf will be parsed first.

On the logs it looks like the 2 last starts of xorg just use nvdia only and the oldest log only loads radeon… No idea at this point. I would rather say, the configuration is wrong.

1 Like

Ok, I switched the priority, and all 6 screens now seem to work. Thank you so much!

I did notice that it took out the audio to the USB Schiit 3 DAC.
Strangly the ASUS AI Mic adapter DAC works just fine.

I tried unplugging the DAC USB and replugging it, but this didn’t help, nor did restarting pulse using systemctl --user restart pulseaudio* or pulseaudio -k

It shows up, but no audio is to be had. It’s not muted and the slider for it works just fine, just no audio plays, but it did before I restarted :slight_smile:

Stats: https://0x0.st/-0yL.txt

Audio Subpanel (Selecting the Schiit (which is on and powered, I verified it was playing right before I did the restart) doesn’t play sound):

Any ideas as to why only that one went bad?

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.