Nvidia permissions causing login problems
I just ran into a strange problem this morning. I was able to fix it pretty easily (lucky guess) and just wanted to share in case anyone else runs into the same problem. I was unable to login to X, or into a console. KDM would simply restart whenever I tried logging in, and a login console would just reset and ask for my login again. Here's why it broke, and how I fixed it:
With Mandrake 9.0 and the latest Nvidia driver, I discovered some permission problems with /dev/nvidia and /dev/nvidiactl. Specifically, only one user was allowed write permissions to those devices, meaning that the other users could not use direct rendering (dri). Wine wanted to use dri; only one user could play games on Wine. Other users got a nice error:
Error: Could not open /dev/nvidiactl because the permissions
are too restrictive. Please see the FREQUENTLY ASKED QUESTIONS
section of /usr/share/doc/NVIDIA_GLX-1.0/README for steps
to correct.
And according to NVIDIA's README file, this is because PAM (a security/authentication system) is messing with the permissions. Editing the file /etc/security/console.perms to remove the line beginning with "<dri>" will, according to them, fix the problem. Indeed it did, but as the README implies, it is also necessary to remove all other references to <dri> in that file. Nvidia has not confirmed this, but I have! When a user tries to login later on, there's that unknown reference to <dri>, with no line beginning "<dri>" to tell it what it is and what permissions it has. Apparently, since this is a security application, it just kicks you out of login to prevent possible problems.
Fortunately, I had another console already open with root, so I was able to edit the file and fix it. The short version: Edit /etc/security/console.perms and remove (or comment out) all lines with <dri> in them. If you do not use PAM, this may not help you, but if your situation sounds similar to mine above, it may be just what you're looking for. I hope this helps someone else!
|