Bug 362051 - panel appears on the wrong screen/display after reboot
Summary: panel appears on the wrong screen/display after reboot
Status: RESOLVED WORKSFORME
Alias: None
Product: plasmashell
Classification: Plasma
Component: Panel (show other bugs)
Version: 5.7.5
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
: 362128 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-04-21 21:03 UTC by Till Schäfer
Modified: 2020-11-23 23:24 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Till Schäfer 2016-04-21 21:03:04 UTC
I have a dual screen setup and the panel is usually on the right screen. Since some time it happened randomly (every few boots) that the panel appears on the left screen after reboot. I have to move it manually to the right screen. Another reboot does not fix the problem. The panels stays left. Since the last few weeks this has become worse and the panel is now always on the left screen after a reboot.

Reproducible: Always




Installed Software:
- kde frameworks 5.21
- qt 5.5.1
- plasma 5.6.3
- nvidia-drivers 361.28 + xorg 1.17.4
Comment 1 Marco Martin 2016-05-04 11:34:00 UTC
*** Bug 362128 has been marked as a duplicate of this bug. ***
Comment 2 Till Schäfer 2016-05-04 11:42:06 UTC
some observation regarding the bug: if i start with a single screen and attach the other screen afterwards, the is moved to the right screen.
Maybe this is a race condition?
Comment 3 Daniel Lichtenberger 2016-05-27 06:39:51 UTC
I'm having the same issue and I also suspect it's some kind of race condition. For me the panel is stored on the wrong (left) screen about 50% of boots. Killing and restarting plasmashell does not trigger the issue.

I'm currently also using the following patch to replace kscreen with QT 5.6-based screen handling in plasmashell, but it didn't solve the issue:

https://git.reviewboard.kde.org/r/125451/

I added debug statements to the PanelView constructor and to the screen change-listener of plasmashell.  Here's the output of a successful boot (panel restored on the right screen):

> Creating panelView, setting screen to QRect(1280,0 1680x1050)

Here's the output of an unsucessful boot (panel restored on the left screen):

> Creating panelView, setting screen to QRect(1280,0 1680x1050)
> Screen changed: old= QRect(1280,0 1680x1050) , new= QRect(0,0 1280x1024) , geometry= QRect(1280,1020 1x30)
> Screen changed: old= QRect(0,0 1280x1024) , new= QRect(1280,0 1680x1050) , geometry= QRect(0,994 1x30)
> Screen changed: old= QRect(1280,0 1680x1050) , new= QRect(0,0 1280x1024) , geometry= QRect(0,994 1x30)

The panel briefly oscillates between the two screens before staying on the "wrong" screen.

I also got a stacktrace in the screen change listener, it seems like the 'TopLevelScreen' is being changed:

         /usr/bin/plasmashell() [0x431c74]
         /usr/bin/plasmashell() [0x435144]
         /usr/bin/plasmashell() [0x43a147]
         /usr/bin/plasmashell() [0x43a044]
         /usr/bin/plasmashell() [0x439e63]
         /usr/lib64/libQt5Core.so.5(_ZN11QMetaObject8activateEP7QObjectiiPPv+0x98e) [0x7f9412607ace]
         /usr/lib64/libQt5Gui.so.5(_ZN7QWindow13screenChangedEP7QScreen+0x2f) [0x7f9412b322bf]
         /usr/lib64/libQt5Gui.so.5(_ZN14QWindowPrivate26emitScreenChangedRecursionEP7QScreen+0x15) [0x7f9412b328a5]
         /usr/lib64/libQt5Gui.so.5(_ZN14QWindowPrivate17setTopLevelScreenEP7QScreenb+0x1bd) [0x7f9412b383fd]
         /usr/lib64/libQt5Gui.so.5(_ZN22QGuiApplicationPrivate31processWindowScreenChangedEventEPN29QWindowSystemInterfacePrivate24WindowScreenChangedEventE+0x201) [0x7f9412b2bda1]
         /usr/lib64/libQt5Gui.so.5(_ZN22QGuiApplicationPrivate24processWindowSystemEventEPN29QWindowSystemInterfacePrivate17WindowSystemEventE+0x145) [0x7f9412b305c5]
         /usr/lib64/libQt5Gui.so.5(_ZN22QWindowSystemInterface22sendWindowSystemEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE+0xbb) [0x7f9412b0effb]
         /usr/lib64/libQt5XcbQpa.so.5(+0x6fa10) [0x7f9404f08a10]
         /usr/lib64/libglib-2.0.so.0(g_main_context_dispatch+0x287) [0x7f940de9e227]
         /usr/lib64/libglib-2.0.so.0(+0x4c458) [0x7f940de9e458]
         /usr/lib64/libglib-2.0.so.0(g_main_context_iteration+0x2c) [0x7f940de9e4fc]
         /usr/lib64/libQt5Core.so.5(_ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE+0x5f) [0x7f941262ec3f]
         /usr/lib64/libQt5Core.so.5(_ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE+0xea) [0x7f94125da79a]
         /usr/lib64/libQt5Core.so.5(_ZN16QCoreApplication4execEv+0x8d) [0x7f94125e2a6d]
         /usr/bin/plasmashell() [0x4232e6]
         /lib64/libc.so.6(__libc_start_main+0xf0) [0x7f9411748710]
         /usr/bin/plasmashell(_start+0x29) [0x41e859]

I'm on openSUSE Tumbleweed, Plasma 5.6.3, Qt 5.6.  I did not have the issue with Plasma 5.5 or before.
Comment 4 Till Schäfer 2016-09-17 15:41:39 UTC
for me this issue was resolved after upgrading form nvidia-drivers 361.28 to 367.44. With 361.28 it is nearly always reproducible. With 367.44 is have not seen it once after several reboots.

i have currently installed the following other components: 
- frameworks 5.26
- qt 5.6.1
- plasma 5.7.5
- xorg 1.18.4

@Daniel Lichtenberger: are you using nvidia-driverss, too? If so, can you reproduce confirm the fix? In this case i would close the bug.
Comment 5 Daniel Lichtenberger 2016-09-17 16:33:22 UTC
I use the radeon driver. I stopped seeing this issue about a month ago as well.  My current versions are:

- Frameworks 5.25.0
- Qt 5.6.1
- Plasma 5.7.4
- Kernel 4.7.3
Comment 6 ghost53947 2016-09-24 12:13:17 UTC
I am having the same issue the panel is now always on the left most screen. There was a commit to make the panel go to the primary screen, it seems that has been undo for some reason.
Comment 7 ghost53947 2016-09-24 12:14:22 UTC
The issue was fixed for me until I updated to plasma 5.7.5 and that broke is again.
Comment 8 Till Schäfer 2016-09-24 15:29:57 UTC
today i also observed the bug again. therefore, the new nvidia-driver does not fix the problem, but makes it less likely.
Comment 9 Valerii Malov 2016-11-11 18:53:31 UTC
What fixed the issue for me:

Upgrading to plasma 5.8.3
Upgrading to Qt 5.6.2
Deleting ~/.local/share/kscreen

I have nvidia-drivers-370.28-r1 if that's relevant
Comment 10 Alexander Mentyu 2018-03-02 13:33:46 UTC
Looks like a duplicate of https://bugs.kde.org/show_bug.cgi?id=356225
Comment 11 Till Schäfer 2020-11-23 23:24:39 UTC
I am no longer observing this issue

Operating System: Gentoo Linux
KDE Plasma Version: 5.20.3
KDE Frameworks Version: 5.76.0
Qt Version: 5.15.1
Kernel Version: 5.9.9-gentoo
OS Type: 64-bit
Processors: 8 × Intel® Core™ i7-4790K CPU @ 4.00GHz
Memory: 23.4 GiB of RAM
Graphics Processor: GeForce GTX 970/PCIe/SSE2