Does the host's graphics card matter?

This is for discussing general topics about how to use VirtualBox.
Post Reply
subraizada3
Posts: 2
Joined: 11. Jul 2017, 05:49

Does the host's graphics card matter?

Post by subraizada3 »

I have a laptop with Nvidia Optimus dual graphics (it can switch freely between the integrated Intel graphics and the discrete GTX 1050). I am running on a Linux host with a Windows 10 guest that I use mainly for Microsoft Office. Will it make any difference in terms of performance whether the VM is run on the Intel graphics or the Nvidia graphics? Thanks.
BillG
Volunteer
Posts: 5102
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Does the host's graphics card matter?

Post by BillG »

In the standard configuration the vm will not use either of them. As a general rule the vm does not use any of the host machine's hardware. It uses its own emulated devices. The only exceptions are when VirtualBox has a pas-through option.
Bill
socratis
Site Moderator
Posts: 27329
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: Does the host's graphics card matter?

Post by socratis »

I'm not sure if you have the ability to switch at will on a Linux host, but on my MacBookPro I use a little program gfxCardStatus which pretty much I use it for reporting the card used. It can be used to change the active card, but sometimes it refuses when an application has a "lock" on the high-end GPU. See the following, and it might worth following the link to the Apple Developer's site: https://gfx.io/switching.html

As far as VirtualBox is concerned, when it starts it can work fine with the integrated GPU. However, if you start a VM that has 2D/3D acceleration enabled, VirtualBox demands to have the high-end GPU used, and it stays like that until VirtualBox exits (including all VMs of course).
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.
MPerz
Posts: 39
Joined: 18. Apr 2013, 16:29
Primary OS: MS Windows other
VBox Version: PUEL
Guest OSses: Windows, Debian, Ubuntu

Re: Does the host's graphics card matter?

Post by MPerz »

I have had some issues with older Intel HD on-board graphics and Aero in Windows guests. Running VMs would result in a lot of display artifacts and black screens. Disabling either Aero in the guest or 3D acceleration in the VM settings was an effective workaround. My guess is this was a result of poor OpenGL support in these chips. Keep in mind that this is completely anecdotal, so your results may vary. I've also never had an issue with Nvidia in this regard.

Yours is an interesting setup; I'd like to hear how you fare with it.
socratis
Site Moderator
Posts: 27329
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: Does the host's graphics card matter?

Post by socratis »

MPerz wrote:I have had some issues with older Intel HD on-board graphics and Aero in Windows guests.
Yes, there were plenty of reports about artifacts, especially with the Intel HD 4xxx cards. I'm not sure if it was bad OpenGL drivers, but most probably you're right.
MPerz wrote:Yours is an interesting setup; I'd like to hear how you fare with it.
"Yours" is quite vague in a discussion where you have 3 participants. Which one were you referring to?
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.
MPerz
Posts: 39
Joined: 18. Apr 2013, 16:29
Primary OS: MS Windows other
VBox Version: PUEL
Guest OSses: Windows, Debian, Ubuntu

Re: Does the host's graphics card matter?

Post by MPerz »

Oops, sorry. I was referring to the OP and his or her dual GPU machine.
subraizada3
Posts: 2
Joined: 11. Jul 2017, 05:49

Re: Does the host's graphics card matter?

Post by subraizada3 »

MPerz wrote:Yours is an interesting setup; I'd like to hear how you fare with it.
Now that I've set it up, the computer switches between the two cards automatically, like on Windows and mac.
The computer is a Dell XPS 15 with a Intel HD 630 and a GTX 1050m. I have the open source Intel drivers and the proprietary nvidia drivers both installed, and use Bumblebee (I'll post the link once my account is a day old) to use them both.

Any program that requires the discrete GPU is launched with optirun, e.g. 'optirun VirtualBox' instead of just 'VirtualBox'. Optirun automatically turns on the Nvidia card and runs the program on it, and the Nvidia card's output is piped through the Intel card onto the screen (like on WIndows/mac). Optirun also takes care of turning off the Nvidia card when the program exits, which is useful because just turning on the GPU without using it increases the battery's discharge rate from about 8-9 W/h to 14-16 W/h.

On Linux, .desktop files are used to generate entries in the applications menu, and to launch applications in general. For the programs that I want to use on the Nvidia GPU, I modified the .desktop file to have them use optirun (e.g., for VB, the line "Exec=VirtualBox %U" was change to "Exec=optirun VirtualBox %U"). Once I did this for all applicable programs, the GPU was turned on/off automatically whenever these programs were launched or exited, with no intervention required from the user.
Post Reply