This page was exported from phaq [ http://phaq.phunsites.net ]
Export date: Fri May 29 14:16:47 2020 / +0000 GMT
It seems impossible at first to run the NVIDIA binary driver on Linux x86_64 when Xen is enabled. That's because NVIDIA does not support Xen in the first place albeit there's some demand for it for sure. Luckily the only things to be changed are within the kernel interface contained in the driver package. There exist already a lot of patches on the net, I took mine from nvnews. You can grab a copy of the patch from my site, too. The following instructions are derived from my steps in getting NVIDIAS's binary driver to work on Fedora Core 6 running Xen on the x86_64 platform (Intel Core 2 Duo 6420 CPU). It was verified to work with driver version 1.0.9755 (march 29, 2007) and 1.0-9639 (may 29, 2007), both of which you can get from the NVidia website. First you need to have some prerequisites installed on your system:
  • toolchain (gcc, make, etc.)
  • applicable kernel headers (I had kernel 2.6.20-1.2948.fc6xen on my system, so I installed kernel-xen-devel-2.6.20-1.2948.fc6 and kernel-xen-2.6.20-1.2948.fc6 packages)
Then the appropriate driver packages needs to be downloaded and extracted to a temporary directory:
mkdir /tmp/nv_xen
cd /tmp/nv_xen
wget http://us.download.nvidia.com/XFree86/Linux-x86_64/1.0-9639/NVIDIA-Linux-x86_64-1.0-9639-pkg2.run
/bin/sh NVIDIA-Linux-x86_64-1.0-9639-pkg2.run -x
Creating directory NVIDIA-Linux-x86_64-1.0-9639-pkg2
Verifying archive integrity... OK
Uncompressing NVIDIA Accelerated Graphics Driver for Linux-x86_64 1.0-9639.
Also get a copy of the NVidia Patch for XEN:
wget http://phaq2.phunsites.net/wp-content/uploads/2007/06/nvidia_xenpatch.gz
Then change to the source directory, apply the patch and compile the driver. The kernel source is required. If installed properly it should be located at /usr/src/kernels. If more than one exists choose the right one according to your 'uname -r' output.
cd NVIDIA-Linux-x86_64-1.0-9639-pkg2/usr/src/nv
zcat ../../../../nvidia_xenpatch.gz | patch -p4
[output omitted]
make SYSSRC=/usr/src/kernels/2.6.20-1.2948.fc6xen-x86_64/ module
[output omitted]
NVIDIA: left KBUILD.
If the compile run succeeds you should see the message NVIDIA: left KBUILD by the end of the output. If anything weird happens, e.g. build process aborts, either the patch did not apply cleanly, the headers are not up to date or your sources are not configured. In the last case a simple 'make oldconfig' from the kernel source directory may be enough to get it fixed. There's also the chance that you try this patch on a non-supported kernel source version or NVIDIA driver package which may prevent successful compilations. Since I did not implement the patch by myself I cannot be of much help in either case. Upon successful compilation you can install and load the driver. Verify that the driver loaded by means of 'lsmod'.
install -D -o root -g root -m 0644 nvidia.ko /lib/modules/`uname -r`/video/nvidia.ko
depmod -a
modprobe nvidia
lsmod|grep nvidia
nvidia               7771096  22
At this point run the NVIDIA installer to get the remaining utilities. Use the 'no-kernel-module' option as you installed the kernel module already.
cd ../../../
/bin/sh nvidia-installer --no-kernel-module
This is it! You are now ready to configure your X server to use the NVIDIA driver. Stick to the docs included with the driver on how to achieve this. This is my Xorg sample configuration with twin-view enabled accross two displays at 1280x1024 resolution.
# sample Xorg configuration file for NVIDIA graphics driver

Section "ServerLayout"
	Identifier	"Default Layout"
	Screen		0  "Screen0" 0 0
	InputDevice	"Keyboard0" "CoreKeyboard"
EndSection

Section "Module"
	Load	"dbe"
	Load	"extmod"
	Load	"record"
	Load	"xtrap"
	Load	"freetype"
	Load	"type1"
	Load	"glx"
EndSection

Section "InputDevice"
	Identifier	"Keyboard0"
	Driver		"kbd"
	Option		"XkbModel" "pc105"
	Option		"XkbLayout" "ch"
	Option		"XkbVariant" "de_nodeadkeys"
EndSection

Section "Device"
	Identifier	"Videocard0"
	Driver		"nvidia"
	Option		"TwinView" "1"
	Option		"CursorShadow" "1"
	Option		"TwinViewOrientation" "RightOf"
	Option		"MetaModes" "1280x1024,1280x1024"
EndSection

Section "Screen"
	Identifier	"Screen0"
	Device		"Videocard0"
	DefaultDepth	24
	SubSection "Display"
		Depth	24
		Modes	"1280x1024"
	EndSubSection
EndSection
Powered by [ Universal Post Manager ] plugin. HTML saving format developed by gVectors Team www.gVectors.com