# Gentoo VM on VirtualBox. vmwgfx Won't Work After Kernel 5.13

## wynn1212

Gentoo VM on Virtualbox. Graphics Controller select as VMSVGA with 3D Acceleration enabled.

After upgrade kernel to 5.13 (sys-kernel/gentoo-sources) My virtualbox display freezes  and never respond. But I can still ssh into gentoo vm.

After digging around. I found out that is vmwgfx complain about can't reserve bar. causing vm display freezes.  :Sad: 

My kernel log about vmwgfx problem:

```
[    9.667911] vmwgfx 0000:00:02.0: vgaarb: deactivate vga console

[    9.668693] vmwgfx 0000:00:02.0: BAR 1: can't reserve [mem 0xe0000000-0xe7ffffff pref]

[    9.669182] vmwgfx: probe of 0000:00:02.0 failed with error -16

```

----------

## Romanticio

Have you tried disabling DRM in VirtualBox?

I've never used VirtualBox but don't see a need for this resource hog in my VMs and disable it in VMware, not kernel.

Kernel 5.13 also giving me headaches with Intel HD 530 Graphics, looks like I'm looking at the monitor through invisible heat waves, shimmies. Same with the only "Stabe" 5.12, 5.12.19, was working with 5.12.17 before I switched to 5.13. Now I use a second kernel 5.10.52 for the Intel graphics and latest stable 5.13 for Nvidia. When my Fedora VM went to 5.13 I did a hard drive install and same issue.

----------

## wynn1212

 *Romanticio wrote:*   

> Have you tried disabling DRM in VirtualBox?
> 
> 

 

Did you mean adding "nomodeset" on kernel parameter. In this case it solved my vm display freezing problem. But it cause not able to start X server due to not loading vmwgfx module.

----------

## Romanticio

No, for me I disable 3D in the VMware settings for the VM, leave the OS alone.

How did you configure kernel 5.13? After eselect select the new kernel and switch to /usr/src/linux, if you are already in /usr/src/linux when changing default kernel you remain in the old kernel directory, stay out of /usr/src/linux when selecting different kernel. Then use command: make oldconfig to carry all kernel settings over from "current running" kernel.

If you went another route, you may have lost the virtualization stuff, which may explain why it can't load the non existing module.

----------

## wynn1212

 *Romanticio wrote:*   

> No, for me I disable 3D in the VMware settings for the VM, leave the OS alone.

 

Disable 3D acceleration in virtualbox still freeze my vm display

 *Romanticio wrote:*   

> How did you configure kernel 5.13?

 

Using genkernel to compile the kernel via the following command:

```
genkernel --btrfs --menuconfig --makeopts=-j9 all
```

And I'm pretty sure all of my module are still intact.

```
gentoo /lib/modules/5.13.9-gentoo-x86_64 # find . | grep vmwgfx

./kernel/drivers/gpu/drm/vmwgfx

./kernel/drivers/gpu/drm/vmwgfx/vmwgfx.ko

gentoo /lib/modules/5.13.9-gentoo-x86_64 #
```

----------

## Romanticio

Typically when upgrading to a higher extra-version kernel there are lots of questions regarding new features. I found it best to just hit the (n) key for all, especially with a VM where nothing changes regarding hardware, processors etc. Every now and then I do a "make menuconfig" and take a stroll in the kernel neighborhood, check out the new arrivals etc. If your sources for the previous kernel that worked are still around with the .config file in it, set kernel 5.13 as default, cd /usr/src/linux, make distclean, make oldconfig, n n n n .....make -j?

If you don't have the .config of the kernel that worked but still have the kernel installed, copy the /boot/config.x.x.x file over and rename it to .config.and do make menuconfig then exit and save.

----------

## Romanticio

More than likely a 5.13 issue, I worked hard to get my Intel graphics stable to no avail so far. Since it's the same with Fedora, I won't sweat it for now.

----------

## wynn1212

Just curious. with the same version "vmwgfx 2.18.1 20210218" fedora vm managed to work on my virtualbox with 5.13 kernel but gentoo vm will not work because of BAR problem. (Note: Both vm are using same VMSVGA graphics controller)

----------

## Romanticio

Grab a copy of Fedora's /boot/config-5.13.7 (or whatever it's named) file and compare it with Gentoo's using Meld or some diff program. Might find what's Fedora's secret.

EDIT: The /boot/config-xxx file is the same file as the .config, just different name in a different location.

----------

## wynn1212

To my surprise. By using fedora's config to compile kernel actually fix vmwgfx bar reserve problem. But since the changes between fedora's config and Gentoo's config is too much. I have no clue what options might be the problem.

----------

## Romanticio

I would try migrating Fedora's settings into "a copy" of Gentoo's .config with Meld.

Might churn out a monster the Linux community will fear.

This way you can keep Gentoo specific stuff. The page linked above shows how easy it's done.

I typically back up the 4 files for current "happy with" kernel from /boot and the .config. Then run as many different kernel configuration till happy or give up, restore the original files sometimes, sometimes reconfigure original because I learned something.

----------

## Romanticio

I don't know if I missed out on the 5.14.5 $ 5.14.6 kernels or they were not pumped out.

Today I went from 5.14.4 where my Intel HD 530 graphics were behind a layer of invisible steam, shimmering all the time, to the 5.14.7 kernel where both graphics devices are steady and normal. All kernels worked great with the Nvidia graphics and nouveau, I don't have optimus but can switch between the two via hardware switch/reboot from Windows.

I knew the day would eventually arrive, since this Intel graphics family is not obscure.

I'll wait till the 5.15 kernel to see if it's still working properly before I ditch the 5.10 kernel I was using for the Intel graphics.

I also crashed my Fedora VM today, I was updating it and a Debian Testing VM at the same time. They both recovered first round, Debian finished but another crash took Fedora down, rescue mode puked some kind of "WTF is this, I can't do anything here" type message. Just throwing this out, all my Debian based VMs, Mint, Ubuntu and Deb Testing all skipped some heartbeats during updates today, Ubuntu and Mint screamed some awful sounding noise. But Debian was the only one crashing the Windows host, weird!, and Windows is a fresh one week old install from latest Microsoft ISO.

EDIT: My hard drive Debians didn't skip a beat, or Gentoo.

----------

## wynn1212

Well looks like in kernel 5.15 fix the issue when I upgrade my kernel to 5.15.10 on my VM.

----------

## Romanticio

That took a while

After my last post Debian Testing went from 5.11 to 5.14.6 kernel and I then had same issues with Intel graphics.

I was saying to myself, damn! if they could of just went one extra version higher.

Wasn't long, couple three days and they went to 5.14.7 and the problem was gone just like Gentoo and Fedora.

----------

## Princess Nell

Did you see this forum thread - https://forums.gentoo.org/viewtopic-t-1146484.html?

----------

