Bug 416226 - Logging in/out and restarting with external monitor as primary makes whole desktop act as secondary screen instead of primary
Summary: Logging in/out and restarting with external monitor as primary makes whole de...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Desktop Containment (show other bugs)
Version: 5.18.90
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 1.0
Assignee: Sebastian Kügler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-14 03:21 UTC by Jan Keith Darunday
Modified: 2022-02-17 11:34 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Screenshot of desktop after login/logout (1.80 MB, image/png)
2020-01-14 03:21 UTC, Jan Keith Darunday
Details
`journalctl --user --boot=0` right after booting to improper desktop (128.91 KB, text/x-log)
2020-01-14 03:29 UTC, Jan Keith Darunday
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Keith Darunday 2020-01-14 03:21:04 UTC
Created attachment 125105 [details]
Screenshot of desktop after login/logout

SUMMARY
Logging in and out and restarting on dual display (with external display as primary) makes whole desktop act as secondary screen instead of primary (screen with default blue background without taskbar/panel).

STEPS TO REPRODUCE
1. Have both Laptop Screen and External Display connected
2. Disable laptop screen and set external display as primary display output
3. Change wallpaper and/or add a widget somewhere
3. Logout and login again (or restart)

OBSERVED RESULT
- Desktop wallpaper is reset KDE Plasma default (Blue)
- Bottom panel is no longer available
- I can still add widgets etc.
- Manually restarting plasma in konsole (launched through alt+f1) using `kquitapp5 plasmashell && kstart5 plasmashell` returns desktop to normal


EXPECTED RESULT
- I should see the same wallpaper/widgets/desktop as I had before restart


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 5.4.11-arch1-1
(available in About System)
KDE Plasma Version: 5.17.5
KDE Frameworks Version: 5.66.0
Qt Version: 5.14.0

ADDITIONAL INFORMATION
Logs from `journalctl --user --boot=0` show the message `kscreen_backend_launcher[1031]: kscreen.xrandr: RRSetOutputPrimary New primary: 68` a second after `plasmashell[1026]` messages start to appear. 

My assumption is that kscreen launches too late and plasmashell detects both my screen (with the laptop screen set as primary) as it starts up.

Note that I'm running on an SSD which could be a factor why plasmashell launches faster than kscreen.
Comment 1 Jan Keith Darunday 2020-01-14 03:29:40 UTC
Created attachment 125106 [details]
`journalctl --user --boot=0` right after booting to improper desktop
Comment 2 Nate Graham 2020-01-22 17:19:24 UTC
Any chance you could try this again in the Plasma 5.18 beta? See https://www.reddit.com/r/kde/comments/epkjlo/plasma_518_lts_beta_more_convenient_and_with_long/fejwivz/?utm_source=share&utm_medium=web2x
Comment 3 Jan Keith Darunday 2020-02-03 01:35:33 UTC
(In reply to Nate Graham from comment #2)
> Any chance you could try this again in the Plasma 5.18 beta? See
> https://www.reddit.com/r/kde/comments/epkjlo/
> plasma_518_lts_beta_more_convenient_and_with_long/fejwivz/
> ?utm_source=share&utm_medium=web2x

Hi, I just tried this with Plasma 5.17.90 with my existing user and with a newly-created user, the same issue occurs.
Comment 4 Christoph Feck 2020-02-13 14:15:06 UTC
Thanks for the update; changing status.
Comment 5 Jan Keith Darunday 2020-05-20 22:15:54 UTC
Hi, just an update for this:
I'm still experiencing this issue on both KDE Plasma 5.18.5 (LTS) and 5.18.90 (Beta).

I have also found the ff. workaround:
By default SDDM displays the greeter on both screens. Logging in to KDE (X11) with this default setting triggers this issue. However, one day, I was trying to make SDDM load on the external monitor as the laptop screen can be too bright at night and it made the issue no longer occur.

What I did was add the ff. to /usr/share/sddm/scripts/Xsetup to turn off the laptop monitor in SDDM:
```
xrandr | egrep -i '^DP1 connected' && xrandr --output eDP1 --off && xrandr --output DP1 --auto --primary
```

Note that the issue occurs again if I remove this and return to the default.
Comment 6 Jan Keith Darunday 2020-05-20 22:20:01 UTC
>load on the external monitor
This should be "load only on the external monitor"

Note that in the above, eDP1 is the laptop screen and DP1 is the external monitor.
Comment 7 Jan Keith Darunday 2021-02-07 03:06:00 UTC
Hi,

I can no longer replicate this in 5.21 beta. Marking this as resolved.

Operating System: Arch Linux
KDE Plasma Version: 5.20.90
KDE Frameworks Version: 5.78.0
Qt Version: 5.15.2
Kernel Version: 5.10.13-arch1-1
OS Type: 64-bit