How to get amd-nvidia hybrid laptop to work with proprietary drivers?

I switched to EndeavourOS from Manjaro Linux which had mhwd as a driver manager, in that utility it had the option to install video-hybrid-amd-nvidia-driver-450x-prime which worked perfectly for my laptop. How would I do that same thing on EndeavourOS?

Laptop Asus TUF FX505DT.
Kernel 5.10.7-arch1-1
DE Plasma 5.20.5
CPU AMD Ryzen 5 3550H with Radeon Vega Mobile Gfx (8) @ 2.100GHz
GPU NVIDIA GeForce GTX 1650 Mobile / Max-Q

welcome at the purple side of Linux!
We do not have tools from Manjaro here, but we have some wiki to a first read, and a friendly bunch of users will join to help here:

So try that first and if you are stuck or have any question ask we will be happy to help.

I looked into the wiki. Problem is I do not have an AMD dedicated graphics card, it is an nVidia one. I know you do not have the tools from Manjaro, that’s why I said:

Manjaro Linux which had mhwd as a driver manager

you might want to re-read my question, I want to have a hybrid setup that would use integrated Vega IGP for most application but I want to be able to use prime-run to offload to the dedicated nVidia GPU. Thank you for the response!

Hello @ferretwithaberet
If you can post the following first.

inxi -Fxxxz --no-host

Edit: Also what desktop did you install?

System:    Kernel: 5.10.7-arch1-1 x86_64 bits: 64 compiler: gcc v: 10.2.0 Desktop: KDE Plasma 5.20.5 
           tk: Qt 5.15.2 wm: kwin_x11 dm: SDDM Distro: EndeavourOS 
Machine:   Type: Laptop System: ASUSTeK product: TUF Gaming FX505DT_FX505DT v: 1.0 serial: <filter> 
           Mobo: ASUSTeK model: FX505DT v: 1.0 serial: <filter> UEFI [Legacy]: American Megatrends 
           v: FX505DT.310 date: 12/24/2019 
Battery:   ID-1: BAT0 charge: 41.7 Wh condition: 41.7/48.1 Wh (87%) volts: 12.8/11.7 model: FX50442 
           type: Li-ion serial: N/A status: Full 
CPU:       Info: Quad Core model: AMD Ryzen 5 3550H with Radeon Vega Mobile Gfx bits: 64 type: MT MCP 
           arch: Zen/Zen+ note: check rev: 1 L2 cache: 2 MiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm bogomips: 33550 
           Speed: 1495 MHz min/max: 1400/2100 MHz boost: enabled Core speeds (MHz): 1: 1495 2: 1457 
           3: 1225 4: 1235 5: 1224 6: 1226 7: 1300 8: 1328 
Graphics:  Device-1: NVIDIA TU117M [GeForce GTX 1650 Mobile / Max-Q] vendor: ASUSTeK driver: nouveau 
           v: kernel bus ID: 01:00.0 chip ID: 10de:1f91 
           Device-2: AMD Picasso vendor: ASUSTeK driver: amdgpu v: kernel bus ID: 05:00.0 
           chip ID: 1002:15d8 
           Device-3: IMC Networks USB2.0 HD UVC WebCam type: USB driver: uvcvideo bus ID: 3-1:2 
           chip ID: 13d3:56a2 serial: <filter> 
           Display: x11 server: X.org 1.20.10 compositor: kwin_x11 driver: amdgpu,ati,modesetting,nouveau 
           unloaded: fbdev,vesa alternate: nv resolution: <missing: xdpyinfo> 
           Message: Unable to show advanced data. Required tool glxinfo missing. 
Audio:     Device-1: NVIDIA vendor: ASUSTeK driver: snd_hda_intel v: kernel bus ID: 01:00.1 
           chip ID: 10de:10fa 
           Device-2: AMD Family 17h HD Audio vendor: ASUSTeK driver: snd_hda_intel v: kernel 
           bus ID: 05:00.6 chip ID: 1022:15e3 
           Sound Server: ALSA v: k5.10.7-arch1-1 
Network:   Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: ASUSTeK driver: r8169 
           v: kernel port: e000 bus ID: 02:00.0 chip ID: 10ec:8168 
           IF: enp2s0 state: down mac: <filter> 
           Device-2: Realtek RTL8821CE 802.11ac PCIe Wireless Network Adapter vendor: AzureWave 
           driver: rtw_8821ce v: N/A port: d000 bus ID: 04:00.0 chip ID: 10ec:c821 
           IF: wlan0 state: up mac: <filter> 
Drives:    Local Storage: total: 1.38 TiB used: 53.09 GiB (3.8%) 
           ID-1: /dev/nvme0n1 vendor: Micron model: 2200V MTFDHBA512TCK size: 476.94 GiB speed: 31.6 Gb/s 
           lanes: 4 serial: <filter> rev: P1MA0V4 temp: 48.9 C 
           ID-2: /dev/sda vendor: Seagate model: ST1000LM048-2E7172 size: 931.51 GiB speed: 6.0 Gb/s 
           serial: <filter> rev: 0001 
Partition: ID-1: / size: 459.79 GiB used: 53.09 GiB (11.5%) fs: ext4 dev: /dev/nvme0n1p1 
Swap:      ID-1: swap-1 type: partition size: 8.8 GiB used: 0 KiB (0.0%) priority: -2 dev: /dev/nvme0n1p2 
Sensors:   System Temperatures: cpu: 56.0 C mobo: N/A 
           Fan Speeds (RPM): cpu: 3200 
           GPU: device: nouveau temp: 42.0 C device: amdgpu temp: 56.0 C 
Info:      Processes: 246 Uptime: 2m wakeups: 1 Memory: 15.13 GiB used: 1.9 GiB (12.5%) Init: systemd 
           v: 247 Compilers: gcc: 10.2.0 Packages: pacman: 1081 Shell: Bash v: 5.1.4 running in: konsole 
           inxi: 3.2.01

If by what desktop you mean what DE, I listed it in the main post its KDE Plasma.

Edit: I tried running the nvidia-installer-dkms but after rebooting systemctl it gets stuck.

Currently it is running on Nouveau open source driver for Nvidia and AMDGpu.

Maybe you can try running the installer in test mode and see what info if any it provides.

nvidia-installer-dkms -t

This will run in test mode. See what it shows.

2021-01-18 18:18:07 [INFO]: All logs will be stored in /tmp/nvidia-installer.log
2021-01-18 18:18:07 [INFO]: Running the installer in testing mode...
2021-01-18 18:18:07 [INFO]: Updating Nvidia graphics cards database...
2021-01-18 18:18:07 [INFO]: nvidia-installer-update-db --tmpdb
Fetching NVIDIA graphics card ids from nvidia.com ...
==> Latest Production Branch Version: found!
==> Latest Legacy GPU version: found!
Adding NVIDIA graphics card ids to a temporary local database.
2021-01-18 18:18:10 [INFO]: Installing nvidia-dkms driver...
2021-01-18 18:18:10 [INFO]: Removing conflicting packages...
2021-01-18 18:18:10 [INFO]: pacman -Rs --noconfirm --noprogressbar --nodeps xf86-video-nouveau
2021-01-18 18:18:10 [INFO]: Downloading and installing driver packages, please wait as this may take a few minutes...
2021-01-18 18:18:10 [INFO]: pacman -Sqy --noconfirm --noprogressbar nvidia-dkms libvdpau nvidia-settings lib32-nvidia-utils lib32-libvdpau
2021-01-18 18:18:10 [INFO]: Creating /etc/X11/xorg.conf.d/20-nvidia.conf file...
2021-01-18 18:18:10 [INFO]: Installation finished. Nothing has been modified as testing mode was ON.

Looks like it should work, I did this before installing it initially too. I know for a fact that when I was using Manjaro Linux, it was also pulling nvidia-prime as part of the video-hybrid-amd-nvidia-driver-450x-prime driver.

You install prime after. Looks like no errors so I’m not sure what’s up with systemctl. You’d have to look at that after separately to diagnose.

If you want to install nvidia then

sudo nvidia-installer-dkms

Then you can install prime.

To install Optimus Manager.

yay -S optimus-manager-qt

To check if it’s running.

systemctl status optimus-manager

Edit: If it’s not running. To start & enable
sudo systemctl enable --now optimus-manager

  1. Now switch to Nvidia GPU, right-click on the Tray and select “Switch to Nvidia“

Welcome @ferretwithaberet :smile:

This might help too: https://forums.developer.nvidia.com/t/nvidia-xconfig-doesnt-do-what-i-want-it-to-nor-does-nvidia-settings/107883/7

1 Like

This is where it gets stuck. Also, I do not think installing optimus-manager will work, because afaik this laptop is not considered an optimus laptop. The way it works as far as I got it is that it starts by using the IGP then offloads to the dedicated GPU, this being called “AMD switchable graphics”. I recall asking a dev of optimus-manager if I remember correctly, and he told me it does not support AMD-nVidia configurations, only Intel-nVidia or Intel-AMD.
Imgur

Okay … if that is the case then Optimus manager may not work then.

Edit: If this is how it works then it should automatically switch to nvidia then. So why it’s hanging at the boot i’m not sure.

Edit2: I think this is something you are going to have to put some effort into diagnosing. Did you wait longer and see if it will boot past here?

Maybe this helps.

I did wait quite a substantial amount of time for it to load.

Edit: I also have no /etc/X11/xorg.conf file, it that is important.

Yes i think this is may be part of the reason or all of it.
Edit: You could try adding this.

sudo nano /etc/X11/xorg.conf.d/20-nvidia.conf

Add the following

Section "Device"
    Identifier "Nvidia Card"
    Driver "nvidia"
    VendorName "NVIDIA Corporation"
    Option "NoLogo" "true"
EndSection

Section "Screen"
        Identifier      "nvidia"
        Option         "metamodes" "nvidia-auto-select +0+0 { ForceFullCompositionPipeline = On }"

        Option          "TripleBuffer"                  "on"
        Option          "AllowIndirectGLXProtocol"      "off"
EndSection

Save the file.

I mean, I saw most “solutions” had a step that requires the user to remove that file anyway, so it might not, I really do not know. Manjaro was doing this for me so now I am left in the dark. :joy:

Yeah, It does not seem to work. It gets stuck in the same place, without the nvidia driver the OS works flawlessly.

Well I would try the setup that i posted the link to above. Just to see as he is using two files one for the amd and one for the nvidia. Don’t give up too easily. :grinning:

Thing is, his config uses "OutputClass" while the default one uses "Device".

I’m not sure why but if you don’t try it i guess you won’t know.

Edit: This is the explanation i see.

The main difference is that Device sections are used for static configuration (e.g. “here’s the configuration for a specific piece of hardware”) while the *Class sections are used for dynamic configuration (e.g. "here’s the configuration for any device that has these properties).