You are not logged in.

#1 2018-12-19 13:50:45

b3n10
Member
Registered: 2018-11-03
Posts: 14

[SOLVED] Virtualbox: Module vboxdrv not found Linux 4.4 LTS

I am using linux-lts44 from AUR. And both linux and linux-headers are installed:

$ sudo pacman -Q linux-lts44
linux-lts44 4.4.168-1

$ sudo pacman -Q linux-lts44-headers
linux-lts44-headers 4.4.168-1

but when I load the module manually, I get this error:

$ sudo modprobe vboxdrv
modprobe: FATAL: Module vboxdrv not found in directory /lib/modules/4.4.168-1-lts4

I found this same issue [SOLVED] VirtualBox: modprobe vboxdrv failure and solution was to install virtualbox-host-dkms, but I'm getting Error! Bad return status for module build on kernel: 4.4.168-1-lts44 (x86_64)

$ sudo pacman -S virtualbox-host-dkms
warning: virtualbox-host-dkms-5.2.22-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) virtualbox-host-dkms-5.2.22-1

Total Installed Size:  11.56 MiB
Net Upgrade Size:       0.00 MiB

:: Proceed with installation? [Y/n]
(1/1) checking keys in keyring                                                                         [############################################################] 100%
(1/1) checking package integrity                                                                       [############################################################] 100%
(1/1) loading package files                                                                            [############################################################] 100%
(1/1) checking for file conflicts                                                                      [############################################################] 100%
(1/1) checking available disk space                                                                    [############################################################] 100%
:: Running pre-transaction hooks...
(1/1) Remove DKMS modules
:: Processing package changes...
(1/1) reinstalling virtualbox-host-dkms                                                                [############################################################] 100%
:: Running post-transaction hooks...
(1/2) Install DKMS modules
==> dkms install vboxhost/5.2.22_OSE -k 4.4.168-1-lts44
Error! Bad return status for module build on kernel: 4.4.168-1-lts44 (x86_64)
Consult /var/lib/dkms/vboxhost/5.2.22_OSE/build/make.log for more information.
(2/2) Arming ConditionNeedsUpdate...

contents of /var/lib/dkms/vboxhost/5.2.22_OSE/build/make.log:

$ cat /var/lib/dkms/vboxhost/5.2.22_OSE/build/make.log
DKMS make.log for vboxhost-5.2.22_OSE for kernel 4.4.168-1-lts44 (x86_64)
Wed Dec 19 21:38:52 PST 2018
make: Entering directory '/usr/lib/modules/4.4.168-1-lts44/build'
  LD      /var/lib/dkms/vboxhost/5.2.22_OSE/build/built-in.o
  LD      /var/lib/dkms/vboxhost/5.2.22_OSE/build/vboxnetadp/built-in.o
  LD      /var/lib/dkms/vboxhost/5.2.22_OSE/build/vboxdrv/built-in.o
  LD      /var/lib/dkms/vboxhost/5.2.22_OSE/build/vboxnetflt/built-in.o
  LD      /var/lib/dkms/vboxhost/5.2.22_OSE/build/vboxpci/built-in.o
  CC [M]  /var/lib/dkms/vboxhost/5.2.22_OSE/build/vboxnetadp/linux/VBoxNetAdp-linux.o
  CC [M]  /var/lib/dkms/vboxhost/5.2.22_OSE/build/vboxdrv/linux/SUPDrv-linux.o
  CC [M]  /var/lib/dkms/vboxhost/5.2.22_OSE/build/vboxnetflt/linux/VBoxNetFlt-linux.o
  CC [M]  /var/lib/dkms/vboxhost/5.2.22_OSE/build/vboxpci/linux/VBoxPci-linux.o
  CC [M]  /var/lib/dkms/vboxhost/5.2.22_OSE/build/vboxnetadp/VBoxNetAdp.o
  CC [M]  /var/lib/dkms/vboxhost/5.2.22_OSE/build/vboxpci/VBoxPci.o
  LD [M]  /var/lib/dkms/vboxhost/5.2.22_OSE/build/vboxnetadp/vboxnetadp.o
  CC [M]  /var/lib/dkms/vboxhost/5.2.22_OSE/build/vboxpci/SUPR0IdcClient.o
  CC [M]  /var/lib/dkms/vboxhost/5.2.22_OSE/build/vboxdrv/SUPDrv.o
  CC [M]  /var/lib/dkms/vboxhost/5.2.22_OSE/build/vboxpci/SUPR0IdcClientComponent.o
  CC [M]  /var/lib/dkms/vboxhost/5.2.22_OSE/build/vboxpci/linux/SUPR0IdcClient-linux.o
  CC [M]  /var/lib/dkms/vboxhost/5.2.22_OSE/build/vboxnetflt/VBoxNetFlt.o
  CC [M]  /var/lib/dkms/vboxhost/5.2.22_OSE/build/vboxnetflt/SUPR0IdcClient.o
  LD [M]  /var/lib/dkms/vboxhost/5.2.22_OSE/build/vboxpci/vboxpci.o
  CC [M]  /var/lib/dkms/vboxhost/5.2.22_OSE/build/vboxnetflt/SUPR0IdcClientComponent.o
  CC [M]  /var/lib/dkms/vboxhost/5.2.22_OSE/build/vboxnetflt/linux/SUPR0IdcClient-linux.o
  CC [M]  /var/lib/dkms/vboxhost/5.2.22_OSE/build/vboxdrv/SUPDrvGip.o
  LD [M]  /var/lib/dkms/vboxhost/5.2.22_OSE/build/vboxnetflt/vboxnetflt.o
  CC [M]  /var/lib/dkms/vboxhost/5.2.22_OSE/build/vboxdrv/SUPDrvSem.o
  CC [M]  /var/lib/dkms/vboxhost/5.2.22_OSE/build/vboxdrv/SUPDrvTracer.o
  CC [M]  /var/lib/dkms/vboxhost/5.2.22_OSE/build/vboxdrv/SUPLibAll.o
  CC [M]  /var/lib/dkms/vboxhost/5.2.22_OSE/build/vboxdrv/r0drv/alloc-r0drv.o
  CC [M]  /var/lib/dkms/vboxhost/5.2.22_OSE/build/vboxdrv/r0drv/initterm-r0drv.o
  CC [M]  /var/lib/dkms/vboxhost/5.2.22_OSE/build/vboxdrv/r0drv/memobj-r0drv.o
  CC [M]  /var/lib/dkms/vboxhost/5.2.22_OSE/build/vboxdrv/r0drv/mpnotification-r0drv.o
  CC [M]  /var/lib/dkms/vboxhost/5.2.22_OSE/build/vboxdrv/r0drv/powernotification-r0drv.o
  CC [M]  /var/lib/dkms/vboxhost/5.2.22_OSE/build/vboxdrv/r0drv/linux/assert-r0drv-linux.o
  CC [M]  /var/lib/dkms/vboxhost/5.2.22_OSE/build/vboxdrv/r0drv/linux/alloc-r0drv-linux.o
  CC [M]  /var/lib/dkms/vboxhost/5.2.22_OSE/build/vboxdrv/r0drv/linux/initterm-r0drv-linux.o
  CC [M]  /var/lib/dkms/vboxhost/5.2.22_OSE/build/vboxdrv/r0drv/linux/memobj-r0drv-linux.o
/var/lib/dkms/vboxhost/5.2.22_OSE/build/vboxdrv/r0drv/linux/memobj-r0drv-linux.c: In function ‘rtR0MemObjNativeLockUser’:
/var/lib/dkms/vboxhost/5.2.22_OSE/build/vboxdrv/r0drv/linux/memobj-r0drv-linux.c:1122:33: warning: passing argument 6 of ‘get_user_pages’ makes pointer from integer without a cast [-Wint-conversion]
                                 fWrite,                 /* force write access. */
                                 ^~~~~~
In file included from /var/lib/dkms/vboxhost/5.2.22_OSE/build/vboxdrv/r0drv/linux/the-linux-kernel.h:98,
                 from /var/lib/dkms/vboxhost/5.2.22_OSE/build/vboxdrv/r0drv/linux/memobj-r0drv-linux.c:31:
include/linux/mm.h:1202:45: note: expected ‘struct page **’ but argument is of type ‘int’
       unsigned int gup_flags, struct page **pages,
                               ~~~~~~~~~~~~~~^~~~~
/var/lib/dkms/vboxhost/5.2.22_OSE/build/vboxdrv/r0drv/linux/memobj-r0drv-linux.c:1124:33: warning: passing argument 7 of ‘get_user_pages’ from incompatible pointer type [-Wincompatible-pointer-types]
                                 &pMemLnx->apPages[0],   /* Page array. */
                                 ^~~~~~~~~~~~~~~~~~~~
In file included from /var/lib/dkms/vboxhost/5.2.22_OSE/build/vboxdrv/r0drv/linux/the-linux-kernel.h:98,
                 from /var/lib/dkms/vboxhost/5.2.22_OSE/build/vboxdrv/r0drv/linux/memobj-r0drv-linux.c:31:
include/linux/mm.h:1203:31: note: expected ‘struct vm_area_struct **’ but argument is of type ‘struct page **’
       struct vm_area_struct **vmas);
       ~~~~~~~~~~~~~~~~~~~~~~~~^~~~
/var/lib/dkms/vboxhost/5.2.22_OSE/build/vboxdrv/r0drv/linux/memobj-r0drv-linux.c:1112:18: error: too many arguments to function ‘get_user_pages’
             rc = get_user_pages(pTask,                  /* Task for fault accounting. */
                  ^~~~~~~~~~~~~~
In file included from /var/lib/dkms/vboxhost/5.2.22_OSE/build/vboxdrv/r0drv/linux/the-linux-kernel.h:98,
                 from /var/lib/dkms/vboxhost/5.2.22_OSE/build/vboxdrv/r0drv/linux/memobj-r0drv-linux.c:31:
include/linux/mm.h:1200:6: note: declared here
long get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
      ^~~~~~~~~~~~~~
  CC [M]  /var/lib/dkms/vboxhost/5.2.22_OSE/build/vboxdrv/r0drv/linux/memuserkernel-r0drv-linux.o
make[2]: *** [scripts/Makefile.build:277: /var/lib/dkms/vboxhost/5.2.22_OSE/build/vboxdrv/r0drv/linux/memobj-r0drv-linux.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [scripts/Makefile.build:484: /var/lib/dkms/vboxhost/5.2.22_OSE/build/vboxdrv] Error 2
make: *** [Makefile:1436: _module_/var/lib/dkms/vboxhost/5.2.22_OSE/build] Error 2
make: Leaving directory '/usr/lib/modules/4.4.168-1-lts44/build'

What should I do next?

UPDATE:
Problem solved by modifying get_user_pages from /usr/lib/modules/4.4.168-1-lts44/build/include/linux/mm.h

long get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
            unsigned long start, unsigned long nr_pages,
            int write, int force, struct page **pages,
            struct vm_area_struct **vmas);

You will get another error "libQt5Core.so.5: cannot open shared object file: No such file or directory" when running virtualbox because qt5.12 has problems running on kernels below 4.11. To fix this, remove qt5-base and replace wit qt5-base-nostatx from AUR.

Last edited by b3n10 (2018-12-20 01:59:22)

Offline

#2 2018-12-19 14:13:29

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: [SOLVED] Virtualbox: Module vboxdrv not found Linux 4.4 LTS

Adapt the current PKGBUILD to the 4.4.x series of kernels?


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#3 2018-12-19 14:40:22

b3n10
Member
Registered: 2018-11-03
Posts: 14

Re: [SOLVED] Virtualbox: Module vboxdrv not found Linux 4.4 LTS

graysky wrote:

Adapt the current PKGBUILD to the 4.4.x series of kernels?

sorry I didn't understand what you mean sad

But I installed linux-lts 4.4 by downloading the snapshot: https://aur.archlinux.org/cgit/aur.git/ … s44.tar.gz
then run makepkg -si

Offline

#4 2018-12-19 14:58:23

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: [SOLVED] Virtualbox: Module vboxdrv not found Linux 4.4 LTS

Without looking deeper into it, a few things come to mind:
1) The PKGBUILD for vb needs to be tweaked to accommodate something unique to the 4.4.x series
2) The vb code needs to be tweaked
3) The DKMS code needs to be tweaked

...do you really need the 4.4 series of kernels?  Have you tried the current lts from [core] (4.14.x)?


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#5 2018-12-19 15:08:00

b3n10
Member
Registered: 2018-11-03
Posts: 14

Re: [SOLVED] Virtualbox: Module vboxdrv not found Linux 4.4 LTS

graysky wrote:

Without looking deeper into it, a few things come to mind:
1) The PKGBUILD for vb needs to be tweaked to accommodate something unique to the 4.4.x series
2) The vb code needs to be tweaked
3) The DKMS code needs to be tweaked

...do you really need the 4.4 series of kernels?  Have you tried the current lts from [core] (4.14.x)?

looks very complicated to "tweak" those codes LOL

I was on 4.19.x stable but my thinkpad x220 freezes when waking from suspend, so I tried switching to other kernel and chose 4.4 LTS which fixed my freezing problem.

I haven't tried 4.14.x LTS but I will do that now then update you.

Offline

#6 2018-12-19 15:47:34

b3n10
Member
Registered: 2018-11-03
Posts: 14

Re: [SOLVED] Virtualbox: Module vboxdrv not found Linux 4.4 LTS

switched to 4.14x LTS which fixed problem on virtualbox but not on my freezing issue sad

Offline

#7 2018-12-19 16:43:28

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: [SOLVED] Virtualbox: Module vboxdrv not found Linux 4.4 LTS

Can't help you.... you will need to figure out why you cannot build for the 4.4.x series of kernel or find the root cause of the freeze and stick with a more modern kernel.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#8 2018-12-19 17:51:14

loqs
Member
Registered: 2014-03-06
Posts: 17,315

Re: [SOLVED] Virtualbox: Module vboxdrv not found Linux 4.4 LTS

Signature of get_user_pages from 4.19

long get_user_pages(unsigned long start, unsigned long nr_pages,
			    unsigned int gup_flags, struct page **pages,
			    struct vm_area_struct **vmas);

Signature of get_user_pages from 4.4

long get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
		    unsigned long start, unsigned long nr_pages,
		    int write, int force, struct page **pages,
		    struct vm_area_struct **vmas);

Online

#9 2018-12-20 01:54:47

b3n10
Member
Registered: 2018-11-03
Posts: 14

Re: [SOLVED] Virtualbox: Module vboxdrv not found Linux 4.4 LTS

loqs wrote:

Signature of get_user_pages from 4.19

long get_user_pages(unsigned long start, unsigned long nr_pages,
			    unsigned int gup_flags, struct page **pages,
			    struct vm_area_struct **vmas);

Signature of get_user_pages from 4.4

long get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
		    unsigned long start, unsigned long nr_pages,
		    int write, int force, struct page **pages,
		    struct vm_area_struct **vmas);

Thanks this fixed the problem. But now when I run virtualbox, I get this error: libQt5Core.so.5: cannot open shared object file: No such file or directory.

And according to this thread, qt5.12 has problems running on kernels below 4.11. This can be fixed by using newest kernel-lts (4.14.x) or stay with 4.4.x then replace qt5-base with qt5-base-nostatx from AUR. I've managed to remove qt5-base:

$ sudo pacman -Rdd qt5-base

then install qt5-base-nostatx and was able to launch virtualbox with 4.4.x kernel.

EDIT: virtualbox manager opens fine but it hangs when launching any virtual machine. I switched back to qt5-base and 4.14.x and was able to run VM. Problem could be with qt5-base-nostatx and not the 4.4.x kernel. Still mark this as SOLVED.

Last edited by b3n10 (2018-12-20 03:02:57)

Offline

Board footer

Powered by FluxBB