can't install video-nvidia drivers (laptop with AMD+Nvidia GPUs)

Hi everybody,

I just got a new laptop to do some deep learning with CUDA and CUDnn support at home, and also decided to switch from ubuntu to Manjaro.

So here is my problem : using CUDA requires to install nvidia drivers first (I know that we don't have to download anything from the nvidia website with manjaro), and when I launch the installation, it ends up freezing and also freezes the whole system when I try executing something else at the same time.

I first tried the GUI installation, with all drivers avaiable, and it always ends up freezing.

After looking at this page and this one on the wiki, it turns out that the command:

sudo mhwd -a pci nonfree 0300

tries to install the free drivers (video-linux) for some reason, and the next one :

sudo mhwd -i pci video-nvidiaxxxxxx

gets stuck when it come to "(6/6) Updating the desktop file MIME type cache...", which seems to be the last step. I also tried to uninstall video-linux first and again, it ends up freezing (reinstalled it after)
I also did pacman -Syyu before.
Does anybody knows what I am missing ? Or do I just need to be more patient and not hit "Ctrl+C" at the last step ? If so, how long ?

Here are some infos about my system:

screenfetch: (I have a GTX 1050 GPU, not displayed here)

 ██████████████████  ████████     oguere@ZaManjaro
 ██████████████████  ████████     OS: Manjaro 19.0.0 Kyria
 ██████████████████  ████████     Kernel: x86_64 Linux 5.4.18-1-MANJARO
 ██████████████████  ████████     Uptime: 9m
 ████████            ████████     Packages: 1174
 ████████  ████████  ████████     Shell: fish 3.0.2
 ████████  ████████  ████████     Resolution: 1920x1080
 ████████  ████████  ████████     DE: KDE 5.66.0 / Plasma 5.17.5
 ████████  ████████  ████████     WM: KWin
 ████████  ████████  ████████     GTK Theme: Breath-Dark [GTK2/3]
 ████████  ████████  ████████     Icon Theme: oxygen
 ████████  ████████  ████████     Disk: 13G / 472G (3%)
 ████████  ████████  ████████     CPU: AMD Ryzen 5 2500U with Radeon Vega Mobile Gfx @ 8x 2GHz
 ████████  ████████  ████████     GPU: Advanced Micro Devices, Inc. [AMD/ATI] Raven Ridge [Radeon Vega Series / Radeon Vega Mobile Series] (rev c4)
                                  RAM: 2045MiB / 6962MiB

mhwd -l:

--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
         network-r8168            2016.04.20                true            PCI


> 0000:01:00.0 (0302:10de:1c8d) Display controller nVidia Corporation:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
    video-nvidia-440xx            2019.10.25               false            PCI
    video-nvidia-435xx            2019.10.25               false            PCI
    video-nvidia-430xx            2019.10.25               false            PCI
    video-nvidia-418xx            2019.10.25               false            PCI
    video-nvidia-390xx            2019.10.25               false            PCI
           video-linux            2018.05.04                true            PCI


> 0000:04:00.0 (0300:1002:15dd) Display controller ATI Technologies Inc:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
           video-linux            2018.05.04                true            PCI
     video-modesetting            2020.01.13                true            PCI
            video-vesa            2017.03.12                true            PCI

mhwd -li:

> Installed PCI configs:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
           video-linux            2018.05.04                true            PCI


Warning: No installed USB configs!

In advance thanks for helping

According to your screenfetch you have an AMD gpu ..

Lets use something more reliable for sharing system information:

inxi -Fxxxza --no-host

Hi, thanks for your quick response, I have indeed AMD CPU and GPU, here is the output though :

System:    Kernel: 5.4.18-1-MANJARO x86_64 bits: 64 compiler: gcc v: 9.2.0 
           parameters: BOOT_IMAGE=/boot/vmlinuz-5.4-x86_64 root=UUID=7ab11490-9dd0-47fa-8a41-0bf859a411bb rw quiet apparmor=1 
           security=apparmor udev.log_priority=3 
           Desktop: KDE Plasma 5.17.5 tk: Qt 5.14.1 wm: kwin_x11 dm: SDDM Distro: Manjaro Linux 

Machine:   Type: Laptop System: ASUSTeK product: VivoBook_ASUSLaptop X570ZD_R570ZD v: 1.0 serial: <filter> 
           Mobo: ASUSTeK model: X570ZD v: 1.0 serial: <filter> UEFI: American Megatrends v: X570ZD.310 date: 07/04/2019 

Battery:   ID-1: BAT0 charge: 45.3 Wh condition: 46.2/48.1 Wh (96%) volts: 11.7/11.7 model: ASUSTeK ASUS Battery type: Li-ion 
           serial: <filter> status: Not charging cycles: 1 

CPU:       Topology: Quad Core model: AMD Ryzen 5 2500U with Radeon Vega Mobile Gfx bits: 64 type: MT MCP arch: Zen 
           family: 17 (23) model-id: 11 (17) stepping: N/A microcode: 810100B L2 cache: 2048 KiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm bogomips: 31948 
           Speed: 1929 MHz min/max: 1600/2000 MHz boost: enabled Core speeds (MHz): 1: 1929 2: 1850 3: 2056 4: 2795 5: 1633 
           6: 1555 7: 1895 8: 1923 
           Vulnerabilities: Type: itlb_multihit status: Not affected 
           Type: l1tf status: Not affected 
           Type: mds status: Not affected 
           Type: meltdown status: Not affected 
           Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl and seccomp 
           Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization 
           Type: spectre_v2 mitigation: Full AMD retpoline, IBPB: conditional, STIBP: disabled, RSB filling 
           Type: tsx_async_abort status: Not affected 

Graphics:  Device-1: NVIDIA GP107M [GeForce GTX 1050 Mobile] vendor: ASUSTeK driver: nouveau v: kernel bus ID: 01:00.0 
           chip ID: 10de:1c8d 
           Device-2: AMD Raven Ridge [Radeon Vega Series / Radeon Vega Mobile Series] vendor: ASUSTeK driver: amdgpu v: kernel 
           bus ID: 04:00.0 chip ID: 1002:15dd 
           Display: x11 server: X.Org 1.20.7 driver: amdgpu,ati,modesetting unloaded: nouveau alternate: fbdev,nv,vesa 
           compositor: kwin_x11 resolution: 1920x1080~60Hz 
           OpenGL: renderer: AMD RAVEN (DRM 3.35.0 5.4.18-1-MANJARO LLVM 9.0.1) v: 4.5 Mesa 19.3.3 direct render: Yes 

Audio:     Device-1: Advanced Micro Devices [AMD/ATI] Raven/Raven2/Fenghuang HDMI/DP Audio driver: snd_hda_intel v: kernel 
           bus ID: 04:00.1 chip ID: 1002:15de 
           Device-2: Advanced Micro Devices [AMD] Family 17h HD Audio vendor: ASUSTeK driver: snd_hda_intel v: kernel 
           bus ID: 04:00.6 chip ID: 1022:15e3 
           Sound Server: ALSA v: k5.4.18-1-MANJARO 

Network:   Device-1: Qualcomm Atheros QCA9377 802.11ac Wireless Network Adapter vendor: AzureWave driver: ath10k_pci v: kernel 
           port: f000 bus ID: 02:00.0 chip ID: 168c:0042 
           IF: wlp2s0 state: up mac: <filter> 
           Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: ASUSTeK driver: r8169 v: kernel port: e000 
           bus ID: 03:00.0 chip ID: 10ec:8168 
           IF: enp3s0 state: down mac: <filter> 

Drives:    Local Storage: total: 476.94 GiB used: 12.45 GiB (2.6%) 
           ID-1: /dev/sda vendor: Kingston model: RBUSNS8180DS3512GJ size: 476.94 GiB block size: physical: 512 B 
           logical: 512 B speed: 6.0 Gb/s serial: <filter> rev: 61E1 scheme: GPT 

Partition: ID-1: / raw size: 476.64 GiB size: 468.16 GiB (98.22%) used: 12.45 GiB (2.7%) fs: ext4 dev: /dev/sda2 

Sensors:   System Temperatures: cpu: 56.6 C mobo: N/A 
           Fan Speeds (RPM): cpu: 2600 
           GPU: device: amdgpu temp: 56 C device: nouveau temp: N/A 

Info:      Processes: 224 Uptime: 19m Memory: 6.80 GiB used: 1.98 GiB (29.1%) Init: systemd v: 242 Compilers: gcc: 9.2.0 
           Shell: fish v: 3.0.2 running in: konsole inxi: 3.0.37 

Have you tried turning the AMD internal Graphics off in Bios/UEFI? I think there might be your conflict.

For both the AMD and the NVidia Graphics to work you would need both drivers installed and running, which i do not know if that is even feasable.

Hi, thanks for your response
I tried your solution, however I looked everywhere in my BIOS 3 times and it doesn't have any option to disable the AMD GPU

Hmm.... the only thing that i was able to turn up is this:
https://ubuntuforums.org/showthread.php?t=2414522

Albeit you should take it with a huge amount of Salt, because seemingly he was able to somehow install the NVidia driver and it is from Ubuntu. I still hope though this helps you to discover the solution.

Depending on your use-case, to run CUDA you might have the wrong hardware, unfortunately.

  • CUDA runs only on nVidia, so you need the nVidia driver loaded
  • You need to also run your GUI, so for that you need something

But there are no utilities that allow you to switch between AMD and nVidia drivers (they do exist for Intel), so you cannot use the AMD driver for your GUI

so your options are:

  1. Run your GUI on your existing nVidia card and add an additional nVidia card to do your CUDA calculations and don't use the AMD (unload the driver) but as you have a VivoBook (laptop), that is going to be difficult...

OR

  1. Drop the GUI (thus also not using the AMD Display driver), go to text-mode only and run your CUDA calculations on your nVidia from the command line.

  2. Arch (Which Manjaro is based on) is not officially supported by nVidia...

Conclusion: You're in uncharted waters... Here be dragons...

:sob: :sob: :sob:

P.S. I'm not saying it doesn't work, it does work! but very few people are doing what you're doing and they're all on Arch, not Manjaro...

it is there, it is called Prime, but Manjaro so far only has a prime-mhwd-setup for only free drivers (in which case only video-linux is allowed to be installed) or for intel+proprietary nvidia driver (called
video-hybrid-intel-nvidia-*-prime).
The combination of AMD+proprietary nvidia should work accordingly but I don't know how to configure it. Maybe this topic can be of help:

@philm Would it be possible to get a video-hybrid-amd-nvidia-*-prime mhwd - config? Given that the Ryzen-APU's are somewhat popular the need should be there.

Takei, I tried the solution on your link by installing dpkg, but unfortunately there are many depedencies for the packages to install.

I finally managed to install it, what did it with pacman first and then with mhwd (looks a bit weird to me but it worked)

Now I have the black screen issue when rebooting, I went to the tty and when I run mhdw -li, I have my nvidia driver well installed, nvidia-smi works too (And says I have CUDA 10.1 instead of 10.2, because of pytorch I guess).
Now I don't know how to get the GUI back ... anybody knows how to solve it ? (I also uninstalled the free drivers, maybe I shouldn't hve ...) Do I have to chroot ? (never did it before)

All right, I finally managed to install it and everything works fine. I did chroot to uninstall the driver and then reinstalled everything.
If anybody with a laptop with AMD + Nvidia GPUs gets stuck in the same situation as me, here is what worked in my case :

  • Install the nvidia driver package with pacman ( linux54-nvidia-440xx for, actually depends on your kernel)
  • reboot
  • Install the nvidia driver with mhwd => It will generate a config file which causes the blackscreen for some reason. (/etc/X11/mhwd.d/nvidia.conf)
  • Rename that file, with mv (you can also delete it but it might be dangerous)
  • reboot
  • done

and mhwd -li outputs (for me):

mhwd --listinstalled
> Installed PCI configs:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
    video-nvidia-440xx            2019.10.25               false            PCI


Warning: No installed USB configs!

Thanks to everyone who tried to give me a solution :slight_smile:

2 Likes

Forum kindly sponsored by