You are not logged in.

#1 2021-11-05 21:01:25

s0lid7
Member
From: Hellas (Greece)
Registered: 2012-10-26
Posts: 59

nvidia-smi NVML insufficient permissions nvidia-470

I think I maybe have the same problem with my gtx 650 drivers which stopped working with version 495.
I did the exact steps Trevor_B mentioned to install 470-dkms but with no luck (did the step with hooks also).
Furthermore, if I have a xorg.conf present can't login with xorg option in login screen, I enter the password and it keeps requesting it again after screen flashes.
Without a xorg.conf file I can login with xorg option but no drivers are recognized by system.
With wayland option I can login but also without any drivers recognized by system.
I did try creating a new xorg with nvidia-xconfig but that ended up with the same result.

Maybe it is not the same problem (?) since:

$ nvidia-smi
Failed to initialize NVML: Insufficient Permissions

but:

# nvidia-smi
Fri Nov  5 23:44:16 2021       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.82.00    Driver Version: 470.82.00    CUDA Version: 11.4     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  Off  | 00000000:05:00.0 N/A |                  N/A |
| 30%   34C    P8    N/A /  N/A |     15MiB /  1994MiB |     N/A      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|  No running processes found

Last edited by s0lid7 (2021-11-05 21:48:33)


Do a pacman -Syu to your brain regularly

Offline

#2 2021-11-06 10:56:11

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,427

Re: nvidia-smi NVML insufficient permissions nvidia-470

Please don't hijack existing solved posts https://wiki.archlinux.org/title/Genera … _hijacking

This output  shows that the installation in general worked and you are using the nvidia 470xx drivers. What are you using to log in? Post your xorg.config as well as your /var/log/xorg.0.log and the full output of

 sudo journalctl -b 

https://wiki.archlinux.org/title/List_o … n_services

Split from  https://bbs.archlinux.org/viewtopic.php?id=270883

Offline

#3 2021-11-06 11:34:03

s0lid7
Member
From: Hellas (Greece)
Registered: 2012-10-26
Posts: 59

Re: nvidia-smi NVML insufficient permissions nvidia-470

I am really sorry for that, my problem occurred at the same time with the transition from 495 to 470, so I thought it was relevant.

My xorg.conf which is generated with nvidia-xconfig, since I had to delete the original in order to login with xorg (didn't keep a backup sad )

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 470.82.00

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Also, with nvidia-xconfig a file with the name xorg.conf.nvidia-xconfig-original is created, but it is empty. Don't know if this is normal.

journalctl -b output:
http://ix.io/3Ebb

The installation worked and i got no complaints about the module the last time, but in nvidia-smi as you can see it doesn't mention the exact card model which is GeForce GTX 650 and I am quite sure that it did before the problem.

Xorg.0.log:

[    16.070] (--) Log file renamed from "/var/log/Xorg.pid-399.log" to "/var/log/Xorg.0.log"
[    16.070] (WW) Failed to open protocol names file lib/xorg/protocol.txt
[    16.070] 
X.Org X Server 1.20.13
X Protocol Version 11, Revision 0
[    16.071] Build Operating System: Linux Archlinux
[    16.071] Current Operating System: Linux Arch 5.14.16-arch1-1 #1 SMP PREEMPT Tue, 02 Nov 2021 22:22:59 +0000 x86_64
[    16.071] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-linux root=UUID=b681a568-e77b-4e35-814a-2f5a8944f9a3 rw loglevel=3 quiet nvidia-drm.modeset=1
[    16.071] Build Date: 31 October 2021  06:30:01AM
[    16.071]  
[    16.071] Current version of pixman: 0.40.0
[    16.071] 	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
[    16.071] Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[    16.071] (==) Log file: "/var/log/Xorg.0.log", Time: Fri Nov  5 21:24:00 2021
[    16.071] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[    16.071] (==) No Layout section.  Using the first Screen section.
[    16.071] (==) No screen section available. Using defaults.
[    16.071] (**) |-->Screen "Default Screen Section" (0)
[    16.071] (**) |   |-->Monitor "<default monitor>"
[    16.071] (==) No monitor specified for screen "Default Screen Section".
	Using a default monitor configuration.
[    16.071] (==) Automatically adding devices
[    16.071] (==) Automatically enabling devices
[    16.071] (==) Automatically adding GPU devices
[    16.071] (==) Automatically binding GPU devices
[    16.071] (==) Max clients allowed: 256, resource mask: 0x1fffff
[    16.071] (WW) The directory "/usr/share/fonts/misc" does not exist.
[    16.071] 	Entry deleted from font path.
[    16.071] (WW) The directory "/usr/share/fonts/Type1" does not exist.
[    16.071] 	Entry deleted from font path.
[    16.071] (==) FontPath set to:
	/usr/share/fonts/TTF,
	/usr/share/fonts/OTF,
	/usr/share/fonts/100dpi,
	/usr/share/fonts/75dpi
[    16.071] (==) ModulePath set to "/usr/lib/xorg/modules"
[    16.071] (II) The server relies on udev to provide the list of input devices.
	If no devices become available, reconfigure udev or disable AutoAddDevices.
[    16.071] (II) Module ABI versions:
[    16.071] 	X.Org ANSI C Emulation: 0.4
[    16.071] 	X.Org Video Driver: 24.1
[    16.071] 	X.Org XInput driver : 24.1
[    16.071] 	X.Org Server Extension : 10.0
[    16.072] (++) using VT number 1

[    16.076] (II) systemd-logind: took control of session /org/freedesktop/login1/session/_37
[    16.079] (II) no primary bus or device found
[    16.079] (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
[    16.079] (II) LoadModule: "glx"
[    16.080] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[    16.081] (II) Module glx: vendor="X.Org Foundation"
[    16.081] 	compiled for 1.20.13, module version = 1.0.0
[    16.081] 	ABI class: X.Org Server Extension, version 10.0
[    16.081] (==) Matched modesetting as autoconfigured driver 0
[    16.081] (==) Matched fbdev as autoconfigured driver 1
[    16.081] (==) Matched vesa as autoconfigured driver 2
[    16.081] (==) Assigned the driver to the xf86ConfigLayout
[    16.081] (II) LoadModule: "modesetting"
[    16.081] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[    16.082] (II) Module modesetting: vendor="X.Org Foundation"
[    16.082] 	compiled for 1.20.13, module version = 1.20.13
[    16.082] 	Module class: X.Org Video Driver
[    16.082] 	ABI class: X.Org Video Driver, version 24.1
[    16.082] (II) LoadModule: "fbdev"
[    16.082] (WW) Warning, couldn't open module fbdev
[    16.082] (EE) Failed to load module "fbdev" (module does not exist, 0)
[    16.082] (II) LoadModule: "vesa"
[    16.082] (II) Loading /usr/lib/xorg/modules/drivers/vesa_drv.so
[    16.082] (II) Module vesa: vendor="X.Org Foundation"
[    16.082] 	compiled for 1.20.9, module version = 2.5.0
[    16.082] 	Module class: X.Org Video Driver
[    16.082] 	ABI class: X.Org Video Driver, version 24.1
[    16.082] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[    16.082] (II) VESA: driver for VESA chipsets: vesa
[    16.082] (WW) Falling back to old probe method for modesetting
[    16.082] (EE) open /dev/dri/card0: No such file or directory
[    16.082] (WW) Falling back to old probe method for modesetting
[    16.082] (EE) open /dev/dri/card0: No such file or directory
[    16.082] (EE) No devices detected.
[    16.082] (EE) 
Fatal server error:
[    16.082] (EE) no screens found(EE) 
[    16.082] (EE) 
Please consult the The X.Org Foundation support 
	 at http://wiki.x.org
 for help. 
[    16.082] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[    16.082] (EE) 
[    16.085] (EE) Server terminated with error (1). Closing log file.

nano /var/log/Xorg.0.log command cames empty for some reason, I had to navigate to the folder through nautilus and open with gedit in order to see contents.

Last edited by s0lid7 (2021-11-06 12:51:22)


Do a pacman -Syu to your brain regularly

Offline

#4 2021-11-06 12:50:46

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,427

Re: nvidia-smi NVML insufficient permissions nvidia-470

Remove the xorg.conf just generating to have generated doesn't really fix much. From the error messages it looks like there are permission issues accessing the relevant device files which could be due to rootless xorg, but more commonly are due to missing an initial startup race in which case you'll want to enable https://wiki.archlinux.org/title/NVIDIA#Early_loading if you already previously configured that, did you make sure to regenerate the initramfs with mkinitcpio -P after installing the 470xx drivers (and adjust the target of the pacman hook if you set that up)?

As for nvidia-smi and listing the card, that's just truncated because you used a small terminal size, rerunning it with a wider terminal will likely show the full name.

Offline

#5 2021-11-06 12:57:25

s0lid7
Member
From: Hellas (Greece)
Registered: 2012-10-26
Posts: 59

Re: nvidia-smi NVML insufficient permissions nvidia-470

I have nvidia-drm.modeset=1 as a kernel parameter

/etc/pacman.d/hooks/nvidia.hooks:

[Trigger]
Operation=Install
Operation=Upgrade
Operation=Remove
Type=Package
Target=nvidia-470xx-dkms
Target=linux
# Change the linux part above and in the Exec line if a different kernel is used

[Action]
Description=Update Nvidia module in initcpio
Depends=mkinitcpio
When=PostTransaction
NeedsTargets
Exec=/bin/sh -c 'while read -r trg; do case $trg in linux) exit 0; esac; done; /usr/bin/mkinitcpio -P'

and /etc/mninitcpio.conf:

# vim:set ft=sh
# MODULES
# The following modules are loaded before any boot hooks are
# run.  Advanced users may wish to specify all system modules
# in this array.  For instance:
#     MODULES=(piix ide_disk reiserfs)
MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)

# BINARIES
# This setting includes any additional binaries a given user may
# wish into the CPIO image.  This is run last, so it may be used to
# override the actual binaries included by a given hook
# BINARIES are dependency parsed, so you may safely ignore libraries
BINARIES=()

# FILES
# This setting is similar to BINARIES above, however, files are added
# as-is and are not parsed in any way.  This is useful for config files.
FILES=()

# HOOKS
# This is the most important setting in this file.  The HOOKS control the
# modules and scripts added to the image, and what happens at boot time.
# Order is important, and it is recommended that you do not change the
# order in which HOOKS are added.  Run 'mkinitcpio -H <hook name>' for
# help on a given hook.
# 'base' is _required_ unless you know precisely what you are doing.
# 'udev' is _required_ in order to automatically load modules
# 'filesystems' is _required_ unless you specify your fs modules in MODULES
# Examples:
##   This setup specifies all modules in the MODULES setting above.
##   No raid, lvm2, or encrypted root is needed.
#    HOOKS=(base)
#
##   This setup will autodetect all modules for your system and should
##   work as a sane default
#    HOOKS=(base udev autodetect block filesystems)
#
##   This setup will generate a 'full' image which supports most systems.
##   No autodetection is done.
#    HOOKS=(base udev block filesystems)
#
##   This setup assembles a pata mdadm array with an encrypted root FS.
##   Note: See 'mkinitcpio -H mdadm' for more information on raid devices.
#    HOOKS=(base udev block mdadm encrypt filesystems)
#
##   This setup loads an lvm2 volume group on a usb device.
#    HOOKS=(base udev block lvm2 filesystems)
#
##   NOTE: If you have /usr on a separate partition, you MUST include the
#    usr, fsck and shutdown hooks.
HOOKS=(base udev autodetect modconf block filesystems keyboard fsck)

# COMPRESSION
# Use this to compress the initramfs image. By default, zstd compression
# is used. Use 'cat' to create an uncompressed image.
#COMPRESSION="zstd"
#COMPRESSION="gzip"
#COMPRESSION="bzip2"
#COMPRESSION="lzma"
#COMPRESSION="xz"
#COMPRESSION="lzop"
#COMPRESSION="lz4"

# COMPRESSION_OPTIONS
# Additional options for the compressor
#COMPRESSION_OPTIONS=()

I also edited previous post to add Xorg.0.log in case you missed it.

I definitely did mkinitcpio -p linux after installing 470, it should be mkinitcpio -P instead?
Also the thing with the nvidia-persistenced daemon occurred with 495 last and failed login and it remains.
I remenber that with the last update (3-4 of November) I got a warning from pacman to check permissions for an updated package. Sadly I don't remember which, so i don't know if that was the reason which triggered the problem.

If it is due to rootless xorg how do I fix this?

Last edited by s0lid7 (2021-11-06 13:05:50)


Do a pacman -Syu to your brain regularly

Offline

#6 2021-11-08 09:37:20

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,427

Re: nvidia-smi NVML insufficient permissions nvidia-470

mkinitcpio -p linux or -P doesn't matter, just that it ran sometime after compiling the modules. FWIW you should name the hook something "late" to ensure it runs after the DKMS compilation hook so something like 72-nvidia.hook

For rootless xorg, not sure whether GDM being GDM has something specific, under normal circumstances you'd enforce it with a /etc/X11/Xwrapper.config with

needs_root_rights = yes

as the contents.

Offline

#7 2021-11-08 14:09:58

s0lid7
Member
From: Hellas (Greece)
Registered: 2012-10-26
Posts: 59

Re: nvidia-smi NVML insufficient permissions nvidia-470

As wiki states probably gdm runs rootless xorg by default since I have kernel mode setting.
https://wiki.archlinux.org/title/Xorg#: … edirection

So hopefully renaming /etc/pacman.d/hooks/72-nvidia.hook instead of nvidia.hookS.... will work
I also found this:

6, updated my /etc/X11/xorg.conf.d/20-nvidia.conf

Section "Files"
ModulePath "/usr/lib/nvidia/xorg"
ModulePath "/usr/lib/xorg/modules"
EndSection

here: https://bbs.archlinux.org/viewtopic.php … 0#p1965550
which i will also add hoping that the problem will get solved and avoid format.


Do a pacman -Syu to your brain regularly

Offline

#8 2021-11-11 01:33:31

s0lid7
Member
From: Hellas (Greece)
Registered: 2012-10-26
Posts: 59

Re: nvidia-smi NVML insufficient permissions nvidia-470

Sadly, it seems that I can't find a solution. I followed all the steps again, but with no luck.
I'm afraid I' ll have to reinstall sad

V1del, thank you for your effort.

-edited-

I've reinstall and now everything is good.
I don't think i can mark this as solved, but if you think I should, please let me know and I will do it.

Last edited by s0lid7 (2021-11-11 23:19:09)


Do a pacman -Syu to your brain regularly

Offline

Board footer

Powered by FluxBB