Virtual Box and new linux derivates How does it work?

Discussions about using Linux guests in VirtualBox.
Post Reply
horvan
Posts: 11
Joined: 30. Apr 2015, 17:20

Virtual Box and new linux derivates How does it work?

Post by horvan »

Deepin 15.4 RC1-2017-03-26-11-20-38.zip
(19.57 KiB) Downloaded 13 times
There is a new lovely Linux distribution based on Debian called deepin OS. They did something new and that may be the reason why the guest extensions have problems to set correct initial resolutions for the system. Is there a chance to get this fixed by the maintainers of virtual box?

The system on it's own works pretty well but in virtual box there is a resolution problem when virtual box comes up

See the Video:

https://youtu.be/HCYdr8nL68E

I know that a simply xrandr -s command fix the problem but the bug returns every time virtual box is booting with installed linux guest additions.

I am lookng for some ideas to fix this or at least telling the developers the direction but I am not shure how guest additions determine initial resolution and how to fix this. May be someone with vaster knowledge than me has a good Idea ho to fix this or at least point out the background and show me the direction to wirte a bug report.
Last edited by horvan on 27. Mar 2017, 11:12, edited 1 time in total.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Virtual Box and new linux derivates How does it work?

Post by mpack »

AFAIK, the Guest Additions do not set display size, the (virtual) hardware does, in response to what the guest OS asks for. Therefore you should be looking at what display size the guest requests.

If you need to continue this discussion then please provide a VM log. With the VM fully shut down, right click it in GUI. Select "Show Log" and save "VBox.log" (ONLY) to a zip file. Attach the zip here.
horvan
Posts: 11
Joined: 30. Apr 2015, 17:20

Re: Virtual Box and new linux derivates How does it work?

Post by horvan »

Log added above.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Virtual Box and new linux derivates How does it work?

Post by mpack »

The log shows the VM going through many display size changes. 640x480x32 and 800x600x32 in the early stages of the boot, then 1024x768x32 later on, and then 27s in it switches to 2560x1600x32, and then for some reason back to 800x600 (presumably because it failed for the reason I'm about to give).

The 2560x1600x32 display mode in particular requires way more than the 16MB of display RAM that you've assigned in the VM recipe. I suggest that you increase this allocation to 128MB and try again.

While I'm here, I see that you've assigned 6 cores to the VM. Since your host only has 6 cores to start with then assigning 100% of your hosts CPU capacity to one task is not a good idea, especially since VirtualBox itself runs as a host task. I would reduce this to three cores - and even that only if you have apps running in the guest that can benefit from additional cores - idle cores slow the VM down (because they still have to be saved/restored on a context switch), they don't speed it up. I don't give my own VMs more than 2 cores.

I think your overall RAM allocation is a tad high at 16GB. I'd reduce to 10GB.
horvan
Posts: 11
Joined: 30. Apr 2015, 17:20

Re: Virtual Box and new linux derivates How does it work?

Post by horvan »

Thank you for your tips. The resolution changes just because I did the video (YoutTube) you can see above. It seems that deepin os assumes that the maximum available resolution is the one to start with. In this case it is 2560x1600x32 the actual screen available has a resolution of 1920x1080 pixels and teh control center for that distro is putten on the right sied of the screen. So you can't see it after booting and the resolution hast to be changed by hand trough xrandr -s <value> to make shure to see anyting and than save the value. Is there a way in virtual box to tell it the size or maximum resolution of the physical display you own?
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Virtual Box and new linux derivates How does it work?

Post by mpack »

I'm not sure I followed all that. All graphically oriented guests, no matter how strange, must have a way to select or live with a current display size - unless they are designed to only ever run on one hardware platform.
horvan wrote:Is there a way in virtual box to tell it the size or maximum resolution of the physical display you own?
The physical display constraints don't matter to the VM. You can however set a maximum display size (regardless of the current monitor) in File|Preferences|Display, setting max guest screen size to "hint" and specifying a size.
horvan
Posts: 11
Joined: 30. Apr 2015, 17:20

Re: Virtual Box and new linux derivates How does it work?

Post by horvan »

Good suggestion I did that set this setting to 1920x1080 but the behavior is just like before and the guest extensions are installed.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Virtual Box and new linux derivates How does it work?

Post by mpack »

Well, if the guest is ignoring size hints then you need to look for a configuration option inside the guest. I'm not a Linux user so I can't tell you where to look. Perhaps the distro's own discussion forum would be a place to look.
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Virtual Box and new linux derivates How does it work?

Post by socratis »

Two things... One, the initial login screen was changes several version ago. Sometimes the login screen can start as low as 640x480. What counts is the one after you've logged in.

Second, if the trick that mpack suggested didn't work, there's another one that might (no guarantees). Try the following command while the VM is running:
VBoxManage controlvm setvideomodehint <xres> <yres> <bpp>
                                      [[<display>] [<enabled:yes|no> | [<xorigin> <yorigin>]]]
From the manual:
setvideomodehint requests that the guest system change to a particular video mode. This requires that the Guest Additions be installed, and will not work for all guest systems.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Post Reply