Community Packages

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#48498 - [dkms] [linux{,-lts,-zen,-grsec}-headers] VB dependency change breaks users without headers

Attached to Project: Community Packages
Opened by Jack O'Connor (oconnor663) - Monday, 07 March 2016, 23:25 GMT
Last edited by Sébastien Luttringer (seblu) - Sunday, 26 March 2017, 22:19 GMT
Task Type Feature Request
Category Packages
Status Closed
Assigned To Tobias Powalowski (tpowa)
Thomas Bächler (brain0)
Andreas Radke (AndyRTR)
Jan Alexander Steffens (heftig)
Daniel Micay (thestinger)
Sébastien Luttringer (seblu)
Architecture All
Severity Low
Priority Low
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 11
Private No



The virtualbox package recently changed from depending on virtualbox-host-modules to depending on virtualbox-host-dkms. This in turn has a dependency on the Linux headers package for the current kernel. Because different kernels have different header packages, all of these dependencies are optional. However in fact, having at least one of them is mandatory.

The result is that users who previously installed virtualbox but did not install any headers, will now be in a broken state by default, where virtualbox-host-modules gets uninstalled, but no new kernel modules get built. Most users (with the standard linux kernel package installed) need to manually install linux-headers to fix this. The only indication that they should do this, though, is when pacman reports the new optional dependencies as part of installing updates. I suspect the vast majority of users either miss this entirely or fail to recognize it as important.

Lots of discussion in this thread:

Is it possible to have the different kernel headers packages all provide some kind of virtual package, like the libgl packages do? Then virtualbox-host-dkms could take a mandatory dependency on that virtual package, and most users would be able to fix their systems when pacman asked them which provider they wanted.
This task depends upon

Closed by  Sébastien Luttringer (seblu)
Sunday, 26 March 2017, 22:19 GMT
Reason for closing:  Fixed
Comment by John (graysky) - Tuesday, 08 March 2016, 00:40 GMT
Worth distilling out from the linked thread Allan's points on the dev ML[1] as the signal-to-noise ratio in the discussion thread isn't very high.

Comment by Stefan Majewsky (majewsky) - Tuesday, 08 March 2016, 10:04 GMT
As an alternative minimal solution, you can consider letting /usr/lib/dkms/alpm-hook issue a warning when no headers are found (i.e., there is no directory matching /usr/lib/modules/*/build/include).
Comment by Allan McRae (Allan) - Tuesday, 08 March 2016, 10:20 GMT
We would also need to warn when gcc is not present, and binutils, and ...

The use of dkms should be reverted.
Comment by Jack O'Connor (oconnor663) - Tuesday, 08 March 2016, 13:38 GMT
Can anyone clarify the original reason for deprecating the binary package? If it's just to create a better story for users on other kernels, that seems like the kind of thing we could solve with another Provides: dependency, while keeping the binaries for users on the default kernels.
Comment by Doug Newgard (Scimmia) - Tuesday, 08 March 2016, 14:06 GMT
Allan, VB's use of DKMS isn't the main issue here.
Comment by Jack O'Connor (oconnor663) - Tuesday, 08 March 2016, 19:42 GMT
An example user report:

My guess is that there are a lot of people in this state. Is there a stopgap change we could make to fix people, without waiting to resolve the questions that Allan mentioned? Options I can think of:

1. Revert the dependency change temporarily.
2. Make `virtualbox-host-dkms` take a temporary required dependency on `linux-headers`.
3. As #2, but make it a virtual dependency that any headers package can provide. (This sounds better long term, but it might need too much discussion to work as a stopgap?)
4. Publish something on Arch News.
Comment by Sébastien Luttringer (seblu) - Tuesday, 08 March 2016, 21:01 GMT
I think the better way to fix this is a provides from our kernel headers packages (something like kernel-headers is fine). This is the best solution to fix the current bug report IMHO.

I can also point this earlier thread, where I announced my plan to move forward with dkms modules and asking for feedback.

I like the idea of adding warning message when a module is registered but headers of an installed kernel are missing.
I would also not disable the current behavior of building modules when only the headers (not the kernel) is installed, because it runs depmod and create conflict with files in /usr/lib/modules/$kver/depmod.*

Packages needed to build the dkms modules are pulled by the dkms module package. So, gcc (which pull binutils) and make are pulled by vbox-host-dkms. Did I miss a technical problem here?
Comment by Federico (fedev) - Tuesday, 08 March 2016, 23:24 GMT
So this hit me too. I don't have the kernel headers installed. I do not have a use for them a take a large amount of disk space. After the last upgrade, I now get this:

Mar 09 06:38:21 host systemd[1]: Failed to start Load Kernel Modules.
Mar 09 06:38:21 host systemd-modules-load[402]: Failed to find module 'vboxdrv'

Like many others pointed out, there was no notice about the need to have the headers. I can get the modules back by installing 'virtualbox-host-modules' but I can't remove 'virtualbox-host-dkms' directly because of a self-dependency?

sudo pacman -Rns virtualbox-host-dkms
checking dependencies...
error: failed to prepare transaction (could not satisfy dependencies)
:: virtualbox: removing virtualbox-host-dkms breaks dependency 'virtualbox-host-dkms'

Of course running "pacman -Rns -dd virtualbox-host-dkms" gets rid of it.
Comment by Doug Newgard (Scimmia) - Wednesday, 09 March 2016, 00:19 GMT
"Like many others pointed out, there was no notice about the need to have the headers."

Yes, there was. You just have to pay attention to what pacman tells you.
% pacman -Qi dkms
Optional Deps : linux-headers: build modules against Arch kernel [installed]
linux-lts-headers: build modules against LTS Arch kernel [installed]
Comment by Allan McRae (Allan) - Wednesday, 09 March 2016, 00:28 GMT
That is the latest version. Anyone who installed the earlier version of the package just got:

Optional Deps : linux-headers

Which is completely non-informative.
Comment by Doug Newgard (Scimmia) - Wednesday, 09 March 2016, 00:46 GMT
Not sure what earlier version would be an issue, since the optdepends with descriptions were added in 2012.
Comment by Allan McRae (Allan) - Wednesday, 09 March 2016, 00:54 GMT
Not for the virtualbox-host-dkms package
Comment by Sébastien Luttringer (seblu) - Wednesday, 09 March 2016, 02:10 GMT
ok, I improved the description in optdepds for vbox-{host,guest}-dkms packages. I also added zen and grsec headers. Btw, not sure using vbox with grsec could work.
Comment by Doug Newgard (Scimmia) - Wednesday, 09 March 2016, 02:58 GMT
"Not for the virtualbox-host-dkms package"

Which is both outside the scope of this ticket, and redundant anyway.
Comment by Frank Vanderham (twelveeighty) - Wednesday, 09 March 2016, 14:33 GMT
FYI - See for the Task scope related to bringing back virtualbox-host-modules
Comment by jb (jb.1234abcd) - Friday, 11 March 2016, 11:30 GMT
I have read all possible threads on this topic.
The prevailing view is that we should revert to pre-dkms changes, i.e. back to use of virtualbox-host-modules.
I experienced it myself and think it was not done professionally (learning from pacman update about vb modules
handling change, then frantically looking for some news about it on the main web site, vb wiki page stating that
for regular kernel no dkms was involved, etc).

I think you should draw some conclusion from this users disturbance.
At least take a break, and then return to it on dev list if at all.
Comment by Doug Newgard (Scimmia) - Friday, 11 March 2016, 12:39 GMT
@jb, outside the scope of this ticket. This is about how headers are handled with the dkkms package. The virtualbox change just brought it to the forefront.
Comment by Jack O'Connor (oconnor663) - Friday, 11 March 2016, 15:23 GMT
@Scimmia, my intention was for "breaks users" to be the focus of this ticket. Would it be helpful if I filed another one?
Comment by jb (jb.1234abcd) - Friday, 11 March 2016, 15:29 GMT

This seems to be a good place:
Comment by Doug Newgard (Scimmia) - Friday, 11 March 2016, 16:03 GMT
@Jack, if that was the intention, I should have just closed it. You brought one specific issue up, the problem with the dkms package and headers, so we went with that.
Comment by Sébastien Luttringer (seblu) - Saturday, 12 March 2016, 16:40 GMT
New version of dkms ( is now displaying warning message when you installing only the kernel or only the headers (and refuse to build)
Comment by Sébastien Luttringer (seblu) - Sunday, 13 March 2016, 18:43 GMT
I added a _temporary_ dep on linux-headers in vbox-host-dkms v5.0.16-2 to prevent user intervention until we figure out a good way to require a headers to be installed.
This finally seems to create more trouble than it solves so I will remove it in -3.