Heavy screen flickering VirtualBox 6.1.50 / 7.0.14 Ubuntu guest kernels 6.4 / 6.5

Discussions about using Linux guests in VirtualBox.
Post Reply
bertje
Posts: 58
Joined: 4. Nov 2010, 09:49
Primary OS: MS Windows 10
VBox Version: OSE other
Guest OSses: Ubuntu/MATE/Server 16.04, 18.04, 20.04, 21.04, 22.04, 23.10, Windows XP/7/10/11

Heavy screen flickering VirtualBox 6.1.50 / 7.0.14 Ubuntu guest kernels 6.4 / 6.5

Post by bertje »

Heavy screen flickering occurs with Ubuntu Wayland guest after installing guest Ubuntu updates:

Youtube: https://youtu.be/RNMMbt66IFw

Screenshot:
VirtualBoxHeavyScreenFlickeringSmall.jpg
VirtualBoxHeavyScreenFlickeringSmall.jpg (45.45 KiB) Viewed 12734 times

Easy reproducible on multiple AMD Ryzen 7/9 Windows/Linux host computers as all guests running Ubuntu (Wayland) flavors are affected after updated kernel versions 6.4/6.5:

- Ubuntu 22.04 / 23.10 Wayland desktops running kernel versions 6.4 and 6.5
- Hosts Windows 10 and any Linux
- VirtualBox versions 6.1.50, 7.0.14 and older
- Corresponding Guest additions installed
- Guest Display settings: 128MB, 3D acceleration unchecked (as 3D graphics acceleration is not supported by VirtualBox)
- Latest Windows 10 host NVidia driver v546.33

Problems:
- Support for Linux kernels 6.4 and 6.5 is recently added to VirtualBox (see Changelog 6.1.50 and 7.0.14) and is very unstable. Screen flickering occurs especially in full screen of the guest and maximized guest window.
- Additionally, the Ubuntu 23.10 / 24.04 installation window does not start or is white (popup asks to quit as there is no GUI response).
- Very slow GUI guest response.

Logs:
guest_dmesg_logs.zip
Ubuntu guest logs
(63.17 KiB) Downloaded 271 times

Related reproducible graphics/display bugs in VirtualBox 6.1.50 / 7.0.14:
- viewtopic.php?t=110879: vmwgfx failure with Ubuntu kernel upgrade (6.5.0-14)
- viewtopic.php?t=110830: Ubuntu 23.01 / 24.04 can not install!
- viewtopic.php?p=543329#p543329: Ubuntu Server 22.04.3 randomly hangs after ~20 hours of running
- viewtopic.php?t=110887: Kernel 6.6 and GUI freeze

Temporary workarounds until this major issue is fixed in VirtualBox (unknown schedule):
- Option 1: Wait for an updated VirtualBox release which fixes Guest Additions with 6.4 kernels and higher.
- Option 2: Downgrade the guest kernel to 6.3 or lower and reinstalling the Guest additions, or:
- Option 3: May not work for everybody: Select X11 instead of default Wayland on login screen (click gear icon lower right corner) (This may result in other issues like not starting Firefox etc)
- Option 3: Change guest screen resolution in the Ubuntu guest temporary via Settings | Displays | Resolution (which changes Refresh Rate). This helps until the guest window is resized as the display refresh rate is incorrectly configured.

Run the following example commands in the Ubuntu guest to downgrade guest Ubuntu kernel version to 6.3:

Code: Select all

# Identify which kernel version is running
$ uname -r
6.5.0-14-generic

# Install kernel 6.3
$ sudo apt-add-repository -y ppa:cappelikan/ppa
$ sudo apt update
$ sudo apt install mainline-gtk

# Start | "Mainline Kernels" and install kernel 6.3

# Show grub bootmenu to boot the newly installed kernel
$ sudo gedit /etc/default/grub
    #GRUB_TIMEOUT_STYLE=hidden
    GRUB_TIMEOUT_STYLE=menu
    
    #GRUB_TIMEOUT=0
    GRUB_TIMEOUT=5

$ sudo update-grub
$ sudo reboot now

# From the Grub boot menu, select Advanced options for Ubuntu | Ubuntu, with Linux 6.3.0-060300-generic | Enter

# Check running kernel
$ uname -r
6.3.0-060300-generic

# Mount VirtualBox guest additions ISO and reinstall
# Make sure that gcc-12 is installed, otherwise the installation will fail
$ sudo apt install build-essential gcc-12
$ cd /media/<user>/media/a/VBox_GAs_6.1.48/
$ sudo ./VBoxLinuxAdditions.run
$ sudo reboot now

# When problem is solved, change Grub bootmenu permanently
$ sudo add-apt-repository ppa:danielrichter2007/grub-customizer
$ sudo apt install grub-customizer
$ grub-customizer

# Tab General Settings | predefined: Advanced options for Ubuntu>Ubuntu, with Linux 6.3.0-060300-generic | Save

# reboot
@VirtualBox developers: Please add and run guest display integration tests with (Ubuntu) 6.5 kernels before releasing a new VirtualBox version. We encountered major graphics issues which makes VirtualBox guests unusable in our production environment.
Last edited by bertje on 30. Jan 2024, 18:21, edited 5 times in total.
bertje
Posts: 58
Joined: 4. Nov 2010, 09:49
Primary OS: MS Windows 10
VBox Version: OSE other
Guest OSses: Ubuntu/MATE/Server 16.04, 18.04, 20.04, 21.04, 22.04, 23.10, Windows XP/7/10/11

Re: Heavy screen flickering VirtualBox 6.1.48 / 7.0.12 Ubuntu Wayland guest kernels 6.4 / 6.5

Post by bertje »

scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Heavy screen flickering VirtualBox 6.1.48 / 7.0.12 Ubuntu Wayland guest kernels 6.4 / 6.5

Post by scottgus1 »

If you're "Erwin" on the Bugtracker, you should add a VM vbox.log, started from cold boot, where the problem demonstrates itself, then fully shut down so the VM window and any error boxes are gone. The devs will need the vbox.log too.
bertje
Posts: 58
Joined: 4. Nov 2010, 09:49
Primary OS: MS Windows 10
VBox Version: OSE other
Guest OSses: Ubuntu/MATE/Server 16.04, 18.04, 20.04, 21.04, 22.04, 23.10, Windows XP/7/10/11

Re: Heavy screen flickering VirtualBox 6.1.48 / 7.0.12 Ubuntu Wayland guest kernels 6.4 / 6.5

Post by bertje »

Working together. Logs added to the ticket as requested. Thanks!
johnzeng
Posts: 10
Joined: 25. Apr 2011, 23:28
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Arch

Re: Heavy screen flickering VirtualBox 6.1.48 / 7.0.12 Ubuntu Wayland guest kernels 6.4 / 6.5

Post by johnzeng »

Just want to add that I'm using X11 and have the same issue with kernel 6.6.

between kernel 6.6 and 6.1 the only obvious one i spot is this found in Xorg.0.log:

Code: Select all

[    53.021] (EE) vmwgfx_scanout_update: failed to send dirty (-12, Cannot allocate memory)
[    53.021] (EE) vmwgfx_scanout_update: failed to send dirty (-12, Cannot allocate memory)
Update: among the kernels that I can find, 6.3.9 is the last one that works and 6.4 is the first one that has this issue.
bertje
Posts: 58
Joined: 4. Nov 2010, 09:49
Primary OS: MS Windows 10
VBox Version: OSE other
Guest OSses: Ubuntu/MATE/Server 16.04, 18.04, 20.04, 21.04, 22.04, 23.10, Windows XP/7/10/11

Re: Heavy screen flickering VirtualBox 6.1.48 / 7.0.12 Ubuntu guest kernels 6.4 / 6.5

Post by bertje »

@jonzeng Thanks for your confirmation. I've updated the first post and title. Yes, 6.3 is the last working kernel.
macsek
Posts: 12
Joined: 12. Jul 2021, 09:55

Re: Heavy screen flickering VirtualBox 6.1.48 / 7.0.12 Ubuntu guest kernels 6.4 / 6.5

Post by macsek »

I have the same problem running a slightly more up to date VirtualBox 7.0.14 on an intel i7 laptop.
viewtopic.php?p=545533
Should I also upload some logs?
bertje
Posts: 58
Joined: 4. Nov 2010, 09:49
Primary OS: MS Windows 10
VBox Version: OSE other
Guest OSses: Ubuntu/MATE/Server 16.04, 18.04, 20.04, 21.04, 22.04, 23.10, Windows XP/7/10/11

Re: Heavy screen flickering VirtualBox 6.1.48 / 7.0.12 Ubuntu guest kernels 6.4 / 6.5

Post by bertje »

Would be great if you can add the logs + affected VBox version to the reported issue https://www.virtualbox.org/ticket/21955. Currently no progress.
macsek
Posts: 12
Joined: 12. Jul 2021, 09:55

Re: Heavy screen flickering VirtualBox 6.1.48 / 7.0.12 Ubuntu guest kernels 6.4 / 6.5

Post by macsek »

I changed nothing, for purpose not installed any program or update, still I cannot reproduce the fault for some reason :-o
I don't know if the logs would make any sense now. I uploaded them anyway.
I have posted the versions to the issue.
bertje
Posts: 58
Joined: 4. Nov 2010, 09:49
Primary OS: MS Windows 10
VBox Version: OSE other
Guest OSses: Ubuntu/MATE/Server 16.04, 18.04, 20.04, 21.04, 22.04, 23.10, Windows XP/7/10/11

Re: Heavy screen flickering VirtualBox 6.1.50 / 7.0.14 Ubuntu guest kernels 6.4 / 6.5

Post by bertje »

Current status:
- Bug still exists in updated VirtualBox 6.1.50 and 7.0.14, also when all guest Ubuntu updates are installed.
- Reported bug https://www.virtualbox.org/ticket/21955 status still "New bug", no response from VirtualBox developers yet.
- Unknown schedule when this bug will be fixed.
James2023
Posts: 4
Joined: 5. Feb 2023, 06:17

Re: Heavy screen flickering VirtualBox 6.1.50 / 7.0.14 Ubuntu guest kernels 6.4 / 6.5

Post by James2023 »

I've been seeing this as well for the last month or two.

I was on 7.0.10 for many 6 months without issue, and this flickering started. Tried the upgrade to 7.0.14. problem persists.

guest is Ubuntu 22.04.

perhaps a Ubuntu update in the past few months has caused the issue.

I've also noticed the mouse cursor is a dark square sometimes.

seems to be quite random.
bertje
Posts: 58
Joined: 4. Nov 2010, 09:49
Primary OS: MS Windows 10
VBox Version: OSE other
Guest OSses: Ubuntu/MATE/Server 16.04, 18.04, 20.04, 21.04, 22.04, 23.10, Windows XP/7/10/11

Re: Heavy screen flickering VirtualBox 6.1.50 / 7.0.14 Ubuntu guest kernels 6.4 / 6.5

Post by bertje »

Duplicate ticket #21981 created for VirtualBox 6.1.50 / 7.0.14 Ubuntu guest kernels 6.4 / 6.5 since there is no response from moderators to change the title of #21955 VirtualBox 6.1.48 / 7.0.12.

Still no confirmation from Oracle.
fth0
Volunteer
Posts: 5678
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Heavy screen flickering VirtualBox 6.1.50 / 7.0.14 Ubuntu guest kernels 6.4 / 6.5

Post by fth0 »

bertje wrote: 7. Feb 2024, 21:07 Still no confirmation from Oracle.
I do not work for Oracle (disclaimer ;)), but I can perhaps provide some related information:

VirtualBox 6.1 and 7.0 do not support Wayland, but only X11. In consequence, if the X11 support in Wayland (e.g. XWayland) or in Linux distributions somehow changed, it would be conceivable that the issue won't get fixed in those VirtualBox versions.

Development of Wayland support is ongoing for VirtualBox 7.1. Since it perhaps is not the deciding factor for when VirtualBox 7.1 will get released, VirtualBox 7.1 might solve the issue or not.

PS: This is my personal assessment, built upon publicly available information.
jnb
Posts: 83
Joined: 12. Sep 2016, 11:18

Re: Heavy screen flickering VirtualBox 6.1.50 / 7.0.14 Ubuntu guest kernels 6.4 / 6.5

Post by jnb »

If anybody is interested this may (or may not!) help.

Also see viewtopic.php?t=110982 and viewtopic.php?t=110962.

I am Ubuntu 22.04, Linux ubuntu-22 6.5.0-21-generic, VB 7.0.14, VBoxGuestAdditions-7.0.14, Windows 11 host, run in a window not full-screen.

I don't wish to alter my VB, GA, Linux kernel or default Wayland. I reinstalled GA but no improvement. I am also unsure whether GA is really installing/working any longer.

The "block cursor on startup" can be solved by opening some application and moving over its open window, then reverts to correct cursor.

The "flickering screen" can be solved by picking a fixed resolution (e.g. from VB View > Virtual Monitor) in 16:9 format. My monitor/gfx card is actually 1920x1200, which is 16:10, but I found any 16:10 resolution flickered where 16:9 did not.

This then leaves me in the (irritating) state that resizing the window no longer works as it did: if the dimensions are smaller than the Window host window I get a white border, if they are larger I get scrollbars.

I wanted to go back to at least try with dynamic resolution again. But I find I cannot do so: having picked a fixed resolution I do not find any way to restore to dynamic, the radio button has to be on one of them. I mistakenly reported this as a Windows Host question at viewtopic.php?t=111176. If anyone knows why I am stuck in fixed/cannot restore to dynamic please let me know! Else beware, I don't know if what I have done has caused this. [EDIT: This has now been resolved at viewtopic.php?p=546888#p546888.]

For now I can work with the fixed resolution. The impression I get here is that fixes may be coming in VB/GA, hopefully soon. I may move to 24.04 in a few months, don't know what the situation there might be....
Cordux
Posts: 1
Joined: 22. Mar 2024, 18:14

Re: Heavy screen flickering VirtualBox 6.1.50 / 7.0.14 Ubuntu guest kernels 6.4 / 6.5

Post by Cordux »

I had the same problem, but I fixed. Here is how I did it:

On Host:
Device -> Insert Guest Additions CD Image..
On VM:
Open the disc in the file explorer -> right-click on empty space -> Open in Terminal
In the Terminal:
sudo ./VBoxLinuxAdditions.run -> sudo rcvoxadd reload

I hope this will work for the rest.

P.S
If you already have Guest Additions already installed, try sudo rcvboxadd reload in the terminal and see if that fixed it. Otherwise I think you need to re-install it.
Post Reply