Solved Virtualbox resolutions missing II

This thread had no resolution that I could find.

* host is Linux Virtualbox 6.1.14
* Guest is FreeBSD 12
* vbox display memory set to 64MB
* vbox graphics controller set to vmsvga
* ose-guest-additions is installed
* dmesg reports "vbox guest loaded successfully"

But the max resolution is 1024x768 (in XFCE4). I'd like to get 1920x1080.

What didn't I set up right?
 
This kind of delves into the bad old days of xorg.conf and faffing about with modelines.

I believe the following should help.

Add some size meta data to your VM
Code:
VBoxManage controlvm "Name of VM" setvideomodehint 1680 1050 32

Run cvt to generate a "modeline" (i.e for 1680x1050 resolution)
Code:
cvt 1680 1050 60
This will give you output similar to:
Code:
# 1680x1050 59.95 Hz (CVT 1.76MA) hsync: 65.29 kHz; pclk: 146.25 MHz
Modeline "1680x1050_60.00"  146.25  1680 1784 1960 2240  1050 1053 1059 1089 -hsync +vsync

In your VM, splice that mode string to create a new mode in a format suitable for xrandr and then "add" it to your output device
Code:
xrandr --newmode "1680x1050_60.00"  146.25  1680 1784 1960 2240  1050 1053 1059 1089 -hsync +vsync
xrandr --addmode VGA-0 1680x1050_60.00

You should now be able to see it in xrandr. The following should use it.
Code:
xrandr --output VGA-0 --mode 1680x1050_60.00

# or

xrandr -s 1680x1050

Personally I recommend X11 forwarding. Or even TigerVNC.
 
Yes, I've tangled with xorg a few times too.

xrandr --newmode "1680x1050_60.00" 146.25 1680 1784 1960 2240 1050 1053 1059 1089 -hsync +vsync

Failure came on this command:
Code:
xrandr --newmode "1920x1080_60.00"  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync
xrandr: Failed to get size of gamma for output default
I also tried at 30kHz
Code:
xrandr --newmode "1920x1080_30.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
xrandr: Failed to get size of gamma for output default
X Error of failed request:  BadName (named color or font does not exist)
  Major opcode of failed request:  140 (RANDR)
  Minor opcode of failed request:  16 (RRCreateMode)
  Serial number of failed request:  19
  Current serial number in output stream:  19
 
Run in the guest's xorg session, in a xterminal, VBoxClient-all. If the result is as expected, set it in ~/.xinitrc or put it in a shell script, let XFCE autostart that script. Works form me from .xinitrc.
 
Run in the guest's xorg session, in a xterminal, VBoxClient-all. If the result is as expected, set it in ~/.xinitrc or put it in a shell script, let XFCE autostart that script. Works form me from .xinitrc.

Thanks, as per this thread I see the same reminder about VBoxClient-all, but running it produces no change. The max video resolution is stubbornly maxed out at 1024x768.

There just has to be some setting in my VM that is wrong if people are accessing resolutions above 1024x768.

For a sanity check, here's what I'm doing:
Host = Linux with VBox 6.14

Guest = stock FreeBSD 12.1 on UFS

to rc.conf I added
Code:
    dbus_enable="YES"
    vboxservice_enable="YES"
    vboxguest_enable="YES"

pkg installed virtualbox-ose-additions

made .xinitrc
Code:
/usr/local/bin/VBoxClient-all &
exec ck-launch-session xfce4-session

reboot, startx, no res over 1024x768

Is everyone 100% sure that 5.4 guest gets higher resolutions with 6.14 host?
 
Is everyone 100% sure that 5.4 guest gets higher resolutions with 6.14 host?

I can confirm that emulators/virtualbox-ose-additions (5.2.44_2) is working well on VirtualBox 6.1.14 ( macOS host system ).

Setup:

- VBoxVGA graphics controller
- VM system EFI mode
- set in /boot/loader.conf efi_max_resolution="widht x height" ( affects console, not xorg )
- VBoxClient-all in ~/.xinitrc
- WM x11-wm/jwm.

Try as graphics controller VBoxVGA or VBoxSVGA instead of VMSVGA.
 
Try as graphics controller VBoxVGA or VBoxSVGA instead of VMSVGA.

Yes, yes, and yes. That did it! Set it to VBoxVGA and all imaginable resolutions appeared ready-to-go in xrandr. Set to 1920x1080 and I'm in business

Thank you. So satisfying to finally get this working.
 
Glad it is worked out :)

Is there really still no way to have an arbitrary resolution without VM specific drivers?
(I use VirtualBox a lot but mostly headless / SSH)

Hmm, PC emulators haven't really come a long way since the 90's.
 
Glad it is worked out :)

Is there really still no way to have an arbitrary resolution without VM specific drivers?
(I use VirtualBox a lot but mostly headless / SSH)

Hmm, PC emulators haven't really come a long way since the 90's.

Agreed. I've used qemu-kvm on Linux, and the guest in my experience needs no guest software to access more resolutions, but qemu-kvm has its own peculiarities. Once working I'm generally happy with VBox.
 
Top