This forum has been archived. All content is frozen. Please use KDE Discuss instead.

[4.10.2] conditional display setup docked/undocked

Tags: None
(comma "," separated)
equaeghe
Registered Member
Posts
67
Karma
0
OS
Hi,


I have a work laptop (internal display LVDS1) that I dock at work, where to the dock a rotatable external display is attached (HDMI2 even though it is connected over DVI). When undocked, of course the internal display should be the only active one (at its native resolution). When docked, the external display should be the only active one, at its native resolution, and rotated 90° counterclockwise (the monitor is rotated 90° clockwise).

In the display configuration utility, there is an option to set a standard configuration, but this does not seem to have any real effect (next time I boot up, the config I saved as standard is not used).

So, I would be grateful if anyone could help me configure my display setup as described above.


Thanks,

Erik
mgraesslin
KDE Developer
Posts
572
Karma
7
OS
Have a look at the new replacement for the control module called "KScreen". That does exactly what you want to have.
equaeghe
Registered Member
Posts
67
Karma
0
OS
That looks promising. KScreen is available to me on Gentoo as a live ebuild, i.e., straight from the vcs head. After installing, it gives me instructions:

Code: Select all
 * Messages for package kde-misc/kscreen-9999:
                                                         
 * Disable the old screen management:
 * # qdbus org.kde.kded /kded org.kde.kded.unloadModule randrmonitor
 * # qdbus org.kde.kded /kded org.kde.kded.setModuleAutoloading randrmonitor false
 * Enable the kded module for the kscreen based screen management:
 * # qdbus org.kde.kded /kded org.kde.kded.loadModule kscreen
 * Now simply (un-)plugging displays should enable/disable them, while
 * the last state is remembered.

So that's what I try, but it fails:
Code: Select all
 ~ # qdbus org.kde.kded /kded org.kde.kded.unloadModule randrmonitor
Cannot find 'org.kde.kded.unloadModule' in object /kded at org.kde.kded
 ~ # qdbus org.kde.kded /kded org.kde.kded.setModuleAutoloading randrmonitor false
Cannot find 'org.kde.kded.setModuleAutoloading' in object /kded at org.kde.kded
 ~ # qdbus org.kde.kded /kded org.kde.kded.loadModule kscreen
Cannot find 'org.kde.kded.loadModule' in object /kded at org.kde.kded

This could be something simple, but I don't know what. Any further help is much appreciated.

Erik
afiestas
Registered Member
Posts
23
Karma
0
Apparently you are missing a process called "kded4", it should be executed on login.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Please note that those qdbus commands should be executed as your normal user, not root.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
equaeghe
Registered Member
Posts
67
Karma
0
OS
bcooksley wrote:Please note that those qdbus commands should be executed as your normal user, not root.

Ah! Now I get:
Code: Select all
 ~ $ qdbus org.kde.kded /kded org.kde.kded.unloadModule randrmonitor
true
 ~ $ qdbus org.kde.kded /kded org.kde.kded.setModuleAutoloading randrmonitor false

 ~ $ qdbus org.kde.kded /kded org.kde.kded.loadModule kscreen
true

I guess this permanently replaces krandr by kscreen, i.e., accross reboots?

On to test KScreen. I'll report back (possibly just by approving the original answer if all goes well).
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
To the best of my knowledge this is a permanent settings change, yes.
You may need to enable automatic module loading of KScreen in System Settings to make it fully permanent, but it definitely disables the old screen management system.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
equaeghe
Registered Member
Posts
67
Karma
0
OS
mgraesslin wrote:Have a look at the new replacement for the control module called "KScreen". That does exactly what you want to have.

I'm testing things out and will report back later (or perhaps file bug reports for KScreen). Upon a first switch from unplugging the external display, the internal display became active at the correct resolution, but the screen brightness was too low. Plugging the external display back in resulted in a switch, but now the bottom half of the screen was black, i.e., the output was 'cut off', whereas I could still place windows there and go there with my mouse. I guess this has to do with the fact that I have my external display rotated.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Hmm, the fact you could move windows into this black area indicates that Plasma Desktop possibly missed the notice that the screen resolution had changed. Are windows able to cover the panel and rest of the screen, except for a small region at the bottom of the screen where the panel normally should be?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
equaeghe
Registered Member
Posts
67
Karma
0
OS
bcooksley wrote:Hmm, the fact you could move windows into this black area indicates that Plasma Desktop possibly missed the notice that the screen resolution had changed. Are windows able to cover the panel and rest of the screen, except for a small region at the bottom of the screen where the panel normally should be?

Well, I only have a self-hiding panel at the top of my screen. It does not seem to be involved.

I must correct what I said earlier: I cannot move my mouse into the black area. Also, being able to move my windows into it, is not any different from being able to move my windows over the viewport's edge when the it does have the correct dimensions.

So I seem to get the following (hor, vert)-changes: (1080,1920) -> (1366,768) -> (1080,768). When disabling the rotation, I correctly get: (1920,1080) -> (1366,768) -> (1920,1080). So this does seem to be rotation-related. Also, on one (physically slow) external display disconnect, the internal display did not come up; after reconnecting/redisconnecting it worked again.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
The failure to correct restore resolution when the screen was rotated is likely a bug in KScreen - please file one at bugs.kde.org for this issue.

For the display disconnect issue - this is quite unusual. Can you reproduce this, and if so, does the xrandr command still show the screen as connected?
(You may need to open Konsole prior to disconnecting the external monitor and then blindly type the command).


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
equaeghe
Registered Member
Posts
67
Karma
0
OS
bcooksley wrote:The failure to correct restore resolution when the screen was rotated is likely a bug in KScreen - please file one at bugs.kde.org for this issue.
Done: https://bugs.kde.org/show_bug.cgi?id=319567

For the display disconnect issue - this is quite unusual. Can you reproduce this, and if so, does the xrandr command still show the screen as connected?
(You may need to open Konsole prior to disconnecting the external monitor and then blindly type the command).
I'll try to reproduce this when I'm back at work; Tuesday at the earliest.


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], q.ignora, watchstar