Problems with proprietary NVIDIA driver installation

Hey everyone I’m having a lot of trouble getting proprietary Nvidia drivers installed on my Lenovo Legion Y540. I read multiple posts by users with similar issues on this forum but none of them solved my issue.
Below I’ve listed some outputs of commands that might help make my problem clearer:

Output of uname -r -
5.10.42-1-MANJARO

Output of lspci -nnk | grep -iA2 vga -

00:02.0 VGA compatible controller [0300]: Intel Corporation UHD Graphics 630 (Mobile) [8086:3e9b]
	Subsystem: Lenovo Device [17aa:3ffc]
	Kernel driver in use: i915
--
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation TU116M [GeForce GTX 1660 Ti Mobile] [10de:2191] (rev ff)
	Kernel modules: nouveau, nvidia_drm, nvidia
01:00.1 Audio device [0403]: NVIDIA Corporation TU116 High Definition Audio Controller [10de:1aeb] (rev ff)

Output of mhwd -li -

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


Warning: No installed USB configs!

output of inxi -Fxza -

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=c091db96-1567-4227-92d2-923bb84c23e7 rw 
           nouveau.modeset=0 quiet apparmor=1 security=apparmor udev.log_priority=3 
           Desktop: KDE Plasma 5.21.5 tk: Qt 5.15.2 info: latte-dock wm: kwin_x11 vt: 1 dm: SDDM Distro: Manjaro Linux 
           base: Arch Linux 
Machine:   Type: Laptop System: LENOVO product: 81SX v: Lenovo Legion Y540-15IRH serial: <filter> Chassis: type: 10 
           v: Lenovo Legion Y540-15IRH serial: <filter> 
           Mobo: LENOVO model: LNVNB161216 v: SDK0Q55722 WIN serial: <filter> UEFI: LENOVO v: BHCN29WW date: 06/19/2019 
Battery:   ID-1: BAT0 charge: 31.3 Wh (56.9%) condition: 55.0/57.0 Wh (96.4%) volts: 11.8 min: 11.5 model: SMP L17M3PG2 
           type: Li-poly serial: <filter> status: Unknown cycles: 135 
CPU:       Info: 6-Core model: Intel Core i7-9750H bits: 64 type: MT MCP arch: Kaby Lake note: check family: 6 
           model-id: 9E (158) stepping: A (10) microcode: DE cache: L2: 12 MiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 62431 
           Speed: 1034 MHz min/max: 800/4500 MHz Core speeds (MHz): 1: 1034 2: 1176 3: 1012 4: 1054 5: 1027 6: 1235 7: 1175 
           8: 2084 9: 1129 10: 981 11: 1040 12: 1166 
           Vulnerabilities: Type: itlb_multihit status: KVM: VMX disabled 
           Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulnerable 
           Type: mds mitigation: Clear CPU buffers; SMT vulnerable 
           Type: meltdown mitigation: PTI 
           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 generic retpoline, IBPB: conditional, IBRS_FW, STIBP: conditional, RSB filling 
           Type: srbds mitigation: Microcode 
           Type: tsx_async_abort status: Not affected 
Graphics:  Device-1: Intel UHD Graphics 630 vendor: Lenovo driver: i915 v: kernel bus-ID: 00:02.0 chip-ID: 8086:3e9b 
           class-ID: 0300 
           Device-2: NVIDIA TU116M [GeForce GTX 1660 Ti Mobile] driver: N/A alternate: nouveau, nvidia_drm, nvidia 
           bus-ID: 01:00.0 chip-ID: 10de:2191 class-ID: 0300 
           Device-3: Lite-On Integrated Camera type: USB driver: uvcvideo bus-ID: 1-6:3 chip-ID: 04ca:7070 class-ID: 0e02 
           Display: x11 server: X.Org 1.20.11 compositor: kwin_x11 driver: loaded: intel display-ID: :0 screens: 1 
           Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.0x11.2") s-diag: 582mm (22.9") 
           Monitor-1: eDP1 res: 1920x1080 hz: 144 dpi: 143 size: 340x190mm (13.4x7.5") diag: 389mm (15.3") 
           OpenGL: renderer: Mesa Intel UHD Graphics 630 (CFL GT2) v: 4.6 Mesa 21.1.2 direct render: Yes 
Audio:     Device-1: Intel Cannon Lake PCH cAVS vendor: Lenovo driver: snd_hda_intel v: kernel 
           alternate: snd_soc_skl,snd_sof_pci bus-ID: 00:1f.3 chip-ID: 8086:a348 class-ID: 0403 
           Device-2: NVIDIA TU116 High Definition Audio driver: snd_hda_intel v: kernel bus-ID: 01:00.1 chip-ID: 10de:1aeb 
           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: Intel Wireless-AC 9560 [Jefferson Peak] driver: iwlwifi v: kernel port: 5000 bus-ID: 00:14.3 
           chip-ID: 8086:a370 class-ID: 0280 
           IF: wlp0s20f3 state: up mac: <filter> 
           Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: Lenovo driver: r8169 v: kernel port: 3000 
           bus-ID: 07:00.0 chip-ID: 10ec:8168 class-ID: 0200 
           IF: enp7s0 state: up speed: 100 Mbps duplex: full mac: <filter> 
           IF-ID-1: docker0 state: down mac: <filter> 
Bluetooth: Device-1: Intel Bluetooth 9460/9560 Jefferson Peak (JfP) type: USB driver: btusb v: 0.8 bus-ID: 1-14:5 
           chip-ID: 8087:0aaa class-ID: e001 
           Report: rfkill ID: hci0 rfk-id: 3 state: up address: see --recommends 
Drives:    Local Storage: total: 1.14 TiB used: 176.24 GiB (15.1%) 
           SMART Message: Required tool smartctl not installed. Check --recommends 
           ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: SK Hynix model: HFS256GD9TNG-L3A0B size: 238.47 GiB block-size: 
           physical: 512 B logical: 512 B speed: 31.6 Gb/s lanes: 4 rotation: SSD serial: <filter> rev: 80040C10 temp: 42.9 C 
           scheme: GPT 
           ID-2: /dev/sda maj-min: 8:0 vendor: Western Digital model: WD10SPZX-24Z10 size: 931.51 GiB block-size: 
           physical: 4096 B logical: 512 B speed: 6.0 Gb/s rotation: 5400 rpm serial: <filter> rev: 1A05 scheme: GPT 
Partition: ID-1: / raw-size: 48.83 GiB size: 47.81 GiB (97.92%) used: 41.98 GiB (87.8%) fs: ext4 dev: /dev/nvme0n1p5 
           maj-min: 259:5 
           ID-2: /boot/efi raw-size: 260 MiB size: 256 MiB (98.46%) used: 29.6 MiB (11.6%) fs: vfat dev: /dev/nvme0n1p1 
           maj-min: 259:1 
           ID-3: /home raw-size: 488.76 GiB size: 480.08 GiB (98.23%) used: 134.24 GiB (28.0%) fs: ext4 dev: /dev/sda5 
           maj-min: 8:5 
Swap:      Alert: No swap data was found. 
Sensors:   System Temperatures: cpu: 56.0 C mobo: N/A 
           Fan Speeds (RPM): N/A 
Info:      Processes: 321 Uptime: 2h 40m wakeups: 2 Memory: 15.52 GiB used: 3.63 GiB (23.4%) Init: systemd v: 248 
           tool: systemctl Compilers: gcc: 11.1.0 clang: 12.0.0 Packages: 1515 pacman: 1501 lib: 440 flatpak: 5 snap: 9 
           Shell: Zsh v: 5.8 running-in: alacritty inxi: 3.3.04 

Output of sudo mhwd -a pci nonfree 0300 -

> Using config 'video-hybrid-intel-nvidia-prime' for device: 0000:01:00.0 (0300:10de:2191) Display controller nVidia Corporation TU116M [GeForce GTX 1660 Ti Mobile]
> Using config 'video-hybrid-intel-nvidia-prime' for device: 0000:00:02.0 (0300:8086:3e9b) Display controller Intel Corporation CoffeeLake-H GT2 [UHD Graphics 630]
> Installing video-hybrid-intel-nvidia-prime...
Sourcing /etc/mhwd-x86_64.conf
Has lib32 support: true
Sourcing /var/lib/mhwd/db/pci/graphic_drivers/hybrid-intel-nvidia-prime/MHWDCONFIG
Processing classid: 0300
Sourcing /var/lib/mhwd/scripts/include/0300
:: Synchronizing package databases...
warning: nvidia-utils-465.31-1 is up to date -- skipping
warning: linux510-nvidia-465.31-6 is up to date -- skipping
error: target not found: linux59-nvidia
 core is up to date
 extra is up to date
 community is up to date
 multilib is up to date
Error: pacman failed!
Error: script failed!

I get a similar error when I try to install through the GUI available in hardware settings. I have even tried going back to the 5.4 kernel but the same error keeps popping up.

I even tried manually installing from an article called “How to install the NVIDIA drivers on Manjaro 21 Linux” but I had problems with DKMS. I can post that output too if necessary. I would be really grateful for any help, since on Lenovo apparently the hdmi slot is connected to the nvidia card and I can’t connect to my monitor without the driver.

I really have no idea why it looks for linux59-nvidia while you have linux510 installed. Perhaps try pacman -Qs linux59 to see if there’s any leftover linux59 packages and remove them all.

Hi thanks for the reply! This is the output I’m getting for pacman -Qs linux59 -

local/linux59 5.9.16-1
    The Linux59 kernel and modules
local/linux59-bbswitch 0.8-15 (linux59-extramodules)
    kernel module allowing to switch dedicated graphics card on Optimus laptops
local/linux59-virtualbox-host-modules 6.1.20-1 (linux59-extramodules)
    Host kernel modules for VirtualBox

Does this mean I still have some leftover packages? I was also confused as to why it was looking for linux59-nvidia. That’s why I even tried switching to an older kernel but it still tried to install linux59-nvidia

Remove linux59 and try installing the drivers again.

I ran sudo mhwd-kernel -r linux59 and it seemed to work after which I ran sudo mhwd -a pci nonfree 0300 once again. The output is as follows:

> Using config 'video-hybrid-intel-nvidia-prime' for device: 0000:01:00.0 (0300:10de:2191) Display controller nVidia Corporation TU116M [GeForce GTX 1660 Ti Mobile]
> Using config 'video-hybrid-intel-nvidia-prime' for device: 0000:00:02.0 (0300:8086:3e9b) Display controller Intel Corporation CoffeeLake-H GT2 [UHD Graphics 630]
> Installing video-hybrid-intel-nvidia-prime...
Sourcing /etc/mhwd-x86_64.conf
Has lib32 support: true
Sourcing /var/lib/mhwd/db/pci/graphic_drivers/hybrid-intel-nvidia-prime/MHWDCONFIG
Processing classid: 0300
Sourcing /var/lib/mhwd/scripts/include/0300
:: Synchronizing package databases...
warning: nvidia-utils-465.31-1 is up to date -- skipping
warning: linux510-nvidia-465.31-6 is up to date -- skipping
 core is up to date
 extra is up to date
 community is up to date
 multilib is up to date
resolving dependencies...
looking for conflicting packages...

Packages (3) lib32-nvidia-utils-465.31-1  linux54-nvidia-465.31-6  nvidia-prime-1.0-4

Total Download Size:    48.59 MiB
Total Installed Size:  133.85 MiB

:: Proceed with installation? [Y/n]
:: Retrieving packages...
downloading nvidia-prime-1.0-4-any.pkg.tar.zst...
downloading linux54-nvidia-465.31-6-x86_64.pkg.tar.zst...
downloading lib32-nvidia-utils-465.31-1-x86_64.pkg.tar.zst...
checking keyring...
checking package integrity...
loading package files...
checking for file conflicts...
error: failed to commit transaction (conflicting files)
lib32-nvidia-utils: /usr/lib32/libEGL_nvidia.so.0 exists in filesystem
lib32-nvidia-utils: /usr/lib32/libGLESv1_CM_nvidia.so.1 exists in filesystem
lib32-nvidia-utils: /usr/lib32/libGLESv2_nvidia.so.2 exists in filesystem
lib32-nvidia-utils: /usr/lib32/libGLX_nvidia.so.0 exists in filesystem
lib32-nvidia-utils: /usr/lib32/libcuda.so exists in filesystem
lib32-nvidia-utils: /usr/lib32/libcuda.so.1 exists in filesystem
lib32-nvidia-utils: /usr/lib32/libnvcuvid.so exists in filesystem
lib32-nvidia-utils: /usr/lib32/libnvcuvid.so.1 exists in filesystem
lib32-nvidia-utils: /usr/lib32/libnvidia-encode.so exists in filesystem
lib32-nvidia-utils: /usr/lib32/libnvidia-encode.so.1 exists in filesystem
lib32-nvidia-utils: /usr/lib32/libnvidia-fbc.so exists in filesystem
lib32-nvidia-utils: /usr/lib32/libnvidia-fbc.so.1 exists in filesystem
lib32-nvidia-utils: /usr/lib32/libnvidia-ifr.so exists in filesystem
lib32-nvidia-utils: /usr/lib32/libnvidia-ifr.so.1 exists in filesystem
lib32-nvidia-utils: /usr/lib32/libnvidia-ml.so exists in filesystem
lib32-nvidia-utils: /usr/lib32/libnvidia-ml.so.1 exists in filesystem
lib32-nvidia-utils: /usr/lib32/libnvidia-opticalflow.so exists in filesystem
lib32-nvidia-utils: /usr/lib32/libnvidia-opticalflow.so.1 exists in filesystem
lib32-nvidia-utils: /usr/lib32/libnvidia-ptxjitcompiler.so exists in filesystem
lib32-nvidia-utils: /usr/lib32/libnvidia-ptxjitcompiler.so.1 exists in filesystem
lib32-nvidia-utils: /usr/lib32/vdpau/libvdpau_nvidia.so.1 exists in filesystem
Errors occurred, no packages were upgraded.
Error: pacman failed!
Error: script failed!

This is different from before so I’m happy there’s finally some progress! Can I go ahead and get rid of all the files that are conflicting? I remember reading in some article that it is ok to delete files similar to this but I just want to confirm once.

Not so fast. Let’s see if any package owns those files:

pacman -Qo /usr/lib32/libEGL_nvidia.so.0

Also let’s see what NVIDIA and kernel packages you have installed:

pacman -Qs nvidia
pacman -Qs linux5

Looks like no package owns any of these files, I ran the command for a couple more of them.
pacman -Qo /usr/lib32/libEGL_nvidia.so.0 -
error: No package owns /usr/lib32/libEGL_nvidia.so.0

Nvidia packages:
pacman -Qs nvidia

local/bumblebee 3.2.1-22
    NVIDIA Optimus support for Linux through Primus/VirtualGL
local/egl-wayland 1.1.7-1
    EGLStream-based Wayland external platform
local/lib32-libvdpau 1.4-1
    Nvidia VDPAU library
local/libvdpau 1.4-1
    Nvidia VDPAU library
local/linux510-nvidia 465.31-6 (linux510-extramodules)
    NVIDIA drivers for linux.
local/mhwd-nvidia 465.31-1
    MHWD module-ids for nvidia 465.31
local/mhwd-nvidia-340xx 340.108-1
    MHWD module-ids for nvidia 340.108
local/mhwd-nvidia-390xx 390.143-1
    MHWD module-ids for nvidia 390.143
local/nvidia-utils 465.31-1
    NVIDIA drivers utilities
local/xf86-video-nouveau 1.0.17-1 (xorg-drivers)
    Open Source 3D acceleration driver for nVidia cards

And finally pacman -Qs linux5

local/linux510 5.10.42-1
    The Linux510 kernel and modules
local/linux510-bbswitch 0.8-58 (linux510-extramodules)
    kernel module allowing to switch dedicated graphics card on Optimus laptops
local/linux510-headers 5.10.42-1
    Header files and scripts for building modules for Linux510 kernel
local/linux510-nvidia 465.31-6 (linux510-extramodules)
    NVIDIA drivers for linux.
local/linux510-virtualbox-host-modules 6.1.22-12 (linux510-extramodules)
    Host kernel modules for VirtualBox
local/linux54 5.4.124-1
    The Linux54 kernel and modules
local/linux54-bbswitch 0.8-133 (linux54-extramodules)
    kernel module allowing to switch dedicated graphics card on Optimus laptops
local/linux54-headers 5.4.124-1
    Header files and scripts for building modules for Linux54 kernel
local/linux54-virtualbox-host-modules 6.1.22-12 (linux54-extramodules)
    Host kernel modules for VirtualBox

Alright, then they can be overwritten:

sudo pacman -S lib32-nvidia-utils --overwrite usr/lib32/*

sudo pacman -S lib32-nvidia-utils --overwrite '/usr/lib32/*'

Now try installing the drivers again.

When I run sudo pacman -S lib32-nvidia-utils --overwrite /usr/lib32/* I get over 1000 errors of the form:

error: target not found: /usr/lib32/audit
warning: '/usr/lib32/audit' is a file, did you mean -U/--upgrade instead of -S/--sync?

Can I manually remove the files that are causing the conflict?

Oops, I guess my syntax was slightly off.

sudo pacman -S lib32-nvidia-utils --overwrite '/usr/lib32/*'

Yes thank you so much this is the output I got:

> Using config 'video-hybrid-intel-nvidia-prime' for device: 0000:01:00.0 (0300:10de:2191) Display controller nVidia Corporation TU116M [GeForce GTX 1660 Ti Mobile]
> Using config 'video-hybrid-intel-nvidia-prime' for device: 0000:00:02.0 (0300:8086:3e9b) Display controller Intel Corporation CoffeeLake-H GT2 [UHD Graphics 630]
> Installing video-hybrid-intel-nvidia-prime...
Sourcing /etc/mhwd-x86_64.conf
Has lib32 support: true
Sourcing /var/lib/mhwd/db/pci/graphic_drivers/hybrid-intel-nvidia-prime/MHWDCONFIG
Processing classid: 0300
Sourcing /var/lib/mhwd/scripts/include/0300
:: Synchronizing package databases...
warning: nvidia-utils-465.31-1 is up to date -- skipping
warning: lib32-nvidia-utils-465.31-1 is up to date -- skipping
warning: linux510-nvidia-465.31-6 is up to date -- skipping
 core is up to date
 extra is up to date
 community is up to date
 multilib is up to date
resolving dependencies...
looking for conflicting packages...

Packages (2) linux54-nvidia-465.31-6  nvidia-prime-1.0-4

Total Installed Size:  25.63 MiB

:: Proceed with installation? [Y/n]
checking keyring...
checking package integrity...
loading package files...
checking for file conflicts...
checking available disk space...
:: Processing package changes...
installing nvidia-prime...
installing linux54-nvidia...
depmod: ERROR: could not open directory /lib/modules/5.4.124-1-MANJARO: No such file or directory
depmod: FATAL: could not search modules: No such file or directory
In order to use nvidia module, reboot the system.
:: Running post-transaction hooks...
(1/3) Arming ConditionNeedsUpdate...
(2/3) Updating module dependencies...
(3/3) Updating Kernel initcpios for Nvidia-DRM...
==> Building image from preset: /etc/mkinitcpio.d/linux510.preset: 'default'
  -> -k /boot/vmlinuz-5.10-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-5.10-x86_64.img
==> Starting build: 5.10.42-1-MANJARO
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [autodetect]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
  -> Running build hook: [keyboard]
  -> Running build hook: [keymap]
  -> Running build hook: [filesystems]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: /boot/initramfs-5.10-x86_64.img
==> Image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux510.preset: 'fallback'
  -> -k /boot/vmlinuz-5.10-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-5.10-x86_64-fallback.img -S autodetect
==> Starting build: 5.10.42-1-MANJARO
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
  -> Running build hook: [keyboard]
  -> Running build hook: [keymap]
  -> Running build hook: [filesystems]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: /boot/initramfs-5.10-x86_64-fallback.img
==> Image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux54.preset: 'default'
  -> -k /boot/vmlinuz-5.4-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-5.4-x86_64.img
==> ERROR: '/lib/modules/5.4.124-1-MANJARO' is not a valid kernel module directory
==> Building image from preset: /etc/mkinitcpio.d/linux54.preset: 'fallback'
  -> -k /boot/vmlinuz-5.4-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-5.4-x86_64-fallback.img -S autodetect
==> ERROR: '/lib/modules/5.4.124-1-MANJARO' is not a valid kernel module directory
error: command failed to execute correctly
nvidia-utils: install reason has been set to 'explicitly installed'
nvidia-prime: install reason has been set to 'explicitly installed'
lib32-nvidia-utils: install reason has been set to 'explicitly installed'
linux510-nvidia: install reason has been set to 'explicitly installed'
linux54-nvidia: install reason has been set to 'explicitly installed'
xorg configuration file: '/etc/X11/mhwd.d/nvidia.conf'
> Successfully installed video-hybrid-intel-nvidia-prime

It successfully installed!

Actually there’s a problem here, this seems to have installed some hybrid driver and it shows that the Nvidia driver doesn’t exist.

Output of inxi -Fxza -

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=c091db96-1567-4227-92d2-923bb84c23e7 rw 
           nouveau.modeset=0 quiet apparmor=1 security=apparmor udev.log_priority=3 
           Desktop: KDE Plasma 5.21.5 tk: Qt 5.15.2 info: latte-dock wm: kwin_x11 vt: 1 dm: SDDM Distro: Manjaro Linux 
           base: Arch Linux 
Machine:   Type: Laptop System: LENOVO product: 81SX v: Lenovo Legion Y540-15IRH serial: <filter> Chassis: type: 10 
           v: Lenovo Legion Y540-15IRH serial: <filter> 
           Mobo: LENOVO model: LNVNB161216 v: SDK0Q55722 WIN serial: <filter> UEFI: LENOVO v: BHCN29WW date: 06/19/2019 
Battery:   ID-1: BAT0 charge: 30.8 Wh (56.0%) condition: 55.0/57.0 Wh (96.4%) volts: 11.8 min: 11.5 model: SMP L17M3PG2 
           type: Li-poly serial: <filter> status: Unknown cycles: 135 
CPU:       Info: 6-Core model: Intel Core i7-9750H bits: 64 type: MT MCP arch: Kaby Lake note: check family: 6 
           model-id: 9E (158) stepping: A (10) microcode: DE cache: L2: 12 MiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 62431 
           Speed: 800 MHz min/max: 800/4500 MHz Core speeds (MHz): 1: 800 2: 800 3: 800 4: 800 5: 800 6: 800 7: 800 8: 800 
           9: 801 10: 800 11: 800 12: 801 
           Vulnerabilities: Type: itlb_multihit status: KVM: VMX disabled 
           Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulnerable 
           Type: mds mitigation: Clear CPU buffers; SMT vulnerable 
           Type: meltdown mitigation: PTI 
           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 generic retpoline, IBPB: conditional, IBRS_FW, STIBP: conditional, RSB filling 
           Type: srbds mitigation: Microcode 
           Type: tsx_async_abort status: Not affected 
Graphics:  Device-1: Intel UHD Graphics 630 vendor: Lenovo driver: i915 v: kernel bus-ID: 00:02.0 chip-ID: 8086:3e9b 
           class-ID: 0300 
           Device-2: NVIDIA TU116M [GeForce GTX 1660 Ti Mobile] driver: N/A alternate: nouveau, nvidia_drm, nvidia 
           bus-ID: 01:00.0 chip-ID: 10de:2191 class-ID: 0300 
           Device-3: Lite-On Integrated Camera type: USB driver: uvcvideo bus-ID: 1-6:3 chip-ID: 04ca:7070 class-ID: 0e02 
           Display: x11 server: X.Org 1.20.11 compositor: kwin_x11 driver: loaded: modesetting unloaded: intel 
           alternate: fbdev,vesa display-ID: :0 screens: 1 
           Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.0x11.2") s-diag: 582mm (22.9") 
           Monitor-1: eDP-1 res: 1920x1080 hz: 144 dpi: 142 size: 344x193mm (13.5x7.6") diag: 394mm (15.5") 
           OpenGL: renderer: llvmpipe (LLVM 12.0.0 256 bits) v: 4.5 Mesa 21.1.2 compat-v: 3.1 direct render: Yes 
Audio:     Device-1: Intel Cannon Lake PCH cAVS vendor: Lenovo driver: snd_hda_intel v: kernel 
           alternate: snd_soc_skl,snd_sof_pci bus-ID: 00:1f.3 chip-ID: 8086:a348 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: Intel Wireless-AC 9560 [Jefferson Peak] driver: iwlwifi v: kernel port: 5000 bus-ID: 00:14.3 
           chip-ID: 8086:a370 class-ID: 0280 
           IF: wlp0s20f3 state: up mac: <filter> 
           Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: Lenovo driver: r8169 v: kernel port: 3000 
           bus-ID: 07:00.0 chip-ID: 10ec:8168 class-ID: 0200 
           IF: enp7s0 state: up speed: 100 Mbps duplex: full mac: <filter> 
           IF-ID-1: docker0 state: down mac: <filter> 
Bluetooth: Device-1: Intel Bluetooth 9460/9560 Jefferson Peak (JfP) type: USB driver: btusb v: 0.8 bus-ID: 1-14:5 
           chip-ID: 8087:0aaa class-ID: e001 
           Report: rfkill ID: hci0 rfk-id: 3 state: up address: see --recommends 
Drives:    Local Storage: total: 1.14 TiB used: 176.61 GiB (15.1%) 
           SMART Message: Required tool smartctl not installed. Check --recommends 
           ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: SK Hynix model: HFS256GD9TNG-L3A0B size: 238.47 GiB block-size: 
           physical: 512 B logical: 512 B speed: 31.6 Gb/s lanes: 4 rotation: SSD serial: <filter> rev: 80040C10 temp: 45.9 C 
           scheme: GPT 
           ID-2: /dev/sda maj-min: 8:0 vendor: Western Digital model: WD10SPZX-24Z10 size: 931.51 GiB block-size: 
           physical: 4096 B logical: 512 B speed: 6.0 Gb/s rotation: 5400 rpm serial: <filter> rev: 1A05 scheme: GPT 
Partition: ID-1: / raw-size: 48.83 GiB size: 47.81 GiB (97.92%) used: 42.32 GiB (88.5%) fs: ext4 dev: /dev/nvme0n1p5 
           maj-min: 259:5 
           ID-2: /boot/efi raw-size: 260 MiB size: 256 MiB (98.46%) used: 29.6 MiB (11.6%) fs: vfat dev: /dev/nvme0n1p1 
           maj-min: 259:1 
           ID-3: /home raw-size: 488.76 GiB size: 480.08 GiB (98.23%) used: 134.26 GiB (28.0%) fs: ext4 dev: /dev/sda5 
           maj-min: 8:5 
Swap:      Alert: No swap data was found. 
Sensors:   System Temperatures: cpu: 60.0 C mobo: N/A 
           Fan Speeds (RPM): N/A 
Info:      Processes: 354 Uptime: 2m wakeups: 1 Memory: 15.52 GiB used: 3.07 GiB (19.8%) Init: systemd v: 248 tool: systemctl 
           Compilers: gcc: 11.1.0 clang: 12.0.0 Packages: 1515 pacman: 1501 lib: 441 flatpak: 5 snap: 9 Shell: Zsh v: 5.8 
           running-in: alacritty inxi: 3.3.04 

Output of inxi -G -

Graphics:  Device-1: Intel UHD Graphics 630 driver: i915 v: kernel
           Device-2: NVIDIA TU116M [GeForce GTX 1660 Ti Mobile] driver: N/A
           Device-3: Lite-On Integrated Camera type: USB driver: uvcvideo
           Display: x11 server: X.Org 1.20.11 driver: loaded: modesetting unloaded: intel resolution: 1920x1080~144Hz
           OpenGL: renderer: llvmpipe (LLVM 12.0.0 256 bits) v: 4.5 Mesa 21.1.2

Output of sudo nvidia-settings -

ERROR: NVIDIA driver is not loaded


ERROR: Unable to load info from any available system

And as far as I can tell the hdmi port for my laptop is still not being recognized by my monitor. Is there any way to install the Nvidia driver and not the hybrid? When I try to install it through GUI, it says the following:

Error: config 'video-nvidia' conflicts with config(s): video-hybrid-intel-nvidia-prime

Is there a way I can maybe uninstall the hybrid and install the actual one?

That needs to be removed:

sudo mhwd -r pci video-modesetting

Then install:

sudo mhwd -a pci nonfree 0300

Running sudo mhwd -r pci video-modesetting shows the error:

Error: config 'video-modesetting' is required by config(s): video-hybrid-intel-nvidia-prime

Should I uninstall video-hybrid-intel-nvidia-prime first? If so how do I do that safely?

No, nevermind about my last post then. I’ve never used Prime, so this is where my knowledge ends.

Ok I’ll try to look into it. I really appreciate the time and effort you put into this.

Just in case you haven’t already…

You probably need to reinstall the hybrid driver as the nvidia driver doesn’t seem to be working here.
Once you reinstall the driver, reboot, and check inxi output again. Then we can see if it works.

I first ran inxi -G and I think you’re right it’s not recognizing the driver or something because the output is

Graphics:  Device-1: Intel UHD Graphics 630 driver: i915 v: kernel
           Device-2: NVIDIA TU116M [GeForce GTX 1660 Ti Mobile] driver: N/A
           Device-3: Lite-On Integrated Camera type: USB driver: uvcvideo
           Display: x11 server: X.Org 1.20.11 driver: loaded: modesetting unloaded: intel resolution: 1920x1080~144Hz
           OpenGL: renderer: llvmpipe (LLVM 12.0.0 256 bits) v: 4.5 Mesa 21.1.2

I also ran mhwd -li and the output is

> Installed PCI configs:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
     video-modesetting            2020.01.13                true            PCI
           video-linux            2018.05.04                true            PCI
video-hybrid-intel-nvidia-prime            2020.11.30               false            PCI

To remove the driver I ran sudo mhwd -r pci video-hybrid-intel-nvidia-prime and got the output:

> Removing video-hybrid-intel-nvidia-prime...
Sourcing /etc/mhwd-x86_64.conf
Has lib32 support: true
Sourcing /var/lib/mhwd/local/pci/video-hybrid-intel-nvidia-prime/MHWDCONFIG
Processing classid: 0300
Sourcing /var/lib/mhwd/scripts/include/0300
checking dependencies...
:: bumblebee optionally requires nvidia: NVIDIA kernel driver
:: ffmpeg optionally requires nvidia-utils: Nvidia NVDEC/NVENC support
:: gst-plugins-bad optionally requires nvidia-utils: nvcodec plugin
:: ksysguard optionally requires nvidia-utils: NVIDIA GPU usage
:: lib32-vulkan-icd-loader optionally requires lib32-vulkan-driver: packaged vulkan driver
:: steam-manjaro optionally requires vulkan-driver: packaged vulkan driver
:: steam-manjaro optionally requires lib32-vulkan-driver: packaged vulkan driver (32bit)
:: vulkan-icd-loader optionally requires vulkan-driver: packaged vulkan driver

Packages (5) lib32-nvidia-utils-465.31-1  linux510-nvidia-465.31-6  linux54-nvidia-465.31-6  nvidia-prime-1.0-4  nvidia-utils-465.31-1

Total Removed Size:  552.56 MiB

:: Do you want to remove these packages? [Y/n]
:: Processing package changes...
removing linux54-nvidia...
depmod: ERROR: could not open directory /lib/modules/5.4.124-1-MANJARO: No such file or directory
depmod: FATAL: could not search modules: No such file or directory
error: command failed to execute correctly
removing linux510-nvidia...
removing lib32-nvidia-utils...
xorg configuration symlink valid...
removing nvidia-prime...
removing nvidia-utils...
xorg configuration symlink valid...
:: Running post-transaction hooks...
(1/4) Reloading system manager configuration...
(2/4) Arming ConditionNeedsUpdate...
(3/4) Updating module dependencies...
(4/4) Updating the desktop file MIME type cache...
'/etc/X11/xorg.conf.d/90-mhwd.conf' symlink is invalid! Removing it...
> Successfully removed video-hybrid-intel-nvidia-prime

when I run mhwd -li again I get

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


Warning: No installed USB configs!

When I tried to run sudo mhwd -a pci nonfree 0300 again I got the output

> Using config 'video-hybrid-intel-nvidia-prime' for device: 0000:01:00.0 (0300:10de:2191) Display controller nVidia Corporation TU116M [GeForce GTX 1660 Ti Mobile]
> Using config 'video-hybrid-intel-nvidia-prime' for device: 0000:00:02.0 (0300:8086:3e9b) Display controller Intel Corporation CoffeeLake-H GT2 [UHD Graphics 630]
> Installing video-hybrid-intel-nvidia-prime...
Sourcing /etc/mhwd-x86_64.conf
Has lib32 support: true
Sourcing /var/lib/mhwd/db/pci/graphic_drivers/hybrid-intel-nvidia-prime/MHWDCONFIG
Processing classid: 0300
Sourcing /var/lib/mhwd/scripts/include/0300
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 multilib is up to date
resolving dependencies...
looking for conflicting packages...

Packages (5) lib32-nvidia-utils-465.31-1  linux510-nvidia-465.31-6  linux54-nvidia-465.31-6  nvidia-prime-1.0-4  nvidia-utils-465.31-1

Total Installed Size:  552.56 MiB

:: Proceed with installation? [Y/n]
checking keyring...
checking package integrity...
loading package files...
checking for file conflicts...
error: failed to commit transaction (conflicting files)
nvidia-utils: /usr/lib/libEGL_nvidia.so.0 exists in filesystem
nvidia-utils: /usr/lib/libGLESv1_CM_nvidia.so.1 exists in filesystem
nvidia-utils: /usr/lib/libGLESv2_nvidia.so.2 exists in filesystem
nvidia-utils: /usr/lib/libGLX_nvidia.so.0 exists in filesystem
nvidia-utils: /usr/lib/libcuda.so.1 exists in filesystem
nvidia-utils: /usr/lib/libnvcuvid.so.1 exists in filesystem
nvidia-utils: /usr/lib/libnvidia-cfg.so.1 exists in filesystem
nvidia-utils: /usr/lib/libnvidia-encode.so.1 exists in filesystem
nvidia-utils: /usr/lib/libnvidia-fbc.so.1 exists in filesystem
nvidia-utils: /usr/lib/libnvidia-ifr.so.1 exists in filesystem
nvidia-utils: /usr/lib/libnvidia-ml.so.1 exists in filesystem
nvidia-utils: /usr/lib/libnvidia-opticalflow.so.1 exists in filesystem
nvidia-utils: /usr/lib/libnvidia-ptxjitcompiler.so.1 exists in filesystem
nvidia-utils: /usr/lib/libnvoptix.so.1 exists in filesystem
lib32-nvidia-utils: /usr/lib32/libEGL_nvidia.so.0 exists in filesystem
lib32-nvidia-utils: /usr/lib32/libGLESv1_CM_nvidia.so.1 exists in filesystem
lib32-nvidia-utils: /usr/lib32/libGLESv2_nvidia.so.2 exists in filesystem
lib32-nvidia-utils: /usr/lib32/libGLX_nvidia.so.0 exists in filesystem
lib32-nvidia-utils: /usr/lib32/libcuda.so.1 exists in filesystem
lib32-nvidia-utils: /usr/lib32/libnvcuvid.so.1 exists in filesystem
lib32-nvidia-utils: /usr/lib32/libnvidia-encode.so.1 exists in filesystem
lib32-nvidia-utils: /usr/lib32/libnvidia-fbc.so.1 exists in filesystem
lib32-nvidia-utils: /usr/lib32/libnvidia-ifr.so.1 exists in filesystem
lib32-nvidia-utils: /usr/lib32/libnvidia-ml.so.1 exists in filesystem
lib32-nvidia-utils: /usr/lib32/libnvidia-opticalflow.so.1 exists in filesystem
lib32-nvidia-utils: /usr/lib32/libnvidia-ptxjitcompiler.so.1 exists in filesystem
Errors occurred, no packages were upgraded.
Error: pacman failed!
Error: script failed!

After verifying that the files did not belong to any package, I removed them and ran the command again and this time it worked. I have saved that output to a file so kindly let me know if I should share that as well.

Now after I ran inxi -Fxza I’m getting the output

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=c091db96-1567-4227-92d2-923bb84c23e7 rw 
           nouveau.modeset=0 quiet apparmor=1 security=apparmor udev.log_priority=3 
           Desktop: KDE Plasma 5.21.5 tk: Qt 5.15.2 info: latte-dock wm: kwin_x11 vt: 1 dm: SDDM Distro: Manjaro Linux 
           base: Arch Linux 
Machine:   Type: Laptop System: LENOVO product: 81SX v: Lenovo Legion Y540-15IRH serial: <filter> Chassis: type: 10 
           v: Lenovo Legion Y540-15IRH serial: <filter> 
           Mobo: LENOVO model: LNVNB161216 v: SDK0Q55722 WIN serial: <filter> UEFI: LENOVO v: BHCN29WW date: 06/19/2019 
Battery:   ID-1: BAT0 charge: 31.3 Wh (56.9%) condition: 55.0/57.0 Wh (96.4%) volts: 11.8 min: 11.5 model: SMP L17M3PG2 
           type: Li-poly serial: <filter> status: Unknown cycles: 135 
CPU:       Info: 6-Core model: Intel Core i7-9750H bits: 64 type: MT MCP arch: Kaby Lake note: check family: 6 
           model-id: 9E (158) stepping: A (10) microcode: DE cache: L2: 12 MiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 62431 
           Speed: 2031 MHz min/max: 800/4500 MHz Core speeds (MHz): 1: 2031 2: 2432 3: 1736 4: 2015 5: 2140 6: 2267 7: 2164 
           8: 1378 9: 2051 10: 1885 11: 2150 12: 2192 
           Vulnerabilities: Type: itlb_multihit status: KVM: VMX disabled 
           Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulnerable 
           Type: mds mitigation: Clear CPU buffers; SMT vulnerable 
           Type: meltdown mitigation: PTI 
           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 generic retpoline, IBPB: conditional, IBRS_FW, STIBP: conditional, RSB filling 
           Type: srbds mitigation: Microcode 
           Type: tsx_async_abort status: Not affected 
Graphics:  Device-1: Intel UHD Graphics 630 vendor: Lenovo driver: i915 v: kernel bus-ID: 00:02.0 chip-ID: 8086:3e9b 
           class-ID: 0300 
           Device-2: NVIDIA TU116M [GeForce GTX 1660 Ti Mobile] driver: N/A alternate: nouveau, nvidia_drm, nvidia 
           bus-ID: 01:00.0 chip-ID: 10de:2191 class-ID: 0300 
           Device-3: Lite-On Integrated Camera type: USB driver: uvcvideo bus-ID: 1-6:3 chip-ID: 04ca:7070 class-ID: 0e02 
           Display: x11 server: X.Org 1.20.11 compositor: kwin_x11 driver: loaded: modesetting unloaded: intel 
           alternate: fbdev,vesa display-ID: :0 screens: 1 
           Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.0x11.2") s-diag: 582mm (22.9") 
           Monitor-1: eDP-1 res: 1920x1080 hz: 144 dpi: 142 size: 344x193mm (13.5x7.6") diag: 394mm (15.5") 
           OpenGL: renderer: llvmpipe (LLVM 12.0.0 256 bits) v: 4.5 Mesa 21.1.2 compat-v: 3.1 direct render: Yes 
Audio:     Device-1: Intel Cannon Lake PCH cAVS vendor: Lenovo driver: snd_hda_intel v: kernel 
           alternate: snd_soc_skl,snd_sof_pci bus-ID: 00:1f.3 chip-ID: 8086:a348 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: Intel Wireless-AC 9560 [Jefferson Peak] driver: iwlwifi v: kernel port: 5000 bus-ID: 00:14.3 
           chip-ID: 8086:a370 class-ID: 0280 
           IF: wlp0s20f3 state: up mac: <filter> 
           Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: Lenovo driver: r8169 v: kernel port: 3000 
           bus-ID: 07:00.0 chip-ID: 10ec:8168 class-ID: 0200 
           IF: enp7s0 state: up speed: 100 Mbps duplex: full mac: <filter> 
           IF-ID-1: docker0 state: down mac: <filter> 
Bluetooth: Device-1: Intel Bluetooth 9460/9560 Jefferson Peak (JfP) type: USB driver: btusb v: 0.8 bus-ID: 1-14:5 
           chip-ID: 8087:0aaa class-ID: e001 
           Report: rfkill ID: hci0 rfk-id: 3 state: up address: see --recommends 
Drives:    Local Storage: total: 1.14 TiB used: 176.66 GiB (15.1%) 
           SMART Message: Required tool smartctl not installed. Check --recommends 
           ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: SK Hynix model: HFS256GD9TNG-L3A0B size: 238.47 GiB block-size: 
           physical: 512 B logical: 512 B speed: 31.6 Gb/s lanes: 4 rotation: SSD serial: <filter> rev: 80040C10 temp: 42.9 C 
           scheme: GPT 
           ID-2: /dev/sda maj-min: 8:0 vendor: Western Digital model: WD10SPZX-24Z10 size: 931.51 GiB block-size: 
           physical: 4096 B logical: 512 B speed: 6.0 Gb/s rotation: 5400 rpm serial: <filter> rev: 1A05 scheme: GPT 
Partition: ID-1: / raw-size: 48.83 GiB size: 47.81 GiB (97.92%) used: 42.33 GiB (88.5%) fs: ext4 dev: /dev/nvme0n1p5 
           maj-min: 259:5 
           ID-2: /boot/efi raw-size: 260 MiB size: 256 MiB (98.46%) used: 29.6 MiB (11.6%) fs: vfat dev: /dev/nvme0n1p1 
           maj-min: 259:1 
           ID-3: /home raw-size: 488.76 GiB size: 480.08 GiB (98.23%) used: 134.3 GiB (28.0%) fs: ext4 dev: /dev/sda5 
           maj-min: 8:5 
Swap:      Alert: No swap data was found. 
Sensors:   System Temperatures: cpu: 57.0 C mobo: N/A 
           Fan Speeds (RPM): N/A 
Info:      Processes: 358 Uptime: 2m wakeups: 1 Memory: 15.52 GiB used: 3.1 GiB (20.0%) Init: systemd v: 248 tool: systemctl 
           Compilers: gcc: 11.1.0 clang: 12.0.0 Packages: 1515 pacman: 1501 lib: 441 flatpak: 5 snap: 9 Shell: Zsh v: 5.8 
           running-in: alacritty inxi: 3.3.04 

which again shows that the driver is not found. But the output of mhwd -li shows:

> Installed PCI configs:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
     video-modesetting            2020.01.13                true            PCI
           video-linux            2018.05.04                true            PCI
video-hybrid-intel-nvidia-prime            2020.11.30               false            PCI


Warning: No installed USB configs!

Maybe because you have a mixed setup prime/bumblebee something blocks somewhere? I don’t think you should have bumblebee too. Also the file issue when reinstalling drivers is weird. That may be a sign you messed up video driver somehow maybe you installed external files?