Bug 265955 - [PATCH] Can't switch back to laptop display when external display gets disconnected
Summary: [PATCH] Can't switch back to laptop display when external display gets discon...
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_randr (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Gustavo Pichorim Boiko
URL:
Keywords:
: 225979 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-02-10 02:25 UTC by Benni Hill
Modified: 2012-06-20 08:04 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.7.0


Attachments
patch for randrmonitor.cpp (1.16 KB, patch)
2011-02-10 02:25 UTC, Benni Hill
Details
added: disable disconnected outputs and enable a connected output on resume from suspend (6.20 KB, patch)
2011-02-12 01:39 UTC, Benni Hill
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Benni Hill 2011-02-10 02:25:15 UTC
Created attachment 57073 [details]
patch for randrmonitor.cpp

Version:           unspecified (using KDE 4.6.0) 
OS:                Linux

This is a patch to the kded_randrmonitor service that solves the below mentioned problem.
If only one output is connected and the user tries to switch the display it makes sure the connected output gets activated and deactivates all disconnected output afterwards.

Reproducible: Always

Steps to Reproduce:
1. Connect an external display to your laptop and use your latop's hotkey (e.g. Fn+F6) to active it and deactivate your laptop's display.
2. Disconnect the external display
3. Try to switch back to internal display with your keyboard

Actual Results:  
Nothing happens
Comment 1 Benni Hill 2011-02-12 01:39:08 UTC
Created attachment 57171 [details]
added: disable disconnected outputs and enable a connected output on resume from suspend

I improved my patch.
Now it also automatically deactivates all disconnected outputs on resume from suspend and switches to a connected monitor if needed. This should fix e.g. Bug #257642.
Please test.

I also want to propose to change the behaviour of RandROutput::isActive() to just check for a valid crtc, because a output can be "active" without beeing connected.
Comment 2 Benni Hill 2011-02-22 14:26:45 UTC
Patch submitted to reviewboard, and improved:
http://svn.reviewboard.kde.org/r/6513/
Comment 3 Lamarque V. Souza 2011-06-06 00:10:29 UTC
Has this patch been applied to KDE's repository?
Comment 4 Lamarque V. Souza 2011-07-11 15:54:47 UTC
Git commit 505c9e0cdc5a6daddd300bd756278b8a9c0fa5cf by Lamarque V. Souza.
Committed on 11/07/2011 at 17:52.
Pushed by lvsouza into branch 'master'.

Fix can't switch back to laptop display when external display gets
disconnected.

REVIEW: 6513
BUG: 257642
BUG: 265955
FIXED-IN: 4.7.0

M  +75   -14   kcontrol/randr/module/randrmonitor.cpp     
M  +10   -0    kcontrol/randr/module/randrmonitor.h     

http://commits.kde.org/kde-workspace/505c9e0cdc5a6daddd300bd756278b8a9c0fa5cf
Comment 5 Lamarque V. Souza 2011-07-11 15:59:23 UTC
Git commit aba27511815aacec5c9769cd7a3a1fc1fa2cf80e by Lamarque V. Souza.
Committed on 11/07/2011 at 17:52.
Pushed by lvsouza into branch 'KDE/4.7'.

Fix can't switch back to laptop display when external display gets
disconnected.

REVIEW: 6513
BUG: 257642
BUG: 265955
FIXED-IN: 4.7.0
(cherry picked from commit 505c9e0cdc5a6daddd300bd756278b8a9c0fa5cf)

M  +75   -14   kcontrol/randr/module/randrmonitor.cpp     
M  +10   -0    kcontrol/randr/module/randrmonitor.h     

http://commits.kde.org/kde-workspace/aba27511815aacec5c9769cd7a3a1fc1fa2cf80e
Comment 6 Myriam Schweingruber 2012-06-20 08:04:24 UTC
*** Bug 225979 has been marked as a duplicate of this bug. ***