Nvidia driver not detected?

Hello,

After various issues, I have come to the conclusion that something is pretty wrong with my video driver, based on my GPU’s driver being listed as “N/A”. I would provide a better conclusion, but I am not very knowledgeable in these matters and the command outputs probably speak better than me. I just believe many of my video issues are likely symptoms of this.

The story (may be unnecessary, but adding context just in case it’s helpful): Finally having a computer (laptop) with a dGPU (RTX 3060) for the first time, I was hoping to do some good gaming on Linux…nope. Nothing would use my dGPU so in my confused search for solutions I installed the nvidia-all drivers (don’t even know why), which ended up not being a solution and I wanted to go back to the ones provided by mhwd. Since then I have experienced additional issues, such as Vulkan, external HDMI displays not working, and nvidia-settings not recognizing my GPU… Yes, there are multiple issues here, and I do not want to make this post about them, but if they are helpful in fixing this one issue – the weird driver situation – then I want to give the full story of how I got to this point.

inxi -v7azy
System:
  Kernel: 5.18.14-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 12.1.0
    parameters: BOOT_IMAGE=/boot/vmlinuz-5.18-x86_64
    root=UUID=ad936496-7268-4a7f-912e-82c498da5f79 rw quiet apparmor=1
    security=apparmor udev.log_priority=3
  Desktop: KDE Plasma v: 5.25.3 tk: Qt v: 5.15.5 wm: kwin_x11 vt: 1 dm: SDDM
    Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Laptop System: Alienware product: Alienware m15 R6 v: N/A
    serial: <superuser required> Chassis: type: 10 serial: <superuser required>
  Mobo: Alienware model: 0Y6YVC v: A02 serial: <superuser required>
    UEFI: Alienware v: 1.14.0 date: 06/09/2022
Battery:
  ID-1: BAT0 charge: 76.0 Wh (93.9%) condition: 80.9/84.3 Wh (96.0%)
    volts: 12.4 min: 11.4 model: BYD DELL M59JH1A type: Li-poly serial: <filter>
    status: discharging
Memory:
  RAM: total: 15.37 GiB used: 4.21 GiB (27.4%)
  RAM Report:
    permissions: Unable to run dmidecode. Root privileges required.
CPU:
  Info: model: 11th Gen Intel Core i7-11800H bits: 64 type: MT MCP
    arch: Tiger Lake gen: core 11 built: 2020 process: Intel 10nm family: 6
    model-id: 0x8D (141) stepping: 1 microcode: 0x3E
  Topology: cpus: 1x cores: 8 tpc: 2 threads: 16 smt: enabled cache:
    L1: 640 KiB desc: d-8x48 KiB; i-8x32 KiB L2: 10 MiB desc: 8x1.2 MiB
    L3: 24 MiB desc: 1x24 MiB
  Speed (MHz): avg: 844 high: 1032 min/max: 800/4600 scaling:
    driver: intel_pstate governor: powersave cores: 1: 1028 2: 801 3: 801 4: 801
    5: 801 6: 904 7: 872 8: 803 9: 889 10: 800 11: 801 12: 795 13: 801 14: 801
    15: 1032 16: 778 bogomips: 73744
  Flags: 3dnowprefetch abm acpi adx aes aperfmperf apic arat
    arch_capabilities arch_perfmon art avx avx2 avx512_bitalg avx512_vbmi2
    avx512_vnni avx512_vp2intersect avx512_vpopcntdq avx512bw avx512cd
    avx512dq avx512f avx512ifma avx512vbmi avx512vl bmi1 bmi2 bts cat_l2
    cdp_l2 clflush clflushopt clwb cmov constant_tsc cpuid cpuid_fault cx16
    cx8 de ds_cpl dtes64 dtherm dts epb ept ept_ad erms est f16c flexpriority
    flush_l1d fma fpu fsgsbase fsrm fxsr gfni ht hwp hwp_act_window hwp_epp
    hwp_notify hwp_pkg_req ibpb ibrs ibrs_enhanced ibt ida intel_pt invpcid
    invpcid_single lahf_lm lm mca mce md_clear mmx monitor movbe movdir64b
    movdiri msr mtrr nonstop_tsc nopl nx ospke pae pat pbe pcid pclmulqdq pdcm
    pdpe1gb pebs pge pku pln pni popcnt pse pse36 pts rdpid rdrand rdseed
    rdt_a rdtscp rep_good sdbg sep sha_ni smap smep split_lock_detect ss ssbd
    sse sse2 sse4_1 sse4_2 ssse3 stibp syscall tm tm2 tpr_shadow tsc
    tsc_adjust tsc_deadline_timer tsc_known_freq umip vaes vme vmx vnmi
    vpclmulqdq vpid x2apic xgetbv1 xsave xsavec xsaveopt xsaves xtopology xtpr
  Vulnerabilities:
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data status: Not affected
  Type: retbleed status: Not affected
  Type: spec_store_bypass
    mitigation: Speculative Store Bypass disabled via prctl
  Type: spectre_v1
    mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: Enhanced IBRS, IBPB: conditional, RSB filling
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel TigerLake-H GT1 [UHD Graphics] vendor: Dell driver: i915
    v: kernel arch: Gen12.1 process: Intel 10nm built: 2020-21 ports:
    active: eDP-1 empty: DP-1,DP-2 bus-ID: 00:02.0 chip-ID: 8086:9a60
    class-ID: 0300
  Device-2: NVIDIA GA106M [GeForce RTX 3060 Mobile / Max-Q] vendor: Dell
    driver: N/A alternate: nouveau non-free: 515.xx+
    status: current (as of 2022-06) arch: Ampere process: TSMC n7 (7nm)
    built: 2020-22 pcie: speed: Unknown lanes: 63 link-max: gen: 6
    speed: 64 GT/s bus-ID: 01:00.0 chip-ID: 10de:2560 class-ID: 0300
  Device-3: Microdia Integrated_Webcam_HD type: USB driver: uvcvideo
    bus-ID: 3-5:4 chip-ID: 0c45:672c class-ID: 0e02
  Display: x11 server: X.Org v: 21.1.4 with: Xwayland v: 22.1.3
    compositor: kwin_x11 driver: X: loaded: modesetting alternate: fbdev,vesa
    gpu: i915 display-ID: :0 screens: 1
  Screen-1: 0 s-res: 2560x1440 s-dpi: 96 s-size: 677x381mm (26.65x15.00")
    s-diag: 777mm (30.58")
  Monitor-1: eDP-1 model: LG Display 0x0690 built: 2020 res: 2560x1440
    hz: 60 dpi: 189 gamma: 1.2 size: 344x194mm (13.54x7.64") diag: 395mm (15.5")
    ratio: 16:9 modes: 2560x1440
  OpenGL: renderer: Mesa Intel UHD Graphics (TGL GT1) v: 4.6 Mesa 22.1.3
    direct render: Yes
Audio:
  Device-1: Intel Tiger Lake-H HD Audio vendor: Dell
    driver: sof-audio-pci-intel-tgl
    alternate: snd_hda_intel,snd_sof_pci_intel_tgl bus-ID: 00:1f.3
    chip-ID: 8086:43c8 class-ID: 0401
  Device-2: NVIDIA GA106 High Definition Audio driver: snd_hda_intel
    v: kernel pcie: speed: Unknown lanes: 63 link-max: gen: 6 speed: 64 GT/s
    bus-ID: 01:00.1 chip-ID: 10de:228e class-ID: 0403
  Sound Server-1: ALSA v: k5.18.14-1-MANJARO running: yes
  Sound Server-2: PulseAudio v: 16.1 running: no
  Sound Server-3: PipeWire v: 0.3.56 running: yes
Network:
  Device-1: Intel Tiger Lake PCH CNVi WiFi vendor: Rivet Networks
    driver: iwlwifi v: kernel bus-ID: 00:14.3 chip-ID: 8086:43f0 class-ID: 0280
  IF: wlp0s20f3 state: up mac: <filter>
  IP v4: <filter> type: dynamic noprefixroute scope: global
    broadcast: <filter>
  IP v6: <filter> type: dynamic noprefixroute scope: global
  IP v6: <filter> type: dynamic noprefixroute scope: global
  IP v6: <filter> type: noprefixroute scope: link
  Device-2: Realtek vendor: Dell driver: r8169 v: kernel pcie:
    speed: Unknown lanes: 63 link-max: gen: 6 speed: 64 GT/s port: 3000
    bus-ID: 2d:00.0 chip-ID: 10ec:2600 class-ID: 0200
  IF: enp45s0 state: down mac: <filter>
  IF-ID-1: docker0 state: down mac: <filter>
  IP v4: <filter> scope: global broadcast: <filter>
  WAN IP: <filter>
Bluetooth:
  Device-1: Intel AX201 Bluetooth type: USB driver: btusb v: 0.8
    bus-ID: 3-14:7 chip-ID: 8087:0026 class-ID: e001
  Report: rfkill ID: hci0 rfk-id: 0 state: down bt-service: enabled,running
    rfk-block: hardware: no software: yes address: see --recommends
Logical:
  Message: No logical block device data found.
RAID:
  Message: No RAID data found.
Drives:
  Local Storage: total: 953.87 GiB used: 139.96 GiB (14.7%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: SK Hynix model: PC711 NVMe 1TB
    size: 953.87 GiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s
    lanes: 4 type: SSD serial: <filter> rev: 41001131 temp: 43.9 C scheme: GPT
  Message: No optical or floppy data found.
Partition:
  ID-1: / raw-size: 200 GiB size: 195.8 GiB (97.90%) used: 139.88 GiB (71.4%)
    fs: ext4 dev: /dev/nvme0n1p9 maj-min: 259:9 label: N/A
    uuid: ad936496-7268-4a7f-912e-82c498da5f79
  ID-2: /boot/efi raw-size: 300 MiB size: 296 MiB (98.67%)
    used: 85.5 MiB (28.9%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
    label: ESP uuid: 78AD-A0FC
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default)
  ID-1: swap-1 type: partition size: 7.45 GiB used: 0 KiB (0.0%)
    priority: -2 dev: /dev/nvme0n1p7 maj-min: 259:7 label: N/A
    uuid: dfce739f-67b5-4de2-b5d8-a2c23b2e80d9
Unmounted:
  ID-1: /dev/nvme0n1p2 maj-min: 259:2 size: 128 MiB fs: <superuser required>
    label: N/A uuid: N/A
  ID-2: /dev/nvme0n1p3 maj-min: 259:3 size: 674.31 GiB fs: ntfs label: OS
    uuid: B892B00A92AFCB68
  ID-3: /dev/nvme0n1p4 maj-min: 259:4 size: 990 MiB fs: ntfs
    label: WINRETOOLS uuid: E8CAAC02CAABCB60
  ID-4: /dev/nvme0n1p5 maj-min: 259:5 size: 16.79 GiB fs: ntfs label: Image
    uuid: 444CAC214CAC102A
  ID-5: /dev/nvme0n1p6 maj-min: 259:6 size: 1.38 GiB fs: ntfs
    label: DELLSUPPORT uuid: 083C77B83C779F7E
  ID-6: /dev/nvme0n1p8 maj-min: 259:8 size: 52.55 GiB fs: ext4 label: N/A
    uuid: a7d5f22f-2bb1-48f6-bb43-c68487cce884
USB:
  Hub-1: 1-0:1 info: Hi-speed hub with single TT ports: 1 rev: 2.0
    speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900
  Hub-2: 2-0:1 info: Super-speed hub ports: 4 rev: 3.1 speed: 10 Gb/s
    chip-ID: 1d6b:0003 class-ID: 0900
  Hub-3: 3-0:1 info: Hi-speed hub with single TT ports: 16 rev: 2.0
    speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900
  Device-1: 3-1:2 info: Razer USA Naga Pro type: Mouse,Keyboard
    driver: hid-generic,usbhid interfaces: 5 rev: 2.0 speed: 12 Mb/s
    power: 100mA chip-ID: 1532:0090 class-ID: 0300 serial: <filter>
  Device-2: 3-5:4 info: Microdia Integrated_Webcam_HD type: Video
    driver: uvcvideo interfaces: 4 rev: 2.0 speed: 480 Mb/s power: 500mA
    chip-ID: 0c45:672c class-ID: 0e02
  Device-3: 3-7:5 info: Alienware LED controller type: HID
    driver: hid-generic,usbhid interfaces: 1 rev: 2.1 speed: 12 Mb/s
    chip-ID: 187c:0550 class-ID: 0300 serial: <filter>
  Device-4: 3-8:6 info: Darfon type: Keyboard driver: hid-generic,usbhid
    interfaces: 2 rev: 2.0 speed: 12 Mb/s power: 16mA chip-ID: 0d62:3740
    class-ID: 0301
  Device-5: 3-14:7 info: Intel AX201 Bluetooth type: Bluetooth driver: btusb
    interfaces: 2 rev: 2.0 speed: 12 Mb/s power: 100mA chip-ID: 8087:0026
    class-ID: e001
  Hub-4: 4-0:1 info: Super-speed hub ports: 8 rev: 3.1 speed: 20 Gb/s
    chip-ID: 1d6b:0003 class-ID: 0900
Sensors:
  System Temperatures: cpu: 40.0 C mobo: N/A
  Fan Speeds (RPM): N/A
Info:
  Processes: 323 Uptime: 2h 5m wakeups: 8 Init: systemd v: 251
  default: graphical tool: systemctl Compilers: gcc: 12.1.0 alt: 11
  clang: 14.0.6 Packages: 1693 pacman: 1665 lib: 487 flatpak: 22 snap: 6
  Shell: Zsh v: 5.9 default: Bash v: 5.1.16 running-in: konsole inxi: 3.3.19
mhwd -li
> Installed PCI configs:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
     video-modesetting            2020.01.13                true            PCI
video-hybrid-intel-nvidia-prime            2021.12.18               false            PCI


Warning: No installed USB configs!

Main question is: How do I properly repair or reinstall my nvidia drivers? Bonus points + possible shrine in my closet if this fixes my other issues, or if you have additional solutions for them.

I’m bad at these kinds of posts, and tend not to know how to even start presenting the problem, so apologies if most of my rambling was confusing and/or unneeded. Please tell me if there is any additional and/or clarifying information I can provide. Thank you for your time and assistance!

first uninstall this:
sudo mhwd -r pci video-hybrid-intel-nvidia-prime
reboot
then provide output from:
pacman -Qs nvidia
pacman -Qs optimus
find /etc/X11/ -name "*.conf"

Sorry for taking long to respond!

So trying the first command it told me that it would break dependencies for nvidia-dkms (which I had downloaded following guides for my original problem of getting games to work). I removed it and replaced it with the non-dkms package then uninstalled. Don’t know how consequential that is, but realized I forgot to mention I was ever using the dkms package, so there you go.

pacman -Qs nvidia
local/egl-wayland 2:1.1.10-1
    EGLStream-based Wayland external platform
local/ffnvcodec-headers 11.1.5.1-2
    FFmpeg version of headers required to interface with Nvidias codec APIs
local/lib32-libvdpau 1.5-1
    Nvidia VDPAU library
local/lib32-opencl-nvidia 515.57-1
    OpenCL implemention for NVIDIA (32-bit)
local/libvdpau 1.5-1
    Nvidia VDPAU library
local/mhwd-nvidia 515.57-1
    MHWD module-ids for nvidia 515.57
local/mhwd-nvidia-390xx 390.151-2
    MHWD module-ids for nvidia 390.151
local/mhwd-nvidia-470xx 470.129.06-1
    MHWD module-ids for nvidia 470.129.06
local/opencl-nvidia 515.57-1
    OpenCL implemention for NVIDIA

pacman -Qs optimus had no output…

find /etc/X11/ -name "*.conf"
/etc/X11/xorg.conf.d/00-keyboard.conf
/etc/X11/xorg.conf.d/30-touchpad.conf

so remove also these, to get rid off nvidia:
sudo pacman -R ffnvcodec-headers lib32-opencl-nvidia opencl-nvidia
then reboot and in bios check if you have there some settings related to your gpu, that it is disabled or something like that

Alright
I uninstalled those packages, and the only GPU related setting I could easily find in my BIOS was for hybrid support, so that’s disabled now.

so install them again:
sudo mhwd -a pci nonfree 0300
reboot and check with inxi -G if the nvidia driver is detected

Now it’s getting stuck at /dev/nvme0n1p9: clean, #/# files, #/# blocks (# being actual numbers of course) when booting.

probably because of the bios setting, so enable it again and see if you can boot normally

Now boot is freezing at a seemingly random point but usually shortly after [FAILED] Failed to start Load Kernel Modules.

can you enter into tty: ctrl+alt+f2 - or f1-f6 and check with: mhwd -li if it installed the prime hybrid drivers?

I was not able to enter into any tty but I was able to boot to runlevel 3. It appears to have installed the drivers.

> Installed PCI configs:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
     video-modesetting            2020.01.13                true            PCI
video-hybrid-intel-nvidia-prime            2021.12.18               false            PCI
Warning: No installed USB configs!

ok so remove them again:
sudo mhwd -r pci video-hybrid-intel-nvidia-prime
reboot and then post output from:
mhwd -l

> 0000:01:00.0 (0300:10de:2560) Display controller nVidia Corporation:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
video-hybrid-intel-nvidia-prime            2021.12.18               false            PCI
video-hybrid-intel-nvidia-470xx-prime            2021.12.18               false            PCI
          video-nvidia            2021.12.18               false            PCI
    video-nvidia-470xx            2021.12.18               false            PCI
           video-linux            2018.05.04                true            PCI
     video-modesetting            2020.01.13                true            PCI
            video-vesa            2017.03.12                true            PCI


> 0000:00:02.0 (0300:8086:9a60) Display controller Intel Corporation:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
video-hybrid-intel-nvidia-prime            2021.12.18               false            PCI
video-hybrid-intel-nvidia-470xx-prime            2021.12.18               false            PCI
           video-linux            2018.05.04                true            PCI
     video-modesetting            2020.01.13                true            PCI
            video-vesa            2017.03.12                true            PCI

so the proper drivers were installed… so install them again, reboot and switch to the 5.15 kernel…

Everything is working on the 5.15 kernel, thanks my dude! I guess I just stay on LTS kernel from now on?

thats probably better… and its also detected in inxi -G?

Yep!

Device-2: NVIDIA GA106M [GeForce RTX 3060 Mobile / Max-Q] driver: nvidia
    v: 515.57

and what about these ?

Ah I should’ve been clearer. “Everything is working” as in all that and your potential shrine in my closet for fixing my dumb issue. It does suck everything can’t just work on the latest everything but I should’ve expected such.
I’m guessing now is the right time to mark your post about switching kernel version as solution.

So it turns out the issue was because of Intel’s Indirect Branch Tracking feature. In case anybody with the same issue stumbles across my threat out of all the others for some reason, I’m going to make this a slightly more comprehensive solution reply:
The first solution is what brahma recommended, and what I did originally, which is to use a sub 5.18 kernel version.
The other solution is to add ibt=off to the kernel boot parameters (I used the graphical tool “grub-customizer” for this) for 5.18 grub/whatever you use entries.