X won't use vboxvideo driver in VirtualBox

Hi everyone, this is my first post.

I'm new to BSDs and am running 12.1 RELEASE but having some difficulty getting FreeBSD to run under VirtualBox. For some reason, the vboxvideo driver is not used in X.

I reviewed and followed the handbook regarding VirtualBox guests:


But it seems to be outdated as it references /etc/X11/xorg.conf. My understanding is that 1) xorg.conf files are deprecated in general (though with some specific exceptions) and that 2) one is supposed to put such files in /usr/local/etc/X11/xorg.conf.d/

I reviewed the instructions on this page:


And it says if you want to force a video driver to be used then it should be placed in
/usr/local/etc/X11/xorg.conf.d

I placed the following information in a file named driver-vboxvideo.conf which I copied from the Handbook section on VirtualBox guests:
Code:
Section "Device"
    Identifier "Card0"
    Driver "vboxvideo"
    VendorName "InnoTek Systemberatung GmbH"
    BoardName "VirtualBox Graphics Adapter"
EndSection

Unfortunately, when that file exists, X will not load. If I move the file elsewhere then X will load but I will not be able to use seamless mode or have the display resize to the window size.

I experimented a bit with 11.X Release and did not have these issues. Is it possibly related to python 2.7? I had to manually edit the Makefile to get virtualbox-ose-additions to build at all.

Any idea what is happening?

Here is the output of kldstat:
Code:
Id Refs Address         Size Name
1 18 0xffffffff80200000 2448ef8 kernel
2 1 0xffffffff82649000 3a99a8 zfs.ko
3 2 0xffffffff829f3000 a5b8 opensolaris.ko
4 1 0xffffffff82c19000 2ef63 vboxguest.ko
5 1 0xffffffff82c48000 2668 intpm.ko
6 1 0xffffffff82c4b000 b50 smbus.ko
7 1 0xffffffff82c4c000 88d8 tmpfs.ko
 
Normaly, there is no .conf file to add to use the vbox video driver provided the vboxguest module is loaded.
Have you loaded vboxservice?

sysrc vboxservice_enable=YES
service vboxservice start


I experimented a bit with 11.X Release and did not have these issues. Is it possibly related to python 2.7? I had to manually edit the Makefile to get virtualbox-ose-additions to build at all.
Try to install virtualbox-ose-additions with pkg. I have a 12.1-RELEASE under virtualbox and I have no trouble at all.
 
Thank you. Yes, I had already inserted that line in my /etc/rc.conf.

The services was running as well. I restarted it to no avail.

Here is my rc.conf:

Code:
clear_tmp_enable="YES"
hostname="freebsd"
ifconfig_em0="DHCP"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="NO"
sshd_enable="YES"
zfs_enable="YES"
sddm_enable="NO"
dbus_enable="YES"
hald_enable="YES"
vboxguest_enable="YES"
vboxservice_enable="YES"
vboxservice_flags="--disable-timesync"


Is vboxvideo supposed to be loaded if X is not running? Just curious.

I did use a test xorg config just to force it to use vboxvideo. I'm wondering if the ose-additions build did not fully complete even though it did not generate failure messages.

Here is the relevant output of /var/log/Xorg.0.log:

Code:
[  1352.214] (II) LoadModule: "vboxvideo"
[  1352.215] (II) Loading /usr/local/lib/xorg/modules/drivers/vboxvideo_drv.so
[  1352.215] (II) Module vboxvideo: vendor="Oracle Corporation"
[  1352.215]    compiled for 1.18.4, module version = 1.0.1
[  1352.215]    Module class: X.Org Video Driver
[  1352.215]    ABI class: X.Org Video Driver, version 20.0
[  1352.215] (**) Load address of symbol "VBOXVIDEO" is 0x801af8020
[  1352.215] (II) VBoxVideo: guest driver for VirtualBox: vbox
[  1352.215] (--) Using syscons driver with X support (version 2.0)
[  1352.215] (--) using VT number 9

[  1352.215] (EE) No devices detected.
[  1352.215] (EE)
Fatal server error:
[  1352.215] (EE) no screens found(EE)
[  1352.215] (EE)
 
Any ideas on this issue? I would love to get more into FreeBSD if I could get this figured out.

Some more info:
- what vbox version
- what host OS
- which graphics controller is selected for your VM in vbox?
I also had issues with X not starting on 13.0-CURRENT when VMSVGA was selected.
When I switched to VBOXSVGA (not entirely sure on the controller name) X started fine.

HTH
 
Hi,
Thank you razrx for the tip.
In my case it works very well with the VboxVGA graphic controller.
VirtualBox displays a warning at the bottom of the screen "Invalid settings detected", but it can be ignored.

Regards
 
Hi,
Thank you razrx for the tip.
In my case it works very well with the VboxVGA graphic controller.
VirtualBox displays a warning at the bottom of the screen "Invalid settings detected", but it can be ignored.

Regards
That's a solution for the OP problem. It's the one I use.

The other one is to leave the default graphic controler in VirtualBox which is VMVGA and install xf86-video-vmware.
Don't keep any .conf file for X (unless you know what you're doing).
 
iirc the manual says you don't need this:

Code:
Section "Device"
    Identifier "Card0"
    Driver "vboxvideo"
    VendorName "InnoTek Systemberatung GmbH"
    BoardName "VirtualBox Graphics Adapter"
EndSection

It should be recognized automatically without giving that information explicitly.

Edit:

I did remember correctly:

"Xorg will automatically recognize the vboxvideo driver. It can also be manually entered in /etc/X11/xorg.conf:"
 
It should be recognized automatically without giving that information explicitly.
Only if you install the right port for the selected graphics controller :D. For anybody else that stumbles upon this thread.

Graphics ControllerPortDriver
VMSVGA (default)x11-drivers/xf86-video-vmwarevmware_drv.so
VBoxVGAemulators/virtualbox-ose-additionsvboxvideo_drv.so
VBoxSVGAemulators/virtualbox-ose-additionsvboxvideo_drv.so

Host:
Windows 10
VirtualBox 6.1.18
Guest:
FreeBSD 12.2 (UEFI)
Graphics Controller: VMSVGA
3D Acceleration: Enabled
No xorg.conf required.
 
fyfe Is there any reason to prefer VMSVGA rather than VBoxVGA or VBoxSVGA? Or is it just because it defaults to that? i.e do both have auto scaling of the guest?
 
There's a good answer on superuser.com explaining the difference between the three options. Other than which driver is used I haven't seen any difference between them but I've only been playing with it for a couple of hours.

I currently haven't got scaling to work yet, in UEFI mode my resolution seems to be stuck at 1920x1080 (possibly because I have efi_max_resolution="1080p" in loader.conf), and in legacy mode my resolution is stuck at 1024x768.
 
Some more info:
- what vbox version
- what host OS
- which graphics controller is selected for your VM in vbox?
I also had issues with X not starting on 13.0-CURRENT when VMSVGA was selected.
When I switched to VBOXSVGA (not entirely sure on the controller name) X started fine.

HTH
I had very similar behaviour as well, and switching from the standard VMSVGA to VBOXSVGA made the trick as well.

I'm using:
vbox 6.1.26
host: macOS 10.15.6
guest OS is FreeBSD 13.0p3
 
I got the same similar issue and I made it by VboxVGA and VboxSVGA does not help.
My env is like:
win 10
vbox: 6.1.28
freebsd:13.0
 
Here is my config for a FreeBSD guest:

freebsd-version: 13.0-RELEASE-p7

installed pkg:
virtualbox-ose-additions-6.1.32 VirtualBox additions for FreeBSD guests

settings in /etc/rc.conf:
vboxguest_enable="YES"
vboxservice_enable="YES"

On the host side:
FreeBSD 13.0 p7
Virtualbox version: 6.1.30
Starting the FreeBSD guest with legacy bios (not with efi boot)
vbox display setting: VBoxSVGA

I have access to a whole range of screen resolutions.
 
Oh,
Thanks,



Please share outputs from these guest commands:
  1. freebsd-version -kru ; uname -aKU
  2. service -e
  3. kldstat
  4. xrandr
  5. pkg -vv | grep -e url -e latest
  6. pkg update
Thanks for your reply. I guess you missed my words. I have made it. So no problem now.
Thanks anyway.

"I got the same similar issue and I made it by VboxVGA and VboxSVGA does not help."
 
Back
Top