View Single Post
Old 05-10-04, 02:26 AM   #5
hppnq
Registered User
 
Join Date: Apr 2004
Location: Dutch
Posts: 113
Default Re: editing XF86Config. in suse linux for nvidia driver

Not to worry, it's not that hard.

You should try to configure X with yast or yast2 first. I don't know what it looks like nowadays, but after typing 'yast' on a prompt, you should get some menu through which you can navigate with your cursor keys. Probably one of the options is to configure your display. If 'yast' doesn't work, try 'yast2'.

Otherwise, you can try to use the sax2 command, like this:

# sax2 -m 0=nvidia

This will destroy your existing configuration and create a new one, so copy your XF86Config if you want to keep it as a backup.

If that still didn't work, you will have to edit your XF86Config by hand. To do this, you have several editors at your disposal. The easiest one that I know is 'pico', which behaves exactly like you would expect. However, it might not be installed. (You can check this easily of course by typing 'pico' at the prompt.) So I'm going to give you a crash course in vi.

If you got here, make a backup of your XF86Config in any case. If something goes wrong, you can always restore and try again.

Do the following (as root):

# cd /etc/X11
# cp XF86Config XF86Config.orig
# vi XF86Config

You will now see the first page of the file. If you get an error about vi being missing, install it from the SUSE cds, it should be there.

In vi, you can navigate with the cursor keys. Scroll down until you see a line that says

Driver "nv"

Maybe instead of "nv" it says something else, like "vga". Whatever it says,
move your cursor to the first letter of the driver name -- in this case, the 'n' of "nv". Type exactly this: cw (the two letters c and w) and you should see the driver name disappear, and a line should appear at the bottom of the screen that says "Insert".

Now, type: nvidia, so that the line now reads

Driver "nvidia"

Press escape, so the line "Insert" at the bottom of the screen disappears. We have now told X to use the nvidia driver. Next, we have to remove some things from the configuration file.

Scrolling around (start with going up, it's probably there), try to locate the lines that start with "Load". If they are present, remove the two lines that go

Load "dri"
Load "GLcore"

You do this by moving the cursor to the first of these two lines and then typing "dd". The line should disappear. Move the cursor to the other one, if necessary, and remove that one by again typing "dd".

Now, check whether there is a line that says

Load "glx"

If it's not there, you have to add it. Move to one of the lines that start with "Load" and press 'o'. You should see a new empty line appear, with the cursor at the beginning. Type the line above (Load "glx") and press Escape when you're done.

You have now finished editing, so it's time to save and quit. Type ':' (single colon). You should see the cursor move to the bottom of the screen, and there should be a colon there. Now, type "wq" (the letters w and q) and Enter.

The file should now have been saved, so you're done.

If anything goes wrong while you're doing this, you can quit by typing the colon ":" and then "q!" (the letter q and an exclamation mark). You will then exit without saving.

vi comes with a tutorial and plenty of help to get you going. If you just type 'vi' you have easy access to both. Also, try the web for more information about configuring nvidia on SUSE -- there is a lot of information out there with the exact information you need.

Good luck!
hppnq is offline   Reply With Quote