Xfce Full screen not working in XFCE on a FreeBSD guest OS on VirtualBox

bran.damon

New Member

Reaction score: 2
Messages: 7

I am running FreeBSD as a guest OS in VirtualBox on a Windows 10 host. I installed the XFCE desktop environment, but unfortunately I cannot put it on full screen mode, its highest resolution that I can set is 1024x768. So based on this article I installed the VirtualBox Guest Additions on the FreeBSD guest OS. I ran the command:
cd /usr/ports/emulators/virtualbox-ose-additions && make install clean
but it gave me an error: "requires kernel source files in /usr/src"
So instead, I installed the package:
pkg install virtualbox-ose-additions-5.2.34_2
I also added these lines to /etc/rc.conf:
vboxguest_enable="YES"
vboxservice_enable="YES"
After reboot the highest resolution that I can select is still 1024x768 instead of the full HD display that I actually have: 1920x1080. So basically nothing changed. If I use the Scale Mode in VirtualBox, that only distorts the proportions and looks horrible. What am I doing wrong?
 

Emrion

Aspiring Daemon

Reaction score: 227
Messages: 690

There shouldn't have any trouble to reach 1920x1080. I just try it on a VirtualBox VM with FreeBSD / xfce.

If you have any xorg.conf, delete it and try again. The Handbook is outdated on this very point.
 

T-Daemon

Daemon

Reaction score: 926
Messages: 1,813

After checking if any xorg configuration files are interfering , and if there are none, try running VBoxClient-all in an X terminal. If it expands to desired size set it in the users ~/.xinitrc file:
Code:
VBoxClient-all &
 
OP
B

bran.damon

New Member

Reaction score: 2
Messages: 7

After checking if any xorg configuration files are interfering , and if there are none, try running VBoxClient-all in an X terminal. If it expands to desired size set it in the users ~/.xinitrc file:
Code:
VBoxClient-all &
Running VBoxClient-all & gave me this:
/usr/local/bin/VBoxClient-all: /usr/bin/VBoxClient: not found
If I run VBoxClient on its own, it gives me this:
VBoxClient: error: No service specified. Quitting because nothing to do!
So unfortunately it didn't solve the issue.
 
OP
B

bran.damon

New Member

Reaction score: 2
Messages: 7

There shouldn't have any trouble to reach 1920x1080. I just try it on a VirtualBox VM with FreeBSD / xfce.

If you have any xorg.conf, delete it and try again. The Handbook is outdated on this very point.
After running find / -name xorg.conf I got no results, so there was nothing to delete. Can you please tell me exactly what commands you ran to install XFCE? I might have done something wrong. I also use a Slim log-in screen for convenience, I don't know if that has anything to do with it.
 

Emrion

Aspiring Daemon

Reaction score: 227
Messages: 690

Well, nothing fancy: pkg install xorg-7.7_3 xfce4-14 virtualbox-ose-additions-5.2.34_2.
I don't use slim for login. I start xfce with: /usr/local/bin/startxfce4 --with-ck-launch
/etc/rc.conf contains: vboxguest_enable="YES" vboxservice_enable="YES"

That's all.
 
OP
B

bran.damon

New Member

Reaction score: 2
Messages: 7

It's a bug in emulators/virtualbox-ose-additions so if I were you I'd install emulators/virtualbox-ose-kmod and it should work without problems. After you install kmod package use xrandr to set your resolution.
I installed virtualbox-ose-kmod as you suggested, but it didn't change anything. 1920x1080 is still not an option. I also tried to add a new display mode with xrandr based on these steps. But I got errors like
"xrandr: Failed to get size of gamma for output default"
and
"xrandr: screen cannot be larger than 1024x768 (desired size 1920x1080)"
 
OP
B

bran.damon

New Member

Reaction score: 2
Messages: 7

Well, nothing fancy: pkg install xorg-7.7_3 xfce4-14 virtualbox-ose-additions-5.2.34_2.
I don't use slim for login. I start xfce with: /usr/local/bin/startxfce4 --with-ck-launch
/etc/rc.conf contains: vboxguest_enable="YES" vboxservice_enable="YES"

That's all.
I reinstalled XFCE in another VirtualBox FreeBSD instance, and now even the mouse clicks are not working. When I run xrandr, I see only low resolution entries, not the desired 1920x1080. I still believe it's possible to get it right, but it sure ain't working for me. Would that matter if I installed a different desktop environment, like Gnome or KDE?
 

weberjn

Member

Reaction score: 12
Messages: 39

One of my FreeBSD guests would not go full screen anymore, but I could compare with another one that still did. Difference was video mode. I changed the .vbox from
<Display controller="VMSVGA" VRAMSize="128" accelerate3D="true"/>
to
<Display VRAMSize="128" accelerate3D="true"/>
and it worked again. No idea why.
The gui says invalid settings but it works.
 

Emrion

Aspiring Daemon

Reaction score: 227
Messages: 690

I reinstalled XFCE in another VirtualBox FreeBSD instance, and now even the mouse clicks are not working. When I run xrandr, I see only low resolution entries, not the desired 1920x1080. I still believe it's possible to get it right, but it sure ain't working for me. Would that matter if I installed a different desktop environment, like Gnome or KDE?
Any input problem is probably related to the switch to udev / EVDEV of Xorg. See here: https://forums.freebsd.org/threads/new-xorg-switch-from-devd-to-udev.74144/

As a quick workaround you can enable moused in /etc/rc.conf.
Can you post the content of /var/log/Xorg.0.log? So, I will compare to mine.

One of my FreeBSD guests would not go full screen anymore, but I could compare with another one that still did. Difference was video mode. I changed the .vbox from
<Display controller="VMSVGA" VRAMSize="128" accelerate3D="true"/>
to
<Display VRAMSize="128" accelerate3D="true"/>
and it worked again. No idea why.
The gui says invalid settings but it works.
I redid the test. If I switch to VMSVGA controller, X is unable to start on my VM. It works either with VBoxVGA or VBoxSVGA.
Maybe this difference of behaviours is due to various versions of VirtualBox and the installed packages.
 
OP
B

bran.damon

New Member

Reaction score: 2
Messages: 7

Any input problem is probably related to the switch to udev / EVDEV of Xorg. See here: https://forums.freebsd.org/threads/new-xorg-switch-from-devd-to-udev.74144/

As a quick workaround you can enable moused in /etc/rc.conf.
Can you post the content of /var/log/Xorg.0.log? So, I will compare to mine.


I redid the test. If I switch to VMSVGA controller, X is unable to start on my VM. It works either with VBoxVGA or VBoxSVGA.
Maybe this difference of behaviours is due to various versions of VirtualBox and the installed packages.
Now in VirtualBox I changed Settings --> Display --> Graphics Controller from VMSVGA to VBoxVGA and it worked! Now I have full screen. :) Important note is however, that when I tick the "Enable 3D Acceleration" option, it automatically switches back to VMSVGA upon startup, and I can't put it on full screen. So VBoxVGA and "Enable 3D Acceleration" unticked are both needed at the same time.
As for the mouse input error, adding moused_enable="YES" to my /etc/rc.conf worked as well.
Anyway, thanks for the help, if you still need my logfile, let me know.
 

Emrion

Aspiring Daemon

Reaction score: 227
Messages: 690

Your Xorg.0.log is now useless since the VM works like you wish. Happy for you.

I don't get the behaviour you describe on my VirtualBox. I can check or uncheck "Enable 3D", it makes not visible difference and leaves the graphic controller as I set it (for reference: VirtualBox 6.0.20 / Windows 7).
 

darknesszy

New Member


Messages: 7

Now in VirtualBox I changed Settings --> Display --> Graphics Controller from VMSVGA to VBoxVGA and it worked! Now I have full screen. :) Important note is however, that when I tick the "Enable 3D Acceleration" option, it automatically switches back to VMSVGA upon startup, and I can't put it on full screen. So VBoxVGA and "Enable 3D Acceleration" unticked are both needed at the same time.
As for the mouse input error, adding moused_enable="YES" to my /etc/rc.conf worked as well.
Anyway, thanks for the help, if you still need my logfile, let me know.

Been searching the web for a few days, this was the only solution that worked. Thank you so much!
 

teo

Aspiring Daemon

Reaction score: 42
Messages: 704

So VBoxVGA and "Enable 3D Acceleration" unticked are both needed at the same time.
As for the mouse input error, adding moused_enable="YES" to my /etc/rc.conf worked as well.
Anyway, thanks for the help, if you still need my logfile, let me know.
What was the procedure for it to work in the end? I got confused.
 

judusfloratos

New Member


Messages: 4

I had the same issue on a Windows 10 machine with a FreeBSD guest in VirtualBox.

Emrion's solution worked. I added the following code to my .xinitrc

/usr/local/bin/startxfce4 --with-ck-launch

I also set my Graphics Controller (in Machine > Settings > Display) to VBoxVGA (VBoxSVGA will also work).

Now my XFCE desktop is full screen in VirtualBox.
 
Top