Bug 443910 - [Plasma 5.23] kwin_core: Failed to initialize compositing, compositing disabled
Summary: [Plasma 5.23] kwin_core: Failed to initialize compositing, compositing disabled
Status: RESOLVED NOT A BUG
Alias: None
Product: kwin
Classification: Plasma
Component: egl (show other bugs)
Version: 5.25.5
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2021-10-17 20:38 UTC by lucasrizzini
Modified: 2022-09-12 17:57 UTC (History)
16 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Logs captured using journalctl from when KDE Plasma was started. (174.62 KB, text/plain)
2021-10-17 20:38 UTC, lucasrizzini
Details

Note You need to log in before you can comment on or make changes to this bug.
Description lucasrizzini 2021-10-17 20:38:49 UTC
Created attachment 142539 [details]
Logs captured using journalctl from when KDE Plasma was started.

After upgrading from 5.22, I get a black screen with responsive pointer and keyboard. Feels like screen misconfiguration. I only have one monitor with one display. Since Xorg seemed up, I tried to open some GUI applications through another TTY using DISPLAY=:0 environment variable attribution with no luck. CTRL+ALT+DEL open the shutdown screen, right? It appears somewhere since I can just press enter and shut down the machine, but it doesn't appear on my screen. I'm on X11.

It works fine if I create a new user before or after the upgrade.


Another user had the same issue and stated that it's working fine on Wayland-> https://www.reddit.com/r/archlinux/comments/qa485a/black_screen_with_totally_responsive_pointer_and/

I restarted sddm with journalctl --follow running -> File attached to the report.

I have this at my /usr/share/sddm/scripts/Xsetup:
/opt/VirtualGL/bin/vglgenkey
xrandr --output HDMI-0 --off --output HDMI1 --mode 1920x1080
Comment 1 lesto 2021-10-17 22:59:30 UTC
same issue there, even worse, happen always in X11, and also happen in wayland if fresh started; i need to make it fail once with X11, restart sddm, and finally i can start plasma wayland successfully.

Just one thing to point out; those core dump seems to happen AFTER the login fail to load, so they seems more a symptom than a casue
Comment 2 lucasrizzini 2021-10-18 16:40:12 UTC
The problem was the Command Output widget in my taskbar. I just removed it before the upgrade and it's all fine now. I even added it again.

Command Output widget -> https://github.com/Zren/plasma-applet-commandoutput
Print -> https://i.imgur.com/Z5m8tk5.png
Comment 3 lucasrizzini 2021-10-18 16:48:28 UTC
I didn't have to update the widget, just removed it from my taskbar before the upgrade and added it again after.
Comment 4 lucasrizzini 2021-10-18 18:53:58 UTC
I was able to start plasmashell, but with no composing. 

Kwin keeps printing this when I try to enable composing: "kwin_core: Failed to initialize compositing, compositing disabled".
Comment 5 Tronic 2021-10-18 18:56:53 UTC
I have the same issue upgrading from 5.22 on X11.

After today's update the desktop shows but compositing is disabled.

Xorg.0.log: https://pastebin.com/BrGHgsR5
journalctl -b: http://ix.io/3C9z
Comment 6 Alvin Smith 2021-10-19 03:39:41 UTC
same issue here for Mac VMware Kali.
Radeon Pro 555X 4 GB
Intel UHD Graphics 630 1536 MB
Comment 7 izyas 2021-10-19 19:19:34 UTC
Same situation. Compositing does not work irrespective of the settings.
kwin_core: Failed to initialize compositing, compositing disabled

NVIDIA 470.74
NVIDIA GeForce GTX 1060 3GB
Comment 8 Tronic 2021-10-20 10:05:25 UTC
I updated to 5.23.1. Situation remains the same. Compositing is broken.
Comment 9 Alvin Smith 2021-10-21 04:33:09 UTC
tried today, still failing but get a report content

Application: plasmashell (5.21.5)

Qt Version: 5.15.2
Frameworks Version: 5.86.0
Operating System: Linux 5.14.0-kali2-amd64 x86_64
Windowing System: X11
Distribution: Kali GNU/Linux Rolling
DrKonqi: 5.23.0 [KCrashBackend]

-- Information about the crash:
<In detail, tell us what you were doing  when the application crashed.>

The crash can be reproduced every time.

-- Backtrace:
Application: Plasma (plasmashell), signal: Segmentation fault

[KCrash Handler]
#4  0x00007f8b2467adb0 in Plasma::Applet::immutability() const () from /lib/x86_64-linux-gnu/libKF5Plasma.so.5
Comment 10 Gabriel H. 2021-10-22 12:03:40 UTC
I'm having the same issue.

Compositing doesn't work at all.

Arch Linux, RX 6700 XT.

Wayland works fine.
Comment 11 Jan Keith Darunday 2021-10-22 12:41:04 UTC
I'm not sure if this is directly related but I have a similar issue that occured after upgrading to 5.23.1.

The same error appears but I can use my system without compositing. It also only happens when I set KWIN_OPENGL_INTERFACE=egl. When this environment variable is unset, kwin compositing works fine.

However, the egl option significantly reduces stutters for me and it has been working well until my last upgrade so I would prefer it to work.

Operating System: Arch Linux
KDE Plasma Version: 5.23.1
KDE Frameworks Version: 5.87.0
Qt Version: 5.15.2
Kernel Version: 5.14.13-zen1-1-zen (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7-8565U CPU @ 1.80GHz
Memory: 15.4 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 620
Comment 12 Jan Keith Darunday 2021-10-22 12:43:50 UTC
To follow up on my previous comment:
I downgraded to kwin 5.23.0 and it had the same bug. Last kwin version that worked for me was 5.22.5.
Comment 13 Tronic 2021-10-22 16:13:05 UTC
Removing GLPlatformInterface=egl from kwinrc fixes the problem for me.
Comment 14 Gabriel H. 2021-10-22 23:58:57 UTC
I can confirm that removing GLPlatformInterface=egl fixes it.
Comment 15 Subramaniyam Raizada 2021-10-23 07:10:05 UTC
I didn't find anything related to GLPlatformInterface or egl in my ~/.config/kwinrc.

However, the KWIN_OPENGL_INTERFACE environment variable was set to egl for me. I didn't do anything to cause that; it seems to have automatically happened.

I was able to temporarily solve it with:
	Within a terminal window inside the X session, run:
	export KWIN_OPENGL_INTERFACE=glx
	kwin_x11 --replace &
This obviously persists until you log out and start X again.

I tried adding GLPlatformInterface=glx inside the [Compositing] section of kwinrc, but that didn't help - compositing was still broken after starting X and required manually exporting the env variable and restarting kwin. Adding the export command directly above 'exec startplasma-x11' in .xinitrc resulted in the same outcome; it seems that the variable gets set to egl somewhere in the plasma init sequence.
Comment 16 lucasrizzini 2021-10-26 18:03:17 UTC
(In reply to Subramaniyam Raizada from comment #15)
> However, the KWIN_OPENGL_INTERFACE environment variable was set to egl for
> me. I didn't do anything to cause that; it seems to have automatically
> happened.


It didn't help in my case. No behavior change.
Comment 17 Alvin Smith 2021-11-04 03:43:29 UTC
Hi community, not sure how we will land on this issue. Could someone point me out some temporary solutions please if we can't get it fix in the near future. I can't run update now. Thank you.
Comment 18 lucasrizzini 2021-11-04 08:41:16 UTC
(In reply to Alvin Smith from comment #17)
> Hi community, not sure how we will land on this issue. Could someone point
> me out some temporary solutions please if we can't get it fix in the near
> future. I can't run update now. Thank you.

No, man.. This is not a forum.
Comment 19 lesto 2021-11-04 09:12:16 UTC
(In reply to Alvin Smith from comment #17)
> Hi community, not sure how we will land on this issue. Could someone point
> me out some temporary solutions please if we can't get it fix in the near
> future. I can't run update now. Thank you.

it worked for me with the fix from Tronic:

> Removing GLPlatformInterface=egl from kwinrc fixes the problem for me.
Comment 20 Jan Keith Darunday 2021-11-04 09:27:31 UTC
Let's not call disabling egl a fix since it's just a workaround. Someone might skim through and accidentally mark this as resolved.

The issue remains with kwin 5.23.2. Also noting here that the 'product' field of this bug seems to be wrongly set to plasmashell instead of kwin so that might cause this to be assigned to the wrong person. Not sure if I should update it.

Operating System: Arch Linux
KDE Plasma Version: 5.23.2
KDE Frameworks Version: 5.87.0
Qt Version: 5.15.2
Kernel Version: 5.14.13-zen1-1-zen (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7-8565U CPU @ 1.80GHz
Memory: 15.4 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 620
Comment 21 Alvin Smith 2021-11-17 01:21:03 UTC
Hi KWin default assignee,

Sorry, I don't know your name. Any progress to share or anything we could look forward to?

Cheers,
Alvin
Comment 22 Alvin Smith 2021-12-03 08:29:30 UTC
(In reply to Alvin Smith from comment #21)
> Hi KWin default assignee,
> 
> Sorry, I don't know your name. Any progress to share or anything we could
> look forward to?
> 
> Cheers,
> Alvin

Latest Kali fixed it somehow. I upgraded successfully.
Comment 23 d 2021-12-04 22:03:30 UTC
I am also having this bug, it seems to have broken with the latest kwin update. 
I have a Nvidia RTX 3070 with the latest nvidia drivers, on Arch.
Downgrading to 5.22.5 fixes the issue, but the issue of compositing breaking remains in 5.23. I have KWIN_OPENGL_INTERFACE=egl, and setting it to glx does fix compositing, but it also degrades the performance of plasma significantly for me on my machine.

Currently I'm on the older version of KWIN, but I would appreciate an update from the team, as this ticket has been open for well over a month now.
Comment 24 Nate Graham 2022-09-08 16:39:36 UTC
Are you able to reproduce this issue in Plasma 5.25 or later?
Comment 25 Jan Keith Darunday 2022-09-08 23:36:21 UTC
I have retested this on both 5.25.4 and 5.25.5, and I can observe the same bug.

Running kwin_x11 --replace in the terminal shows me the ff. error whenever I try to enable compositing using Alt+Shift+F12:
kwin_scene_opengl: Creating the OpenGL rendering failed:  "Invalid QOpenGLContext::globalShareContext()"

This does not happen when I comment out KWIN_OPENGL_INTERFACE=egl in my ~/.config/plasma-workspace/env/kwin_env.sh file

Operating System: Arch Linux
KDE Plasma Version: 5.25.4 and 5.25.5
KDE Frameworks Version: 5.97.0
Qt Version: 5.15.5
Kernel Version: 5.19.6-zen1-1-zen (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7-8565U CPU @ 1.80GHz
Memory: 15.4 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 620
Comment 26 Nate Graham 2022-09-09 17:48:10 UTC
Where did ~/.config/plasma-workspace/env/kwin_env.sh come from? Did you create it and populate it, or did your distro do that?
Comment 27 Jan Keith Darunday 2022-09-09 17:58:00 UTC
(In reply to Nate Graham from comment #26)
> Where did ~/.config/plasma-workspace/env/kwin_env.sh come from? Did you
> create it and populate it, or did your distro do that?

Ah, It's been a while but I believe I put it there myself. I'm not sure about others that had egl set in their kwinrc though. It worked well for me and I feel like I've had a more stable fps when I had it enabled until it stopped working at 5.23.
Comment 28 Nate Graham 2022-09-12 17:57:39 UTC
Sounds like everything works with the default settings, then. :) Setting random environment variables is known to cause problems like this, as the issues they work around get fixed and they eventually start causing more harm than good.