nvidia-persistenced: Failed to query NVIDIA devices.

Asked by Allard Pruim

I just updates my Nvidia graphics drivers in Ubuntu (no ppa, just the drivers in the repo's) when I rebooted and I get this lines every time when booting up.

[code]
Sep 28 16:48:00 ubuntu-pc-allard nvidia-persistenced: Started (1088)
Sep 28 16:48:00 ubuntu-pc-allard nvidia-persistenced: Failed to query NVIDIA devices. Please ensure that the NVIDIA device files (/dev/nvidia*) exist, and that user 117 has read and write permissions for those files.
Sep 28 16:48:00 ubuntu-pc-allard nvidia-persistenced: Shutdown (1088)
[/code]

I don't know what's causing this or if this is bad but I believe it showed up after I installed the updates.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu nvidia-graphics-drivers Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Allard Pruim (allardpruim) said :
#1

I just updates my Nvidia graphics drivers in Ubuntu (no ppa, just the drivers in the repo's) when I rebooted and I get this lines every time when booting up.

[code]
Sep 28 16:48:00 ubuntu-pc-allard nvidia-persistenced: Started (1088)
Sep 28 16:48:00 ubuntu-pc-allard nvidia-persistenced: Failed to query NVIDIA devices. Please ensure that the NVIDIA device files (/dev/nvidia*) exist, and that user 117 has read and write permissions for those files.
Sep 28 16:48:00 ubuntu-pc-allard nvidia-persistenced: Shutdown (1088)
[/code]

I don't know what's causing this or if this is bad but I believe it showed up after I installed the updates.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#2

What is the output of:

grep 117 /etc/passwd; lsb_release -a; uname -a

Thanks

Revision history for this message
Allard Pruim (allardpruim) said :
#3

allard@ubuntu-pc-allard:~$ grep 117 /etc/passwd; lsb_release -a; uname -a
avahi:x:111:117:Avahi mDNS daemon,,,:/var/run/avahi-daemon:/bin/false
nvidia-persistenced:x:117:126:NVIDIA Persistence Daemon,,,:/:/sbin/nologin
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.3 LTS
Release: 14.04
Codename: trusty
Linux ubuntu-pc-allard 3.13.0-63-generic #103-Ubuntu SMP Fri Aug 14 21:42:59 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#4

OK and what is the output of:

ls -ld /dev/nvidia*; file /dev/nvidia*

Thanks

Revision history for this message
Allard Pruim (allardpruim) said :
#5

This:

allard@ubuntu-pc-allard:~$ ls -ld /dev/nvidia*; file /dev/nvidia*
crw-rw-rw- 1 root root 195, 0 okt 2 16:38 /dev/nvidia0
crw-rw-rw- 1 root root 195, 255 okt 2 16:38 /dev/nvidiactl
/dev/nvidia0: character special
/dev/nvidiactl: character special

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#6

Technically the avahi user has rw access via the "others" group having rw access (the last 3 parts of the access, it just doesn't have execute).

Revision history for this message
Aravind R (araviaravi) said :
#7

I will like to add solution to this question. This bug exist in Ubuntu 18.04 and driver version 410. In my case user id is 128.

The output of ls -altr /dev/nvidia* says that owner is root.

When I run cat /etc/passwd ; the above id 128 belongs to nvidia-persistenced

When I run id 128 ; I get user as nvidia-persistenced and group as nvidia-persistenced.

I have decided to not to mess with owner of the file system. Hence I have solved my problem by giving acl access control to this user and group.

sudo -i

getfacl /dev/nvidia*

It says that root is the only and sole have access to these files.

setfacl -m "u:nvidia-persistenced:rw" /dev/nvidia*

This gives exclusive read write to the user nvidia-persistenced.

setfacl -m "g:nvidia-persistenced:rw" /dev/nvidia*

This gives exclusive read write to the group nvidia-persistenced.

exit

reboot.

My problem is resolved.

Can you help with this problem?

Provide an answer of your own, or ask Allard Pruim for more information if necessary.

To post a message you must log in.