Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 158686 - x11-drivers/nvidia-drivers don't compile against xen kernels
Summary: x11-drivers/nvidia-drivers don't compile against xen kernels
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Lowest enhancement (vote)
Assignee: X11 External Driver Maintainers
URL: http://www.nvnews.net/vbulletin/showt...
Whiteboard:
Keywords:
: 202992 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-12-20 14:48 UTC by Michael Croes
Modified: 2009-05-26 16:02 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
files/nvidia-drivers-100.14.09_xen.patch (100.14.09_xen.patch,8.23 KB, patch)
2007-06-21 18:31 UTC, Sergey Belyashov
Details | Diff
files/nvidia-drivers-100.14.11_xen.patch (nvidia-drivers-100.14.11_xen.patch,8.72 KB, patch)
2007-07-12 01:11 UTC, Peter Fern
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Croes 2006-12-20 14:48:17 UTC
Because of the differences in Xen and non-Xen linux kernels the nvidia drivers as provided by nvidia don't compile against a Xen kernel. There is a patch availible at http://www.nvnews.net/vbulletin/showthread.php?t=77597 which should work with current nvidia drivers in portage now. On http://www.nvnews.net/vbulletin/showthread.php?t=81514 there is some information about SUSE users using this patch to use the nvidia drivers.

I tried the patch against 1.0.9625 and manually compiled the driver. The driver compiled, but I had some instability issues of which I don't know whether they're caused by the driver or other problems in the system (also have to boot using noapic).

If a xen flag could be added to the nvidia drivers ebuild which runs this patch (and perhaps sets environment variables in case they're needed as described on the second link) this shouldn't effect normal users.
Comment 1 Marco Clocchiatti 2006-12-23 00:33:42 UTC
(In reply to comment #0)
>
> There is a patch
> availible at http://www.nvnews.net/vbulletin/showthread.php?t=77597 which
> should work with current nvidia drivers in portage now.
> 
On amd64 it needs this other patch: http://www.nvnews.net/vbulletin/showthread.php?t=68648
to avoid a 'unknown symbol xen_tlb_flush'.
I've installed manually both and they work.
See also http://www.nvnews.net/vbulletin/showthread.php?t=77597&page=2#19
Comment 2 Chris Gianelloni (RETIRED) gentoo-dev 2006-12-28 11:44:23 UTC
Can you try 9746, which was just added to the tree?  Likely, this will still need work, but I'm hoping.
Comment 3 Dennis Petschull 2007-01-03 17:08:36 UTC
I tried this patch on the 9631 and 9742 ebuilds. It compiles fine, but whilest merging I get:
WARNING: //lib/modules/2.6.18-xen/video/nvidia.ko needs unknown symbol phys_to_machine
Doing "modprobe nvidia" afterwards also gives me the "unknown symbol phys_to_machine" error.
I also tried it with the 2.6.16.28-xen kernel from portage, but with the same results.
Does someone know how to fix this?
Comment 4 Sergey Belyashov 2007-06-21 18:31:21 UTC
Created attachment 122719 [details, diff]
files/nvidia-drivers-100.14.09_xen.patch

This is patch for x11-drivers/nvidia-drivers-100.14.09
Comment 5 Peter Fern 2007-07-12 01:11:26 UTC
Created attachment 124604 [details, diff]
files/nvidia-drivers-100.14.11_xen.patch

I removed the ability to enable pat with PREEMPT_RT and without XEN since it's not of great use and I was too lazy to add another iftest
Comment 6 Dennis Petschull 2007-09-01 11:00:18 UTC
The nvidia-drivers-100.14.09_xen.patch works for me with the latest xen-sources kernel (2.6.20-r2), but I still get the above error while inserting the module:
"WARNING: //lib/modules/2.6.20-xen-r2/video/nvidia.ko needs unknown symbol
phys_to_machine"

Can anybody help me out with this issue, please?
Thanks!
Comment 7 impulze 2007-09-16 11:19:59 UTC
with 100.14.09 and applied patch i can boot fine. no symbol issues there. but when kdm starts i just get a black screen followed by an instant reboot.
with 100.14.11 and applied patch the ebuild boils out with the following message:

sh ./conftest.sh "x86_64-pc-linux-gnu-gcc" "x86_64-pc-linux-gnu-gcc" /usr/src/linux /usr/src/linux/_dom0 select_makefile full_output
If you are using a Linux 2.4 kernel, please make sure
you either have configured kernel sources matching your
kernel or the correct set of kernel headers installed
on your system.

If you are using a Linux 2.6 kernel, please make sure
you have configured kernel sources matching your kernel
installed on your system. If you specified a separate
output directory using either the "KBUILD_OUTPUT" or
the "O" KBUILD parameter, make sure to specify this
directory with the SYSOUT environment variable or with
the equivalent nvidia-installer command line option.

Depending on where and how the kernel sources (or the
kernel headers) were installed, you may need to specify
their location with the SYSSRC environment variable or
the equivalent nvidia-installer command line option.

*** Unable to determine the target kernel version. ***

you may have noticed the _dom0 directory in KBUILD_OUTPUT that's because i use
alias make0="mkdir -p _dom0 && make O=_dom0"


i'm using xen-3.1.0 from the tree... any suggestions on how to go on?
Comment 8 Jakub Moc (RETIRED) gentoo-dev 2007-12-22 09:17:21 UTC
*** Bug 202992 has been marked as a duplicate of this bug. ***
Comment 9 Marc Blumentritt 2007-12-27 19:32:43 UTC
Hi,

I got the same problem as impulze, while NOT using "make 0=...". Here my error message:

 * Applying NVIDIA_glx-glheader.patch ...
  [ ok ]
/usr/portage/x11-drivers/nvidia-drivers/nvidia-drivers-100.14.19.ebuild: line 186: x86-fbsd: command not found
 * Applying NVIDIA_i2c-hwmon.patch ...
  [ ok ]
 * Converting Makefile.kbuild to use M= instead of SUBDIRS= ...
  [ ok ]
>>> Source unpacked.
>>> Compiling source in /var/tmp/portage/x11-drivers/nvidia-drivers-100.14.19/work/NVIDIA-Linux-x86-100.14.19-pkg0/usr/src/nv ...
 * Preparing nvidia module
sh ./conftest.sh "i686-pc-linux-gnu-gcc" "i686-pc-linux-gnu-gcc" /usr/src/linux /lib/modules/2.6.20-xen-r6/build cc_sanity_check full_output
rm -f Makefile
sh ./conftest.sh "i686-pc-linux-gnu-gcc" "i686-pc-linux-gnu-gcc" /usr/src/linux /lib/modules/2.6.20-xen-r6/build select_makefile full_output
If you are using a Linux 2.4 kernel, please make sure
you either have configured kernel sources matching your
kernel or the correct set of kernel headers installed
on your system.

If you are using a Linux 2.6 kernel, please make sure
you have configured kernel sources matching your kernel
installed on your system. If you specified a separate
output directory using either the "KBUILD_OUTPUT" or
the "O" KBUILD parameter, make sure to specify this
directory with the SYSOUT environment variable or with
the equivalent nvidia-installer command line option.

Depending on where and how the kernel sources (or the
kernel headers) were installed, you may need to specify
their location with the SYSSRC environment variable or
the equivalent nvidia-installer command line option.

*** Unable to determine the target kernel version. ***

make: *** [select_makefile] Error 1
 * 
 * ERROR: x11-drivers/nvidia-drivers-100.14.19 failed.
 * Call stack:
 *                         ebuild.sh, line 1701:  Called dyn_compile
 *                         ebuild.sh, line 1039:  Called qa_call 'src_compile'
 *                         ebuild.sh, line   44:  Called src_compile
 *   nvidia-drivers-100.14.19.ebuild, line  214:  Called linux-mod_src_compile
 *                  linux-mod.eclass, line  518:  Called die
 * The specific snippet of code:
 *                      emake HOSTCC="$(tc-getBUILD_CC)" CC="$(get-KERNEL_CC)" LDFLAGS="$(get_abi_LDFLAGS)" \
 *                                ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS} \
 *                              || die "Unable to make ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS}."
 *  The die message:
 *   Unable to make  IGNORE_CC_MISMATCH=yes V=1 SYSSRC=/usr/src/linux SYSOUT=/lib/modules/2.6.20-xen-r6/build clean module.
 * 
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/log/portage/x11-drivers:nvidia-drivers-100.14.19:20071226-212809.log'.


Here my emerge --info (while not running my xen kernel):
hive portage # emerge --info
Portage 2.1.3.19 (default-linux/x86/2007.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.23-gentoo-r3 i686)
=================================================================
System uname: 2.6.23-gentoo-r3 i686 Intel(R) Core(TM)2 Duo CPU E6550 @ 2.33GHz
Timestamp of tree: Thu, 27 Dec 2007 08:16:01 +0000
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p17
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python:     2.4.4-r6
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.10-r5
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.23-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=prescott -pipe -fomit-frame-pointer -mno-tls-direct-seg-refs"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -march=prescott -pipe -fomit-frame-pointer -mno-tls-direct-seg-refs"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks fixpackages metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.osuosl.org/ "
LANG="en_US.UTF-8"
LINGUAS="de en"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/sunrise /usr/portage/local/layman/initng /usr/portage/local/layman/drizzt-overlay /usr/portage/local/my_ebuilds"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa arts bash-completion beagle berkdb bitmap-fonts bzip2 cairo cdr cli cracklib crypt cups dbus dri dvd dvdr dvdread eds emboss encode esd evo exif fam firefox fortran gdbm gif gimp glitz gnome gphoto2 gpm gstreamer gtk hal hvm iconv ipv6 java javascript jpeg kde kerberos lm_sensors logitech-mouse mad matroska midi mikmod mmx mmxext mono mozilla mp2 mp3 mpeg mudflap musepack ncurses nls nptl nptlonly nvidia ogg openal opengl openmp oss pam pcre pdf perl png pppd python qt3support qt4 quicktime readline reflection scanner sdl session speex spell spl sse sse2 ssl ssse3 startup-notification svg tcpd thunderbird tiff truetype truetype-fonts type1-fonts unicode usb userlocales vim-pager vim-with-x vorbis win32codecs wmf x86 xanim xcb xcomposite xface xml xorg xv xvmc zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CAMERAS="kodak" ELIBC="glibc" INITNG_PLUGINS="also bash_launcher chdir chroot conflict cpout critical ctrlaltdel daemon_clean debug_commands envparser find fmon fstat history idleprobe initctl interactive iparser last limit lockfile logfile netdev netprobe ngc4 ngcs nge pause provide reload renice rlparser simple_launcher stcmd stdout suid syncron syslog sysreq unneeded usplash" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de en" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


Regards,
Marc
Comment 10 Doug Goldstein (RETIRED) gentoo-dev 2007-12-27 19:44:57 UTC
NVIDIA themselves state that this driver does not work with Xen kernels since Xen kernels export a completely different API.

Until NVIDIA changes their stance, Gentoo will not support Xen kernels.
Comment 11 Chris Gianelloni (RETIRED) gentoo-dev 2008-01-09 22:51:20 UTC
I agree with Doug.  As such, marking as WONTFIX.
Comment 12 clemens hlauschek 2008-04-08 16:18:03 UTC
I don't really agree with the decision to close the bug, as it seems to me to be only just some minor issues with the build-process. 

Nvidia doesn't official support xen, which I do understand, but anyway, the nvidia-Script listens to the env-Variable IGNORE_XEN_PRESENCE, and with the small changes I made to the xen-kernel, just to get the driver compiled, (http://forums.gentoo.org/viewtopic.php?p=4644365), my X11 runs stable and without any problems since last christmas...

best regards,
clemens
Comment 13 clemens hlauschek 2008-04-08 16:31:01 UTC
But anyhow, it is my belief that this bug belongs to xen-sources. that's where I filed a bugreport which got marked as duplicated. 

-clemens