Bug 483520 - Window size is reset after screen sleep
Summary: Window size is reset after screen sleep
Status: RESOLVED WORKSFORME
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: 6.0.2
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: qt6, regression
Depends on:
Blocks:
 
Reported: 2024-03-14 07:39 UTC by Eugene Shalygin
Modified: 2024-04-15 15:14 UTC (History)
1 user (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 Eugene Shalygin 2024-03-14 07:39:14 UTC
Putting the screen to sleep and waking it up again resets non-maximized, but larger than 1920x1080 windows  to 1920x1080.


STEPS TO REPRODUCE
1.  Open any window, size it to be bigger than 1920x1080.
2. Wait for the screen to go into the sleep mode.
3. Wake up the screen.

OBSERVED RESULT
The window is moved to the top left corner of the screen and its size is set to 1920x1080.


SOFTWARE/OS VERSIONS
Operating System: Gentoo Linux 2.15
KDE Plasma Version: 6.0.2
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Kernel Version: 6.8.0-gentoo (64-bit)
Graphics Platform: Wayland
Graphics Processor: AMD Radeon Graphics

ADDITIONAL INFORMATION
This is a regression from 5.27.
Comment 1 Nate Graham 2024-04-09 22:05:17 UTC
What's the resolution of the screen that this is happening on?
Comment 2 Eugene Shalygin 2024-04-09 22:18:37 UTC
3440 × 1440
Comment 3 Nate Graham 2024-04-11 19:37:54 UTC
Thanks. And what scale is this screen set to?
Comment 4 Eugene Shalygin 2024-04-11 21:08:14 UTC
The scale is set to 100% and QT_AUTO_SCREEN_SCALE_FACTOR=0
Comment 5 Nate Graham 2024-04-11 21:36:50 UTC
Did you manually set QT_AUTO_SCREEN_SCALE_FACTOR?
Comment 6 Eugene Shalygin 2024-04-13 10:11:04 UTC
I did set it manually in the past (Plasma 5), but now I don't find this variable in any of the config files. 

After updating one of the other system libraries, the window size seem to be right after unlocking the screen, but plasmashell crashes every time instead:

Program terminated with signal SIGSEGV, Segmentation fault.
[KCrash Handler]
#4  0x00007f9f9beac43e in void QtPrivate::QPodArrayOps<KScreen::WaylandOutputDevice*>::emplace<KScreen::WaylandOutputDevice*&>(long long, KScreen::WaylandOutputDevice*&) () at /usr/lib64/qt6/plugins/kf6/kscreen/KSC_KWayland.so
#5  0x00007f9f9beaa626 in KScreen::WaylandConfig::addOutput(unsigned int, unsigned int) () at /usr/lib64/qt6/plugins/kf6/kscreen/KSC_KWayland.so
#6  0x00007f9f9beaa8cf in KScreen::WaylandConfig::setupRegistry()::{lambda(void*, wl_registry*, unsigned int, char const*, unsigned int)#1}::_FUN(void*, wl_registry*, unsigned int, char const*, unsigned int) () at /usr/lib64/qt6/plugins/kf6/kscreen/KSC_KWayland.so
#7  0x00007f9fa7f0c2aa in ffi_call_unix64 () at /usr/lib64/libffi.so.8
#8  0x00007f9fa7f0b6c1 in ffi_call_int () at /usr/lib64/libffi.so.8
#9  0x00007f9fa7f0be1d in ffi_call () at /usr/lib64/libffi.so.8
#10 0x00007f9faaa44c44 in wl_closure_invoke.constprop () at /usr/lib64/libwayland-client.so.0
#11 0x00007f9faaa44fac in dispatch_event.isra () at /usr/lib64/libwayland-client.so.0
#12 0x00007f9faaa49af6 in wl_display_dispatch_pending () at /usr/lib64/libwayland-client.so.0
#13 0x00007f9fa9f5e052 in QtWaylandClient::QWaylandDisplay::flushRequests() () at /usr/lib64/libQt6WaylandClient.so.6
#14 0x00007f9fa827a68d in QObject::event(QEvent*) () at /usr/lib64/libQt6Core.so.6
#15 0x00007f9faa516bb9 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib64/libQt6Widgets.so.6
#16 0x00007f9fa82f0408 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib64/libQt6Core.so.6
#17 0x00007f9fa83162ee in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /usr/lib64/libQt6Core.so.6
#18 0x00007f9fa80c85b7 in postEventSourceDispatch(_GSource*, int (*)(void*), void*) () at /usr/lib64/libQt6Core.so.6
#19 0x00007f9fa6ca1c72 in g_main_dispatch () at /usr/lib64/libglib-2.0.so.0
#20 0x00007f9fa6ca4e27 in g_main_context_iterate_unlocked.isra () at /usr/lib64/libglib-2.0.so.0
#21 0x00007f9fa6ca544c in g_main_context_iteration () at /usr/lib64/libglib-2.0.so.0
#22 0x00007f9fa80c1f10 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt6Core.so.6
#23 0x00007f9fa831b00a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt6Core.so.6
#24 0x00007f9fa831b1c7 in QCoreApplication::exec() () at /usr/lib64/libQt6Core.so.6
#25 0x0000561d91241154 in main ()
Comment 7 Nate Graham 2024-04-15 15:11:42 UTC
Ok, it sounds like the original issue is fixed now; please open a new bug report for that new different one. Thanks!
Comment 8 Eugene Shalygin 2024-04-15 15:14:38 UTC
Well, to me it seems the original issue is now unreachable :)