3D acceleration not working in VirtualBox

26,697

You are doing exactly the opposite of what you should be doing when your guest OS has limited virtual hardware resources. Enabling 3D acceleration will give the guest OS better performance only if both the host OS and the guest OS have the hardware resources to support it.

Instead of enabling 3D acceleration you should allocate additional virtual hardware resources to the Ubuntu guest OS if it is possible to do so without depriving the Windows 10 host OS of the physical hardware resources that it needs to run properly.

  1. Uncheck Enable 3D Acceleration.

    • In the left pane of VirtualBox click the Ubuntu 16.04 guest OS.

    • Click the Settings icon which looks like a yellow gear.

    • In the Ubuntu 16.04 - Settings window select Display -> Video tab.

    • Uncheck Enable 3D Acceleration (see below screenshot).

  2. Increase the amount of available virtual RAM in the VirtualBox Ubuntu 16.04 guest OS.

    • In the left pane of VirtualBox click the Ubuntu 16.04 guest OS.

    • Click the Settings icon which looks like a yellow gear.

    • In the Ubuntu 16.04 - Settings window select System -> Motherboard tab.

    • Move the Base Memory slider to the right to increase the amount of virtual RAM to 4GB.

  3. Increase the number of virtual processors from the default of 1 to 2.

    • Same as step 2 until you reach the Ubuntu 16.04 - Settings window and then select System -> Processor tab.

    • Move the Processor(s) slider to the right to increase the number of virtual processors from the default of 1 to 2.

  4. Increase VirtualBox video RAM to the maximum amount of 256MB. From the Windows command line run:

    cd "C:\Program Files\Oracle\Virtualbox"
    vboxmanage modifyvm "Name of virtual machine" --vram 256
    

    If you run VirtualBox and go to Display in the Settings window, you would see:

    enter image description here

  5. Click the OK button in the lower right corner of the Ubuntu 16.04 - Settings window to apply the changes in the Ubuntu 16.04 guest OS settings.

  6. Another thing to take into account is X11 vs Wayland. Wayland may not work that well in a virtual machine environment, so you may want to test the desktop behavior by editing the necessary gdm configuration, and enabling/disabling Wayland. This is done through the /etc/gdm/custom.conf file. In there look for the following line and comment/uncomment as needed: source

    #WaylandEnable=false
    
Share:
26,697

Related videos on Youtube

lakshay.angrish
Author by

lakshay.angrish

Updated on September 18, 2022

Comments

  • lakshay.angrish
    lakshay.angrish almost 2 years

    My laptop has an 8th Generation Intel Core i5 8250U processor, with an Nvidia GeForce MX150 GPU, 8GB RAM and a 1TB hard drive. I have installed Ubuntu 16.04 64-bit as a guest OS on Windows 10 64-bit using VirtualBox. Ubuntu was not running smoothly, as there was a lot of lagging.

    I searched online for information about the problem and many sources recommended to enable 3D acceleration in the VirtualBox guest OS settings so I did, but after a few loading screens Ubuntu 16.04 doesn't respond and gets stuck on a particular black screen with faint white text of some sort.

    Checking Enable 3D Acceleration in the VirtualBox guest OS settings causes a black screen and checking on Enable 2D Video Acceleration results in a message that says: Invalid Settings have been selected.

    enter image description here
    2D & 3D Acceleration and Video Memory settings in VirtualBox on Windows 10

    • Takkat
      Takkat about 6 years
      The image you had attached is a 100% black box - no "fainted" text visible. How did you "turn on 3D acceleration"?
    • David Foerster
      David Foerster about 6 years
      Welcome to Ask Ubuntu! Could you please add a little more detail? What exactly did you do, what did you expect to happen and what happened instead? Did you encounter any warning or error messages? Please reproduce them in their entirety in your question. You can select, copy and paste terminal content and most dialogue messages in Ubuntu. Please edit your post to add information instead of posting a comment. (see How do I ask a good question?)
    • lakshay.angrish
      lakshay.angrish about 6 years
      @Takkat The image is a screenshot, maybe the text is not visible in it, but it is visible on my computer. I turned on the 3D acceleration from the display settings available in the settings option in the VirtualBox launcher
    • Takkat
      Takkat about 6 years
      @lakshay.angrish: you'd also need to install the guest additions for passthrough of the host GPU but the reason for the black screen may be something else. See askubuntu.com/questions/162075/… for a start.
    • lakshay.angrish
      lakshay.angrish about 6 years
      @Takkat: i had already installed the guest additions, but still I get the black screen
    • Takkat
      Takkat about 6 years
      @karel: not me who voted (yet) but the OP did not add any additional information so it still is unclear why they boot to a black screen (IMO not related to 3D accel). We can only guess. In case you are lucky you may find a solution but it would be of great help if the OP at least participated a bit on helping them. We would e.g. need the hardware specs incl. CPU, GPU and RAM, host OS architecture, host graphics driver, guest architecture, VBox version, VM settings, ... shortly much much more than a simple black box with an obscure "faint white text of some sort".
  • lakshay.angrish
    lakshay.angrish about 6 years
    What does 3D acceleration do then? Why was it recommended by other sources?
  • karel
    karel about 6 years
    I replied to your comment by editing my answer. In addition to inaccurate Ubuntu tutorials there are also a lot of obsolete Ubuntu tutorials on the internet and apparently the search engines do not check each website's content and remove obsolete tutorials from their search results. At Ask Ubuntu we can delete inaccurate content, or correct and update it by editing it.
  • lakshay.angrish
    lakshay.angrish about 6 years
    I have core i5 8250U with Nvidia Geforce MX150, 8GB RAM and 1TB Hard drive in my laptop. I have seen 3D acceleration working just fine in laptops that have lower specs than mine. What could be the reason for that?
  • karel
    karel about 6 years
    Your Nvidia graphics card cannot be used for virtual video RAM in VirtualBox. I'm assuming that you have already tried allocating 4GB RAM, 256MB video RAM and 2 CPUs to the VM guest OS and you're becoming frustrated because it still doesn't work.
  • lakshay.angrish
    lakshay.angrish about 6 years
    I allocated the said resources, and subsequently the UI was faster, but it still lags a bit. I do want to know why a black frozen screen appears when 3D acceleration is turned on
  • karel
    karel about 6 years
    Check BIOS/UEFi to make sure that either Intel VT-X or AMD-V hardware vitualization is enabled: Enabling Intel VT and AMD-V virtualization hardware extensions in BIOS. Three close votes out of required have been cast to close your question as unclear because there's no visible text on your black screenshot. It's petty & spiteful, but that's what you have to deal with if you want your question to stay open
  • lakshay.angrish
    lakshay.angrish about 6 years
    Checking on 2D acceleration says that Invalid Settings have been selected
  • FantomX1
    FantomX1 almost 5 years
    for me the graphics were jaggy at gtx 2070 desktop, when I disabled 3d acceleration, everything worked perfectly smoothed, other than that one guy seemed to have similar problem as you dedoimedo.com/computers/virtualbox-3d-accel-black-screen.htm‌​l