Bug 483912 - Overview, Flip Switch, Show FPS, other OpenGL effects render as black screen when KWIN_OPENGL_INTERFACE=egl
Summary: Overview, Flip Switch, Show FPS, other OpenGL effects render as black screen ...
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: scene-opengl (other bugs)
Version First Reported In: 6.0.2
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: qt6
: 484472 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-03-18 15:50 UTC by Conor Dockry
Modified: 2024-07-10 17:22 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.1
Sentry Crash Report:


Attachments
Flip Switch using egl on x11 (1.79 MB, image/jpeg)
2024-03-18 15:50 UTC, Conor Dockry
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Conor Dockry 2024-03-18 15:50:49 UTC
Created attachment 167414 [details]
Flip Switch using egl on x11

SUMMARY
In x11 when displaying Overview, Flip Switch, Cover Switch as well as enabling Show FPS, all render as black voids if 
KWIN_OPENGL_INTERFACE=egl and QT_XCB_GL_INTEGRATION=xcb_egl are set


STEPS TO REPRODUCE
1.  Usin x11, in ~/.config/plasma-workspace/env/kwin.sh export KWIN_OPENGL_INTERFACE=egl and export QT_XCB_GL_INTEGRATION=xcb_egl
2. Activate above effects and/or turn on Show FPS

OBSERVED RESULT
All render as black in their respective frames. 
KSystemLog shows error:

kwin_x11	kwin_scene_opengl: 0x1: GL_INVALID_OPERATION in glBindTexture(non-gen name)


EXPECTED RESULT
egl can be used as in Plasma 5 without glitches.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: openSUSE Tumbleweed
KDE Plasma Version: 6.0.2
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2

ADDITIONAL INFORMATION
Doesn't occur in Wayland. Doesn't occur in x11 when egl is not used.
Comment 1 Conor Dockry 2024-04-08 07:09:28 UTC
*** Bug 484472 has been marked as a duplicate of this bug. ***
Comment 2 Guido 2024-04-11 13:38:24 UTC
I have the same bug so I think it's confirmed.

It persist in KWIN 6.0.3 and with last mesa 24.0.5
Comment 3 Guido 2024-04-17 15:01:50 UTC
The bug persist in kwin 6.0.4
Comment 4 Guido 2024-04-22 15:51:58 UTC
(In reply to Conor Dockry from comment #0)

What graphics card do you have? What drivers are you using? In my case (Intel igpu Tigerlake) kwin totally crashes.
Comment 5 Conor Dockry 2024-04-22 16:02:09 UTC
(In reply to Guido from comment #4)

intel-media-driver
intel-vaapi-driver

> lspci -k
00:02.0 VGA compatible controller: Intel Corporation Raptor Lake-P [Iris Xe Graphics] (rev 04)
	Subsystem: Lenovo Device 2309
	Kernel driver in use: i915
	Kernel modules: i915, xe
Comment 6 Guido 2024-04-22 16:07:47 UTC
(In reply to Conor Dockry from comment #5)
> (In reply to Guido from comment #4)
> 
> intel-media-driver
> intel-vaapi-driver
> 
> > lspci -k
> 00:02.0 VGA compatible controller: Intel Corporation Raptor Lake-P [Iris Xe
> Graphics] (rev 04)
> 	Subsystem: Lenovo Device 2309
> 	Kernel driver in use: i915
> 	Kernel modules: i915, xe

In my case:

00:02.0 VGA compatible controller: Intel Corporation TigerLake-LP GT2 [Iris Xe Graphics] (rev 01)
        DeviceName: Onboard - Video
        Subsystem: Dell Device 0a02
        Kernel driver in use: i915
        Kernel modules: i915, xe
Comment 7 Guido 2024-05-22 15:53:21 UTC
the bug persists with Plasma 6.0.5

Operating System: Manjaro Linux 
KDE Plasma Version: 6.0.5
KDE Frameworks Version: 6.2.0
Qt Version: 6.7.0
Kernel Version: 6.8.10-1-MANJARO (64-bit)
Graphics Platform: X11
Processors: 8 × 11th Gen Intel® Core™ i5-1135G7 @ 2.40GHz
Memory: 15.4 GiB of RAM
Graphics Processor: Mesa Intel® Xe Graphics
Manufacturer: Dell Inc.
Product Name: Inspiron 5502
Comment 8 Zamundaaa 2024-05-24 17:09:56 UTC
Afaict, the problem here is that the wrong egl display got used for compositing, so the shared context with Qt doesn't work. With https://invent.kde.org/plasma/kwin/-/commit/686ea6374bb7e03876006a52822cff9ca23c42cd that's fixed, so this issue should be gone in 6.1
Comment 9 Guido 2024-05-24 17:11:34 UTC
(In reply to Zamundaaa from comment #8)
> Afaict, the problem here is that the wrong egl display got used for
> compositing, so the shared context with Qt doesn't work. With
> https://invent.kde.org/plasma/kwin/-/commit/
> 686ea6374bb7e03876006a52822cff9ca23c42cd that's fixed, so this issue should
> be gone in 6.1

thank you!
Comment 10 Guido 2024-05-25 13:49:19 UTC
I tried but seems to work only for KWIN_COMPOSE=O2ES while in the past it workded also for standard compose
Comment 11 Guido 2024-06-14 10:10:16 UTC
(In reply to Guido from comment #10)
> I tried but seems to work only for KWIN_COMPOSE=O2ES while in the past it
> workded also for standard compose

Any solution about this?
Comment 12 Zamundaaa 2024-07-10 17:22:12 UTC
I looked into it, but I can't see anything that would cause this difference between GLES and desktop GL - and this doesn't happen on my PC