Summary: | Using xrandr to enable and disable external screen results in it not having a Plasma containment | ||
---|---|---|---|
Product: | [Plasma] KScreen | Reporter: | S. Christian Collins <s_chriscollins> |
Component: | common | Assignee: | kscreen-bugs-null <kscreen-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | aleixpol, nate, notmart, vmlinuz386 |
Priority: | NOR | ||
Version: | 5.27.1 | ||
Target Milestone: | 1.0 | ||
Platform: | Neon | ||
OS: | Linux | ||
See Also: | https://bugs.kde.org/show_bug.cgi?id=466149 | ||
Latest Commit: | Version Fixed In: | 5.27.3 | |
Sentry Crash Report: |
Description
S. Christian Collins
2023-02-23 17:33:52 UTC
Ultimately the same as Bug 460341 since KScreen will notice the change, re-evaluate config data, and trigger the bug. *** This bug has been marked as a duplicate of bug 460341 *** (In reply to Nate Graham from comment #1) > Ultimately the same as Bug 460341 since KScreen will notice the change, > re-evaluate config data, and trigger the bug. > > *** This bug has been marked as a duplicate of bug 460341 *** Are you sure? That bug is about a display being disabled, whereas with my bug, the display is enabled and functions, but just doesn't have a wallpaper or desktop functionality. I can still drag windows to it, etc. Also, that bug appears to involve NVIDIA, but I can repro this bug in Virtualbox. Ok, definitely a different issue then. Looks like Plasma has misplaced your desktop containment. Sorry about that. I would strongly recommend using `kscreen-doctor` to turn on and off your secondary screen from the command line, rather than xrandr. This way KScreen gets notified of the change automatically and informs Plasma immediately, rather than all of this happening in a roundabout way because KScreen has to watch for external config changes. Instead of xrandr, If you instead run > kscreen-doctor output.HDMI-0.disable and > kscreen-doctor output.HDMI-0.disable to disable and re-enable your external screen, does Plasma react properly? (In reply to Nate Graham from comment #4) > Instead of xrandr, If you instead run > > kscreen-doctor output.HDMI-0.disable > and > > kscreen-doctor output.HDMI-0.disable > to disable and re-enable your external screen, does Plasma react properly? Hi Nate. I assume you meant to write `kscreen-doctor output.HDMI-0.enable` for the second command. Unfortunately, this results in the screen being in "duplicate" mode rather than extending my desktop. All I could find for documentation was in "kscreen-doctor --help", which doesn't show all available options. By looking at the source code and experimenting, I finally figured out how to make this work with kscreen-doctor. At first, I had the display enabling and parameter setting in a single command, which resulted in the screen not becoming enabled, but by splitting it into two commands, it works. I have it running in a single line as follows: > kscreen-doctor output.HDMI-0.enable && kscreen-doctor output.HDMI-0.mode.1280x1024@75 output.HDMI-0.position.1920,120 I will update my screen commands to use kscreen-doctor, since this is the officially supported way. Cool, so that works? You get a desktop on the secondary screen when you do that? Yes. The kscreen-doctor command chain gives me a proper, usable desktop on the secondary monitor. Awesome! So now we need to figure out why the config that KScreen generates automatically when it detects those external xrandr changes don't result in the external screen getting a proper Plasma containment. Same issue here My video setup is just iGPU of 11700K CPU. Using HDMI and DP at one time. Now I switched from using xrandr to kscreen-doctor and works perfect. Old commmands for hotkeys: > xrandr --output DP-1 --auto --output HDMI-1 --off --output HDMI-2 --off > xrandr --output DP-1 --off --output HDMI-1 --auto --output HDMI-2 --off > xrandr --output DP-1 --off --output HDMI-1 --off --output HDMI-2 --auto New commmands for hotkeys: > kscreen-doctor output.DP-1.enable output.HDMI-1.disable output.HDMI-2.disable > kscreen-doctor output.DP-1.disable output.HDMI-1.enable output.HDMI-2.disable > kscreen-doctor output.DP-1.disable output.HDMI-1.disable output.HDMI-2.enable (In reply to Gerardo Exequiel Pozzi from comment #9) > Same issue here > > My video setup is just iGPU of 11700K CPU. Using HDMI and DP at one time. > Now I switched from using xrandr to kscreen-doctor and works perfect. > > Old commmands for hotkeys: > > xrandr --output DP-1 --auto --output HDMI-1 --off --output HDMI-2 --off > > xrandr --output DP-1 --off --output HDMI-1 --auto --output HDMI-2 --off > > xrandr --output DP-1 --off --output HDMI-1 --off --output HDMI-2 --auto > > New commmands for hotkeys: > > kscreen-doctor output.DP-1.enable output.HDMI-1.disable output.HDMI-2.disable > > kscreen-doctor output.DP-1.disable output.HDMI-1.enable output.HDMI-2.disable > > kscreen-doctor output.DP-1.disable output.HDMI-1.disable output.HDMI-2.enable Well, not fixed at all. For example switching from TV (1366x768) to Monitor (1920x1200). "KDE" only uses a rectangle al top-left of the screen of 1366x768 and without anything (no panels). Also switching from TV to Monitor, there are screen tearing on videos for example. All of these issues are fixed if I touch <Meta> + <P> and select current config: no tearing, normal desktop with panel. That seems like a different issue. Can you submit a new bug report for it? Thanks! A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/2735 Git commit 253034f3da5b89d70b5946665c5f8f5011013896 by David Edmundson. Committed on 13/03/2023 at 16:57. Pushed by davidedmundson into branch 'master'. Screenpool: avoid uniqueConnection with lambda Handling QScreen geometryChanged was connected to a lambda with a unique connection. Qt cannot determine this and doesn't connect. The unique connection was used as handleScreenAdded is also called when the output order changed to handle things being async. (I don't think that's actually needed, but that's a refactor for another thread) This patch shuffles the code so we only connect once which is cleaner anyway. Related: bug 466020 M +21 -11 shell/screenpool.cpp M +1 -0 shell/screenpool.h https://invent.kde.org/plasma/plasma-workspace/commit/253034f3da5b89d70b5946665c5f8f5011013896 A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/2739 Git commit 3164e1367122245dda4a3a4d95cbcb623e8168a2 by David Edmundson. Committed on 13/03/2023 at 17:03. Pushed by davidedmundson into branch 'Plasma/5.27'. Screenpool: avoid uniqueConnection with lambda Handling QScreen geometryChanged was connected to a lambda with a unique connection. Qt cannot determine this and doesn't connect. The unique connection was used as handleScreenAdded is also called when the output order changed to handle things being async. (I don't think that's actually needed, but that's a refactor for another thread) This patch shuffles the code so we only connect once which is cleaner anyway. Related: bug 466020 (cherry picked from commit 253034f3da5b89d70b5946665c5f8f5011013896) M +21 -11 shell/screenpool.cpp M +1 -0 shell/screenpool.h https://invent.kde.org/plasma/plasma-workspace/commit/3164e1367122245dda4a3a4d95cbcb623e8168a2 We think the above changes may have fixed the issue for 5.27.3. Can you please upgrade to that version and verify? Thanks a lot! |