[plug] Xinerama on Debian

Randal Adamson ranz at devdata.net
Fri Aug 19 08:27:07 WST 2005


On Thu, 2005-08-18 at 15:52 -0700, WolfBite wrote:
> always handy to know :)
> might be time to try setting up that third monitor :))
> 
> Cameron Patrick <cameron at patrick.wattle.id.au> wrote:
>         WolfBite wrote:
>         
>         > Xinerama is handled by twinview using the Nvida drivers.
>         > Currently I dont think the nv driver will do xinerama.
>         
>         It will, but only using one output on each card. i.e. you can
>         have a
>         PCI Nvidia and an AGP Nvidia, or (presumably - don't have any
>         PCI-E
>         cards) two PCI-E Nvidia cards, or even a Nvidia and a Radeon,
>         but not
>         one Nvidia card with dual connectors. I used to use a TNT2 and
>         a
>         Geforce MX in Xinerama configuration for a while; it worked
>         quite
>         well.
>         
>         (Apologies for this nitpicking post which probably won't help
>         Randal
>         with his problem.)
>         
>         Cameron

I might be onto something here.

I'm attempting to do it the "Debian Way". That is, download the packages
nvidia-kernel and nvidia-common. In nvidia-kernel, there's a
comprehensive "How-To" on getting this up and running. This is
in /usr/share/doc/README.Debian. Here's the part that we're interested
in:

----[ SNIP ]----

METHOD #1 Using a kernel-headers package
***********************************************************************

As root (or using fakeroot)
1. cd /usr/src
   tar xzvf nvidia-kernel-source.tar.gz -C <YOUR BUILD LOCATION>
   (It will install in <YOU BUILD LOCATION>/modules)
   - or -
   tar xzvf nvidia-kernel-source.tar.gz  (if building in /usr/src)

   The standard build location is /usr/src

2. Find out your kernel version:

   uname -r   For example: 2.4.21-4-k7

3. Download and install package: kernel-headers-2.4.21-4-k7
   It will install in /usr/src/

   Make sure your kernel image and headers have matching release numbers
to
   avoid possible problems in packages built from different sources.

4. Set some environment variables (if bash is your shell):

    export KSRC=/usr/src/kernel-headers-2.4.21-4-k7
    export KVERS=2.4.21-4-k7

5. Then build nvidia-kernel package:

   cd <YOUR BUILD LOCATION>/modules/nvidia-kernel
   debian/rules binary_modules

(You can also combine step 4 and 5 into one line:
KSRC=/usr/src/kernel-headers-2.4.21-4-k7 KVERS=2.4.21-4-k7 debian/rules
binary_modules)

6. Install nvidia-kernel-common:

   If not installed already
   apt-get install nvidia-kernel-common

7. Install the nvidia-kernel package:

   dpkg -i ../nvidia-kernel-2.4.21-4-k7_1.0.7174-1+_.Custom_i386.deb
   ( or similar filename )

----[ END SNIP ]----

However, I seem to be getting stuck on part 5 - it throws the error in
the attached text file (nvidia-kernel.txt).

Just not sure what to do now :(

Cheers,

Ranz
-------------- next part --------------
athlon64:/usr/src/modules/nvidia-kernel# debian/rules binary_modules
cat: /include/linux/version.h: No such file or directory
/bin/sh: line 0: test: -ge: unary operator expected
# select which makefile to use.
rm -f /usr/src/modules/nvidia-kernel/nv/Makefile || true
if [ 4 = 6  ]; then \
     cd /usr/src/modules/nvidia-kernel/nv ; \
     ln -s Makefile.kbuild Makefile ; \
     cd .. ; \
     if [ 0  = 1 ] ; then \
        dpatch apply 04_minion ; \
     fi ; \
     if [ 0 = 1 ]; then \
        dpatch apply 01_sysfs ; \
        dpatch status 01_sysfs >patch-stamp ; \
        dpatch apply 02_pcialias ; \
                dpatch status 02_pcialias >>patch-stamp ; \
     fi ; \
fi
if [  4 = 4  ]; then \
     cd /usr/src/modules/nvidia-kernel/nv ; \
     ln -s Makefile.nvidia Makefile ; \
     cd .. ; \
fi
#nothing here anymore
touch configure-stamp
if [ -f /usr/src/modules/nvidia-kernel/debian/control.template ]; then \
        cp  /usr/src/modules/nvidia-kernel/debian/control.template /usr/src/modules/nvidia-kernel/debian/control; \
fi
dh_testdir
dh_testroot
PATCHLEVEL = 4
Kernel compiler version : 3.4.4
Detected compiler version : 4.0.1

You appear to be compiling the NVIDIA kernel module with
a compiler different from the one that was used to compile
the running kernel. This may be perfectly alright and you
may be building this module for another kernel in which case
you may ignore this message.

The compiler that will be used to compile this module has been
determined from:
 1) the CC environment variable
 2) that specified in
    /include/linux/compile.h
 3) gcc
Using compiler gcc version 4.0.1
touch /usr/src/modules/nvidia-kernel/nv/gcc-check
touch /usr/src/modules/nvidia-kernel/nv/cc-sanity-check
## Main Make ##
IGNORE_CC_MISMATCH=1 CC="gcc"  /usr/bin/make -C /usr/src/modules/nvidia-kernel/nv -f Makefile SYSSRC=   KBUILD_PARAMS="-C  SUBDIRS=/usr/src/modules/nvidia-kernel/nv" module;
make[1]: Entering directory `/usr/src/modules/nvidia-kernel/nv'
echo \#define NV_COMPILER \"`gcc -v 2>&1 | tail -n 1`\" > nv_compiler.h
gcc -c -Wall -Wimplicit -Wreturn-type -Wswitch -Wformat -Wchar-subscripts -Wparentheses -Wpointer-arith  -Wno-multichar  -Werror -O -fno-common -UDEBUG -U_DEBUG -DNDEBUG -MD -D__KERNEL__ -DMODULE -D_LOOSE_KERNEL_NAMES -DNTRM -D_GNU_SOURCE -D_LOOSE_KERNEL_NAMES -D__KERNEL__ -DMODULE  -DNV_MAJOR_VERSION=1 -DNV_MINOR_VERSION=0 -DNV_PATCHLEVEL=7174  -DNV_UNIX   -DNV_LINUX   -DNV_INT64_OK   -DNVCPU_X86       -I. -I/lib/modules/2.6.11-9-amd64-k8/build/include -Wsign-compare -Wno-cast-qual -Wno-error nv.c
In file included from /lib/modules/2.6.11-9-amd64-k8/build/include/linux/kernel.h:15,
                 from nv-linux.h:45,
                 from nv.c:14:
/lib/modules/2.6.11-9-amd64-k8/build/include/linux/bitops.h: In function 'generic_hweight64':
/lib/modules/2.6.11-9-amd64-k8/build/include/linux/bitops.h:123: warning: integer constant is too large for 'unsigned long' type
/lib/modules/2.6.11-9-amd64-k8/build/include/linux/bitops.h:123: warning: integer constant is too large for 'unsigned long' type
/lib/modules/2.6.11-9-amd64-k8/build/include/linux/bitops.h:124: warning: integer constant is too large for 'unsigned long' type
/lib/modules/2.6.11-9-amd64-k8/build/include/linux/bitops.h:124: warning: integer constant is too large for 'unsigned long' type
/lib/modules/2.6.11-9-amd64-k8/build/include/linux/bitops.h:125: warning: integer constant is too large for 'unsigned long' type
/lib/modules/2.6.11-9-amd64-k8/build/include/linux/bitops.h:125: warning: integer constant is too large for 'unsigned long' type
/lib/modules/2.6.11-9-amd64-k8/build/include/linux/bitops.h:126: warning: integer constant is too large for 'unsigned long' type
/lib/modules/2.6.11-9-amd64-k8/build/include/linux/bitops.h:126: warning: integer constant is too large for 'unsigned long' type
/lib/modules/2.6.11-9-amd64-k8/build/include/linux/bitops.h:127: warning: integer constant is too large for 'unsigned long' type
/lib/modules/2.6.11-9-amd64-k8/build/include/linux/bitops.h:127: warning: integer constant is too large for 'unsigned long' type
In file included from /lib/modules/2.6.11-9-amd64-k8/build/include/linux/timex.h:61,
                 from /lib/modules/2.6.11-9-amd64-k8/build/include/linux/sched.h:11,
                 from /lib/modules/2.6.11-9-amd64-k8/build/include/linux/module.h:10,
                 from nv-linux.h:46,
                 from nv.c:14:
/lib/modules/2.6.11-9-amd64-k8/build/include/asm/timex.h: In function 'get_cycles':
/lib/modules/2.6.11-9-amd64-k8/build/include/asm/timex.h:25: warning: left shift count >= width of type
In file included from /lib/modules/2.6.11-9-amd64-k8/build/include/linux/sched.h:15,
                 from /lib/modules/2.6.11-9-amd64-k8/build/include/linux/module.h:10,
                 from nv-linux.h:46,
                 from nv.c:14:
/lib/modules/2.6.11-9-amd64-k8/build/include/linux/cpumask.h: In function '__first_cpu':
/lib/modules/2.6.11-9-amd64-k8/build/include/linux/cpumask.h:211: warning: signed and unsigned type in conditional expression
/lib/modules/2.6.11-9-amd64-k8/build/include/linux/cpumask.h: In function '__next_cpu':
/lib/modules/2.6.11-9-amd64-k8/build/include/linux/cpumask.h:217: warning: signed and unsigned type in conditional expression
In file included from /lib/modules/2.6.11-9-amd64-k8/build/include/linux/list.h:7,
                 from /lib/modules/2.6.11-9-amd64-k8/build/include/linux/wait.h:23,
                 from /lib/modules/2.6.11-9-amd64-k8/build/include/asm/semaphore.h:42,
                 from /lib/modules/2.6.11-9-amd64-k8/build/include/linux/sched.h:19,
                 from /lib/modules/2.6.11-9-amd64-k8/build/include/linux/module.h:10,
                 from nv-linux.h:46,
                 from nv.c:14:
/lib/modules/2.6.11-9-amd64-k8/build/include/linux/prefetch.h: In function 'prefetch_range':
/lib/modules/2.6.11-9-amd64-k8/build/include/linux/prefetch.h:62: warning: pointer of type 'void *' used in arithmetic
In file included from /lib/modules/2.6.11-9-amd64-k8/build/include/linux/module.h:10,
                 from nv-linux.h:46,
                 from nv.c:14:
/lib/modules/2.6.11-9-amd64-k8/build/include/linux/sched.h: In function 'arch_pick_mmap_layout':
/lib/modules/2.6.11-9-amd64-k8/build/include/linux/sched.h:1174: warning: integer constant is too large for 'unsigned long' type
In file included from /lib/modules/2.6.11-9-amd64-k8/build/include/linux/mm.h:36,
                 from /lib/modules/2.6.11-9-amd64-k8/build/include/linux/poll.h:11,
                 from nv-linux.h:58,
                 from nv.c:14:
/lib/modules/2.6.11-9-amd64-k8/build/include/asm/pgtable.h: In function 'pgd_bad':
/lib/modules/2.6.11-9-amd64-k8/build/include/asm/pgtable.h:212: warning: left shift count >= width of type
/lib/modules/2.6.11-9-amd64-k8/build/include/asm/pgtable.h: In function 'pud_bad':
/lib/modules/2.6.11-9-amd64-k8/build/include/asm/pgtable.h:220: warning: left shift count >= width of type
/lib/modules/2.6.11-9-amd64-k8/build/include/asm/pgtable.h: In function 'pte_modify':
/lib/modules/2.6.11-9-amd64-k8/build/include/asm/pgtable.h:358: warning: left shift count >= width of type
In file included from /lib/modules/2.6.11-9-amd64-k8/build/include/linux/poll.h:11,
                 from nv-linux.h:58,
                 from nv.c:14:
/lib/modules/2.6.11-9-amd64-k8/build/include/linux/mm.h: In function 'lowmem_page_address':
/lib/modules/2.6.11-9-amd64-k8/build/include/linux/mm.h:437: warning: integer constant is too large for 'unsigned long' type
/lib/modules/2.6.11-9-amd64-k8/build/include/linux/mm.h: In function 'pud_alloc':
/lib/modules/2.6.11-9-amd64-k8/build/include/linux/mm.h:673: warning: left shift count >= width of type
/lib/modules/2.6.11-9-amd64-k8/build/include/linux/mm.h:673: warning: integer constant is too large for 'unsigned long' type
/lib/modules/2.6.11-9-amd64-k8/build/include/linux/mm.h: In function 'pmd_alloc':
/lib/modules/2.6.11-9-amd64-k8/build/include/linux/mm.h:680: warning: left shift count >= width of type
/lib/modules/2.6.11-9-amd64-k8/build/include/linux/mm.h:680: warning: integer constant is too large for 'unsigned long' type
In file included from /lib/modules/2.6.11-9-amd64-k8/build/include/linux/dma-mapping.h:19,
                 from /lib/modules/2.6.11-9-amd64-k8/build/include/asm-generic/pci-dma-compat.h:7,
                 from /lib/modules/2.6.11-9-amd64-k8/build/include/asm/pci.h:94,
                 from /lib/modules/2.6.11-9-amd64-k8/build/include/linux/pci.h:903,
                 from nv-linux.h:69,
                 from nv.c:14:
/lib/modules/2.6.11-9-amd64-k8/build/include/asm/dma-mapping.h: In function 'dma_sync_single_for_cpu':
/lib/modules/2.6.11-9-amd64-k8/build/include/asm/dma-mapping.h:72: warning: implicit declaration of function 'flush_write_buffers'
In file included from /lib/modules/2.6.11-9-amd64-k8/build/include/asm/pci.h:94,
                 from /lib/modules/2.6.11-9-amd64-k8/build/include/linux/pci.h:903,
                 from nv-linux.h:69,
                 from nv.c:14:
/lib/modules/2.6.11-9-amd64-k8/build/include/asm-generic/pci-dma-compat.h: In function 'pci_map_page':
/lib/modules/2.6.11-9-amd64-k8/build/include/asm-generic/pci-dma-compat.h:49: warning: pointer of type 'void *' used in arithmetic
In file included from /lib/modules/2.6.11-9-amd64-k8/build/include/linux/pci.h:903,
                 from nv-linux.h:69,
                 from nv.c:14:
/lib/modules/2.6.11-9-amd64-k8/build/include/asm/pci.h: In function 'pci_dac_page_to_dma':
/lib/modules/2.6.11-9-amd64-k8/build/include/asm/pci.h:99: warning: implicit declaration of function 'page_to_phys'
/lib/modules/2.6.11-9-amd64-k8/build/include/asm/pci.h: In function 'pci_dac_dma_to_page':
/lib/modules/2.6.11-9-amd64-k8/build/include/asm/pci.h:106: warning: integer constant is too large for 'unsigned long' type
/lib/modules/2.6.11-9-amd64-k8/build/include/asm/pci.h:106: warning: integer constant is too large for 'unsigned long' type
/lib/modules/2.6.11-9-amd64-k8/build/include/asm/pci.h:106: warning: comparison is always false due to limited range of data type
/lib/modules/2.6.11-9-amd64-k8/build/include/asm/pci.h:106: warning: integer constant is too large for 'unsigned long' type
/lib/modules/2.6.11-9-amd64-k8/build/include/asm/pci.h:106: warning: integer constant is too large for 'unsigned long' type
/lib/modules/2.6.11-9-amd64-k8/build/include/asm/pci.h:106: warning: integer constant is too large for 'unsigned long' type
/lib/modules/2.6.11-9-amd64-k8/build/include/asm/pci.h:106: warning: integer constant is too large for 'unsigned long' type
In file included from nv.c:14:
nv-linux.h:691:2: warning: #warning "conftest.sh failed, assuming remap_page_range(4)!"
In file included from nv.c:14:
nv-linux.h: In function 'NV_UNLOCK_PAGE':
nv-linux.h:1052: warning: integer constant is too large for 'unsigned long' type
nv-linux.h:1052: warning: integer constant is too large for 'unsigned long' type
nv-linux.h:1052: warning: comparison is always false due to limited range of data type
nv-linux.h:1052: warning: integer constant is too large for 'unsigned long' type
nv-linux.h:1052: warning: integer constant is too large for 'unsigned long' type
nv-linux.h:1052: warning: integer constant is too large for 'unsigned long' type
nv-linux.h:1052: warning: integer constant is too large for 'unsigned long' type
nv.c: In function 'nvos_get_agp_device_by_class':
nv.c:404: warning: implicit declaration of function 'pci_find_class'
nv.c:404: warning: assignment makes pointer from integer without a cast
nv.c:418: warning: assignment makes pointer from integer without a cast
nv.c: In function 'nv_kern_mmap':
nv.c:1541: warning: implicit declaration of function 'remap_page_range'
nv.c: In function 'nv_kern_read_cardinfo':
nv.c:2188: warning: pointer targets in passing argument 4 of 'rm_get_device_name' differ in signedness
nv.c: In function 'nv_kern_read_status':
nv.c:2350: warning: pointer targets in passing argument 2 of 'rm_read_registry_dword' differ in signedness
nv.c:2350: warning: pointer targets in passing argument 3 of 'rm_read_registry_dword' differ in signedness
nv.c:2350: warning: pointer targets in passing argument 4 of 'rm_read_registry_dword' differ in signedness
nv.c:2351: warning: pointer targets in passing argument 2 of 'rm_read_registry_dword' differ in signedness
nv.c:2351: warning: pointer targets in passing argument 3 of 'rm_read_registry_dword' differ in signedness
nv.c:2351: warning: pointer targets in passing argument 4 of 'rm_read_registry_dword' differ in signedness
nv.c: In function '_get_phys_address':
nv.c:2594: warning: right shift count >= width of type
nv.c:2594: warning: right shift count >= width of type
nv.c:2598: warning: left shift count >= width of type
nv.c:2598: warning: integer constant is too large for 'unsigned long' type
nv.c:2598: warning: left shift count >= width of type
nv.c:2598: warning: integer constant is too large for 'unsigned long' type
nv.c:2599: warning: left shift count >= width of type
nv.c:2602: warning: left shift count >= width of type
nv.c:2602: warning: integer constant is too large for 'unsigned long' type
nv.c: In function 'nv_get_kern_phys_address':
nv.c:2637: warning: integer constant is too large for 'unsigned long' type
nv.c:2637: warning: integer constant is too large for 'unsigned long' type
nv.c:2637: warning: comparison is always true due to limited range of data type
nv.c:2638: warning: integer constant is too large for 'unsigned long' type
nv.c:2638: warning: comparison is always false due to limited range of data type
nv.c:2638: warning: integer constant is too large for 'unsigned long' type
nv.c:2638: warning: integer constant is too large for 'unsigned long' type
nv.c: In function 'nv_alloc_pages':
nv.c:2702: warning: pointer targets in passing argument 5 of 'KernAllocAGPPages' differ in signedness
nv.c:2732: warning: pointer targets in passing argument 6 of 'rm_alloc_agp_pages' differ in signedness
nv.c: In function 'nvos_count_devices':
nv.c:3232: warning: assignment makes pointer from integer without a cast
nv.c:3237: warning: assignment makes pointer from integer without a cast
/tmp/ccOS66Nk.s: Assembler messages:
/tmp/ccOS66Nk.s:1060: Error: suffix or operands invalid for `pushf'
/tmp/ccOS66Nk.s:1060: Error: suffix or operands invalid for `pop'
/tmp/ccOS66Nk.s:1062: Error: suffix or operands invalid for `movq'
/tmp/ccOS66Nk.s:1067: Error: suffix or operands invalid for `movq'
/tmp/ccOS66Nk.s:1083: Error: suffix or operands invalid for `movq'
/tmp/ccOS66Nk.s:1084: Error: suffix or operands invalid for `movq'
/tmp/ccOS66Nk.s:1095: Error: suffix or operands invalid for `movq'
/tmp/ccOS66Nk.s:1097: Error: suffix or operands invalid for `movq'
/tmp/ccOS66Nk.s:1098: Error: suffix or operands invalid for `movq'
/tmp/ccOS66Nk.s:1103: Error: suffix or operands invalid for `movq'
/tmp/ccOS66Nk.s:1113: Error: suffix or operands invalid for `push'
/tmp/ccOS66Nk.s:1113: Error: suffix or operands invalid for `popf'
/tmp/ccOS66Nk.s:1130: Error: suffix or operands invalid for `pushf'
/tmp/ccOS66Nk.s:1130: Error: suffix or operands invalid for `pop'
/tmp/ccOS66Nk.s:1132: Error: suffix or operands invalid for `movq'
/tmp/ccOS66Nk.s:1137: Error: suffix or operands invalid for `movq'
/tmp/ccOS66Nk.s:1153: Error: suffix or operands invalid for `movq'
/tmp/ccOS66Nk.s:1154: Error: suffix or operands invalid for `movq'
/tmp/ccOS66Nk.s:1162: Error: suffix or operands invalid for `movq'
/tmp/ccOS66Nk.s:1164: Error: suffix or operands invalid for `movq'
/tmp/ccOS66Nk.s:1165: Error: suffix or operands invalid for `movq'
/tmp/ccOS66Nk.s:1170: Error: suffix or operands invalid for `movq'
/tmp/ccOS66Nk.s:1180: Error: suffix or operands invalid for `push'
/tmp/ccOS66Nk.s:1180: Error: suffix or operands invalid for `popf'
/tmp/ccOS66Nk.s:3094: Error: suffix or operands invalid for `pushf'
/tmp/ccOS66Nk.s:3094: Error: suffix or operands invalid for `pop'
/tmp/ccOS66Nk.s:3110: Error: suffix or operands invalid for `push'
/tmp/ccOS66Nk.s:3110: Error: suffix or operands invalid for `popf'
/tmp/ccOS66Nk.s:5586: Error: suffix or operands invalid for `pushf'
/tmp/ccOS66Nk.s:5586: Error: suffix or operands invalid for `pop'
/tmp/ccOS66Nk.s:5599: Error: suffix or operands invalid for `push'
/tmp/ccOS66Nk.s:5599: Error: suffix or operands invalid for `popf'
/tmp/ccOS66Nk.s:5643: Error: suffix or operands invalid for `push'
/tmp/ccOS66Nk.s:5643: Error: suffix or operands invalid for `popf'
/tmp/ccOS66Nk.s:5682: Error: suffix or operands invalid for `pushf'
/tmp/ccOS66Nk.s:5682: Error: suffix or operands invalid for `pop'
/tmp/ccOS66Nk.s:5688: Error: suffix or operands invalid for `push'
/tmp/ccOS66Nk.s:5688: Error: suffix or operands invalid for `popf'
/tmp/ccOS66Nk.s:5755: Error: suffix or operands invalid for `push'
/tmp/ccOS66Nk.s:5755: Error: suffix or operands invalid for `popf'
make[1]: *** [nv.o] Error 1
make[1]: Leaving directory `/usr/src/modules/nvidia-kernel/nv'
make: *** [build-stamp] Error 2


More information about the plug mailing list