[KScreen] [Bug 367490] Disabling laptop screen makes it also external screen disabled
https://bugs.kde.org/show_bug.cgi?id=367490 Sebastian Kügler changed: What|Removed |Added CC||tietze.he...@gmail.com --- Comment #16 from Sebastian Kügler --- *** Bug 351826 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
[KScreen] [Bug 367490] Disabling laptop screen makes it also external screen disabled
https://bugs.kde.org/show_bug.cgi?id=367490 Sebastian Kügler changed: What|Removed |Added Status|CONFIRMED |RESOLVED Resolution|--- |FIXED Latest Commit||http://commits.kde.org/libk ||screen/90d8ee283f88cb07ff93 ||6ecb497b277593b99b98 --- Comment #15 from Sebastian Kügler --- Git commit 90d8ee283f88cb07ff936ecb497b277593b99b98 by Sebastian Kügler. Committed on 19/08/2016 at 10:43. Pushed by sebas into branch 'master'. normalize output positions in setoperation Summary: When setting a config, outputs may fall outside of the virtual screen layout. This can happen when, for example, a single screen is enabled and its position is not zero. The screen size is a unified rect of the enabled and connected outputs, which doesn't necessarily sit at 0,0 initially. By normalizing the output position, we avoid this pitfall. Especially the xrandr backend struggles with this, since it will disable outputs falling outside of the virtual screen, and it does so after policy checks have happened, so in the worst (and actually fairly common) case, it will disable the only remaining output, leading to ... The reason to do the normalization in SetConfigOperation right before the config is passed to the backends to apply is to catch this inconsistency problem with configs at a common entry-point. Doing it in the library, rather than in the xrandr backend also means that we can autotest it -- we can't sensible do that with the xrandr backend. Test Plan: * manually tested by enabling the left / top most output of two actual outputs, this failed before and left all outputs disabled, with this patch, it works as expected * added autotest to make sure the normalization works Reviewers: #plasma, graesslin Reviewed By: #plasma, graesslin Subscribers: graesslin, plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D2496 M +43 -0autotests/testscreenconfig.cpp M +33 -0src/setconfigoperation.cpp http://commits.kde.org/libkscreen/90d8ee283f88cb07ff936ecb497b277593b99b98 -- You are receiving this mail because: You are watching all bug changes.
[KScreen] [Bug 367490] Disabling laptop screen makes it also external screen disabled
https://bugs.kde.org/show_bug.cgi?id=367490 --- Comment #14 from Sebastian Kügler --- Ow, by the way: you can work around the problem by moving the external enabled screen to the left in the preview, and then disabling the laptop screen, then apply. This should avoid the problem. -- You are receiving this mail because: You are watching all bug changes.
[KScreen] [Bug 367490] Disabling laptop screen makes it also external screen disabled
https://bugs.kde.org/show_bug.cgi?id=367490 --- Comment #13 from Sebastian Kügler --- Yes, I'm pretty sure we got the root cause of this problem by its balls. Proposed patch: https://phabricator.kde.org/D2496 (If you can easily test this, please go ahead and report back. Otherwise, you can wait until it's merged, should only be a few days.) -- You are receiving this mail because: You are watching all bug changes.
[KScreen] [Bug 367490] Disabling laptop screen makes it also external screen disabled
https://bugs.kde.org/show_bug.cgi?id=367490 --- Comment #12 from soee --- So i should wait with any more tests until your patch lands in master? -- You are receiving this mail because: You are watching all bug changes.
[KScreen] [Bug 367490] Disabling laptop screen makes it also external screen disabled
https://bugs.kde.org/show_bug.cgi?id=367490 --- Comment #11 from Sebastian Kügler --- Wrong hunch. DPMS doesn't seem to mess up. What's happening is: - the left screen gets disabled - the right stays enabled, and its position is at the right edge of the left screen - the screen geometry is updated to *the dimensions* of a unified rect of all screens (done in the xrandr backend) - the right screen now falls (at least partly) outside of the screen - the xrandr backend can't deal with this situation and disables the "wrongly" positioned output Worse, in the xrandr backend, we're supposed to have all the policy checks done, so it will also happily disable all outputs. I've reproduced the problem and tracked down where it's going wrong in the code. I have a proof-of-concept patch which makes it work on my disk, which I need to polish up, autotest and post for review. We can fix this by updating the output's positions to the new screen size, basically normalizing all positions to the top-left outputs position. -- You are receiving this mail because: You are watching all bug changes.
[KScreen] [Bug 367490] Disabling laptop screen makes it also external screen disabled
https://bugs.kde.org/show_bug.cgi?id=367490 Sebastian Kügler changed: What|Removed |Added Status|UNCONFIRMED |CONFIRMED Keywords||multiscreen CC||k...@privat.broulik.de Ever confirmed|0 |1 --- Comment #10 from Sebastian Kügler --- Thanks for the report and details. I've had a look at the information, here are my thoughts: I can't seem to reproduce this issue, for me, with a laptop and an HDMI screen attached, the following works: - When both are connected, I disable the laptop screen in kscreen's kcm in systemsettings - this makes all content move to the external monitor, the laptop display is not part of my desktop anymore (it's now essentially a single-screen system - when unplugging, the laptop screen gets enabled again, all content moves there, all is fine I think powerdevil isn't really helpful here. The "Turn off screen" action has a bit of an unclear effect: - for laptops with single screen, "do nothing" will also switch off the display (the backlight in fact) - for laptops with dual screen, it triggers dpms off on all screens These DPMS tricks while we're doing screen changes are tricky, since dpms waits for some kind of input, and then re-enables the screen, this seems to mess up the config we receive from xrandr callbacks. This may happen due to dpms affecting, at least temporarily, the geometry of the screens, like this: 1471559631060 ; kded ; resuming : KScreen::Output( 66 "eDP-1" connected enabled QPoint(0,0) QSize(-1, -1) "72" ) The QSize(-1, -1) seems to be the culprit, that should not happen. What seems to work for me is not setting powerdevil to "Turn off screen", but leave it to suspend, or do nothing, based on your preference (just to avoid the dpms calls during lid close). Could you try that and see if it works for you? -- You are receiving this mail because: You are watching all bug changes.
[KScreen] [Bug 367490] Disabling laptop screen makes it also external screen disabled
https://bugs.kde.org/show_bug.cgi?id=367490 --- Comment #9 from soee --- Created attachment 100662 --> https://bugs.kde.org/attachment.cgi?id=100662&action=edit Working screens configuration -- You are receiving this mail because: You are watching all bug changes.
[KScreen] [Bug 367490] Disabling laptop screen makes it also external screen disabled
https://bugs.kde.org/show_bug.cgi?id=367490 --- Comment #8 from soee --- Before i do the check i wanted to report one thing: having the problem i switched back to Nvidia profile and did come power configuration setup changes System Settings -> Power Management -> Energy Saving: [X] Button events handling When laptop is closed: Turn Off Screen [X] Even when an external monitor is connected Than i closed laptop's lid and had only external screen active - pretty good os far. After reboot though GRUB/sddm is always loading on laptop screen (probably because user configuration is not available here) so i have to open laptop lid, login and ... this time even with laptop lid opened i had it's screen disabled as i wanted (see attached screenshot 3). Though i'm not sure why and how it started to work. -- You are receiving this mail because: You are watching all bug changes.
[KScreen] [Bug 367490] Disabling laptop screen makes it also external screen disabled
https://bugs.kde.org/show_bug.cgi?id=367490 --- Comment #7 from Sebastian Kügler --- plasmashell is entirely orthogonal here. We just look at the screen setup. Could rm kscreen.log, recreate the issue on Intel, and post that log as well? -- You are receiving this mail because: You are watching all bug changes.
[KScreen] [Bug 367490] Disabling laptop screen makes it also external screen disabled
https://bugs.kde.org/show_bug.cgi?id=367490 --- Comment #6 from soee --- Yes i have the same issue on Intel profile. Also - as you can see on the second attached screen - after hdmi cable is unplugged and plugged in again (as i mentioned in bug report) the laptop screen is black (after i move whole panel to connected screen) and i do not have context menu when i right click on it etc. I have to restart plasmashell to have them laptop screen configuration back (wallpaper etc). -- You are receiving this mail because: You are watching all bug changes.
[KScreen] [Bug 367490] Disabling laptop screen makes it also external screen disabled
https://bugs.kde.org/show_bug.cgi?id=367490 --- Comment #5 from Sebastian Kügler --- Could you please test this in the Intel profile as well? -- You are receiving this mail because: You are watching all bug changes.
[KScreen] [Bug 367490] Disabling laptop screen makes it also external screen disabled
https://bugs.kde.org/show_bug.cgi?id=367490 --- Comment #4 from soee --- Some more info: Dell Inspiron with hybrid graphics: Intel + Nvidia (working on nvidia profile with 370.23 propriety driver version). External screen is LG 29UC97C using 2560x1080 resolution. -- You are receiving this mail because: You are watching all bug changes.
[KScreen] [Bug 367490] Disabling laptop screen makes it also external screen disabled
https://bugs.kde.org/show_bug.cgi?id=367490 --- Comment #3 from soee --- Created attachment 100660 --> https://bugs.kde.org/attachment.cgi?id=100660&action=edit kscreen.log -- You are receiving this mail because: You are watching all bug changes.
[KScreen] [Bug 367490] Disabling laptop screen makes it also external screen disabled
https://bugs.kde.org/show_bug.cgi?id=367490 --- Comment #2 from soee --- Created attachment 100659 --> https://bugs.kde.org/attachment.cgi?id=100659&action=edit Wrong panel rendering after unplugging/plugging in hdmi cable -- You are receiving this mail because: You are watching all bug changes.
[KScreen] [Bug 367490] Disabling laptop screen makes it also external screen disabled
https://bugs.kde.org/show_bug.cgi?id=367490 --- Comment #1 from soee --- Created attachment 100658 --> https://bugs.kde.org/attachment.cgi?id=100658&action=edit Screens configuration is System Settings -- You are receiving this mail because: You are watching all bug changes.