Community Packages

Please read this before reporting a bug:
http://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

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

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#65053 - [virtualbox-guest-dkms] Build module vboxguest to allow screen-resizing when using VMSVGA

Attached to Project: Community Packages
Opened by TotallyNot Elite (TotallyNotElite) - Sunday, 05 January 2020, 00:37 GMT
Last edited by Christian Hesse (eworm) - Friday, 17 July 2020, 06:30 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Christian Hesse (eworm)
Architecture x86_64
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 7
Private No

Details

Description:
Currently, virtualbox-guest-dkms does not build the kernel module "vboxguest" when compiling for kernel 4.16 or above. This makes automatic screen-resizing (guest) (controlled by /usr/bin/VBoxClient --vmsvga) error out (see image ss1.png) when the display controlled "vmsvga" is used in Virtualbox (host). Letting vboxguest build on kernels >= 4.16 lets screen-resizing work correctly. (see image ss2.png, resizing works)

Additional info:
* package version(s)
6.1.0-1
* config and/or log files etc.
See attached images
* link to upstream bug report, if any
none, Archlinux specific issue

Steps to reproduce:
1. Create an Archlinux VM in Virtualbox with the display controller set to "vmsvga" (default)
2. Install Archlinux normally with Xorg and some DE (I used lxqt for testing)
3. Install virtualbox-guest-utils and virtualbox-guest-dkms
4. Launch VBoxClient with parameters "-d -v --vmsvga"

Steps to fix:
1. Let vboxguest build on kernels 4.16 and above. Check file "virtualbox-guest-dkms.conf"
   ss1.png (63.3 KiB)
   ss2.png (15.2 KiB)
This task depends upon

Closed by  Christian Hesse (eworm)
Friday, 17 July 2020, 06:30 GMT
Reason for closing:  Fixed
Additional comments about closing:  virtualbox 6.1.12-1 and linux 5.7.9.arch1-1
Comment by Doug Newgard (Scimmia) - Sunday, 05 January 2020, 00:39 GMT
vboxguest is part of the kernel now
Comment by TotallyNot Elite (TotallyNotElite) - Sunday, 05 January 2020, 00:53 GMT
I am aware, but this issue still persists. The version in the kernel doesn't seem to be up-to-date maybe? VMSVGA was introduced in virtualbox 6.0. It's important to note that the ISO guest additions also build vboxguest, vboxsf and vboxvideo so it works correctly there too.
Comment by TotallyNot Elite (TotallyNotElite) - Sunday, 05 January 2020, 16:24 GMT
Oh, are you saying that an issue involving vboxguest is out of scope for this package/the Archlinux issue tracker and should rather be reported to the Kernel itself? Unfortunate.
Comment by Lin Xiao (xiaoliniess) - Sunday, 12 January 2020, 14:43 GMT
The situation is not ideal for virtualbox, especially in distribution like archlinux.

Archlinux upgrade kernel so aggressively that the upstream virtualbox module may not compile against the latest kernel. With vboxguest and vboxvideo interated into linux kernel, and vboxsf integration is also under review, we may have at least all guest modules in the kernel source tree so they are guaranteed to work with all later kernels. So it's understandable that the maintainer prefer the in kernel modules.

But those in kernel modules are submitted by third party, virtualbox upstream won't maintain them. And virtualbox often change both the api between guest to host and guest kernel to guest user space. The in kernel modules don't follow upstream close enough, so new virtualbox may break them.

Currently there are at least three major bugs related to virtualbox guest in archlinux, #64806, #61307, and this one. Switching to use upstream kernel moudules can solve all 3 problems, for now at least. But we may soon face the dilemma as new kernel released and virtualbox kernel modules failed to compile.
Comment by Jared Sutton (jpsutton) - Thursday, 16 January 2020, 17:54 GMT
I commented out the "BUILD_EXCLUSIVE_KERNEL" line, and adjusted the "DEST_MODULE_LOCATION" lines to match the in-tree locations of these modules (rather than placing them in "/kernel/misc") in virtualbox-guest-dkms.conf and rebuild the package locally. I'm not sure if adjusting the module location was completely necessary, but it was bugging me that there were 2 versions of the modules floating around in /lib/modules/... and I didn't know which one was loading, so it made sense to me to replace the broken (in-tree) one.

After installing and rebooting, screen-resizing still did not work. I added a new systemd service to run VBoxClient with the correct parameters (as indicated in step 4 of the original report above) as root. This resolved the screen resizing problem for me. Any attempt to run "VBoxClient -d -v --vmsvga" as the user inside the X session was met with multiple "VERR_ACCESS_DENIED" errors, and non-functioning screen resizing.

Comment by TotallyNot Elite (TotallyNotElite) - Sunday, 19 January 2020, 13:01 GMT
@jpsutton can you check the permissions of the file "/dev/vboxuser"? Running "chmod 666 /dev/vboxuser" as root should fix this issue.
Comment by Jared Sutton (jpsutton) - Sunday, 19 January 2020, 13:58 GMT
<deleted>
Comment by Jared Sutton (jpsutton) - Sunday, 19 January 2020, 14:01 GMT
@TotallyNotElite the permissions of the device already seem correct:

$ ls -la /dev/vboxuser
crw-rw-rw- 1 root root 10, 58 Jan 19 2020 /dev/vboxuser
Comment by TotallyNot Elite (TotallyNotElite) - Sunday, 19 January 2020, 14:21 GMT
@jpsutton and running it without root still throws said error? You should be aware that the permissions are usually automatically set correctly after a reboot.
Comment by Lin Xiao (xiaoliniess) - Sunday, 19 January 2020, 14:24 GMT
VBoxClient --vmsvga is supposed to run by root. You don't need to change anything.
Ubuntu just run is along with VBoxService
Comment by TotallyNot Elite (TotallyNotElite) - Tuesday, 21 January 2020, 19:52 GMT
@xiaoliniess you're absolutely right. I was confused because the same doesn't apply for the other vboxclient "modes". Sorry for the misinformation.

> Archlinux upgrade kernel so aggressively that the upstream virtualbox module may not compile against the latest kernel. With vboxguest and vboxvideo interated into linux kernel, and vboxsf integration is also under review, we may have at least all guest modules in the kernel source tree so they are guaranteed to work with all later kernels. So it's understandable that the maintainer prefer the in kernel modules.

Ironically, the same is currently the case with kernel 5.5.

Commenting out one line (dkms.conf of vboxguest, remove kernel version constraint) in the package archive makes it work on kernel 5.4 and below, but it fails to build on kernel 5.5 as far as I could tell.
Comment by TotallyNot Elite (TotallyNotElite) - Thursday, 11 June 2020, 20:23 GMT
We've got some progress on this upstream! https://lkml.org/lkml/2020/5/20/1301

I'd also like to contribute some (packaging related) changes to the package "virtualbox-guest-utils" that would further remedy this problem, would I just submit a patch via email to Christian Hesse?
Comment by Patrick Goetz (pgoetz) - Friday, 12 June 2020, 21:11 GMT
Using the LTS kernel (5.4.45) with xorg-server-xvfb, I can't get the resizing to work after installing the DKMS virtualbox-guest-utils; using either the VMSVGA or the VboxVGA Display setting. I get the "VBoxClient: Failed to get display change request, rc=VERR_ACCESS_DENIED" error dialog when trying to resize with Display=VboxVGA, but this goes away when Display=VMSVGA; the screen just silently doesn't resize. Nothing is logged to /var/log/Xorg.0.log.
The Arch Wiki page https://wiki.archlinux.org/index.php/VirtualBox/Install_Arch_Linux_as_a_guest suggests:

When using the packaged guest additions (virtualbox-guest-utils) in Arch guests, guest display auto-resizing does not work with the VMSVGA graphics adapter.
Either choose a different graphics controller (i.e. VBoxSVGA or VBoxVGA) or install the guest additions from the ISO (while the guest is running, go to Devices > Insert Guest Additions CD Image..., mount the CD, and in the guest run VBoxLinuxAdditions.run with root permissions).

Neither of these worked (and wouldn't expect the latter to work with the LTS kernel, since I'm running the stock kernel on the VirtualBox host. Mostly commenting to get update notifications.
Comment by john (pm3841) - Sunday, 12 July 2020, 18:03 GMT
VBoxVGA together with virtualbox-guest-utils-6.1.4-6-x86_64.pkg.tar.zst works. Clipboard/Autosize at least.
Comment by Christian Hesse (eworm) - Friday, 17 July 2020, 06:30 GMT
This should be fixed with virtualbox 6.1.12-1 and linux 5.7.9.arch1-1 (or linux-lts 5.4.52-1) when using VMSVGA.

Loading...