Switching to Nvidia drivers from Nouveau with mhwd fails

Hi,

I have a system using nouveau at the moment, and am trying to switch to nvidia drivers so I can use CUDA with a titan rtx.

Using mhwd to switch from video-linux to video-nvidia causes the boot process to fail. It hangs on the manufacturer’s logo when booting (grub is fine). I have been able to chroot from a live USB and switch back to nouveau, and the system boots as normal.

It seems like it might be gnome hanging on start - the logs disappear very quickly, leaving me with a blank screen.

For context:

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

 Display controller nVidia Corporation TU102 [TITAN RTX]
--------------------------------------------------------------------------------
  > 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 



  > AVAILABLE:

   NAME:	video-nvidia
   ATTACHED:	PCI
   VERSION:	2020.11.30
   INFO:	Closed source NVIDIA drivers for linux.
   PRIORITY:	4
   FREEDRIVER:	false
   DEPENDS:	-
   CONFLICTS:	video*nvidia* 
   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:	* 



$ sudo pacman -Q | grep nvidia
mhwd-nvidia 465.31-1
mhwd-nvidia-390xx 390.143-1

and I have linux 5.10

any thoughts much appreciated!

sudo mhwd -r pci video-linux
then
sudo mhwd -i pci video-nvidia

On gnome you might have to enable early kms. As administrator edit the /etc/mkinitcpio.conf and make the MODULES= line like this

MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)

then run from terminal:
sudo mkinitcpio -P
sudo update-grub

Also, you probably have autologin on and is trying wayland session and not always starts (at least on my end does funky things)

1 Like

This didn’t fix it unfortunately

Ok, we must know more about your system:

System:
  Kernel: 5.10.42-1-MANJARO x86_64 bits: 64 compiler: gcc v: 11.1.0 
  parameters: BOOT_IMAGE=/boot/vmlinuz-5.10-x86_64 
  root=UUID=4b4cff75-8cb5-4976-9831-b2fe6f6d4d54 rw quiet splash apparmor=1 
  security=apparmor resume=UUID=6a9dcfad-1151-4b6e-9629-3112572406c8 
  udev.log_priority=3 
  Desktop: GNOME 3.38.4 tk: GTK 3.24.29 wm: gnome-shell dm: GDM 40.0 
  Distro: Manjaro Linux base: Arch Linux 
Machine:
  Type: Desktop System: PC Specailist product: Tornado R5 v: N/A 
  serial: <filter> 
  Mobo: ASUSTeK model: PRIME B450-PLUS v: Rev X.0x serial: <filter> 
  UEFI: American Megatrends v: 1820 date: 09/12/2019 
Memory:
  RAM: total: 23.48 GiB used: 3.97 GiB (16.9%) 
  RAM Report: permissions: Unable to run dmidecode. Root privileges required. 
CPU:
  Info: 6-Core model: AMD Ryzen 5 3600 bits: 64 type: MT MCP arch: Zen 2 
  family: 17 (23) model-id: 71 (113) stepping: 0 microcode: 8701013 cache: 
  L2: 3 MiB bogomips: 86268 
  Speed: 2769 MHz min/max: 2200/3600 MHz boost: enabled Core speeds (MHz): 
  1: 2769 2: 1890 3: 2196 4: 2196 5: 1990 6: 2196 7: 2196 8: 2196 9: 2565 
  10: 2020 11: 1879 12: 2196 
  Flags: 3dnowprefetch abm adx aes aperfmperf apic arat avic avx avx2 bmi1 
  bmi2 bpext cat_l3 cdp_l3 clflush clflushopt clwb clzero cmov cmp_legacy 
  constant_tsc cpb cpuid cqm cqm_llc cqm_mbm_local cqm_mbm_total cqm_occup_llc 
  cr8_legacy cx16 cx8 de decodeassists extapic extd_apicid f16c flushbyasid 
  fma fpu fsgsbase fxsr fxsr_opt ht hw_pstate ibpb ibs irperf lahf_lm lbrv lm 
  mba mca mce misalignsse mmx mmxext monitor movbe msr mtrr mwaitx nonstop_tsc 
  nopl npt nrip_save nx osvw overflow_recov pae pat pausefilter pclmulqdq 
  pdpe1gb perfctr_core perfctr_llc perfctr_nb pfthreshold pge pni popcnt pse 
  pse36 rdpid rdpru rdrand rdseed rdt_a rdtscp rep_good sep sev sev_es sha_ni 
  skinit smap smca sme smep ssbd sse sse2 sse4_1 sse4_2 sse4a ssse3 stibp 
  succor svm svm_lock syscall tce topoext tsc tsc_scale umip v_vmsave_vmload 
  vgif vmcb_clean vme vmmcall wbnoinvd wdt xgetbv1 xsave xsavec xsaveerptr 
  xsaveopt xsaves 
  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: 
  always-on, RSB filling 
  Type: srbds status: Not affected 
  Type: tsx_async_abort status: Not affected 
Graphics:
  Device-1: NVIDIA TU102 [TITAN RTX] driver: nouveau v: kernel bus-ID: 05:00.0 
  chip-ID: 10de:1e02 class-ID: 0300 
  Display: wayland server: X.org 1.20.11 compositor: gnome-shell driver: 
  loaded: nouveau note: n/a (using device driver) - try sudo/root 
  display-ID: 0 resolution: <missing: xdpyinfo> 
  OpenGL: renderer: NV162 v: 4.3 Mesa 21.1.2 direct render: Yes 
Audio:
  Device-1: NVIDIA TU102 High Definition Audio driver: snd_hda_intel v: kernel 
  bus-ID: 05:00.1 chip-ID: 10de:10f7 class-ID: 0403 
  Device-2: AMD Starship/Matisse HD Audio vendor: ASUSTeK 
  driver: snd_hda_intel v: kernel bus-ID: 08:00.4 chip-ID: 1022:1487 
  class-ID: 0403 
  Sound Server-1: ALSA v: k5.10.42-1-MANJARO running: yes 
  Sound Server-2: JACK v: 0.125.0 running: no 
  Sound Server-3: PulseAudio v: 14.2 running: yes 
  Sound Server-4: PipeWire v: 0.3.30 running: no 
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet 
  vendor: ASUSTeK driver: r8169 v: kernel port: f000 bus-ID: 03:00.0 
  chip-ID: 10ec:8168 class-ID: 0200 
  IF: enp3s0 state: up speed: 1000 Mbps duplex: full mac: <filter> 
  IP v4: <filter> type: dynamic noprefixroute scope: global 
  broadcast: <filter> 
  IP v6: <filter> type: noprefixroute scope: link 
  Device-2: Realtek RTL8192EE PCIe Wireless Network Adapter driver: rtl8192ee 
  v: kernel port: e000 bus-ID: 04:00.0 chip-ID: 10ec:818b class-ID: 0280 
  IF: wlp4s0 state: down mac: <filter> 
  WAN IP: <filter> 
Bluetooth:
  Message: No bluetooth data found. 
Logical:
  Permissions: Unable to run lvs. Root privileges required. 
RAID:
  Message: No RAID data found. 
Drives:
  Local Storage: total: 1.93 TiB used: 612.16 GiB (31.0%) 
  SMART Message: Required tool smartctl not installed. Check --recommends 
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Western Digital 
  model: WDS100T3X0C-00SJG0 size: 931.51 GiB block-size: physical: 512 B 
  logical: 512 B speed: 31.6 Gb/s lanes: 4 rotation: SSD serial: <filter> 
  rev: 111110WD temp: 50.9 C scheme: GPT 
  ID-2: /dev/sda maj-min: 8:0 vendor: Seagate model: ST1000DM010-2EP102 
  size: 931.51 GiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s 
  rotation: 7200 rpm serial: <filter> rev: CC43 scheme: GPT 
  ID-3: /dev/sdb maj-min: 8:16 vendor: A-Data model: SU650 size: 111.79 GiB 
  block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s rotation: SSD 
  serial: <filter> rev: 1c45 scheme: GPT 
  Message: No optical or floppy data found. 
Partition:
  ID-1: / raw-size: 905.39 GiB size: 890.1 GiB (98.31%) 
  used: 264.12 GiB (29.7%) fs: ext4 dev: /dev/nvme0n1p2 maj-min: 259:2 
  label: N/A uuid: 4b4cff75-8cb5-4976-9831-b2fe6f6d4d54 
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%) 
  used: 296 KiB (0.1%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1 
  label: NO_LABEL uuid: 24A8-73A8 
  ID-3: /mnt/archive raw-size: 488.28 GiB size: 479.62 GiB (98.23%) 
  used: 348.04 GiB (72.6%) fs: ext4 dev: /dev/sda5 maj-min: 8:5 
  label: linux_storage uuid: 07cb8824-4d60-4cec-9b0a-3b3720820458 
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default) 
  ID-1: swap-1 type: partition size: 25.83 GiB used: 0 KiB (0.0%) priority: -2 
  dev: /dev/nvme0n1p3 maj-min: 259:3 label: N/A 
  uuid: 6a9dcfad-1151-4b6e-9629-3112572406c8 
Unmounted:
  ID-1: /dev/sda1 maj-min: 8:1 size: 16 MiB fs: <superuser required> 
  label: N/A uuid: N/A 
  ID-2: /dev/sda2 maj-min: 8:2 size: 94.16 GiB fs: ntfs label: N/A 
  uuid: D4AC546BAC5449DE 
  ID-3: /dev/sda3 maj-min: 8:3 size: 335.42 GiB fs: ext4 label: home_partition 
  uuid: e65d53a2-12fe-41d9-bac1-a6cc9cb31b0d 
  ID-4: /dev/sda4 maj-min: 8:4 size: 13.63 GiB fs: ntfs label: New Volume 
  uuid: F05AB91F5AB8E40E 
  ID-5: /dev/sdb1 maj-min: 8:17 size: 260 MiB fs: fat (32 bit) label: SYSTEM 
  uuid: C496-433A 
  ID-6: /dev/sdb2 maj-min: 8:18 size: 128 MiB fs: <superuser required> 
  label: N/A uuid: N/A 
  ID-7: /dev/sdb3 maj-min: 8:19 size: 500 MiB fs: ntfs label: Recovery 
  uuid: EA9096D69096A899 
  ID-8: /dev/sdb4 maj-min: 8:20 size: 110.92 GiB fs: ntfs label: Windows 
  uuid: 503C99EB3C99CC7A 
USB:
  Hub-1: 1-0:1 info: Full speed (or root) Hub ports: 10 rev: 2.0 
  speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900 
  Device-1: 1-7:2 info: Holtek USB-HID Keyboard type: Keyboard,HID 
  driver: hid-generic,usbhid interfaces: 3 rev: 1.1 speed: 12 Mb/s 
  power: 100mA chip-ID: 04d9:0192 class-ID: 0300 
  Device-2: 1-10:3 info: Logitech M-UAS144 [LS1 Laser Mouse] type: Mouse 
  driver: hid-generic,usbhid interfaces: 1 rev: 2.0 speed: 1.5 Mb/s 
  power: 98mA chip-ID: 046d:c062 class-ID: 0301 
  Hub-2: 2-0:1 info: Full speed (or root) Hub ports: 4 rev: 3.1 speed: 10 Gb/s 
  chip-ID: 1d6b:0003 class-ID: 0900 
  Hub-3: 3-0:1 info: Full speed (or root) Hub ports: 2 rev: 2.0 
  speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900 
  Hub-4: 4-0:1 info: Full speed (or root) Hub ports: 4 rev: 3.1 speed: 10 Gb/s 
  chip-ID: 1d6b:0003 class-ID: 0900 
  Hub-5: 5-0:1 info: Full speed (or root) Hub ports: 4 rev: 2.0 
  speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900 
  Hub-6: 5-2:2 info: Microchip (formerly SMSC) Hub ports: 4 rev: 2.1 
  speed: 480 Mb/s chip-ID: 0424:2744 class-ID: 0900 
  Hub-7: 6-0:1 info: Full speed (or root) Hub ports: 4 rev: 3.1 speed: 10 Gb/s 
  chip-ID: 1d6b:0003 class-ID: 0900 
  Hub-8: 6-2:2 info: Microchip (formerly SMSC) Hub ports: 4 rev: 3.1 
  speed: 5 Gb/s chip-ID: 0424:5744 class-ID: 0900 
Sensors:
  System Temperatures: cpu: 42.6 C mobo: 0 C gpu: nouveau temp: 43.0 C 
  Fan Speeds (RPM): N/A gpu: nouveau fan: 783 
Info:
  Processes: 335 Uptime: 23m wakeups: 1 Init: systemd v: 248 tool: systemctl 
  Compilers: gcc: 11.1.0 Packages: 1427 pacman: 1406 lib: 411 flatpak: 7 
  snap: 14 Shell: Bash v: 5.1.8 running-in: gnome-terminal inxi: 3.3.04

What error do you get when you try to install the nvidia drivers?

Boot fails, I think Gnome fails to start.

Could it have something to do with Wayland? I gather it doesn’t play nicely with nvidia proprietary drivers.

Here’s the state after swtiching but before reboot:

$ sudo inxi -G
Graphics:  Device-1: NVIDIA TU102 [TITAN RTX] driver: nouveau v: kernel 
           Display: server: X.org 1.20.11 driver: loaded: nvidia resolution: <missing: xdpyinfo> 
           OpenGL: renderer: NV162 v: 4.3 Mesa 21.1.2

That can be,because you are installing 465 drivers that doesn’t support wayland while the 470 drivers beta has support for wayland,and GNOME boots up in Wayland by default (if you don’t install the propietary drivers during the installation).

If you type in a terminal

echo $XDG_SESSION_TYPE

And it says Wayland then:

Edit the file /etc/gdm/custom.conf and remove the # before the line #WaylandEnable=false

Save,reboot,try the above command again,it should say X11,if its then install the drivers normally,it should now boot fine with GNOME.

Appreciate the advice - I did manage to switch from Wayland to X11, but sadly I had the same boot problem.

Must be something else!