You are not logged in.

#1 2020-07-14 02:19:19

dabljues
Member
Registered: 2020-07-14
Posts: 3

VirtualBox auto-resizing issues

Hello guys,

I am posting in a Newbie Corner sub, but I've been using Arch for last 2 years. Basically, I have a problem with Arch on VirtualBox.

So let me present my setup:

- Host OS: Windows 10
- Guest OS: Arch 5.7.8, one kernel
- DE: i3-gaps
- VirtualBox version: 6.1.10


I started by installed wiki-recommended packages from https://wiki.archlinux.org/index.php/Vi … as_a_guest:

- virtualbox-guest-utils (6.1.1)
- xf86-video-vmware

Since I am not using any DM, I've added:

VBoxClient-all

line to my xinitrc. And I've enable vboxservice via systemctl.

After this (and installing DE, xorg packages etc.), I am of course able to start X session with startx. The resolution for my guest OS starts to change after I enter a passphrase for my encrypted disk - just before launching TTY (as for the TTY - it is stretched). If I have my VirtualBox window maximized - the Guest OS resolution jumps to the highest possible fitting the window (mind that I have 2K display). Same happens if I start my VM in a smaller window - half size etc - the guest OS resizes. Then I can of course go startx and everything works fine - polybar is aligned, nothing goes out of the screen (not stretched as TTY was - perfect size).

The problem is: I cannot really resize the guest OS resolution by resizing the window (Auto-resize guest display is ON). When I do it - I am left with scrollbar on VirtualBox window - you know what I mean.

Fortunately, I've made a VM snapshot before all this, so basically I have a snapshot with clean arch installation (so everything above was an operation on a full-clone). So being curious I've cloned that again and this time - I didn't install the utils package from the arch repos. I did it by inserting the Guest Additions CD, mounting it and installing it (sh VBoxLinuxAdditions.run). So after rebooting the machine I was kinda surprised - the TTY window wouldn't resize. Anyway I started X session with startx and boom - the windows resized to fill the whole maximized VirtualBox window. And then I checked - I can resize the window and the guest OS resizes itself as well! I didn't even have to add VBoxClient-all line in any autostart file - it simply worked. I've noticed that the installation via inserting a CD added some more files, like in /etc/X11/xinit/xinitrc.d -> basically a script which does VBoxClient-all. And more (binaries in /usr/bin).

Now I know, that the virtualbox-guest-utils package should be sufficient and it is up to date with the guest additions version I've installed on the 2nd VM.

Before you ask, I've also tried:

- installing linux-headers
- installing virtualbox-guest-iso (this is dumb)
- installing virtualbox-guest-dkms
- installing gcc and make (dunno why - I saw somebody post it and it was an accepted answer to a similar problem)
- adding $USER do vboxsf group

I've also tried doing everything I've just described on VirtualBox 6.1.2 and 6.1.8.

So basically two identical systems, two different outputs (also did pacman -Syu before I did anything on them).

I know, that I can just use the CD method and be fine with it, but here's a problem - I've created a script which basically installs all the things I need on a clean arch installation (copies dotfiles, enables services, changes themes etc.). So I would really like to see it be done via bash script.

Do you guys know what could be the source of the problem? If I need to provide any logs or commands output for you - please tell, dunno what could be important.

Thanks in advance,
dabljues

Offline

#2 2020-07-14 10:12:08

fistrosan
Member
Registered: 2020-04-01
Posts: 172

Re: VirtualBox auto-resizing issues

What resolution and aspect-ratio are you aiming for ? Maybe you can list your available options with xrandr and select one of those ? you can also create your own custom resolution using cvt and xrandr.

https://wiki.archlinux.org/index.php/Xrandr

Offline

#3 2020-07-14 15:28:11

dabljues
Member
Registered: 2020-07-14
Posts: 3

Re: VirtualBox auto-resizing issues

I am not aiming for a particular resolution or aspect ratio. I want to resize the VB window however I want and I want the guest OS display to change it's resolution accordingly, that's why I don't use xrandr.

Offline

#4 2020-07-14 18:36:12

twelveeighty
Member
Registered: 2011-09-04
Posts: 1,456

Re: VirtualBox auto-resizing issues

Please search before posting - see My reply to a similar thread and also pm3840's response after that.

Offline

#5 2020-07-14 22:08:38

dabljues
Member
Registered: 2020-07-14
Posts: 3

Re: VirtualBox auto-resizing issues

I've got VBoxSVGA. Basically, I was able to fix it by installing the additions manually via script: pacman -S virtualbox-guest-iso -> mount the downloaded iso -> run the shell script within it -> unmount + cleanup -> done. And it works as intended

Offline

#6 2020-07-15 14:41:56

twelveeighty
Member
Registered: 2011-09-04
Posts: 1,456

Re: VirtualBox auto-resizing issues

Great! Please mark your post as SOLVED if that fixed your problem.

Offline

Board footer

Powered by FluxBB