Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Installing gdev.ko module fails with nouveau. #19

Open
wuhaozju opened this Issue · 9 comments

3 participants

wuhaozju Shinpei Kato Yusuke FUJII
wuhaozju

Hi. We are installing gdev on ubuntu 10.04 64 bit. However, Installing gdev.ko module fails with nouveau. Here are the details:

cd $(TOPDIR)/gdev/mod
mkdir build
cd build
../configure
(Gdev Module: must copy gdev_interface.h to build directory for build to succeed.)
(From: $(TOPDIR)/gdev/mod/linux/nouveau-3.3.0/drivers/gpu/drm/nouveau/gdev_interface.h)
(To: $(TOPDIR)/gdev/mod/build)

make

/***list***/
make -C /lib/modules/3.3.0-gdev+nouveau/build M=/home/seven/Gdev/gdev/mod/build modules
make[1]: Entering directory `/home/seven/linux'
CC [M]  /home/seven/Gdev/gdev/mod/build/gdev_drv.o
/home/seven/Gdev/gdev/mod/build/gdev_drv.c:63: warning: ‘__gdev_notify_handler’ defined but not used
CC [M]  /home/seven/Gdev/gdev/mod/build/gdev_drv_nvidia.o
CC [M]  /home/seven/Gdev/gdev/mod/build/gdev_fops.o
CC [M]  /home/seven/Gdev/gdev/mod/build/gdev_ioctl.o
CC [M]  /home/seven/Gdev/gdev/mod/build/gdev_proc.o
CC [M]  /home/seven/Gdev/gdev/mod/build/gdev_api.o
CC [M]  /home/seven/Gdev/gdev/mod/build/gdev_device.o
CC [M]  /home/seven/Gdev/gdev/mod/build/gdev_sched.o
CC [M]  /home/seven/Gdev/gdev/mod/build/gdev_nvidia.o
CC [M]  /home/seven/Gdev/gdev/mod/build/gdev_nvidia_fifo.o
CC [M]  /home/seven/Gdev/gdev/mod/build/gdev_nvidia_compute.o
CC [M]  /home/seven/Gdev/gdev/mod/build/gdev_nvidia_mem.o
CC [M]  /home/seven/Gdev/gdev/mod/build/gdev_nvidia_shm.o
CC [M]  /home/seven/Gdev/gdev/mod/build/gdev_nvidia_nvc0.o
CC [M]  /home/seven/Gdev/gdev/mod/build/gdev_nvidia_nve4.o
/home/seven/Gdev/gdev/mod/build/gdev_nvidia_nve4.c: In function ‘nve4_copy_linear’:
/home/seven/Gdev/gdev/mod/build/gdev_nvidia_nve4.c:519: warning: unused variable ‘page_count’
/home/seven/Gdev/gdev/mod/build/gdev_nvidia_nve4.c: At top level:
/home/seven/Gdev/gdev/mod/build/gdev_nvidia_nve4.c:461: warning: ‘nve4_memcpy_m2mf_transfer_rect’ defined but not used
LD [M]  /home/seven/Gdev/gdev/mod/build/gdev.o
Building modules, stage 2.
MODPOST 1 modules
WARNING: "gdev_drv_getdrm" [/home/seven/Gdev/gdev/mod/build/gdev.ko] undefined!
WARNING: "gdev_drv_bo_unmap" [/home/seven/Gdev/gdev/mod/build/gdev.ko] undefined!
WARNING: "gdev_drv_chan_alloc" [/home/seven/Gdev/gdev/mod/build/gdev.ko] undefined!
WARNING: "gdev_drv_write" [/home/seven/Gdev/gdev/mod/build/gdev.ko] undefined!
WARNING: "gdev_drv_vspace_free" [/home/seven/Gdev/gdev/mod/build/gdev.ko] undefined!
WARNING: "gdev_drv_bo_alloc" [/home/seven/Gdev/gdev/mod/build/gdev.ko] undefined!
WARNING: "gdev_drv_getdevice" [/home/seven/Gdev/gdev/mod/build/gdev.ko] undefined!
WARNING: "gdev_drv_vspace_alloc" [/home/seven/Gdev/gdev/mod/build/gdev.ko] undefined!
WARNING: "gdev_drv_getparam" [/home/seven/Gdev/gdev/mod/build/gdev.ko] undefined!
WARNING: "gdev_drv_bo_map" [/home/seven/Gdev/gdev/mod/build/gdev.ko] undefined!
WARNING: "gdev_drv_read" [/home/seven/Gdev/gdev/mod/build/gdev.ko] undefined!
WARNING: "gdev_drv_read32" [/home/seven/Gdev/gdev/mod/build/gdev.ko] undefined!
WARNING: "gdev_drv_bo_bind" [/home/seven/Gdev/gdev/mod/build/gdev.ko] undefined!
WARNING: "gdev_drv_getaddr" [/home/seven/Gdev/gdev/mod/build/gdev.ko] undefined!
WARNING: "gdev_drv_bo_unbind" [/home/seven/Gdev/gdev/mod/build/gdev.ko] undefined!
WARNING: "gdev_drv_bo_free" [/home/seven/Gdev/gdev/mod/build/gdev.ko] undefined!
WARNING: "gdev_drv_write32" [/home/seven/Gdev/gdev/mod/build/gdev.ko] undefined!
WARNING: "gdev_drv_chan_free" [/home/seven/Gdev/gdev/mod/build/gdev.ko] undefined!
CC      /home/seven/Gdev/gdev/mod/build/gdev.mod.o
LD [M]  /home/seven/Gdev/gdev/mod/build/gdev.ko
make[1]: Leaving directory `/home/seven/linux'

make install

/***list***/
make -C /lib/modules/3.3.0-gdev+nouveau/build M=/home/seven/Gdev/gdev/mod/build modules
make[1]: Entering directory `/home/seven/linux'
Building modules, stage 2.
MODPOST 1 modules
WARNING: "gdev_drv_getdrm" [/home/seven/Gdev/gdev/mod/build/gdev.ko] undefined!
WARNING: "gdev_drv_bo_unmap" [/home/seven/Gdev/gdev/mod/build/gdev.ko] undefined!
WARNING: "gdev_drv_chan_alloc" [/home/seven/Gdev/gdev/mod/build/gdev.ko] undefined!
WARNING: "gdev_drv_write" [/home/seven/Gdev/gdev/mod/build/gdev.ko] undefined!
WARNING: "gdev_drv_vspace_free" [/home/seven/Gdev/gdev/mod/build/gdev.ko] undefined!
WARNING: "gdev_drv_bo_alloc" [/home/seven/Gdev/gdev/mod/build/gdev.ko] undefined!
WARNING: "gdev_drv_getdevice" [/home/seven/Gdev/gdev/mod/build/gdev.ko] undefined!
WARNING: "gdev_drv_vspace_alloc" [/home/seven/Gdev/gdev/mod/build/gdev.ko] undefined!
WARNING: "gdev_drv_getparam" [/home/seven/Gdev/gdev/mod/build/gdev.ko] undefined!
WARNING: "gdev_drv_bo_map" [/home/seven/Gdev/gdev/mod/build/gdev.ko] undefined!
WARNING: "gdev_drv_read" [/home/seven/Gdev/gdev/mod/build/gdev.ko] undefined!
WARNING: "gdev_drv_read32" [/home/seven/Gdev/gdev/mod/build/gdev.ko] undefined!
WARNING: "gdev_drv_bo_bind" [/home/seven/Gdev/gdev/mod/build/gdev.ko] undefined!
WARNING: "gdev_drv_getaddr" [/home/seven/Gdev/gdev/mod/build/gdev.ko] undefined!
WARNING: "gdev_drv_bo_unbind" [/home/seven/Gdev/gdev/mod/build/gdev.ko] undefined!
WARNING: "gdev_drv_bo_free" [/home/seven/Gdev/gdev/mod/build/gdev.ko] undefined!
WARNING: "gdev_drv_write32" [/home/seven/Gdev/gdev/mod/build/gdev.ko] undefined!
WARNING: "gdev_drv_chan_free" [/home/seven/Gdev/gdev/mod/build/gdev.ko] undefined!
make[1]: Leaving directory `/home/seven/linux'
sudo rmmod gdev
ERROR: Module gdev does not exist in /proc/modules
make: [install] Error 1 (ignored)
sudo make -C /lib/modules/3.3.0-gdev+nouveau/build M=/home/seven/Gdev/gdev/mod/build modules_install
make: Entering directory `/home/seven/linux'
INSTALL /home/seven/Gdev/gdev/mod/build/gdev.ko
DEPMOD  3.3.0-gdev+nouveau
make: Leaving directory `/home/seven/linux'
sudo install -o root -m 0755 -d /usr/local/gdev
sudo install -o root -m 0755 -d /usr/local/gdev/include
sudo install -o root -m 0755 -d /usr/local/gdev/etc
sudo install -o root -m 0644 Module.symvers \
         /usr/local/gdev/etc/Module.symvers.gdev
sudo install -o root -m 0644 gdev_api.h gdev_autogen.h \
         gdev_nvidia_def.h gdev_list.h gdev_time.h /usr/local/gdev/include
sudo install -o root -m 0644 gdev.rules \
         /etc/udev/rules.d/80-gdev.rules
sudo modprobe gdev
FATAL: Error inserting gdev (/lib/modules/3.3.0-gdev+nouveau/extra/gdev.ko): Invalid argument
make: [install] Error 1 (ignored)

dmesg

/***list***/
[  709.379405] This is Gdev-compatible Nouveau driver.
[  709.379423] VGA switcheroo: detected Optimus DSM method \ handle
[  709.380834] [drm] nouveau 0000:01:00.0: Unsupported chipset 0x0e7010a2
[  709.381456] nouveau: probe of 0000:01:00.0 failed with error -22
[ 1140.633619] gdev: no symbol version for gdev_drv_chan_free
[ 1140.633624] gdev: Unknown symbol gdev_drv_chan_free (err -22)
[ 1140.633638] gdev: no symbol version for gdev_drv_write32
[ 1140.633640] gdev: Unknown symbol gdev_drv_write32 (err -22)
[ 1140.633647] gdev: no symbol version for gdev_drv_bo_free
[ 1140.633649] gdev: Unknown symbol gdev_drv_bo_free (err -22)
[ 1140.633654] gdev: no symbol version for gdev_drv_bo_unbind
[ 1140.633656] gdev: Unknown symbol gdev_drv_bo_unbind (err -22)
[ 1140.633673] gdev: no symbol version for gdev_drv_getaddr
[ 1140.633674] gdev: Unknown symbol gdev_drv_getaddr (err -22)
[ 1140.633683] gdev: no symbol version for gdev_drv_bo_bind
[ 1140.633684] gdev: Unknown symbol gdev_drv_bo_bind (err -22)
[ 1140.633687] gdev: no symbol version for gdev_drv_read32
[ 1140.633688] gdev: Unknown symbol gdev_drv_read32 (err -22)
[ 1140.633698] gdev: no symbol version for gdev_drv_read
[ 1140.633700] gdev: Unknown symbol gdev_drv_read (err -22)
[ 1140.633702] gdev: no symbol version for gdev_drv_bo_map
[ 1140.633703] gdev: Unknown symbol gdev_drv_bo_map (err -22)
[ 1140.633713] gdev: no symbol version for gdev_drv_getparam
[ 1140.633715] gdev: Unknown symbol gdev_drv_getparam (err -22)
[ 1140.633720] gdev: no symbol version for gdev_drv_vspace_alloc
[ 1140.633722] gdev: Unknown symbol gdev_drv_vspace_alloc (err -22)
[ 1140.633725] gdev: no symbol version for gdev_drv_getdevice
[ 1140.633726] gdev: Unknown symbol gdev_drv_getdevice (err -22)
[ 1140.633738] gdev: no symbol version for gdev_drv_bo_alloc
[ 1140.633740] gdev: Unknown symbol gdev_drv_bo_alloc (err -22)
[ 1140.633743] gdev: no symbol version for gdev_drv_vspace_free
[ 1140.633744] gdev: Unknown symbol gdev_drv_vspace_free (err -22)
[ 1140.633746] gdev: no symbol version for gdev_drv_write
[ 1140.633748] gdev: Unknown symbol gdev_drv_write (err -22)
[ 1140.633752] gdev: no symbol version for gdev_drv_chan_alloc
[ 1140.633753] gdev: Unknown symbol gdev_drv_chan_alloc (err -22)
[ 1140.633756] gdev: no symbol version for gdev_drv_bo_unmap
[ 1140.633757] gdev: Unknown symbol gdev_drv_bo_unmap (err -22)
[ 1140.633759] gdev: no symbol version for gdev_drv_getdrm
[ 1140.633761] gdev: Unknown symbol gdev_drv_getdrm (err -22)
[ 1469.629974] gdev: no symbol version for gdev_drv_chan_free
[ 1469.629979] gdev: Unknown symbol gdev_drv_chan_free (err -22)
[ 1469.629992] gdev: no symbol version for gdev_drv_write32
[ 1469.629994] gdev: Unknown symbol gdev_drv_write32 (err -22)
[ 1469.630047] gdev: no symbol version for gdev_drv_bo_free
[ 1469.630048] gdev: Unknown symbol gdev_drv_bo_free (err -22)
[ 1469.630054] gdev: no symbol version for gdev_drv_bo_unbind
[ 1469.630056] gdev: Unknown symbol gdev_drv_bo_unbind (err -22)
[ 1469.630077] gdev: no symbol version for gdev_drv_getaddr
[ 1469.630079] gdev: Unknown symbol gdev_drv_getaddr (err -22)
[ 1469.630088] gdev: no symbol version for gdev_drv_bo_bind
[ 1469.630089] gdev: Unknown symbol gdev_drv_bo_bind (err -22)
[ 1469.630092] gdev: no symbol version for gdev_drv_read32
[ 1469.630093] gdev: Unknown symbol gdev_drv_read32 (err -22)
[ 1469.630104] gdev: no symbol version for gdev_drv_read
[ 1469.630105] gdev: Unknown symbol gdev_drv_read (err -22)
[ 1469.630107] gdev: no symbol version for gdev_drv_bo_map
[ 1469.630109] gdev: Unknown symbol gdev_drv_bo_map (err -22)
[ 1469.630119] gdev: no symbol version for gdev_drv_getparam
[ 1469.630121] gdev: Unknown symbol gdev_drv_getparam (err -22)
[ 1469.630126] gdev: no symbol version for gdev_drv_vspace_alloc
[ 1469.630128] gdev: Unknown symbol gdev_drv_vspace_alloc (err -22)
[ 1469.630131] gdev: no symbol version for gdev_drv_getdevice
[ 1469.630132] gdev: Unknown symbol gdev_drv_getdevice (err -22)
[ 1469.630145] gdev: no symbol version for gdev_drv_bo_alloc
[ 1469.630146] gdev: Unknown symbol gdev_drv_bo_alloc (err -22)
[ 1469.630149] gdev: no symbol version for gdev_drv_vspace_free
[ 1469.630151] gdev: Unknown symbol gdev_drv_vspace_free (err -22)
[ 1469.630153] gdev: no symbol version for gdev_drv_write
[ 1469.630155] gdev: Unknown symbol gdev_drv_write (err -22)
[ 1469.630159] gdev: no symbol version for gdev_drv_chan_alloc
[ 1469.630161] gdev: Unknown symbol gdev_drv_chan_alloc (err -22)
[ 1469.630163] gdev: no symbol version for gdev_drv_bo_unmap
[ 1469.630164] gdev: Unknown symbol gdev_drv_bo_unmap (err -22)
[ 1469.630166] gdev: no symbol version for gdev_drv_getdrm
[ 1469.630168] gdev: Unknown symbol gdev_drv_getdrm (err -22)
wuhaozju

We blacklist nouveau, compile and install linux-3.3.
And we use the already patched nouveau source residing in gdev/mod/linux/nouveau-3.3.0. Here are the details:

cd $(TOPDIR)/gdev/mod/linux/nouveau-3.3.0/

make NOUVEAUROOTDIR=$(TOPDIR)/gdev/mod/linux/nouveau-3.3.0

/***list***/
Makefile:649: "WARNING: Appending $KCPPFLAGS (-I/home/seven/Gdev/gdev/mod/linux/nouveau-3.3.0/include/drm) from command line to kernel $CPPFLAGS"
... 
Building modules, stage 2.
MODPOST 6 modules
CC      /home/seven/Gdev/gdev/mod/linux/nouveau-3.3.0/drivers/gpu/drm/drm.mod.o
LD [M]  /home/seven/Gdev/gdev/mod/linux/nouveau-3.3.0/drivers/gpu/drm/drm.ko
CC      /home/seven/Gdev/gdev/mod/linux/nouveau-3.3.0/drivers/gpu/drm/drm_kms_helper.mod.o
LD [M]  /home/seven/Gdev/gdev/mod/linux/nouveau-3.3.0/drivers/gpu/drm/drm_kms_helper.ko
CC      /home/seven/Gdev/gdev/mod/linux/nouveau-3.3.0/drivers/gpu/drm/i2c/ch7006.mod.o
LD [M]  /home/seven/Gdev/gdev/mod/linux/nouveau-3.3.0/drivers/gpu/drm/i2c/ch7006.ko
CC      /home/seven/Gdev/gdev/mod/linux/nouveau-3.3.0/drivers/gpu/drm/i2c/sil164.mod.o
LD [M]  /home/seven/Gdev/gdev/mod/linux/nouveau-3.3.0/drivers/gpu/drm/i2c/sil164.ko
CC      /home/seven/Gdev/gdev/mod/linux/nouveau-3.3.0/drivers/gpu/drm/nouveau/nouveau.mod.o
LD [M]  /home/seven/Gdev/gdev/mod/linux/nouveau-3.3.0/drivers/gpu/drm/nouveau/nouveau.ko
CC      /home/seven/Gdev/gdev/mod/linux/nouveau-3.3.0/drivers/gpu/drm/ttm/ttm.mod.o
LD [M]  /home/seven/Gdev/gdev/mod/linux/nouveau-3.3.0/drivers/gpu/drm/ttm/ttm.ko

sudo make install NOUVEAUROOTDIR=$(TOPDIR)/gdev/mod/linux/nouveau-3.3.0

/***list***/
Makefile:649: "WARNING: Appending $KCPPFLAGS (-I/home/seven/Gdev/gdev/mod/linux/nouveau-3.3.0/include/drm) from command line to kernel $CPPFLAGS"
INSTALL /home/seven/Gdev/gdev/mod/linux/nouveau-3.3.0/drivers/gpu/drm/drm.ko
INSTALL /home/seven/Gdev/gdev/mod/linux/nouveau-3.3.0/drivers/gpu/drm/drm_kms_helper.ko
INSTALL /home/seven/Gdev/gdev/mod/linux/nouveau-3.3.0/drivers/gpu/drm/i2c/ch7006.ko
INSTALL /home/seven/Gdev/gdev/mod/linux/nouveau-3.3.0/drivers/gpu/drm/i2c/sil164.ko
INSTALL /home/seven/Gdev/gdev/mod/linux/nouveau-3.3.0/drivers/gpu/drm/nouveau/nouveau.ko
INSTALL /home/seven/Gdev/gdev/mod/linux/nouveau-3.3.0/drivers/gpu/drm/ttm/ttm.ko
DEPMOD  3.3.0-gdev+nouveau

sudo shutdown -r now

modprobe -r nouveau
(WARNING: Error removing drm_kms_helper (/lib/modules/3.3.0-gdev+nouveau/extra/drm_kms_helper.ko): Device or resource busy)

lsmod|grep nouveau
    nothing

modprobe nouveau modeset=1 noaccel=0

lsmod|grep nouveau
    nouveau               841010  0 
    ttm                    81069  1 nouveau
    mxm_wmi                 1923  1 nouveau
    video                  12694  1 nouveau
    drm_kms_helper         33865  1 nouveau,[permanent]
    drm                   247690  3 nouveau,ttm,drm_kms_helper
wuhaozju

Please help us to resolve this issue.
Thank you.

Shinpei Kato
Owner

Hmm, is there any reason that you stick with nouveau-3.3.0?
This is an old version of the patched kernel. I suggest you using a patch file. Please see below:
https://github.com/shinpei0208/gdev/blob/master/docs/README.gdev

If you still have the same problem, can you please let me know?

Shinpei

wuhaozju

@shinpei0208 Thanks for the reply.
I cannot patch the kernel downloaded by "git clone --depth 1 git://anongit.freedesktop.org/nouveau/linux-2.6".
patching file drivers/gpu/drm/nouveau/Makefile
Hunk #1 succeeded at 265 (offset 29 lines).
patching file drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c
Hunk #1 succeeded at 676 with fuzz 1 (offset 253 lines).
Hunk #2 succeeded at 699 (offset 253 lines).
patching file drivers/gpu/drm/nouveau/gdev_interface.c
patching file drivers/gpu/drm/nouveau/gdev_interface.h
patching file drivers/gpu/drm/nouveau/nouveau_chan.c
patching file drivers/gpu/drm/nouveau/nouveau_dma.h
patching file drivers/gpu/drm/nouveau/nouveau_drm.c
Hunk #1 succeeded at 87 with fuzz 2 (offset 16 lines).
Hunk #2 succeeded at 364 (offset 9 lines).
Hunk #3 FAILED at 382.
Hunk #4 succeeded at 671 with fuzz 1 (offset 64 lines).
Hunk #5 FAILED at 764.
2 out of 5 hunks FAILED -- saving rejects to file drivers/gpu/drm/nouveau/nouveau_drm.c.rej

The version of kernel mentioned above is VERSION = 3 PATCHLEVEL = 12 SUBLEVEL = 0 EXTRAVERSION = -rc3. So I download a kernel of version 3.10.1 from https://www.kernel.org/, then the patch file "gdev-nouveau-3.10.patch" residing in gdev/mod/linux/patches/ directory works.

I blacklist nouveau with options modeset = 0, then I remove nouveau by "modprobe -r nouveau" and reload it by "modprobe nouveau modeset=1 noaccel=0". If I do not blacklist nouveau, it prompts "Module nouveau is in use" when I try to remove it.

However, when I try to install the Gdev Kernel Module (step 4), linux kernel crashes. Am I making any mistakes in following the installation steps?

Thanks,
Wu Hao

Shinpei Kato
Owner

What is your GPU?

wuhaozju

GT 640

Shinpei Kato
Owner

Okay, it should work. Can you send me a kernel crush log?

Yusuke FUJII
Collaborator

Hi. @wuhaozju .
Thank you for your report.

I saw your kernel crash logs.
As I see it, it may be my commit's bug..........
If it is the bug that I think, I fixed it by @3a6aa2c.
Could you try "git pull" and "Gdev Module Installation (README.gdev: 4. Gdev Kernel Module)" once?

Thanks.

wuhaozju

Hi, @yukke0826

Thank you for your help.
I am trying it and I will report the result ASAP.

Thanks,
Wu Hao

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.