Summary: | unable to switch back to laptop monitor after external monitor has been unplugged and other way around | ||
---|---|---|---|
Product: | [Plasma] KScreen | Reporter: | Anton <anton.bugs> |
Component: | kded | Assignee: | Alex Fiestas <afiestas> |
Status: | RESOLVED FIXED | ||
Severity: | major | CC: | aleksander.kamenik, dvratil, mail |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kscreen/d43eb850be250147d45741e2fe2bd7f5c3637a75 | Version Fixed In: | |
Sentry Crash Report: | |||
Attachments: |
.xsession-errors file
Xorg.log .xsession-errors file Xorg.log xrandr --verbose output kscreen config 1 kscreen config 2 |
Description
Anton
2012-12-31 00:17:27 UTC
Created attachment 76106 [details]
.xsession-errors file
Created attachment 76107 [details]
Xorg.log
*** This bug has been marked as a duplicate of bug 312231 *** I tested the latest trunk with the patch applied, the crash is gone, however my main problem is still there: I'm not able to switch back to the laptop screen after I unplugged the external monitor. So I'm changing the title and reopening... Created attachment 76108 [details]
.xsession-errors file
Created attachment 76109 [details]
Xorg.log
updated logs from a just rebooted laptop
Created attachment 76110 [details]
xrandr --verbose output
I only have 1 external monitor, however my bug might be still related to #312231. I'll keep an eye on it.
So when you unplug the external monitor and open the laptop lid, the laptop monitor remains blank? yes the laptop remains black and I actually don't touch the lid (it would go into a sleep mode in my setup) and simply plugging/unplugging the external monitor. Here is more info. I managed to turn on the laptop monitor using "xrandr" (blindly) and tried to plug to the external monitor back. kscreen failed again and now the external monitor reminds black. Matthias Blaicher may be right in his comment https://bugs.kde.org/show_bug.cgi?id=312231#c4. Anton, try switching to another tty and back to re-enable the blank LVDS1. I had problems myself with sleep and monitor configuration. I think most problems are related so I won't open a new bug for this. Setup: Thinkpad x220, dock with external monitor via displayport. Fedora 17, x64. My preferred setup is to use the external monitor as the secondary monitor on the right, but have it aligned by the bottom (not default top) of the screen. Default: https://kilx.eu/pics/default.top.png Bottom: https://kilx.eu/pics/bottom.png I did three tests: 1. undock kscreen reconfigures correctly by disabling external monitor dock results: works 100%, external monitor configured and aligned by bottom 2. sleep by using Sleep button from KDE->Leave menu wake up using power button above the laptop keyboard during wake up i can see system messages on both screens results: works 100% as well 3. sleep by closing lid wake up by opening lid during wake up i see system messages only on the external monitor results: fail, kscreen has forgotten the custom position (external monitor is still to the right and secondary, but aligned via top, not bottom) open apps have been moved to the external monitor, as if LVDS1 was disabled meanwhile I fix the position (align by bottom) in kscreen, press apply and lvds1 goes blank fix this by switching to another tty for a second and back (press ctrl+alt+F2 and ctrl+alt+F1) I see three problems in test 3. 1. The internal LVDS1 screen takes time to power up when waking up by opening lid and kscreen reconfigures the screens too early (it only sees the external monitor) 2. Then it does see LVDS1 and enables it but for some reason the position info is lost 3. When changing the position LVDS1 goes blank and a switch to another tty and back works as a refresh which makes it work again $ echo before sleep via lid close; md5sum .kde/share/apps/kscreen/*;cat .kde/share/apps/kscreen/9cc77b869fdd9dfa952de53c129ed353 ;echo before sleep via lid close 04af62609bf7ab5fbc389058a10793ca .kde/share/apps/kscreen/9cc77b869fdd9dfa952de53c129ed353 [ { "enabled" : true, "hash" : "fc7a53d5ea6898e59583336a3d00e62f", "mode" : { "refresh" : 59.9339, "size" : { "height" : 1080, "width" : 1920 } }, "pos" : { "x" : 1366, "y" : 0 }, "primary" : false, "rotation" : 1 }, { "enabled" : true, "hash" : "56a261ac023a91a83de96bf5cb585786", "mode" : { "refresh" : 60.0186, "size" : { "height" : 768, "width" : 1366 } }, "pos" : { "x" : 0, "y" : 312 }, "primary" : true, "rotation" : 1 } ] $ echo after wake up via lid open; md5sum .kde/share/apps/kscreen/*;cat .kde/share/apps/kscreen/9cc77b869fdd9dfa952de53c129ed353 ;echo after wake up via lid open 83e715b9904c88b493f7338b8cb267d6 .kde/share/apps/kscreen/9cc77b869fdd9dfa952de53c129ed353 [ { "enabled" : true, "hash" : "fc7a53d5ea6898e59583336a3d00e62f", "mode" : { "refresh" : 59.9339, "size" : { "height" : 1080, "width" : 1920 } }, "pos" : { "x" : 1366, "y" : 0 }, "primary" : false, "rotation" : 1 }, { "enabled" : true, "hash" : "56a261ac023a91a83de96bf5cb585786", "mode" : { "refresh" : 60.0186, "size" : { "height" : 768, "width" : 1366 } }, "pos" : { "x" : 0, "y" : 0 }, "primary" : true, "rotation" : 1 } ] When testing I discovered that kscreen had created several configurations files in the apps/kscreen/ folder at times, but I don't know how to reproduce this. Maybe the old kcm_display module is interfering? I did click the "ignore" checkbox so that there is no pop up window when monitor setup is changed. But it is compiled as I only installed libkscreen and kscreen in addition to the default Fedora KDE install. Can you paste the content of ~/.kde/share/apps/kscreen/ ? (In reply to comment #9) > yes the laptop remains black and I actually don't touch the lid (it would go > into a sleep mode in my setup) and simply plugging/unplugging the external > monitor. > > Here is more info. I managed to turn on the laptop monitor using "xrandr" > (blindly) and tried to plug to the external monitor back. kscreen failed > again and now the external monitor reminds black. > > Matthias Blaicher may be right in his comment > https://bugs.kde.org/show_bug.cgi?id=312231#c4. Git commit 168d178322b020e581fe189bd2ffdb855fa60d66 by Dan Vrátil. Committed on 02/01/2013 at 12:50. Pushed by dvratil into branch 'master'. Make sure that in simpleOutput() case the output is enabled Unplugging external monitor while laptop lid is closed causes no outputs to be enabled, not even after opening the lid, so make sure that the embedded output is always enabled. REVIEW: 108062 M +4 -0 kded/generator.cpp M +4 -0 tests/testgenerator.cpp http://commits.kde.org/kscreen/168d178322b020e581fe189bd2ffdb855fa60d66 Created attachment 76139 [details]
kscreen config 1
Created attachment 76140 [details]
kscreen config 2
btw, my led is always open
Tested with "Make sure that in simpleOutput() case the output is enabled". Did not help in my case. The difference now was that after installing new libkscreen and kscreen and reboot KDE logged in and then disabled LVDS1, with external monitor working. Had to do the switch to other tty and back trick to reenable it. Configuration looked OK though with correct position. Test 3 as in my previous comment had the same results. What I noticed when I fixed the position (align by bottom) KDE moved open applications to the external monitor as the primary was blank/disabled. I then had to do then switch tty refresh and move the open apps back manually. Nothing changed for me either Git commit b06a0969dc3ac65d32d070b9460f3262703b88a7 by Àlex Fiestas. Committed on 10/01/2013 at 16:03. Pushed by afiestas into branch 'master'. Do not save the generated configuration when lid is closed Basically right now we were applying the "ideal config" everytime the lid was being open or closed, smashing any existing configuration. Now we behave like: on lid CLOSED: -We apply an ideal config, which will take into account the new lid state on lid OPEN: -We try to restore the previous configuration if any, or generate a new one. M +10 -2 kded/daemon.cpp M +1 -1 kded/daemon.h http://commits.kde.org/kscreen/b06a0969dc3ac65d32d070b9460f3262703b88a7 Please, remove any configuration file under ~/.kde/share/apps/kscreen to make sure that you have right behavior. Thanks ! You probably fixed Aleksander's problem but not mine. Again, I don't close/open lid. I simply unplug an external monitor. The display switching hotkey (fn-f7) stopped working with the latest version as well. I'm wrong, it's 99% working, including the hotkey. There is still some problem with the logic of the initial configuration. For example, then I unplugged the external monitor for the first time (after deleting configs files), the screen on the laptop was extended to an unexisting monitor. And it was full screen but flickering (like trying to switch to a different monitor) for the second time, and that's then the hotkey didn't help. I haven't tested the lid/sleep problem, be cause after update to current versions of libkscreen and kscreen the position info is not remembered even after a simple undock/dock. This worked previously. Investigating the issue I found that the positional info is not saved at all in the config file. ## this was generated after enabling and bottom aligning the second display. But here I can see it's still top aligned: .kde/share/apps/kscreen/9cc77b869fdd9dfa952de53c129ed353 [ { "enabled" : true, "id" : "fc7a53d5ea6898e59583336a3d00e62f", "mode" : { "refresh" : 59.9339, "size" : { "height" : 1080, "width" : 1920 } }, "pos" : { "x" : 1366, "y" : 0 }, "primary" : false, "rotation" : 1 }, { "enabled" : true, "id" : "56a261ac023a91a83de96bf5cb585786", "mode" : { "refresh" : 60.0186, "size" : { "height" : 768, "width" : 1366 } }, "pos" : { "x" : 0, "y" : 0 }, "primary" : true, "rotation" : 1 } ] Aleksander, could you open a new bug for your issue please? It's getting messy here :\ I thought this might be a regression of the current bugfix, but you're probably right. Anton, can you try the following? -Upgrade to latest libkscreen/kscreen -Remove any file in ~/.kde/share/apps/kscreen directory -Execute in a terminal the following command: perl -e "while(1){system('xrandr'); sleep(5);}" -Plug your screen, wait at least 6 seconds -Unplug your screen, wait at least 6 seconds. This will check if you are being affected by this bug: bugs.freedesktop.org/show_bug.cgi?id=58405 Thanks ! No, I don't have HDMI output. Ok, I can't seems reproduce screen flickering. Let's focus on the extended desktop problem. Here are the steps to reproduce: 1. Plug an external monitor (1920, 1200) 2. remove config filles: rm -r ~/.kde4/share/apps/kscreen/ 3. Unplug an external monitor Results: Laptop screen (1280,800) will be switched to 3200, 800. 4. Press display switch hotkey Result: Unable to fix the resolution. Xorg.log file (after an external monitor disconnect): ------------------------------------------------------------------------- [ 5742.033] (II) intel(0): EDID vendor "LEN", prod id 16401 [ 5742.033] (II) intel(0): Printing DDC gathered Modelines: [ 5742.033] (II) intel(0): Modeline "1280x800"x0.0 69.30 1280 1328 1360 1403 800 803 809 821 -hsync -vsync (49.4 kHz eP) [ 5742.033] (II) intel(0): Modeline "1280x800"x0.0 57.59 1280 1328 1360 1403 800 803 809 821 -hsync -vsync (41.0 kHz e) [ 5742.136] (II) intel(0): switch to mode 1280x800 on crtc 3 (pipe 0) .xsession-errors file: ----------------------------- Applying config Finding a mode with: QSize(1280, 800) "60" Requested screen size is QSize(3200, 800) 1 Output 66 has CRTC 63 Disabling: 66 (CRTC 63 ) XRRSetCrtcConfig() returned 0 DPI: 97.6923 Size: QSize(3200, 800) MM: 832 x 208 QSize(3200, 800) 832 x 208 Enabling: 65 Found free CRTC 63 XRRSetCrtcConfig() returned 0 displayBtn triggered displayButton: 5 Config for one output Requested screen size is QSize(3200, 800) 1 displayBtn triggered displayButton: 1 Config for one output Requested screen size is QSize(3200, 800) 1 Anton, would you be able to connect on IRC so we can further debug this? requesting all the information via bugtrack is going to be rather a long process, while it could be a few minutes on IRC. In case you can, I'm "afiestas" on irc.freenode.org Git commit d43eb850be250147d45741e2fe2bd7f5c3637a75 by Àlex Fiestas. Committed on 14/01/2013 at 12:06. Pushed by afiestas into branch 'master'. Reset screen position for singleOutput We have to come out with a better way of doing this, we can't keep reseting everything in all config methods. M +1 -0 kded/generator.cpp http://commits.kde.org/kscreen/d43eb850be250147d45741e2fe2bd7f5c3637a75 Thanks guys, 2 hours of debugging but it was totally worth it. Just want to say that all the issues I reported here earlier have been fixed for me as well now. Thanks! Thanks for getting back to us Aleksander, we are almost out of bugs so a release will come soon :) |