Bug 481937 - After plasma6 update, VirtualBox VM is unusable with 3D acceleration turned off
Summary: After plasma6 update, VirtualBox VM is unusable with 3D acceleration turned off
Status: RESOLVED DOWNSTREAM
Alias: None
Product: kde
Classification: I don't know
Component: general (show other bugs)
Version: unspecified
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-02-28 15:43 UTC by mhamedbj
Modified: 2024-03-15 15:56 UTC (History)
10 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mhamedbj 2024-02-28 15:43:23 UTC
SUMMARY
***
I have a working KDE neon on virtualbox (updated everyday), after updated today to plasma6 

sudo apt update
sudo apt dist-upgrade

I have a black screen , no more mouse no nothing after boot
when I try ctrl alt F5 before kde finish loading  I have a new session to type some command , but when KDE finish loading the system take me back to the graphical session (the black screen) and I cant go back to any alt ctrl fX

***


STEPS TO REPRODUCE
1. install a virtual box kde neon kde 5
2. update to KDE 6
3. 

OBSERVED RESULT


black screen / unresponsive system

EXPECTED RESULT

login screen kde plasme

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 mhamedbj 2024-02-28 16:48:20 UTC
Same behavior if you try install new KDE NEON on VirtualBox

neon-user-20240228-1346.iso

Virtualbox 7.0.14
RAM 16go
4cpu
128Mo Video memory (VMSVGA)

Black screen , no login , no mouse, no way to change session via ctrl alt fX

regards
Comment 2 SilSon 2024-03-01 09:48:20 UTC
It help for my VM to enable "3D acceleration" (with VMSVGA as graphics controller).
Comment 3 mhamedbj 2024-03-01 15:10:55 UTC
BINGO !!! thanks
Comment 4 Nicolas Fella 2024-03-02 22:34:08 UTC
Not a Neon bug, the same happens on Fedora
Comment 5 Martin Riethmayer 2024-03-06 15:11:55 UTC
I've investigated a bit further. To do so, I enabled 3d acceleration and installed Neon, then disabled 3d acceleration again.

If you do *not* enable auto-login, you'll get as far as the SDDM login screen. You can now switch TTYs (e.g.  by hitting (Right-)CTRL+F3). 

I've updated the guest-additions manually from the command line to match the version of the VBox on the host (in my case: 7.0.14 is running on host, the GuestAdditions now are also installed at version 7.0.14 inside the Guest - check with "(Right-)CTRL+N" and selecting "runtime").

This does not make any difference, but at least I'm fairly certain now, that the mismatch of the GuestAdditions shipped by Neon (6.0.0) and the actual VBox Host version are not to blame.

From journalctl, I can see the failed attempts to log in to a Wayland session (X session works), but I have no clue if any of the messages actually mean anything.
When logging in, quite a few things seem to get done, e.g.

Finished KSpash "ready" Stage.

or

Reached target Startup of XDG autostart applications.

A few warnings or suspicious messages that I noticed are:

- VMware: No 3D enables (0, success).
- libEGL warning: egl: failed to create dri2 screen (happens quite often)
- qt.qpa.wayland: Creating a fake screen in order for Qt not to crash (happens quite often)

I don't know how to debug further ...
Comment 6 Nate Graham 2024-03-08 15:20:08 UTC
So the issue here is that changes were made in KWin that can't be easily reverted that result in issues in VMs with severely outdated graphics drivers. 3D acceleration should be considered mandatory. Not only will it resolve this issue, but it will result in a better UX in the VM as well because graphical effects and animations will actually start working. I'll update Neon's website at least to mention this, and we'll work on communicating it more broadly.
Comment 7 mhamedbj 2024-03-08 15:35:42 UTC Comment hidden (spam)
Comment 8 Bug Janitor Service 2024-03-08 16:19:57 UTC
A possibly relevant merge request was started @ https://invent.kde.org/websites/neon-kde-org/-/merge_requests/19
Comment 9 Nate Graham 2024-03-08 17:14:03 UTC
I've also written a blog post (https://pointieststick.com/2024/03/08/psa-enable-3d-acceleration-in-your-virtualbox-vms/) and started a conversation on the vbox-dev mailing list (https://www.virtualbox.org/pipermail/vbox-dev/2024-March/010257.html).
Comment 10 Aaron Rainbolt 2024-03-08 18:28:07 UTC
Blindly enabling 3d acceleration in a VM could be dangerous for security reasons - the 3d drivers provide a potential for VM escape. A solution that works for me is to change the graphics controller to VBoxSVGA - this does not require enabling 3d acceleration, and I get a full Plasma 6 desktop. Seems to work so far - Firefox is working, video on Reddit is working, Plasma Welcome is working.
Comment 11 Liang Qi 2024-03-10 18:59:48 UTC
See also https://bugs.kde.org/show_bug.cgi?id=482965 for KDE 6 vm in VMware Fusion on MacBook Pro M3 Max.
Comment 12 Nate Graham 2024-03-15 14:57:52 UTC
Git commit c69bb4c79330ad644f2257ae8c9041882644047d by Nate Graham.
Committed on 08/03/2024 at 16:02.
Pushed by sitter into branch 'master'.

Tell people to enable 3D acceleration in their VirtualBox VMs

Non-3D accelerated VirtualBox graphics drivers are outdated and don't
support KWin well. In Plasma 6, this problem has become worse due to
changes made in KWin that aren't easily reverted or conditionalized. So let's
notify people that they need to enable 3D acceleration if they use neon
in a virtualBox VM.

M  +3    -0    download.php

https://invent.kde.org/websites/neon-kde-org/-/commit/c69bb4c79330ad644f2257ae8c9041882644047d
Comment 13 Nate Graham 2024-03-15 15:56:38 UTC
The TL;DR here is that the default VirtualBox graphics driver (VBSVGA) driver is broken-ish, and has been for years, and a necessary change in KWin now requires that it not be broken in that way. Ultimately VirtualBox just needs to fix their driver or make a different one used by default.

Until one of those things happen, users of VirtualBox will need to alter their machine settings in one of the following ways:
- Enable 3D acceleration if there are no security concerns
- Switch to the graphics driver to VBoxSVGA if there are security concerns