Bug 513835 - kwin Crash in KWin::InputDevice::switchToggle after flipping the 2-in-1 laptop screen, changing into tablet mode
Summary: kwin Crash in KWin::InputDevice::switchToggle after flipping the 2-in-1 lapto...
Status: RESOLVED DUPLICATE of bug 514082
Alias: None
Product: kwin
Classification: Plasma
Component: generic-crash (other bugs)
Version First Reported In: 6.5.4
Platform: Fedora RPMs Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: wayland-only
Depends on:
Blocks:
 
Reported: 2025-12-26 12:17 UTC by naczo
Modified: 2026-01-07 22:01 UTC (History)
2 users (show)

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


Attachments
Crash log (16.35 KB, text/vnd.kde.kcrash-report)
2025-12-26 12:17 UTC, naczo
Details
Another crash log, few days prior (21.93 KB, text/plain)
2025-12-26 12:18 UTC, naczo
Details
3rd Crash (43.22 KB, text/plain)
2025-12-31 10:38 UTC, naczo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description naczo 2025-12-26 12:17:08 UTC
Created attachment 187997 [details]
Crash log

SUMMARY
While doing something, like watching a video using mpv player, or writing something in xournal++, i encounter a crash while I'm trying to flip the screen of my 2-in-1 convertible laptop, either from or into tablet mode. However, it does not always happen so I have not found a way to reproduce this on demand. I 

STEPS TO REPRODUCE
1. Play a video in mpv player (Fullscreen)
2. Flip the screen into tablet mode

OBSERVED RESULT
Crash.

EXPECTED RESULT
Not crash.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
(available in the Info Center app, or by running `kinfo` in a terminal window)
Linux/KDE Plasma: Fedora Linux 43
KDE Plasma Version: 6.5.4
KDE Frameworks Version: 6.21.0 
Qt Version: 6.10.1

ADDITIONAL INFORMATION
Device: ThinkPad 11e Yoga Gen 6
Comment 1 naczo 2025-12-26 12:18:35 UTC
Created attachment 187998 [details]
Another crash log, few days prior
Comment 2 TraceyC 2025-12-29 18:33:03 UTC
Searchable backtrace of the crashing thread, most recent


Thread 1 (Thread 0x7f3edd279f00 (LWP 1871)):
[KCrash Handler]
#4  0x00007f3ee4567740 in void doActivate<false>(QObject*, int, void**) () from /lib64/libQt6Core.so.6
#5  0x00007f3ecc33e0e6 in IIOSensorProxyOrientationSensor::start() () from /usr/lib64/qt6/plugins/sensors/libqtsensors_iio-sensor-proxy.so
#6  0x00007f3ee4291e08 in QSensor::start() () from /lib64/libQt6Sensors.so.6
#7  0x00007f3ee75df96f in KWin::OrientationSensor::setEnabled(bool) [clone .part.0] () from /lib64/libkwin.so.6
#8  0x00007f3ee75037cd in QtPrivate::QCallableObject<KWin::Workspace::init()::{lambda()#2}, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) [clone .lto_priv.0] () from /lib64/libkwin.so.6
#9  0x00007f3ee456759a in void doActivate<false>(QObject*, int, void**) () from /lib64/libQt6Core.so.6
#10 0x00007f3ee74846aa in KWin::TabletModeManager::tabletModeChanged(bool) () from /lib64/libkwin.so.6
#11 0x00007f3ee733f42e in QtPrivate::QCallableObject<KWin::InputRedirection::addInputDevice(KWin::InputDevice*)::{lambda(KWin::SwitchState, std::chrono::duration<long, std::ratio<1l, 1000000l> >, KWin::InputDevice*)#1}, QtPrivate::List<KWin::SwitchState, std::chrono::duration<long, std::ratio<1l, 1000000l> >, KWin::InputDevice*>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) [clone .lto_priv.0] () from /lib64/libkwin.so.6
#12 0x00007f3ee4567697 in void doActivate<false>(QObject*, int, void**) () from /lib64/libQt6Core.so.6
#13 0x00007f3ee728038b in KWin::InputDevice::switchToggle(KWin::SwitchState, std::chrono::duration<long, std::ratio<1l, 1000000l> >, KWin::InputDevice*) () from /lib64/libkwin.so.6
#14 0x00007f3ee75a521c in KWin::LibInput::Connection::processEvents() () from /lib64/libkwin.so.6
#15 0x00007f3ee4558fcc in QObject::event(QEvent*) () from /lib64/libQt6Core.so.6
#16 0x00007f3ee583db9f in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib64/libQt6Widgets.so.6
#17 0x00007f3ee44fc4e8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib64/libQt6Core.so.6
#18 0x00007f3ee44ffb09 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /lib64/libQt6Core.so.6
#19 0x00007f3ee46d3e64 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt6Core.so.6
#20 0x00007f3ee52fe5d2 in QUnixEventDispatcherQPA::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt6Gui.so.6
#21 0x00007f3ee4509063 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt6Core.so.6
#22 0x00007f3ee4504819 in QCoreApplication::exec() () from /lib64/libQt6Core.so.6
#23 0x00005593fccf4a49 in main ()
Comment 3 TraceyC 2025-12-29 18:44:13 UTC
I'm not immediately able to reproduce this with the same steps, switching back and forth between tablet mode and desktop mode multiple times, with Wayland.

Does this happen in Wayland, or X11 or both?
Comment 4 naczo 2025-12-31 10:38:10 UTC
Created attachment 188109 [details]
3rd Crash

Happened again, laptop was closed, in sleep for over 10 hours (xournal++ was left open), i opened it and flipped the screen, kwin crashed.
Comment 5 naczo 2025-12-31 10:39:05 UTC
It happens only in wayland. However I also can't reproduce it sadly, it happens randomly.
Comment 6 wapeety 2026-01-04 10:18:46 UTC
seems pretty similar to my bug:
https://bugs.kde.org/show_bug.cgi?id=514082 
could it be actually the same?
Comment 7 naczo 2026-01-04 10:23:30 UTC
I think my bug is also related to the orientation sensor so it is very likely it's the same.
Comment 8 TraceyC 2026-01-07 22:01:39 UTC
Based on the backtrace, this is indeed the same crash as bug 514082. Well spotted. I'll merge this report into the other one, which has a more detailed backtrace and has been confirmed.

*** This bug has been marked as a duplicate of bug 514082 ***