# xfree86 to xorg-x11 for nvidia users in a few simple steps

## Nutterpc

After hearing all about this xorg-x11, and how good it was, I thought I might try it for myself

Little did I know the troubles I had ahead of me, and what I would face, but I didn't give up, that wouldn't be right of me   :Wink: 

Anyway, after reading multiple posts on the forums, I tried what others had mentioned with no luck, so went in search of another answer. And this is how I migrated to xorg-x11......laid out just in steps, so users can simply go stepo by step thru, then xinit..........so here goes:

Step 1) Drop back to command prompt by exiting your window manager, and hit emerge -C xfree, this will unmerge xfree86.....be patient, this will take a bit

Step 2) After this is completed, unmerge nvidia-glx & nvidia-kernel

Step 3)  As per when you do a clean install, remember when you have to do a search for kernel modules? Namely nvidia.o......I encountered this problem where it was telling me I had the wrong version, so by running: find /lib/modules/<kernel version>/ -type f -iname '*.o' , it will find your nvidia.o module. Simply delete that file

Step 4) emerge xorg-x11....then find something else to do for a little while, watch a movie or something, once that completes, re-emerge your nvidia-glx & nvidia-kernel drivers, then emerge any extra fonts you want/need

Step 5) Run xorgconfig, and set yourself up a new xorg.conf file, then edit it with your favoured editor. Save & exit. Then run opengl-update xorg-x11 (My bad for not pointing this out when I wrote this, ta to Gandalf The White for reminding me). The next step needed is this tip by ozbird: I'd also suggest emerging the corefonts package, as these are not bundled with xorg-11 as they are in xfree.

Finally, adjust the font path order to match XF86Config; the order created by xorgconfig results in a wider font being used for things like Mozilla's menus (ugly.) I'm using the following:

Code:

        FontPath     "/usr/share/fonts/75dpi"

        FontPath     "/usr/share/fonts/100dpi"

        FontPath     "/usr/share/fonts/misc"

        FontPath     "/usr/share/fonts/Type1"

        FontPath     "/usr/share/fonts/Speedo"

        FontPath     "/usr/share/fonts/TTF"

        FontPath     "/usr/share/fonts/util"

        FontPath     "/usr/share/fonts/corefonts"

In Mozilla, the generic "serif" and "san-serif" fonts (from KDE?) still appeared wider than with XFree86 - I suspect there's another font path that needs adjusting. Selecting specific fonts (e.g. Arial) fixed that.

Please note that xorg-x11 is still currently listed as unstable, so the more people that give it a shot, the faster it can be put in the stable tree and xfree finally put out to pasture.

If anyone has any tips they would like me to add to this post, to expand on what I have, and others who have contributed to this thread, then please pm me with what you would like me to add/edit, and as soon as I get the next available moment, I will make the necessary changes.

Nutterpc

----------

## Gandalf the White

Great howto, I myself had problems getting this going and if this had existed then I would have been very happy. Just thought you should add, some people(myself included) have run into problems with the nvidia drivers, just thought you should add, before starting up xorg-x11, run 

```
opengl-update xorg-x11
```

 . The interesting thing that I've noticed, is that different people run in to very different problems. I never had any problems compiling the nvidia modules, I didn't even unmerge them!

----------

## Nutterpc

Ta for pointing that out Gandalf The White

As you can see, I have edited the post to reflect the slight error/omission of mine  :Rolling Eyes:  ....silly, but when u ain't slept for 2 days and having to battle falling asleep at the keyboard, yeah, sometimes things slip your mind   :Laughing: 

Glad that this info might have helped you if you ever did need it   :Wink: 

I'm going to be working on some other things during the next few days too, might see what other stuff I can rustle up

Nutterpc

----------

## John5788

hm. i dont ever remember doing all that. all i did was emerge -C xfree, and emerge xorg-x11, etc-update, xorgconfig and everything worked still.

----------

## Nutterpc

That's the thing john, some users have problems, some don't..........I'd be happy if I was one of the ones who didn't need to go through all this   :Wink: 

At least if it helps one, it helps more

Nutterpc

----------

## Shiryou

Yeah, i do have a little problem along these lines. I cant seem to get Xorg to run with the nvidia drivers. IT complains that it cant find the nvidia module, even though lsmod reprts that its actually loaded. I can only use the NV do far, which gives bad glxgears performance. I wonder what im missing?

----------

## Nutterpc

Shiryou, what you need to do if you have loaded the drivers correctly, is to set the nvidia modules to load upon startup

/etc/modules.autoload.d/kernel-2.6 if I'm not mistaken, add nvidia on that, save & reboot....probs should disappear  :Smile: 

See how u go

Nutterpc

----------

## moocha

Another thing to note is that one should make sure NOT to have the "pie" USE flag enabled for X.org (probably also for XFree86, but that's academic right now  :Smile:  ). Safest way is to do a 

```
mkdir -p /etc/portage

echo "x11-base/xorg-x11 -pie" >> /etc/portage/package.use
```

If the "pie" USE flag is enabled you'll get a lot of "Undefined symbol" errors when trying to start the X server. This probably holds true regardless of video card or video driver.

----------

## Nutterpc

Ta for that tip there moocha

The more people we can help move to xorg-x11 the better I say.........  :Wink: 

Nutterpc

----------

## Shiryou

Hiya, cheers for the feedback. Turns out it was all to do with using older 2.4 modules (nvidia.o) instead of 2.6 kernel ones. Odd really. I'd always used 4496 (i think thats the number) as the newer ones were quite screwed according to a lot of people. So... it seems Xorg is now running fairly nicely. Need to have a good play and see how it fairs. Maybe we'll get alpha blending?  :Laughing: 

----------

## Gandalf the White

@Shiryou:

        Yeah, all the newer versions of the nvidia drivers don't mix with framebuffer....i.e., if you kill xorg, your console will be messed up. Some people have had these problems with 4496, others haven't, I have, I use 4363, works perfectly, and I get better perfomance than the other versions.

----------

## ozbird

 *Gandalf the White wrote:*   

> ...  before starting up xorg-x11, run 
> 
> ```
> opengl-update xorg-x11
> ```
> ...

 

Are you sure you want to do that?  I assume that the xorg-x11 drivers are not hardware-accelerated like the nvidia-glx ones, so performance will suffer.

My suggestion is not to unmerge the nvidia-{kernel,glx} packages at all - just run "emerge nvidia-kernel nvidia-glx" once you've installed xorg-x11, then run "opengl-update nvidia".  Works for me...

I'd also suggest emerging the corefonts package, as these are not bundled with xorg-11 as they are in xfree. 

Finally, adjust the font path order to match XF86Config; the order created by xorgconfig results in a wider font being used for things like Mozilla's menus (ugly.)  I'm using the following:

```
        FontPath     "/usr/share/fonts/75dpi"

        FontPath     "/usr/share/fonts/100dpi"

        FontPath     "/usr/share/fonts/misc"

        FontPath     "/usr/share/fonts/Type1"

        FontPath     "/usr/share/fonts/Speedo"

        FontPath     "/usr/share/fonts/TTF"

        FontPath     "/usr/share/fonts/util"

        FontPath     "/usr/share/fonts/corefonts"

```

In Mozilla, the generic "serif" and "san-serif" fonts (from KDE?) still appeared wider than with XFree86 - I suspect there's another font path that needs adjusting.  Selecting specific fonts (e.g. Arial) fixed that.

----------

## Gandalf the White

@ozbird:

As I said in my post, each person has different results. For instance, in my install, I never had to change the font paths or reemerge corefonts, the fonts look just great. This is maybe something that nutterpc may wish to add to his howto however, because I too have seen that mentioned elsewhere. As for the nvidia, I use the nvidia installer to install my older drivers, since there is no ebuild as they are hacked drivers from minion.de, and the installer runs the opengl-update switch. Let me put it this way though, The first time I installed xorg-x11, I started the xserver without running the opengl-update, and I could never get the nvidia drivers to work, no matter what I did. I am not saying this will be the same with everyone, but that is my experience, thanks for the tip though!

----------

## Guru

 *Shiryou wrote:*   

> Yeah, i do have a little problem along these lines. I cant seem to get Xorg to run with the nvidia drivers. IT complains that it cant find the nvidia module, even though lsmod reprts that its actually loaded. I can only use the NV do far, which gives bad glxgears performance. I wonder what im missing?

 

I have the same problem as described in this thread:

https://forums.gentoo.org/viewtopic.php?t=142490

Basically, my nvidia drivers get loaded correctly at boot (as shown via lsmod); however, when X.org tries to start, it complains it cannot load the nvidia drivers.  

I am working with a CLEAN gentoo install using kernel 2.6.5 (gentoo-dev-sources).  Anyone else having this problem?

----------

## Gandalf the White

Didn't get that problem myself, but two questions for you:

1) When you startx with driver set to nvidia, do you get the nvidia splashscreen?

2)Under lsmod, do you see nvidia.o or nvidia.ko? if you see .o then the module is compiled against 2.4 series kernels

For a start I would recommend re-emerging nvidia-kernel. What error do you get specifically?

----------

## Nutterpc

It seems different people seem to have different problems

Not everyones pc is made the same, I & everyone else on this forums knows that. But some of us might have similar problems, which is why this thread was made.

running the command after getting xorg-x11 installed: opengl-update xorg-x11, is ONLY used to be able to get x up and running, the immeditaly drivers are installed, configuration files edited, then whatever other changes are needed, and the system rebooted.

This wasn't meant to make people think that you HAD to run with xorg-x11 acceleration all the time, it is only used in order to get X up & displayed, thereby giving you the capability to install your drivers and to get the rest of the system up & running.

----------

## Ard Righ

I'm just curious, everyone having issues with the nvidia drivers, have you read up on the conflicts between udev and nvidia drivers ?

This thread mentions the following:

 *Quote:*   

> if you use an nvidia, and you dont opengl-update nvidia, then x will not start. this goes for xfree or xorg. the nvidia-glx ebuild does this for you, but after installing xorg it probably did an opengl-update xorg-x11

 

 Also, from this thread there are notes about making sure nvidia devices are created correctly at boot (making sure the autoload of nvidia works correctly)

 And finally DSD's Guide on writing udev rules mentions a section on nvidia drivers.

----------

## Gandalf the White

@Ard Righ:

Just thought I should point out that probably at least 99% of all Gentooites are not using udev, and are still using devfs(which is the default). Running opengl-update nvidia is not at all necessary to start xorg, it may be what works on some people's computers but it most certainly is not what worked on mine. I did not use portage to install my nvidia drivers, I never did opengl-update nvidia, and I get wonderful 3d performance from my system.

----------

## HydroSan

You wanna know what I did to get it working perfect? It was MUCH simpler than what you posted.

```
emerge unmerge xfree

ACCEPT_KEYWORDS="~x86" emerge (--pretend, to make sure) xorg-x11

(ran the /usr/X11R6/bin/xf86config - works for XOrg.)

nano -w /etc/X11/xorg.conf

....

(uncommented:)

#Load "glx"

Driver "nvidia"
```

Just that simple. ... I think.

----------

## moocha

 *Ard Righ wrote:*   

> I'm just curious, everyone having issues with the nvidia drivers, have you read up on the conflicts between udev and nvidia drivers ?
> 
> This thread mentions the following:
> 
>  *Quote:*   if you use an nvidia, and you dont opengl-update nvidia, then x will not start. this goes for xfree or xorg. the nvidia-glx ebuild does this for you, but after installing xorg it probably did an opengl-update xorg-x11 
> ...

 

Using udev (no devfs in kernel) and xorg-x11 on the box I'm typing this in. Installed everything from stage1. Had to do nothing different from the XFree86 days (well, except for emerging X.Org twice due to not knowing about the trouble with the "pie" USE flag).

udev and nvidia.ko work like a charm.

----------

## Guru

Well,

I got nvidia working in Kernel 2.6.5 (gentoo-dev-sources).  I am using udev with devfs (followed the udev howto).

I am not sure what I did, but I did have to re-install nvidia-glx and nvidia-kernel several times before I finally got things working.  

I do know that after I got X.org working with nvidia, I did an opengl-update nvidia, and things still worked nicely after that.

----------

## slick0

For nvidia-glx to work, do I need to install xfree first?  I'm trying now to install nvidia-glx (after installing x.org and nvidia-kernel without a problem) and emerge -p is telling me x.org is a block for xfree, which is supposedly a required dependency for nvidia-glx.  Xfree was never installed on the box, as it's a new install.  I'd rather not have to install xfree at all, especially after already having x.org build.

-Jared

----------

## moocha

Once you install X.Org it won't require XFree86 anymore. The reason it shows xfree as required is that the default provider of the virtual/x11 dependency is still x11-base/xfree, not x11-base/xorg-x11. nvidia-glx requires the virtual package, virtual/x11, which is provided by xorg-x11. So just install X.Org and you'll be fine. Make sure you don't have the Xaw3d USE flag set, as it causes xfree to be merged in blocking xorg.

----------

## Gandalf the White

@slick0:

What ever you do, do not allow anything to install xfree!!!! As far as I know, it is not possible to have both installed at the same time. A good idea would be to inject xfree, so that any ebuilds that have xfree explicitlt as a dependency(i.e., not the virtual package), will think that it is installed. Do this via 

```
emerge --inject x11-base/xfree-4.3.0-r5
```

. Some people will tell you this is a bad idea, I have done this on my system and it has caused zero problems for me, and I did this at least a week ago(I think).Last edited by Gandalf the White on Wed Apr 28, 2004 11:31 am; edited 1 time in total

----------

## slick0

That worked.  Thanks, Gandalf the White.  However I had to do inject x11-base/xfree-4.3.0-r5 as sys-x11 doesn't exist, just an fyi.

-Jared

----------

## Gandalf the White

Yeah thanks, I made the post on campus and couldn't remember exactly what it was. Glad to see it worked and you were able to figure out what I was saying!   :Laughing: 

----------

## LeTene

You can avoid having to do the nasty inject of XFree86 by using:

```

emerge --nodeps nvidia-glx

```

One caveat - I'm not too sure how this will affect emerge -u world or emerge -U world of your system, but on mine it seems OK.

----------

## Gandalf the White

@LeTene

That's another way of doing it for specific ebuilds, but(on my system at least), emerge -U world would still want to emerge xfree, by injecting it it no longer wants to do this, and I can emerge away no problems.

----------

## Ard Righ

Is it still the case that XFree needs to be injected to stop it from being installed ?

I thought with the latest package of Xorg, that XFree was blocked (the B that shows up), so that it won't install while Xorg is installed ?

I have xorg and gnome 2.6 installed on my PC. When I do a emerge -p kde, it doesn't list trying to install XFree ?

----------

## RioFL

oook I'm confused. What's the big bru-ha about xorg vs xfree? Is xorg supposed to be an order of magnitude better or some such?  My system must be rock stable as I use it for work 99% of my day. The only thing I took a chance on was the 2.6.5 kernel which is working perfectly for me, presently using devfs, but in the next incarnation of this machine I intend to kill that and use udev.  Will xorg be any better for me?  I need extremely fast vid response, and sadly at the moment I still have some dropped frames in movies, and  rendering is a bit slow which I attribute to the processors.

My machine is:

dual p3-933 procs on a tyan tiger 230T motherboard (Apollo Pro133T chipset), using a geforce4 Ti 4200 128mb and nvidia 4496 kernel and matching glx  in twinview mode.

any ideas here?

Chuck

----------

## moocha

 *RioFL wrote:*   

> oook I'm confused. What's the big bru-ha about xorg vs xfree?

 

It's a licensing issue. Search the damn forum, that's why there's that search box smack on every page.

 *RioFL wrote:*   

> Is xorg supposed to be an order of magnitude better or some such?

 

No better and no worse than XFree86 4.3.99-someversion since it's a very recent fork of the XFree86 codebase - a fork of the last version under the old license.

 *RioFL wrote:*   

> My system must be rock stable as I use it for work 99% of my day.

 

Then you've just answered your own dilemma - if it must be stable, leave it alone. Duh.

----------

## Negeus

All of the following takes place on a fresh installation (I was checking out kde before I emerged the nvidia packages and thats how I noticed the change)...

After emerging nvidia-kernel and nvidia-glx (had to inject xfree), I modified my /etc/X11/xorg.conf by uncommenting glx and changing nv to nvidia in the driver section for my gfx card.  When I restarted X and logged back into kde I found that all my fonts were now big and ugly (I will post a screenshot if nessecary).  

I had not changed one thing apart from what was mentioned above.  It may be worth noting that the first time I tried restarting X it failed to start but everything was ok after a reboot.

If you would like me to post my entire xorg.conf or just certain sections then please say so.

----------

## RioFL

 *Negeus wrote:*   

> All of the following takes place on a fresh installation (I was checking out kde before I emerged the nvidia packages and thats how I noticed the change)...
> 
> After emerging nvidia-kernel and nvidia-glx (had to inject xfree), I modified my /etc/X11/xorg.conf by uncommenting glx and changing nv to nvidia in the driver section for my gfx card.  When I restarted X and logged back into kde I found that all my fonts were now big and ugly (I will post a screenshot if nessecary).  
> 
> I had not changed one thing apart from what was mentioned above.  It may be worth noting that the first time I tried restarting X it failed to start but everything was ok after a reboot.
> ...

 

It may be something else, but I had that same problem with xfree when I first installed it. Turned out my monitor was lying to the card (the interpretation of this was different with the latest xfree compared to the older version). This statement in the XF86Config device section for the vid card cured it, but it may or may not be so with your problem (could be different default fonts?) with xorg. It can't hurt to try it though.

```

     Option      "NoDDC"    "1"

```

----------

## Negeus

 *Quote:*   

> It may be something else, but I had that same problem with xfree when I first installed it. Turned out my monitor was lying to the card (the interpretation of this was different with the latest xfree compared to the older version). This statement in the XF86Config device section for the vid card cured it, but it may or may not be so with your problem (could be different default fonts?) with xorg. It can't hurt to try it though. 

 

Well I cannot thank you enough, this fixed the problem!! Do you have a link that explains why this solution works, can you explain it yourself or will a simple forum search suffice?

What does the NoDDC option do?

----------

## RioFL

 *Negeus wrote:*   

>  *Quote:*   It may be something else, but I had that same problem with xfree when I first installed it. Turned out my monitor was lying to the card (the interpretation of this was different with the latest xfree compared to the older version). This statement in the XF86Config device section for the vid card cured it, but it may or may not be so with your problem (could be different default fonts?) with xorg. It can't hurt to try it though.  
> 
> Well I cannot thank you enough, this fixed the problem!! Do you have a link that explains why this solution works, can you explain it yourself or will a simple forum search suffice?
> 
> What does the NoDDC option do?

 

i found the info either on the nvidia site, or in the docs from a downloaded copy directly from nvidia one time.. it encompasses 2 other older options which i dont remember, but basically what it says to the nvidia kernel is "my monitor lies about itself. do not believe it. accept only what i tell you via my xf86config file and ignore the monitor's insane ravings"

that's basically it. one of my monitors swears it can only do 1024x768 but the monitor specs and my own experiments show it to handle 1600x1200 with ease. i dont know why, but it appears that the font changes from the default when the monitor is believed.

i am sure a proper technical explanation can be found on the nvidia site. i forgot most of that since this happened a while ago. i have been using that option for more than a year.

chuck

----------

## Negeus

Thanks for that, the Nvidia readme confirms you have a good memory  :Laughing: 

Just in case anyone else is interested here are the relavent sections from the Nvidia drivers readme...

 *Quote:*   

> 
> 
> Option "NoDDC" "boolean"
> 
>              Synonym for "IgnoreEDID"
> ...

 

 *Quote:*   

> 
> 
> HOW MODES ARE VALIDATED
> 
> During the PreInit phase of the X server, the NVIDIA X driver validates
> ...

 

----------

## Duck-Billed Platypus

 *Shiryou wrote:*   

> Yeah, i do have a little problem along these lines. I cant seem to get Xorg to run with the nvidia drivers. IT complains that it cant find the nvidia module, even though lsmod reprts that its actually loaded. I can only use the NV do far, which gives bad glxgears performance. I wonder what im missing?

 

When that happened to me, I had to manually build/install the modules for my kernel using the instructions in the nvidia-glx README...

----------

## riprjak

 *Guru wrote:*   

>  *Shiryou wrote:*   Yeah, i do have a little problem along these lines. I cant seem to get Xorg to run with the nvidia drivers. IT complains that it cant find the nvidia module, even though lsmod reprts that its actually loaded. I can only use the NV do far, which gives bad glxgears performance. I wonder what im missing? 
> 
> I have the same problem as described in this thread:
> 
> https://forums.gentoo.org/viewtopic.php?t=142490
> ...

 

EXACTLY the same problem.  ACCEPT_KEYWORDS="~amd64" or "amd64" nvidia-glx/kernel drivers, 2.6.5-r1 gentoo-dev-sources

Dmesg shows no errors on the load of the nvidia module (taints kernel, of course... but no errors)... tried every nvagp option in xorg.conf...  

A solution would be appreciated  :Smile: 

----------

## riprjak

 *riprjak wrote:*   

> A solution would be appreciated 

 

Ask and I shall recieve  :Wink:  this  thread details solution.

err!

jak

----------

## Nutterpc

What this sounds like to me is you need to is try the following:

Make sure your nvidia driver is set to load in /etc/modules.autoload.d/kernel-2.6

If they are, proceed to next step

As per my original post, when you originally setup gentoo, there was a part where you had to look for all modules (one of them's the nvidia driver). Once you find that it is there, try deleting this file.

try then re-emerging the nvidia-drivers, then reboot.......cross your fingers too, that might help  :Wink: 

Nutterpc

----------

## carney1979

Still didn't work for me  :Crying or Very sad: 

Negeus' solution is worth a try, but it will have to wait until the AM. Caffiene has run out and I'm done.

Funny thing was I HAD glx working perfectly under xfree until someone suggested I try reemerging xfree with a couple of different use flags. That's when I got into trouble. I removed the new use flags and tried again to remerge xfree. Now glx was "broken".

I'll bet that sometime between my last update of xfree and when I tried to reemerge xfree I must have changed or added or deleted a use flag(s) that it all needs to work. And now the problem has carried over when I installed xorg.

Nutterpc, care to share your use flags used to emerge xorg?

David   :Shocked: 

----------

## moocha

Well, what are the USE flags you emerged X.Org with? cat /var/db/pkg/x11-base/xorg-x11-6.7.0/USE

----------

## sdaffis

Now I too have switched to X.org with no hassle at all!

All I did was:

```
emerge -C xfree

ACCEPT_KEYWORDS="~x86" emerge xorg

ACCEPT_KEYWORDS="~x86" emerge nvidia-kernel nvidia-glx corefonts

```

And basically I was set! I just backed up my old XF86Config-4 before and copied + edited it for fonts. Rocks like ninja!  :Smile: 

(You've just gotta LOVE the faster startup time!!!)   :Wink: 

----------

## |cJ|

 *LeTene wrote:*   

> You can avoid having to do the nasty inject of XFree86 by using:
> 
> ```
> 
> emerge --nodeps nvidia-glx
> ...

 

I was having problems until i read this thanx alot!

----------

## pcrissman

I'm working on a fresh install, and decided to go with xorg right from go.

It just finished compiling, and etc-update has informed me that I have 257 files that need updating.

257 files!

Keep in mind, this is a fresh install.  The only things I've done past the end of the install guide is install the bootsplash/framebuffer.

Is this many files to update normal?  I was just curious.  I almost fell off my chair.

----------

