How to make xorg prefer "nvidia" over "nv" driver in a xorg.conf less configuration?
aplattner at nvidia.com
Thu May 14 00:27:29 PDT 2009
On Wed, May 13, 2009 at 11:58:44PM -0700, Francesco Pretto wrote:
> Stefan Dirsch <sndirsch <at> suse.de> writes:
> > See discussion on
> > http://lists.freedesktop.org/archives/xorg/2008-July/037098.html
> > and the following commmits in git master of xserver:
> > commit 0dbfe0ebc69c307c0626ba824de15d03de1251d4
> I'm sorry, but this not a very useful answer. You are basically saying "the
> driver loading priority of Xorg is hardcoded and if you want to change it,
> recompile Xserver". I've already read that discussions in the past: I DON'T want
> Xorg to default ship with "nvidia" set at higher priority and I perfectly agree
> with reverting that commit. I just want to learn how to configure my system to
> accomplish what I've asked. There are 2 considerations:
> 1) You've pointed me the driver loading priority is hardcoded in Xorg so can't
> be changed by normal users. Maybe HAL fdi policies files can be used to
> accomodate my task?
> 2) If there's no configurable option to solve this, this would de definitively a
> lacking feature: Xorg can't prefer one driver instead of another in a xorg.conf
> less configuration. As I've explained, this would be very useful in my setup
> where basically I continue to swap video card depending the fact I'm running
> native or virtualized.
You can sort of do this, but you do need an xorg.conf. For example,
Identifier "default layout"
Screen 0 "nvidia"
Screen 1 "vesa"
Whichever screen corresponds to the hardware that's not present should
fail to initialize.
With this setup, starting X with the nvidia driver set up does this:
(II) LoadModule: "nvidia"
(II) Loading /usr/lib/xorg/modules/drivers//nvidia_drv.so
(II) Module nvidia: vendor="NVIDIA Corporation"
compiled for 4.0.2, module version = 1.0.0
Module class: X.Org Video Driver
(II) LoadModule: "vesa"
(II) Loading /usr/lib/xorg/modules/drivers//vesa_drv.so
(II) Module vesa: vendor="X.Org Foundation"
compiled for 126.96.36.1992, module version = 1.3.0
Module class: X.Org Video Driver
ABI class: X.Org Video Driver, version 5.0
(II) NVIDIA(0): NVIDIA GPU GeForce 8600M GT (G84) at PCI:1:0:0 (GPU-0)
(II) Unloading /usr/lib/xorg/modules/drivers//vesa_drv.so
If I sabotage the nvidia driver, it does this instead:
(EE) NVIDIA: Failed to load the NVIDIA kernel module. Please check your
(EE) NVIDIA: system's kernel log for additional error messages.
(II) UnloadModule: "nvidia"
(II) Unloading /usr/lib/xorg/modules/drivers//nvidia_drv.so
(EE) Failed to load module "nvidia" (module-specific error, 0)
(II) VESA(0): initializing int10
(II) VESA(0): Primary V_BIOS segment is: 0xc000
(II) VESA(0): VESA BIOS detected
(II) VESA(0): VESA VBE Version 3.0
(II) VESA(0): VESA VBE Total Mem: 14336 kB
(II) VESA(0): VESA VBE OEM: NVIDIA
(II) VESA(0): VESA VBE OEM Software Rev: 96.132
(II) VESA(0): VESA VBE OEM Vendor: NVIDIA Corporation
(II) VESA(0): VESA VBE OEM Product: GeForce 8600M GT
(II) VESA(0): VESA VBE OEM Product Rev: Chip Rev
You ought to be able to do something similar with your VM device. This is
essentially what the server autoconfig would have done for you if that patch
hadn't been reverted, you just have to do it manually now.
Hope that helps!
More information about the xorg