2

I'm trying to properly install virtualbox guest additions to a guest linux Debian virtual machine. The problem is that video performance, at 1920x1080 is crap. The host is a macOS core i5 with a radeon R9 M395.

I've installed all virtualbox-guest packages: virtualbox-guest-x11 virtualbox-guest-dkms virtualbox-guest-addittions

After looking inside /var/log/Xorg.0.log it seems that vboxvideo module is not loading.

$ cat /var/log/Xorg.0.log
...
[    15.387] (II) LoadModule: "vboxvideo"
[    15.388] (WW) Warning, couldn't open module vboxvideo
[    15.388] (II) UnloadModule: "vboxvideo"
[    15.388] (II) Unloading vboxvideo
[    15.388] (EE) Failed to load module "vboxvideo" (module does not exist, 0)
...

$ dkms stat
virtualbox-guest, 5.1.12, 4.8.0-2-amd64, x86_64: installed
$ uname -r
4.8.0-2-amd64
$ lsmod| grep vbox
vboxsf                 49152  0
vboxvideo              49152  2
vboxguest             282624  6 vboxsf,vboxvideo
ttm                    98304  1 vboxvideo
drm_kms_helper        155648  1 vboxvideo
drm                   360448  5 vboxvideo,ttm,drm_kms_helper

What's happening?

Where could I locate vboxvideo module? What is the filename?

Where shall I look next?

  • can you edit your question and show dkms status and uname -r – user192526 Jan 10 '17 at 8:39
  • I've no access right now to the host machine (I will add raw data as soon as I have access), but I can assure that kernel modules are properly build and loaded. Kernel version is either 4.8.0-1-amd64 or 4.8.0-2-amd64. – kikeenrique Jan 10 '17 at 10:12
3

The vbox video module has to be in the guest. You have to mount the additions iso in the vbox control panel, which will then show the iso cd contents on boot after you mount the cd, then you run the vbox additions installer from the iso contents, which installs all the required drivers. Once the drivers are installed in the guest, vbox will be good to go. I never use the debian packages for my debian vms, I use the iso installer directly.

It's slightly unclear from your question about what is in host and what is in guest. So I'll treat this in two sections, the first assumes no guest additions have been installed, or have been incorrectly installed, and the second is how to actually enable resizable screens. Jump down to the last section first in case your debian guest packages are all fine and there is no issue, look for the enable screen resizing option to be non grayed out, if it is, your guest modules are fine, if it's not, proceed to the first steps and get the modules properly installed.

As an aside, but also possibly the actual answer to your question, my /var/log/Xorg.0.log on this vbox install also says that vboxvideo is failing/unloaded, because module is not installed, but when I check with lsmod, it is, and my screen display resolution once I corrected the vbox driver issues proves it is, so that Xorg.0.log data may be an xorg bug, unrelated to your issue. Xorg.0.log however says that the actual driver is "modesetting" even though it's not loaded, so my suspiction is that there is an issue in Xorg/vboxvideo that makes xorg think the vboxvideo driver is not available when it is. You can see this by simply using lsmod on the booted install. Also you can see if it the advanced screen resize features work or are enabled, if they are, the driver is working.

Installing Guest Additions:

I never use the debian packages in the guest because I prefer to install vbox directly from Oracle, and for the guestadditions to likewise come directly from oracle, to match all the versions, but if you use debian packages, I believe it's really just virtualbox-guest-x11, virtualbox-guest-utils (though your xorg log output suggests that in fact that was failing). Also, you don't have to learn every distro's vbox guest package ins and outs if you use the stuff directly from oracle, you just run the guest additions installer .run package. I've used that method for about 10 years, and never had an issue with it.

I never use the guest distro packages, as noted, so I can't say anything about why they would fail, nor can I debug issues with them (that's why I use the direct install, it's always reliable unless there is a kernel support issue, but that will impact the debian packages too). Basically all the debian packages are is a wrapper around what guestadditions installer would have installed in the first place, that's really all those packages do, which means just another possible point of error or failure.

Take the host vbox master window, select your guest, then select settings, then make sure you the iso is mounted as an optical drive.

Then navigate to the location the iso is at. In Debian Stretch host, with vbox 5.1, that iso is at (use locate or similar tool to find the file):

 /usr/share/virtualbox/VBoxGuestAdditions.iso

Mount this iso, boot the guest, then mount the cd image in the guest.

# mount /dev/cdrom /media
ls -w 1 /media
32Bit
64Bit
AUTORUN.INF
autorun.sh
...
VBoxLinuxAdditions.run

then run it:

#/media/VBoxLinuxAdditions.run

This runs the installer, and will install the correct guest additions for the host system and guest. Reboot the guest, if necessary.

The host vbox version should match with the guest additions iso contents, which means if you install vbox directly, along with the guest additions download, in the host, you know that's the right version, and if you then also install the guest drivers from the iso files directly, you know those are right. I'm updating my vbox to check this since I don't use it much anymore.

Installing Required Packages to Build Kernel Modules:

NOTE: on installing guest additions, you have to have: make gcc plus your kernel headers installed, that's the problem i had. If you see vboxadd install fail message on the guest additions install, that's why.

So install the linux-image, linux-headers, gcc, and make, reboot, and then run (this actually will just run by itself after kernel reinstall):

service vboxadd setup 

again, or better, install kernel/ headers/gcc/make before you start, then the vbox guest additions installer will get it all running correctly, and the drivers will get installed, the enable resize switch will be active, and you can set your guest to whatever size you want. Actually, as soon as I installed the latest kernel image/header packages, vboxadd ran automatically, so once I reboot, I had access to all the formerly grayed out controls, full resolution, copy paste etc.

Enabling Resizable Guest Windows Once GuestAdditions Modules are correctly installed

These last two things might be all you needed all along, but the overall answer should help many people who have failed to actually install the guest additions properly in the first place, or who, like me, forgot to install or check that gcc, make, and kernel headers are also installed.

There's a few details I'm not sure about, like setting the desired screen size, since I never use that feature beyond resizing the screen on boot, so here's how to do that.

https://forums.virtualbox.org/viewtopic.php?f=2&t=68966 that vbox forum thread covers specific questions about getting larger resolutions.

First, make sure you are not in fullscreen mode: i.e. switch to your windowed 1280x1024 mode (or whatever windowed mode suits you).

IMPORTANT. Make sure that View|Auto resize guest display is enabled (checked).

Make sure that the Guest Additions are installed, not merely having the GAs CD mounted. If they are installed then there should be an icon on the guest taskbar which will tell you the GAs version and status.

Carefully drag the bottom edge of the VM window to reduce the screen height. You are trying to achieve a 16:9 ratio, so with a 1280 display width you want a display height of 720, exactly.

Shut down the VM completely (not suspend), then restart it. We want windows to start up, seeing a 16:9 ratio while booting up. This should make it happy to accept other 16:9 ratios.

I couldn't initially find the autosize option, it was grayed out, in-active until I actually got the vbox modules built. It's an option in the guest container top menu, view, but mine was grayed out since the module wasn't actually built until I corrected the missing kernel headers/gcc/make issue.

Assuming you installed the modules following the above method, you'd then reboot. After the system is fully started (at login screen, that is), you'll see the option in the guest container window: View -> AutoResize Guest Display, no longer grayed out. Enable it.

Then go down to: View -> Virtual Screen1 -> select the display size you want.

And there it is:

inxi -bxxx
System:    Host: vm-openbox Kernel: 3.13.0-107-generic i686 (32 bit gcc: 4.8.4)
           Desktop: Openbox 3.5.2 dm: lightdm Distro: Ubuntu Trusty Tahr (development branch)
Machine:   Device: virtualbox System: innotek product: VirtualBox v: 1.2 Chassis: Oracle type: 1
           Mobo: Oracle model: VirtualBox v: 1.2 BIOS: innotek v: VirtualBox date: 12/01/2006
CPU:       Single core AMD Athlon 64 X2 5000+ (-UP-) speed: 2594 MHz (max)
Graphics:  Card: InnoTek Systemberatung VirtualBox Graphics Adapter bus-ID: 00:02.0 chip-ID: 80ee:beef
           Display Server: X.Org 1.14.5 drivers: (unloaded: fbdev,vesa) Resolution: 1920x1080@60.0hz
           GLX Renderer: Gallium 0.4 on llvmpipe (LLVM 3.3, 128 bits)
           GLX Version: 2.1 Mesa 10.0.0 Direct Rendering: Yes
Network:   Card: Intel 82540EM Gigabit Ethernet Controller
           driver: e1000 v: 7.3.21-k8-NAPI port: d010 bus-ID: 00:03.0 chip-ID: 8086:100e
Drives:    HDD Total Size: 8.6GB (31.4% used)
Info:      Processes: 94 Uptime: 3 min Memory: 106.2/908.8MB
           Init: Upstart v: 1.11 runlevel: 2 default: 2 Gcc sys: 4.8.4
           Client: Shell (bash 4.2.451 running in xfce4-terminal) inxi: 2.3.2
  • I appreciate your help a lot. I think I've a hell mix of problems. I've started using virtualbox on mac, and the poor graphics performance has mixed with that xorg output that seems buggy (your suspicion is mine too). – kikeenrique Jan 11 '17 at 9:16
  • I've done a lot of vbox linux support in the past, so your post prompted me to check the stuff. I can tell you for sure my vbox install reports, like yours, failure to load the vboxvideo module, but that is an xorg error, NOT a vbox error. But the tests I suggest will show this. Note of course if the host video has issues, vbox video in the guest would not be able to resolve those. I'd actually not looked into enabling wide screen guest support, so that was a nice learning thing for me. But that's how you can tell if your video is working, try getting it larger than default 1024/1280 widths. – Lizardx Jan 12 '17 at 0:35
1

After some investigation, it seems that there is a mix of bugs.

First, virtualbox graphics performance on mac is so slow that, at first, it makes you think that the driver is not working. It's a long standing bug, still alive, related to retina/HiDpi displays: Poor graphics performance on retina display
As it's commented in the report, you can mitigate a bit using YourVMachine->Settings>Display>Use Unscaled HiDPI, but then you'll need a magnifying glass.

Second, the output of xorg seems buggy, and misinforming about vboxvideo xorg module driver.

Second and a half, Debian package (and virtualbox official package) has deprecated virtualbox xorg module in favor of vboxvideo kernel driver, check comment in Debian package changelog remove vboxvideo_drv_system.so, obsolete and useless, pointing to virtualbox bug 16052.

  • Good follow up, this should help more than a few people over time. I'm not surprised to see issues with retinal display, remember, for oracle, the free software projects they bought when they bought Sun are kind of annoyances to them, not profit drivers, and vbox is certainly one of those things. On macs this would be particularly relevant because vbox would form a small niche market there, most mac users use the other vm, parallels, so there's no real money reason for oracle to spend money debugging stuff that's probably difficult to resolve. – Lizardx Jan 12 '17 at 0:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.