I can't change resolution and refresh rate on virtualbox

Hi,
I cannot change resolution.
I tried via xrandr, arandr and KDE5 settings but it simply doesn't work. I'm using FreeBSD on my virtual machine. I use Virtualbox and I think that this may be a problem.
When I try to change resolution it gives: "Failed to get size of gamma for output default". I heard that's really common unix problem, but still I cannot find solution. Could you help me please?
nani.png
angry_on_kde_with_freebsd.png

(Kde 5 settings): those are the highest setting for me(refresh rate and resolution).
 
Run VBoxClient-all. Then run xrandr, that should give you a list of resolutions. Then something like xrandr -s 1280x720 will switch it to 1280x720.
 
You can try to create a file ended by .conf in /usr/local/etc/X11/xorg.conf.d/ (like resolv.conf) with this content:
Code:
Section "Screen"
        Identifier "Screen0"
        Device     "Card0"
        Monitor    "Monitor0"
        SubSection "Display"
           Modes "1920x1080"   
        EndSubSection
EndSection
 
You can try to create a file ended by .conf in /usr/local/etc/X11/xorg.conf.d/ (like resolv.conf) with this content:
Code:
Section "Screen"
        Identifier "Screen0"
        Device     "Card0"
        Monitor    "Monitor0"
        SubSection "Display"
           Modes "1920x1080"  
        EndSubSection
EndSection

It doesn't work, but I'm really grateful that you want to help. Thank you (; !
 
Sorry that it didn't work. It's the trick I use for FreeBSD - Lxde on VirtualBox. But in my case, if I recall correctly the change of resolution works, but it doesn't memorize this setting from session to session, hence this .conf file.

Regarding VBoxClient-all, I'm pretty sure you have it, but it returns an error.
Code:
% VBoxClient-all
/usr/local/bin/VBoxClient-all: /usr/bin/VBoxClient: not found
% which VBoxClient-all
/usr/local/bin/VBoxClient-all
% file /usr/local/bin/VBoxClient-all
usr/local/bin/VBoxClient-all: POSIX shell script, ASCII text executable
% cat /usr/local/bin/VBoxClient-all
(... snip ...)
/usr/bin/VBoxClient --vmsvga-x11  # In case VMSVGA emulation is enabled
fi
So it's /usr/bin/VBoxClient which doesn't exist, not /usr/local/bin/VBoxClient-all. This command is called at the end of the script, otherwise VBoxClient-all uses /usr/local/bin/VBoxClient. And this last is present. I think it's a bug.
 
Last edited:
Hi,

In the virtual machine display settings, try changing the Graphics Controller to VBoxVGA and increasing the video memory from the default 20MB.
You'll get a "invalid settings detected" in the bottom, but that's just because you are not using the recommended Graphics Controller (doesn't matter).

This worked for me (the virtualbox-ose-additions are also needed of course).

Cheers


vboxfreebsd.png
 
Actually if you see "Invalid settings setected" there is hight probablity that settings will be reverted to defaults. In such case set and leave default with 3D acceleration enabled. Then close VM client machine settings and change Video card selection and if you want video card memory directly from VM manager (see pictures). This assumes that you have virtualbox-ose-additions installed.
If you don't want to use virtualbox-ose-additions, you can get required resolution but it is a bit more laborious:
If you want to get full screen resolution you have to measure it first. e.g. my full screen resolution is 1920x1080. But VM client full screen is obviously smaller. In my case it is 1920x972 (calculate precisely and discard pixels taken by frame of VM client and VM host toolbars and so on), next you will mahe to define monitor properties for FreeBSD and save it (with resolution information), close FreeBSD client and tun
from VM host (if your client name is FreBSD. if not sure run :
VBoxManage list vms)

VBoxManage setextradata FreeBSD CustomVideoMode1 1920x972x32
and you are set. Now each time you start FreeBSD client it will run in full screen resolution)
 

Attachments

  • VM client and VoxSVGA.png
    VM client and VoxSVGA.png
    841.6 KB · Views: 455
  • VM client and video memory.png
    VM client and video memory.png
    841.1 KB · Views: 617
What is your Vbox version? If you are using Vbox 6.1 like me, then, the guest addition from ports doesn't work (it's for Vbox 5). I doesn't work for me at least, even though I found many users here said that it's just works fine for them. In this case, I got the native resolution of my screen with this trick:

First, if you have the guest addition installed, remove it and revert everything you have put into /etc/rc.conf according to the handbook.

Second, on the VM setting change VboxVGA/VboxSVGA to VMSVGA. Install xf86-video-vmware package then reboot. Done.

I have used this trick for a long time before I put FreeBSD on real hardware. Hope it will help you.
 
What is your Vbox version? If you are using Vbox 6.1 like me, then, the guest addition from ports doesn't work (it's for Vbox 5). I doesn't work for me at least, even though I found many users here said that it's just works fine for them. In this case, I got the native resolution of my screen with this trick:

First, if you have the guest addition installed, remove it and revert everything you have put into /etc/rc.conf according to the handbook.

Second, on the VM setting change VboxVGA/VboxSVGA to VMSVGA. Install xf86-video-vmware package then reboot. Done.

I have used this trick for a long time before I put FreeBSD on real hardware. Hope it will help you.
of course it works. VM host version and VM client additios version are irrelevant. I have VM host 6.1.12 host and FreeBSD VM client with virtualbox-ose-additions-5.2.34_2 working well with 3D acceleration anabled, VboxSVGA and 1920x972 resolution
 
Yes, applying the correction in the /usr/local/bin/VBoxClient-all script works ok, check all paths inside must be "usr/local/bin/VBoxClient" and #!/bin/sh in the first line.

Check in line 38 of the script:

Code:
/usr/bin/VBoxClient/ --vmsvga-x11  #In case VMVGA emulation is enabled

to

Code:
/usr/local/bin/VBoxClient/ --vmsvga-x11  #In case VMVGA emulation is enabled


this was the solution I applied before finding this post and I think it must be a little bug
 
Back
Top