# Nvidia Drivers /dev/nvidia0 problems

## adcrawfo

Hello all,

This has been plauging me for a while and I have tried searching and using those methods and nothing seems to be working.  The problem I have is that /dev/nvidia0 and /dev/nvidiactl have goofy permissions that won't allow my user to run anything that requires either file.  Now I have done the searches and modified /etc/udev/rules.d/51-nvidiaperm.rules to be

```
KERNEL=="nvidia*|nvidiactl*", NAME="%k", GROUP="video"

```

I have modified  /etc/udev/rules.d/40-video.rules to be

```
# device node will be /dev/dri/card?

KERNEL=="card*",        GROUP="video"

KERNEL=="nvidia*",      GROUP="video",  MODE="0666"

KERNEL=="3dfx*",        GROUP="video"

```

and when I reboot I still get this from a ls -lh /dev/nvidia*

```
crw-rw---- 1 root root  195,   0 Aug 26 15:25 /dev/nvidia0

crw-rw---- 1 root root 195, 255 Aug 26 15:25 /dev/nvidiactl
```

so I do a chmod 0666 /dev/nvidia* and get

```
crw-rw-rw- 1 root root  195,   0 Aug 26 15:25 /dev/nvidia0

crw-rw-rw- 1 root root 195, 255 Aug 26 15:25 /dev/nvidiactl
```

Ok so all looks good, go to fire up doom3 and get this

```
----- R_InitOpenGL -----

Setup X display connection

dlopen(libGL.so.1)

Initializing OpenGL display

Using XFree86-VidModeExtension Version 2.2

DGA DirectVideo Mouse (Version 2.0) initialized

Free86-VidModeExtension Activated at 2048x768

Using 8/8/8 Color bits, 8 Alpha bits, 24 depth, 8 stencil display.

NVIDIA: could not open the device file /dev/nvidia0 (Permission denied).

NVIDIA: Direct rendering failed; attempting indirect rendering.

GL_RENDERER: GeForce 7300 SE/7200 GS/PCI/SSE2

```

So I run ls -lh /dev/nvidia* and get

```
crw-rw---- 1 root root  195,   0 Aug 26 15:25 /dev/nvidia0

crw-rw-rw- 1 root root 195, 255 Aug 26 15:25 /dev/nvidiactl
```

So my question is, what in the hell is changing the permissions on nvidia0?????  

I've tried doing a 

```
user51desktop ~ # chown root:video /dev/nvidia*

user51desktop ~ # ls -lh /dev/nvidia*

crw-rw-rw- 1 root video 195,   0 Aug 26 15:25 /dev/nvidia0

crw-rw-rw- 1 root video 195, 255 Aug 26 15:25 /dev/nvidiactl

```

and it will change until again I go to fire up doom 3 then I get the same error as before and it resets it to

```
user51desktop ~ # ls -lh /dev/nvidia*

crw-rw---- 1 root root  195,   0 Aug 26 15:25 /dev/nvidia0

crw-rw-rw- 1 root video 195, 255 Aug 26 15:25 /dev/nvidiactl

```

My /etc/group

```
root:x:1:root

bin:x:1:root,bin,daemon

daemon:x:2:root,bin,daemon

sys:x:3:root,bin,adm

adm:x:4:root,adm,daemon

tty:x:5:

disk:x:6:root,adm,haldaemon

lp:x:7:lp

mem:x:8:

kmem:x:9:

wheel:x:10:root,alan

floppy:x:11:root,alan,haldaemon

mail:x:12:mail

news:x:13:news

uucp:x:14:uucp

man:x:15:man

console:x:17:

audio:x:18:alan

cdrom:x:19:alan,haldaemon

dialout:x:20:root

tape:x:26:root

video:x:27:root

postgres:x:70:

cdrw:x:80:alan,haldaemon

nut:x:84:

usb:x:85:alan,root,haldaemon

users:x:100:alan

nofiles:x:200:

postfix:x:207:

postdrop:x:208:

smmsp:x:209:smmsp

portage:x:250:portage,alan

utmp:x:406:

nogroup:x:65533:

nobody:x:65534:

sshd:x:22:alan

cron:x:16:

games:!:35:alan

plugdev:x:407:alan,root,haldaemon

vmware:x:408:alan

lpadmin:x:106:

rpc:x:111:

dhcp:x:409:

gdm:x:410:

messagebus:x:411:apache:x:81:

gkrellmd:x:412:

crontab:x:413:

video:x:44:root,alan

haldaemon:x:414:haldaemon

```

My Nvidia bug report

My emerge info

```
Portage 2.1.4.4 (default-linux/x86/2007.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.24.4 i686)

=================================================================

System uname: 2.6.24.4 i686 Intel(R) Pentium(R) Dual CPU E2160 @ 1.80GHz

Timestamp of tree: Tue, 26 Aug 2008 19:36:01 +0000

app-shells/bash:     3.2_p33

dev-java/java-config: 1.3.7, 2.1.6

dev-lang/python:     2.4.4-r13

dev-python/pycrypto: 2.0.1-r6

sys-apps/baselayout: 1.12.11.1

sys-apps/sandbox:    1.2.18.1-r2

sys-devel/autoconf:  2.13, 2.61-r2

sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1

sys-devel/binutils:  2.18-r1

sys-devel/gcc-config: 1.4.0-r4

sys-devel/libtool:   1.5.26

virtual/os-headers:  2.6.23-r3

ACCEPT_KEYWORDS="x86"

CBUILD="i686-pc-linux-gnu"

CFLAGS="-O2 -march=prescott -pipe -fomit-frame-pointer"

CHOST="i686-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"

CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"

CXXFLAGS="-O2 -march=prescott -pipe -fomit-frame-pointer"

DISTDIR="/usr/portage/distfiles"

FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"

GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"

MAKEOPTS=""

PKGDIR="/usr/portage/packages"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

SYNC="rsync://rsync.gentoo.org/gentoo-portage"

USE="X acl alsa apache2 apm audiofile avi bitmap-fonts browserplugin bzip2 cdr cli cracklib crypt ctype cups dba divx4linux dri dts dvd dvdr dvdread emboss encode esd ethereal exif expat fam fastbuild flac foomaticdb force-cgi-redirect fortran ftp gd gdbm gif gimpprint glut gmp gpm gstreamer gtk gtk2 gtkhtml guile iconv idn imlib ipv6 isdnlog java jpeg lcms libg++ libusb libwww mad memlimit midi mikmod mng motif mozilla mp3 mpeg msn mudflap musepack ncurses nls nptl nptlonly nsplugin nvidia ogg opengl openmp oss pam pcre pdf pdflib perl png posix ppds pppd python quicktime readline reflection samba server session simplexml slang soap sockets spell spl ssl tcltk tcpd tiff tk tokenizer truetype truetype-fonts type1-fonts udev unicode v4l vorbis win32codecs x86 xinerama xml xml2 xorg xsl xv xvid zlib" ALSA_CARDS="EMU10k1" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="vesa nvidia"

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

```

uname -a 

```
user51desktop ~ # uname -a

Linux user51desktop 2.6.24.4 #4 PREEMPT Wed Apr 9 15:30:15 CDT 2008 i686 Intel(R) Pentium(R) Dual CPU E2160 @ 1.80GHz GenuineIntel GNU/Linux
```

and my nvidia driver version

```
Calculating dependencies... done!

[ebuild   R   ] x11-drivers/nvidia-drivers-173.14.09  USE="gtk -acpi -custom-cflags (-multilib)" 0 kB 

```

If anyone can help me figure out this problem I would be eternally grateful.  I've been fighting with this on and off for months now and haven't found anything that has helped.  Thanks in advance!

----------

## PaulBredbury

Udev does not seem to be the right place to set nvidia permissions.

----------

## Gef

Hi,

Did you check the parameters passed to the module by modprobe ? ( /etc/modprobe.d/nvidia) :

```

# Nvidia drivers support

alias char-major-195 nvidia

alias /dev/nvidiactl char-major-195

# To tweak the driver the following options can be used, note that

# you should be careful, as it could cause instability!! For more 

# options see /usr/share/doc/nvidia-drivers-177.68/README 

#

# !!! SECURITY WARNING !!!

# DO NOT MODIFY OR REMOVE THE DEVICE FILE RELATED OPTIONS UNLESS YOU KNOW

# WHAT YOU ARE DOING.

# ONLY ADD TRUSTED USERS TO THE VIDEO GROUP, THESE USERS MAY BE ABLE TO CRASH,

# COMPROMISE, OR IRREPARABLY DAMAGE THE MACHINE.

options nvidia NVreg_DeviceFileMode=432 NVreg_DeviceFileUID=0 NVreg_DeviceFileGID=27 NVreg_ModifyDeviceFiles=1

```

edit : PaulBredbury was quicker.

----------

## adcrawfo

PaulBredbury, thank you very much.  I tried searching bugzilla but I must not have had the right search terms.  I thank you from the bottom of my heart.

----------

