linux newbie question

(Phrangkk) #1

I’ve been trying to get mandrake 9 setup at home and I screwed up my X86Config file when I was installing the nvidia drivers.
Now I can’t run X, the graphical interface thingy.
how can I edit the config file from the command line, so I don’t have to do a complete re-install.
not that the install is difficult, I’d just rather not do it a fourth time.

(Eric) #2

Use one of the texteditors to edit the file.

mcedit is nice. type “mcedit /etc/X11/XF86Config”
if that doesn’t work try “pico /etc/X11/XF86Config”
if you have none of these editors try “vi /etc/X11/XF86Config” …thought I cannot recomend VI to a newbie :slight_smile:

Can you please post the error you get when you start X?

(Phrangkk) #3

Thanks, I’ll give those a try!

I can’t tell you what error I’m getting…
All is know is that when the gui is trying to come up the screen flickers a few times and spits me out to a command pompt.

I’m assuming it is b/c I rebooted without finishing editing the config file.

I’ll let you know if I have more trouble!

(acasto) #4

That is usually the result of not editing the file. If you don’t change the driver from “nv” to “nvidia” it will try to start but fail.

(basse) #5

one simple editor too, is “pico”…

like acasto said, change the “nv” to “nvidia”,

but also in the “modules” section, make sure that:
“dri” and “GLcore” and NOT loaded (comment out or remove line) and
“glx” is loaded (just add this if not there already).

if still no success, you can start X with this:

“xinit &>error.log”

and then check the error.log file to see what errors are there… post them here and we’ll see what happens…


(Phrangkk) #6

I was able to get into the file with VI and then I entered
startx and it tried again and again gave me the command line.
I noticed that, according to the error messages, it was trying to use
so I tried editing that file but got the same results.

I was trying to build my XF86Config file by copying and pasting from the sample file in the /docs/nvidia directory.

Could I just replace my file with that one and would that work?

and what is the syntax for copying a file to another location
it’s “cp”?

If it makes a difference, I used the RPMs to install the drivers.

thanks for all the help!

(mrunion) #7

You may want to compile from the source. I have Mandrake 9.0 and I had to use the source to compile and install the drivers.

Also just copying their Config over won’t work if you don’t have exactly the same inputs, etc.

(basse) #8

or, if you want to keep the rpm-database (for uninstalling and stuff), you can download SRPMS (source rpm) packages… and build from there…

rpmbuild --rebuild nameofrpm
rpm -Uvh nameoftherpmfilejustbuilt

when you rebuild source rpm into binary, remember to check from the couple of last lines of output WHERE it actually saves the rpm… it can be somewhere like /usr/linux/…

still… the error log file would help a lot here…


(Phrangkk) #9

I tried install from the tar.gz files and
ended up with the same result.

It looks like I’ll have to break down and RTFM.

I really had hoped it wouldn’t come to this.

It may be that the driver’s were compiled for a different kernel?
Or am I compiling them when I install them.

Apparently the NVdriver module is not being loaded.
This seems to be the core problem.
Any hints?

(basse) #10

noooooooooooooooooooo… not the RTFM!!!

are you sure you have tried everything else?

you download the SRPM packages from the site. then rebuild them, and after it’s done, install those packages. that way, you get correct driver for your kernel.


(overextrude) #11

Some ideas…

The XF86Config-4 file is a newer format, hence the “-4”. I used to have an app on my system called XF86Cfg (it’s a strange gui-based configuration tool) but I think it somehow get removed during a massive update. Anyhow, it’s this file that will be used to initialize XWindows. If you use XF86Config (the configuration tool), it will produce a configuration file, but it won’t have the “-4” extension on it. What I’d suggest doing is saving the default XF86Config-4 file to a different file name, and then creating a symbolic link called XF86Config-4 that points to the configuration you just created with XF86Config.

(Phrangkk) #12

so I use the XF86Config tool after I load my drivers from srpm


I’ll try it

Another big problem I have is that after I do a failed install and lose my
abilty to get into X and my KDE, the only way I know to try again and get setup is to reinstall the whole thing.
I found the auto install floppy thing and that should help but it is still a pain.
I’m sure there is a better and quicker way.
any suggestions?

thanks for all this help!

(Phrangkk) #13

OK I got it!
the trick was making sure the Kernel headers were installed and then building from the source rpms!

Whoo Hooo!

Now I’ll try and install blender!
wish me luck!