problem with GDM. starts only when started as root

Asked by javaboy

A few days back, I downloaded the NVIDIA display driver version 100.14.19 released recently and tried to install. It said kernel headers were required, so i downloaded them and installed and the driver installed properly.

I don't know what went wrong, but when I restarted, the graphical display was not coming up. Only the terminal was appearing.

I tried typing '$ X' and graphics was appearing, but when I type '$ gdm' nothing was happening. GDM is working when started as root. i.e., when I type '$ sudo gdm' graphics work, and the 3d driver is working properly too..

Then in xorg.conf, i tried changing the driver from 'nvidia' to 'nv' and it works automatically, but not with 'nvidia'

GDM is not loading as a normal user. I tried reinstalling the NVIDIA driver, but its no use. please help.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Wrwrwr
Solved:
Last query:
Last reply:
Revision history for this message
Wrwrwr (wrwrwr) said :
#1

Maybe you've used sudo when installing? This could unnecessarily make some files owned by root, and that would explain the behaviour.

Probably you know, but the recommended way to install nvidia drivers is the restricted drivers manager.

Revision history for this message
javaboy (javaboy-ms) said :
#2

Thanks for the suggestion, but it won't install if I don't use sudo. The driver provided by Restriced Devices Manager was not this good and that is why I installed this.

Now I tried switching back to the Ubuntu restricted drivers in Synaptic Package Manager by reinstalling them, but they are not working too :((. Could someone help me in uninstalling this driver? I don't have the slightest Idea where the files are located.

Revision history for this message
Wrwrwr (wrwrwr) said :
#3

It may be very hard to roll back your system to the state before installing these drivers.

First thing to check would be if there are some files owned by root in your home directory:
ls -la ~

This following command may help trace the files modified by the installer:
strace -e trace=file NVIDIA-Linux-x86-100.14.19-pkg1.run

It would be better to use package from gutsy repository:
http://packages.ubuntu.com/gutsy/misc/nvidia-glx-new
(I mean adding for a while adding gutsy main repository to sources and selectively updating drivers and dependencies; this is not really fail safe or recommended, but probably better then using this installer.)

Also, if you still want to use the installer, there are some prerequisites to this:
http://www.nvnews.net/vbulletin/showthread.php?t=72490

Revision history for this message
javaboy (javaboy-ms) said :
#4

Hey Wrwrwr,
the command 'strace' does not exist on my computer :((

do u think it would start working if I upgrade after the final version gutsy is released? that is the same as installing the graphic drivers of gutsy now right?

Revision history for this message
Best Wrwrwr (wrwrwr) said :
#5

Copy the following & paste it in terminal to install strace:

sudo apt-get install strace

Upgrading later would be the recommended thing to do, gutsy is at the moment in development and testing, so some things including new nvidia drivers may not work. By upgrading you would also get some new features concerning graphics -- like new autodetection and the Bullet Proof X. ;)

There is still a small chance that the manually installed drivers would interfere with the new gutsy drivers, but i guess it's not anything to really worry about.

It is possible to install the drivers from the ati site, however this is rather not worth all the work. Note that you need to have a proper versions of x-server and other packages too.

Revision history for this message
javaboy (javaboy-ms) said :
#6

Hey
Im trying with strace now. But I guess all the backup files were overwritten as I tried installing the drivers multiple times. So, I'l wait for the final version of gutsy to come out.. thats 12 days from now. after installing that, I'l tel u how it goes. thanks a lot for all the help :)

Revision history for this message
javaboy (javaboy-ms) said :
#7

Thanks Wrwrwr, that solved my question.

Revision history for this message
javaboy (javaboy-ms) said :
#8

This is what I get when I do an strace on the nvidia installer file..

$ strace -e trace=file ./NVIDIA-Linux-x86-100.14.19-pkg1.run
execve("./NVIDIA-Linux-x86-100.14.19-pkg1.run", ["./NVIDIA-Linux-x86-100.14.19-pkg"...], [/* 31 vars */]) = -1 EACCES (Permission denied)
strace: exec: Permission denied
Process 32163 detached

$ sudo strace -e trace=file ./NVIDIA-Linux-x86-100.14.19-pkg1.run
execve("./NVIDIA-Linux-x86-100.14.19-pkg1.run", ["./NVIDIA-Linux-x86-100.14.19-pkg"...], [/* 35 vars */]) = -1 EACCES (Permission denied)
strace: exec: Permission denied
Process 32167 detached

:( so that isnt working too most probably i ran the installer multiple times. Anyways I'l wait for gutsy :)

Revision history for this message
Wrwrwr (wrwrwr) said :
#9

You can have a root terminal, for example: sudo su (anyway that will probably give more files than we're willing to check ;).

It's a good choice to wait for a couple of days, i'm not sure if the new driver would work on feisty at all.

Some simpler ideas are to check if you don't have any root owned files or directories in your home folder (.gconf or something like that), or check the logs (dmesg and Xorg.0.log) with this non working driver.