Screen flickering and multiple keyboard input events are very annoying. I have solved both issues on Ubuntu 20.04 that is running as guest virtual machine in VirtualBox 6.1 on macOS Big Sur 11.1.
When I tried to log in to the guest operating system Ubuntu 20.04 the screen flickered and keyboard events were interpreted several times on the login screen. For example, the entered password “Ubuntu” was interpreted as “UUUbbb…”.
Thanks to the blog post “How to fix Flickering in some versions of Linux on VirtualBox” I have solved the issues. It seems that those problems occur on Linux systems which run as guest virtual machine in VirtualBox on macOS.
Disable Wayland
Both problems are permanently fixed when “Wayland” is disabled.
# Depending on your preference you can use 'gedit' or 'vi' sudo vi /etc/gdm3/custom.conf # Uncomment "WaylandEnable=false"
Tip for a minimal installation of Ubuntu (Update: 10.03.2021)
If you only set up Ubuntu in the mode “Minimal Installation”, then you need to install GCC for compiling perl modules. This is required for installing the Guest Additions of VirtualBox.
sudo apt install gcc perl make
Only after you installed the Guest Additions the flickering will stop.
VirtualBox Settings (Update: 10.03.2021)
These are my settings:
System: Base Memory: 4GB Extended Features: Enable I/O APIC and Hardware Clock in UTC Time Processor: More than one Execution Cap: 100% Paravirtualization Interface: Default Hardware Virtualization: Enable Nested Paging Display: Video Memory: 128 MB Monitor Count: 1 Scale Factor: 100% Graphic Controller: VBoxSVGA Acceleration: Disabled Network: Enable Network Adapter: Attached to Bridged Adapter Name: en0: Ethernet Advanced: Promiscuous Mode = Deny
Further information:
How to fix Flickering in some versions of Linux on VirtualBox