Bug 493148 - Plugging in Valve Index VR headset freezes screen and blocks inputs - error: kwin_wayland[1174]: kwin_scene_opengl: 0x502: GL_INVALID_OPERATION error generated. <image> and <target> are incompatible
Summary: Plugging in Valve Index VR headset freezes screen and blocks inputs - error: ...
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: scene-opengl (show other bugs)
Version: 6.1.5
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
: 493996 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-09-15 09:41 UTC by Jonathan
Modified: 2024-10-23 18:59 UTC (History)
3 users (show)

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


Attachments
journalctl --boot 0 (gzipped because too large) (81.29 KB, text/plain)
2024-09-15 09:44 UTC, Jonathan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan 2024-09-15 09:41:14 UTC
SUMMARY

Some background that is connected to the issue:
Due to Nvidia driver issues, when booting my system, sometimes my Valve Index VR headset gets initialized in an unusable state where it isn't recognized by SteamVR. To re-initialize it into a usable state I have to unplug it's power cable and then plug it back in.
This is also discussed here: https://bugs.kde.org/show_bug.cgi?id=487938

Now my "real" issue:
Whenever I plug back in the VR headset's power cable to re-initialize it, the screen freezes and no mouse/keyboard inputs are registered anymore. I also can't switch to a TTY (e.g. Ctrl+alt+F3).
If I leave a youtube video playing before plugging in the headset, it's sound continues playing but the screen including the video freezes. Pausing the video doesn't work because inputs aren't registered anymore.
If I unplug the VR headset's power cable the screen unfreezes and everything works again.

ADDITIONAL INFORMATION:
- I can hear KDE's "device connected" jingle twice before the screen locks up.
- ssh to the PC after the freeze works fine and it responds to commands.
- I found the following errors being spammed into journalctl multiple times per second while the system is locked up:
Sep 15 11:00:08 linuxjoni04 kwin_wayland[1174]: kwin_scene_opengl: 0x502: GL_INVALID_OPERATION error generated. <image> and <target> are incompatible
Sep 15 11:00:08 linuxjoni04 kwin_wayland[1174]: kwin_scene_opengl: Invalid framebuffer status:  "GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT"
Sep 15 11:00:08 linuxjoni04 kwin_wayland[1174]: kwin_wayland_drm: Checking test buffer failed!
Sep 15 11:00:08 linuxjoni04 kwin_wayland[1174]: kwin_scene_opengl: 0x502: GL_INVALID_OPERATION error generated. <image> and <target> are incompatible

(see attached journalctl --boot 0 for full journal)


STEPS TO REPRODUCE
1. Boot PC & Log in
2. Plug in VR headset
3. Try to move mouse or type anything on keyboard

OBSERVED RESULT
-> Screen freezes and no inputs are registered anymore

EXPECTED RESULT
-> Being able to continue using the PC with the headset plugged in

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.1.5
KDE Frameworks Version: 6.5.0
Qt Version: 6.7.2
Kernel Version: 6.10.10-2-cachyos-lto (64-bit)
Graphics Platform: Wayland
Processors: 24 × 13th Gen Intel® Core™ i7-13700K
Memory: 62.5 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 3090 Ti/PCIe/SSE2
Manufacturer: ASUS
Comment 1 Jonathan 2024-09-15 09:44:05 UTC
Created attachment 173680 [details]
journalctl --boot 0 (gzipped because too large)
Comment 2 Zamundaaa 2024-10-02 23:50:11 UTC
*** Bug 493996 has been marked as a duplicate of this bug. ***
Comment 3 Bug Janitor Service 2024-10-15 18:59:31 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/6633
Comment 4 Zamundaaa 2024-10-21 22:57:00 UTC
Git commit 741bdb0b6bcdd2fd161615dd22b58902fbdead21 by Xaver Hugl.
Committed on 21/10/2024 at 22:29.
Pushed by zamundaaa into branch 'master'.

backends/drm: leave all outputs disabled by default, including VR headsets

This ensures that we don't fail to enable normal screens when the non-desktop ones can't be
enabled.

M  +20   -4    src/backends/drm/drm_gpu.cpp

https://invent.kde.org/plasma/kwin/-/commit/741bdb0b6bcdd2fd161615dd22b58902fbdead21
Comment 5 Zamundaaa 2024-10-21 23:53:43 UTC
Git commit b7dbb2845bfe454efe75be8f7f1b1631f50be174 by Xaver Hugl.
Committed on 21/10/2024 at 23:44.
Pushed by zamundaaa into branch 'Plasma/6.2'.

backends/drm: leave all outputs disabled by default, including VR headsets

This ensures that we don't fail to enable normal screens when the non-desktop ones can't be
enabled.


(cherry picked from commit 741bdb0b6bcdd2fd161615dd22b58902fbdead21)

Co-authored-by: Xaver Hugl <xaver.hugl@gmail.com>

M  +20   -4    src/backends/drm/drm_gpu.cpp

https://invent.kde.org/plasma/kwin/-/commit/b7dbb2845bfe454efe75be8f7f1b1631f50be174