You are not logged in.

#1 2020-09-05 17:25:01

doctor-venom
Member
Registered: 2020-01-22
Posts: 9

[SOLVED] Installing and configuring NVIDIA-lts drivers

can someone provide me with a detailed instructions on how to replace mesa and nouveau with NVIDIA proprietary drivers in a way that doesn't ruin my installation, please.
I have ASUS TUF FX505DT laptop with Ryzen 5 R5-3550H CPU and GTX 1650 Mobile GPU, I installed Arch Linux as second OS alongside with Windows 10. The Linux kernel used is 5.4.61-1-lts.
I want to use NVIDIA drivers because nouveau doesn't seem to provide me with full functionality of the GPU, and i cant use CUDA and NVIDIA tools that i need.

when i run

 lspci -k | grep -A 2 -E "(VGA|3D)"

I  get:

01:00.0 VGA compatible controller: NVIDIA Corporation TU117M [GeForce GTX 1650 Mobile / Max-Q] (rev a1)
	Subsystem: ASUSTeK Computer Inc. Device 109f
	Kernel driver in use: nvidia
--
05:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Picasso (rev c2)
	Subsystem: ASUSTeK Computer Inc. Device 18f1
	Kernel driver in use: amdgpu

which says that nvidia driver is in use... but i cant use command line tools like nvidia-smi or nvidia-settings etc... and whats strange is the output of lspci -v for the GTX 1650:

01:00.0 VGA compatible controller: NVIDIA Corporation TU117M [GeForce GTX 1650 Mobile / Max-Q] (rev a1) (prog-if 00 [VGA controller])
	Subsystem: ASUSTeK Computer Inc. Device 109f
	Flags: bus master, fast devsel, latency 0, IRQ 78, IOMMU group 9
	Memory at f6000000 (32-bit, non-prefetchable) [size=16M]
	Memory at c0000000 (64-bit, prefetchable) [size=256M]
	Memory at d0000000 (64-bit, prefetchable) [size=32M]
	I/O ports at f000 [size=128]
	Expansion ROM at f7000000 [disabled] [size=512K]
	Capabilities: <access denied>
	Kernel driver in use: nvidia
	Kernel modules: nouveau, nvidia_drm, nvidia

why is nouveau loaded? although i booted with kernel parameter nouveau.modset=0 and blacklisted it in

/etc/modprobe.d/blacklist.conf

and

/etc/modprobe.d/nvidia.conf

I read the archwiki page about NVIDIA which says i should visit NVIDIA's driver download site and download the driver, and i did so but i failed with installation it doesn't complete and break at some point.

what i want to do next is uninstall mesa and try to nvidia-lts from repositories, but i am afraid ill ruin my installation.. so if anyone can advice me or give useful links ill be thankful. i've been digging in the internet for 3 days now i really cant understand how to get that NVIDIA driver to work correctly...

Last edited by doctor-venom (2021-06-22 21:49:48)

Offline

#2 2020-09-05 18:05:04

loqs
Member
Registered: 2014-03-06
Posts: 19,047

Re: [SOLVED] Installing and configuring NVIDIA-lts drivers

doctor-venom wrote:

whats strange is the output of lspci -v for the GTX 1650:

01:00.0 VGA compatible controller: NVIDIA Corporation TU117M [GeForce GTX 1650 Mobile / Max-Q] (rev a1) (prog-if 00 [VGA controller])
	Subsystem: ASUSTeK Computer Inc. Device 109f
	Flags: bus master, fast devsel, latency 0, IRQ 78, IOMMU group 9
	Memory at f6000000 (32-bit, non-prefetchable) [size=16M]
	Memory at c0000000 (64-bit, prefetchable) [size=256M]
	Memory at d0000000 (64-bit, prefetchable) [size=32M]
	I/O ports at f000 [size=128]
	Expansion ROM at f7000000 [disabled] [size=512K]
	Capabilities: <access denied>
	Kernel driver in use: nvidia
	Kernel modules: nouveau, nvidia_drm, nvidia

why is nouveau loaded? although i booted with kernel parameter nouveau.modset=0 and blacklisted it in

/etc/modprobe.d/blacklist.conf

and

/etc/modprobe.d/nvidia.conf

The nouveau driver is not in use,  the kernel is just listing it as another available module for that device.

doctor-venom wrote:

I read the archwiki page about NVIDIA which says i should visit NVIDIA's driver download site and download the driver, and i did so but i failed with installation it doesn't complete and break at some point.

wiki wrote:

Warning: Avoid installing the NVIDIA driver through the package provided from the NVIDIA website. Installation through pacman allows upgrading the driver together with the rest of the system.

Offline

#3 2020-09-05 19:09:32

doctor-venom
Member
Registered: 2020-01-22
Posts: 9

Re: [SOLVED] Installing and configuring NVIDIA-lts drivers

Thanks for your reply.
seems like I misread the wiki.. anyway i did install it using pacman using sudo pacman -S nvidia-lts lib32-nvidia-utils.

the question i have now is why i get:

$ nvidia-settings 

ERROR: An internal driver error occurred


ERROR: Unable to load info from any available system

and

$ nvidia-smi
Failed to initialize NVML: Driver/library version mismatch

How do i get them to work?
I did the automatic configuration as stated in the wiki here, i get the following output when i run nvidia-xconfig:

$ sudo nvidia-xconfig
Using X configuration file: "/etc/X11/xorg.conf".
Backed up file '/etc/X11/xorg.conf' as '/etc/X11/xorg.conf.backup'
New X configuration file written to '/etc/X11/xorg.conf'

I think the installation and configuration are fine but i don't understand it doesn't work and throws errors when i run for example nvidia-settings.

Another note: because i use linux-lts then the driver should be nvidia-lts, why it shows the driver is just "nvidia" is that okay?

Last edited by doctor-venom (2020-09-05 22:09:40)

Offline

#4 2020-09-05 19:13:46

loqs
Member
Registered: 2014-03-06
Posts: 19,047

Re: [SOLVED] Installing and configuring NVIDIA-lts drivers

What is the output of:

pacman -Qs nvidia

Does X work with /etc/X11/xorg.conf produced by nvidia-xconfig?

Offline

#5 2020-09-05 19:23:35

doctor-venom
Member
Registered: 2020-01-22
Posts: 9

Re: [SOLVED] Installing and configuring NVIDIA-lts drivers

The output of pacman -Qs nvidia is:

$ pacman -Qs nvidia
local/conky-cairo 1.11.3-1
    conky - built for nvidia - Just change one variable to build the git version - defaults to release
    version.
local/egl-wayland 1.1.5-1
    EGLStream-based Wayland external platform
local/libvdpau 1.4-1
    Nvidia VDPAU library
local/libxnvctrl 450.66-1
    NVIDIA NV-CONTROL X extension
local/nvidia-lts 1:450.66-14
    NVIDIA drivers for linux-lts
local/nvidia-settings 450.66-1
    Tool for configuring the NVIDIA graphics driver
local/nvidia-utils 450.66-1
    NVIDIA drivers utilities
local/opencl-nvidia 450.66-1
    OpenCL implemention for NVIDIA
loqs wrote:

Does X work with /etc/X11/xorg.conf produced by nvidia-xconfig?

How can i check which configuration X uses?

Offline

#6 2020-09-05 19:29:18

loqs
Member
Registered: 2014-03-06
Posts: 19,047

Re: [SOLVED] Installing and configuring NVIDIA-lts drivers

X will list the config files it uses in it's log file.  Xorg.log will be in /var/log/ or ~/.local/share/xorg/.  Please post the contents of Xorg.log.

Offline

#7 2020-09-05 19:41:19

doctor-venom
Member
Registered: 2020-01-22
Posts: 9

Re: [SOLVED] Installing and configuring NVIDIA-lts drivers

okay so i just logged out (that ended the X session) then when i tried to login again (i use ly windows manager) X server failed to load!

I think thats because i ran the nvidia-xconfig in my session that i closed after which xorg tried to use the xorg.conf generated by nvidia-xconfig...

the contents of ~/.local/share/xorg/Xorg. 0.log:

 
[ 11755.048] (WW) Failed to open protocol names file lib/xorg/protocol.txt
[ 11755.048]
X.Org X Server 1.20.9
X Protocol Version 11, Revision 0
[ 11755.048] Build Operating System: Linux Arch Linux
[ 11755.048] Current Operating System: Linux VENOM 5.4.61-1-lts #1 SMP Wed, 26 Aug 2020 18:35:48 +0000 x86_64
[ 11755.048] Kernel command line: initrd=\amd-ucode.img initrd=\initramfs-linux-lts.img root=UUID=21c6ef8a-3d6c-48de-ac72-ad79879bd1ab resume=UUID=a1bb11e6-dff6-4133-a8ab-2170f8f88c65 rw nouveau.modset=0
[ 11755.048] Build Date: 02 September 2020  06:17:44AM
[ 11755.048]
[ 11755.048] Current version of pixman: 0.40.0
[ 11755.049]    Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
[ 11755.049] Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 11755.049] (==) Log file: "/home/venom/.local/share/xorg/Xorg.0.log", Time: Sun Sep  6 01:27:52 2020
[ 11755.049] (==) Using config file: "/etc/X11/xorg.conf"
[ 11755.049] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[ 11755.049] (==) ServerLayout "Layout0"
[ 11755.049] (**) |-->Screen "Screen0" (0)
[ 11755.049] (**) |   |-->Monitor "Monitor0"
[ 11755.050] (**) |   |-->Device "Device0"
[ 11755.050] (**) |-->Input Device "Keyboard0"
[ 11755.050] (**) |-->Input Device "Mouse0"
[ 11755.050] (==) Automatically adding devices
[ 11755.050] (==) Automatically enabling devices
[ 11755.050] (==) Automatically adding GPU devices
[ 11755.050] (==) Automatically binding GPU devices
[ 11755.050] (==) Max clients allowed: 256, resource mask: 0x1fffff
[ 11755.050] (WW) The directory "/usr/share/fonts/Type1" does not exist.
[ 11755.050]    Entry deleted from font path.
[ 11755.050] (WW) The directory "/usr/share/fonts/100dpi" does not exist.
[ 11755.050]    Entry deleted from font path.
[ 11755.050] (WW) The directory "/usr/share/fonts/75dpi" does not exist.
[ 11755.050]    Entry deleted from font path.
[ 11755.050] (==) FontPath set to:
        /usr/share/fonts/misc,
        /usr/share/fonts/TTF,
        /usr/share/fonts/OTF
[ 11755.050] (==) ModulePath set to "/usr/lib/xorg/modules"
[ 11755.050] (WW) Hotplugging is on, devices using drivers 'kbd', 'mouse' or 'vmmouse' will be disabled.
[ 11755.050] (WW) Disabling Keyboard0
[ 11755.050] (WW) Disabling Mouse0
[ 11755.050] (II) Module ABI versions:
[ 11755.050]    X.Org ANSI C Emulation: 0.4
[ 11755.050]    X.Org Video Driver: 24.1
[ 11755.050]    X.Org XInput driver : 24.1
[ 11755.050]    X.Org Server Extension : 10.0
[ 11755.051] (++) using VT number 2

[ 11755.051] (--) controlling tty is VT number 2, auto-enabling KeepTty
[ 11755.053] (II) systemd-logind: took control of session /org/freedesktop/login1/session/_31
[ 11755.053] (II) xfree86: Adding drm device (/dev/dri/card0)
[ 11755.053] (II) Platform probe for /sys/devices/pci0000:00/0000:00:08.1/0000:05:00.0/drm/card0
[ 11755.054] (II) systemd-logind: got fd for /dev/dri/card0 226:0 fd 10 paused 0
[ 11755.058] (--) PCI: (1@0:0:0) 10de:1f91:1043:109f rev 161, Mem @ 0xf6000000/16777216, 0xc0000000/268435456, 0xd0000000/33554432, I/O @ 0x0000f000/128, BIOS @ 0x????????/524288
[ 11755.058] (--) PCI:*(5@0:0:0) 1002:15d8:1043:18f1 rev 194, Mem @ 0xe0000000/268435456, 0xf0000000/2097152, 0xf7500000/524288, I/O @ 0x0000c000/256
[ 11755.058] (II) Open ACPI successful (/var/run/acpid.socket)
[ 11755.058] (II) LoadModule: "glx"
[ 11755.058] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[ 11755.060] (II) Module glx: vendor="X.Org Foundation"
[ 11755.060]    compiled for 1.20.9, module version = 1.0.0
[ 11755.060]    ABI class: X.Org Server Extension, version 10.0
[ 11755.060] (II) LoadModule: "nvidia"
[ 11755.061] (II) Loading /usr/lib/xorg/modules/drivers/nvidia_drv.so
[ 11755.061] (II) Module nvidia: vendor="NVIDIA Corporation"
[ 11755.061]    compiled for 1.6.99.901, module version = 1.0.0
[ 11755.061]    Module class: X.Org Video Driver
[ 11755.061] (II) NVIDIA dlloader X Driver  430.09  Thu Apr 18 02:31:13 CDT 2019
[ 11755.061] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[ 11755.061] xf86EnableIOPorts: failed to set IOPL for I/O (Operation not permitted)
[ 11755.061] (EE) No devices detected.
[ 11755.061] (EE)
Fatal server error:
[ 11755.061] (EE) no screens found(EE)
[ 11755.061] (EE)
Please consult the The X.Org Foundation support
         at http://wiki.x.org
 for help.
[ 11755.061] (EE) Please also check the log file at "/home/venom/.local/share/xorg/Xorg.0.log" for additional information.
[ 11755.061] (EE)
[ 11755.070] (EE) Server terminated with error (1). Closing log file.

Offline

#8 2020-09-05 19:51:28

loqs
Member
Registered: 2014-03-06
Posts: 19,047

Re: [SOLVED] Installing and configuring NVIDIA-lts drivers

See NVIDIA_Optimus for options to configure the system's two GPUs.

[ 11755.061] (II) NVIDIA dlloader X Driver  430.09  Thu Apr 18 02:31:13 CDT 2019

The Xorg.log also showed the driver version does not match that supplied by the nvidia packages,  430.09 instead of 450.66.

Last edited by loqs (2020-09-05 19:51:43)

Offline

#9 2020-09-05 20:38:24

doctor-venom
Member
Registered: 2020-01-22
Posts: 9

Re: [SOLVED] Installing and configuring NVIDIA-lts drivers

Thank you for pointing that out.

So, as a first step i am going to update the nvidia driver to 450.66, ( how can i do that? i did full system upgrade with pacman -Syu and it is updating to version 450.66 now ).

Then ill try to get X server back to work ( how to do? the backup config that i though may help is same as the new one because i ran nvidia-xconfig twice I ran Xorg :0 -configure which created /root/xorg.conf.new then replaced /etc/X11/xorg.conf with it).

Then I'll work on configuring system's 2 GPUs to work together or at least make NVIDIA's one work alone because i only need it.

Last edited by doctor-venom (2020-09-05 21:25:19)

Offline

Board footer

Powered by FluxBB