How to set up the drivers correctly for amd igpu and nvidia dgpu?

Hello!

I've been trying to set up my system for a week already and couldn't find a reliable solution to my problem.

I don't know how to identify whether my gpu is working as it should. Having AMD cpu with integrated graphics and Nvidia dgpu confuses me, as I suspect that I have only the igpu working. This is because if i do: glxinfo | grep OpenGL it says nothing about Nvidia.

To be honest, I think it would be better if I reinstall the OS and start doing something from scratch.
It would be extremely helpful if someone could tell me what do I have to install for it to work properly on a fresh system. Basically, I want it to work like nvidia-optimus (if it's possible), so my dgpu is used only on heavy load (or similar scenarios).

Note: whenever I have /X.Org , I edited it by adding '/' to remove hyperlink.

glxinfo | grep OpenGL output:

OpenGL vendor string: /X.Org
OpenGL renderer string: AMD RENOIR (DRM 3.36.0, 5.6.16-1-MANJARO, LLVM 10.0.0)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 20.0.7
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6 (Compatibility Profile) Mesa 20.0.7
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 20.0.7
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:

inxi -Fxz output:

System: Host: fortminor Kernel: 5.6.16-1-MANJARO x86_64 bits: 64 compiler: gcc v: 10.1.0
Desktop: KDE Plasma 5.18.5 Distro: Manjaro Linux
Machine: Type: Laptop System: ASUSTeK product: ROG Zephyrus G15 GA502IV_GA502IV v: 1.0
serial:
Mobo: ASUSTeK model: GA502IV v: 1.0 serial: UEFI: American Megatrends
v: GA502IV.205 date: 05/25/2020
Battery: ID-1: BAT0 charge: 77.3 Wh condition: 77.3/76.0 Wh (102%) model: ASUSTeK ASUS Battery
status: Not charging
CPU: Topology: 8-Core model: AMD Ryzen 7 4800HS with Radeon Graphics bits: 64 type: MT MCP
arch: Zen rev: 1 L2 cache: 4096 KiB
flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm bogomips: 92661
Speed: 1398 MHz min/max: 1400/2900 MHz Core speeds (MHz): 1: 1397 2: 1398 3: 1397
4: 1396 5: 1397 6: 1397 7: 1397 8: 1396 9: 1397 10: 1397 11: 1397 12: 1397 13: 1397
14: 1397 15: 1397 16: 1396
Graphics: Device-1: NVIDIA vendor: ASUSTeK driver: nvidia v: 440.82 bus ID: 01:00.0
Device-2: AMD Renoir vendor: ASUSTeK driver: amdgpu v: kernel bus ID: 05:00.0
Display: x11 server: X.Org 1.20.8 driver: amdgpu,nvidia resolution: 1920x1080~240Hz
OpenGL: renderer: AMD RENOIR (DRM 3.36.0 5.6.16-1-MANJARO LLVM 10.0.0)
v: 4.6 Mesa 20.0.7 direct render: Yes
Audio: Device-1: NVIDIA TU106 High Definition Audio vendor: ASUSTeK driver: snd_hda_intel
v: kernel bus ID: 01:00.1
Device-2: AMD driver: snd_hda_intel v: kernel bus ID: 05:00.1
Device-3: AMD Raven/Raven2/FireFlight/Renoir Audio Processor driver: N/A
bus ID: 05:00.5
Device-4: AMD Family 17h HD Audio vendor: ASUSTeK driver: snd_hda_intel v: kernel
bus ID: 05:00.6
Sound Server: ALSA v: k5.6.16-1-MANJARO
Network: Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: ASUSTeK
driver: r8169 v: kernel port: e000 bus ID: 02:00.0
IF: enp2s0 state: down mac:
Device-2: Intel Wi-Fi 6 AX200 driver: iwlwifi v: kernel port: e000 bus ID: 03:00.0
IF: wlp3s0 state: up mac:
Drives: Local Storage: total: 953.87 GiB used: 21.04 GiB (2.2%)
ID-1: /dev/nvme0n1 vendor: Intel model: SSDPEKNW010T8 size: 953.87 GiB
Partition: ID-1: / size: 581.40 GiB used: 21.04 GiB (3.6%) fs: ext4 dev: /dev/nvme0n1p8
ID-2: swap-1 size: 7.81 GiB used: 0 KiB (0.0%) fs: swap dev: /dev/nvme0n1p7
Sensors: System Temperatures: cpu: 61.0 C mobo: N/A gpu: amdgpu temp: 46 C
Fan Speeds (RPM): N/A
Info: Processes: 317 Uptime: 24m Memory: 15.13 GiB used: 1.96 GiB (13.0%) Init: systemd
Compilers: gcc: 10.1.0 Shell: bash v: 5.0.17 inxi: 3.0.37

mhwd -l -d --pci output:


PCI Device: /devices/pci0000:00/0000:00:01.1/0000:01:00.0 (0300:10de:1f12)
Display controller nVidia Corporation TU106M [GeForce RTX 2060 Max-Q]


INSTALLED:

NAME: video-nvidia-440xx
ATTACHED: PCI
VERSION: 2019.10.25
INFO: Closed source NVIDIA drivers for linux.
PRIORITY: 8
FREEDRIVER: false
DEPENDS: -
CONFLICTS: video-hybrid-intel-nvidia-340xx-bumblebee video-hybrid-intel-nvidia-390xx-bumblebee video-hybrid-intel-nvidia-418xx-bumblebee video-hybrid-intel-nvidia-430xx-bumblebee video-hybrid-intel-nvidia-435xx-prime video-hybrid-intel-nvidia-440xx-prime video-nvidia-340xx video-nvidia-390xx video-nvidia-418xx video-nvidia-430xx video-nvidia-435xxs
CLASSIDS: 0300 0302
VENDORIDS: 10de

NAME: video-linux
ATTACHED: PCI
VERSION: 2018.05.04
INFO: Standard open source drivers.
PRIORITY: 2
FREEDRIVER: true
DEPENDS: -
CONFLICTS: -
CLASSIDS: 0300 0380 0302
VENDORIDS: 1002 8086 10de

NAME: video-modesetting
ATTACHED: PCI
VERSION: 2020.01.13
INFO: /X.org modesetting video driver.
PRIORITY: 1
FREEDRIVER: true
DEPENDS: -
CONFLICTS: -
CLASSIDS: 0300
VENDORIDS: *

AVAILABLE:

NAME: video-nvidia-440xx
ATTACHED: PCI
VERSION: 2019.10.25
INFO: Closed source NVIDIA drivers for linux.
PRIORITY: 8
FREEDRIVER: false
DEPENDS: -
CONFLICTS: video-hybrid-intel-nvidia-340xx-bumblebee video-hybrid-intel-nvidia-390xx-bumblebee video-hybrid-intel-nvidia-418xx-bumblebee video-hybrid-intel-nvidia-430xx-bumblebee video-hybrid-intel-nvidia-435xx-prime video-hybrid-intel-nvidia-440xx-prime video-nvidia-340xx video-nvidia-390xx video-nvidia-418xx video-nvidia-430xx video-nvidia-435xxs
CLASSIDS: 0300 0302
VENDORIDS: 10de

NAME: video-linux
ATTACHED: PCI
VERSION: 2018.05.04
INFO: Standard open source drivers.
PRIORITY: 2
FREEDRIVER: true
DEPENDS: -
CONFLICTS: -
CLASSIDS: 0300 0380 0302
VENDORIDS: 1002 8086 10de

NAME: video-modesetting
ATTACHED: PCI
VERSION: 2020.01.13
INFO: /X.org modesetting video driver.
PRIORITY: 1
FREEDRIVER: true
DEPENDS: -
CONFLICTS: -
CLASSIDS: 0300
VENDORIDS: *

NAME: video-vesa
ATTACHED: PCI
VERSION: 2017.03.12
INFO: /X.org vesa video driver.
PRIORITY: 0
FREEDRIVER: true
DEPENDS: -
CONFLICTS: -
CLASSIDS: 0300
VENDORIDS: *


PCI Device: /devices/pci0000:00/0000:00:08.1/0000:05:00.0 (0300:1002:1636)
Display controller ATI Technologies Inc Renoir


INSTALLED:

NAME: video-linux
ATTACHED: PCI
VERSION: 2018.05.04
INFO: Standard open source drivers.
PRIORITY: 2
FREEDRIVER: true
DEPENDS: -
CONFLICTS: -
CLASSIDS: 0300 0380 0302
VENDORIDS: 1002 8086 10de

NAME: video-modesetting
ATTACHED: PCI
VERSION: 2020.01.13
INFO: /X.org modesetting video driver.
PRIORITY: 1
FREEDRIVER: true
DEPENDS: -
CONFLICTS: -
CLASSIDS: 0300
VENDORIDS: *

AVAILABLE:

NAME: video-linux
ATTACHED: PCI
VERSION: 2018.05.04
INFO: Standard open source drivers.
PRIORITY: 2
FREEDRIVER: true
DEPENDS: -
CONFLICTS: -
CLASSIDS: 0300 0380 0302
VENDORIDS: 1002 8086 10de

NAME: video-modesetting
ATTACHED: PCI
VERSION: 2020.01.13
INFO: /X.org modesetting video driver.
PRIORITY: 1
FREEDRIVER: true
DEPENDS: -
CONFLICTS: -
CLASSIDS: 0300
VENDORIDS: *

NAME: video-vesa
ATTACHED: PCI
VERSION: 2017.03.12
INFO: /X.org vesa video driver.
PRIORITY: 0
FREEDRIVER: true
DEPENDS: -
CONFLICTS: -
CLASSIDS: 0300
VENDORIDS: *

As far as I understand the last command says what drivers are compatible with my system, but I'm not sure which ones I should install.

And by the way, is my gpu setup hybrid? I couldn't find a way to identify that.

Thanks a lot!

P.S: I don't know if it's relevant, but I have dual boot with Windows 10 on the same SSD and secure boot is disabled.

Hello :slightly_smiling_face:!
Looking at you current output, you do seem to have the proprietary NVIDIA driver AND AMD's drivers installed. However, only your AMD iGPU seems to work at the moment.
You might be interested in PRIME offloading, a technology which uses you AMD iGPU for most tasks to save power, but once you run something with the command prime-run your NVIDIA dGPU is used for maximum performance. Unfortunately, Manjaro doesn't yet offer an easy installation way of getting PRIME working with AMDGPU + NVIDIA, but I'll tell you how to set it up manually.
The good news is that most necessary stuff is already installed. We're just going to install PRIME so you can actually make use of you NVIDIA dGPU for e.g. gaming.
First, install PRIME:

sudo pacman -Syu nvidia-prime

You might get promped which provider to use. Choose "nvidia-440xx-utils".
Reboot your system afterwards.
After this, it's time to set up the apps which should use the NVIDIA dGPU.
First of all, the command to launch apps with your NVIDIA dGPU from a terminal is:

prime-run <command>

where <command> is the command you usually use to start an application.
If you want to run steam games with your NVIDIA dGPU, simply put the line

prime-run %command%

in your "set launch options" under "properites" of the game you want to run on the dGPU.
For lutris, there should be an easy toggle called "Enable NVIDIA Prime render offload" somewhere in the settings which when enabled should run your game on the NVIDIA dGPU.
If you have any further questions/difficulties, feel free to ask!

2 Likes

Thanks a lot for a quick and understandable response! I will try it out when I get to my PC. In the meantime, I want to ask if it’s the best option available at the moment? (prime offloading)

Also, I installed video modesetting while trying things out. Should I remove it?

Thanks! :slight_smile:

Yep it does work! Literally what I wanted. Thank you so much!

1 Like

Yes, at the moment I'd say PRIME offloading is your best bet. It combines great battery life with great performance at the coast of convenience (having to add prime-run to everything). You could use only AMDGPU, but that would give horrible performance, or only video-nvidia, which would disable your iGPU and cause your laptop to have poor battery life, especially with a Desktop Environment that's very GPU power hungry like KDE. (I have a RTX 2070S desktop and KDE uses 40% (!) GPU while moving windows on a 165Hz 1440p screen). You can uninstall the modesetting drivers, although it's not necessary.

1 Like

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

Forum kindly sponsored by