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

Which part of KDE configures the screen setup?

Tags: None
(comma "," separated)
janpla
Registered Member
Posts
71
Karma
0
I have trouble with my screen setup: every time I start my system, the desktop has forgotten all about my settings: I have two screens, which I can set up manually to the resolution I want, with the two working together as one screen. With Google I only find vague-ish references to xrandrrc, which apply to older versions of KDE - mine is 4.14.2. I have asked before in this forum, but not got any answer, so I am now reading through the KDE System Admin docs, but so far I haven't found anything.

So, my question is: where in the process is the screen resolution set up? When it worked, it seemed to happen some time after I logged in, which is odd, since I remember having the setting I want already from the login screen, but that that is an aside. My suspicion is that it happens when plasma is started up (?), but if somebody could corfirm or correct this, I'd be grateful. In the end I will probably end up strace-ing things.
wolfi323
Registered Member
Posts
1129
Karma
11
OS
janpla wrote:So, my question is: where in the process is the screen resolution set up?

KScreen.
And in particular the "KScreen 2" background service. Check that this is enabled in Systemsettings->Startup and Shutdown->Service Management, so that your settings from Systemsettings->Display and Monitor are getting applied.

If it's disabled, KDE will just keep Xorg's settings, i.e. the ones from the login screen.

The configuration is saved in ~/.kde(4)/share/apps/kscreen/, try to remove that folder if you have problems. Maybe the configuration became corrupted somehow...
janpla
Registered Member
Posts
71
Karma
0
wolfi323: thanks for helping out. I had a quick look - ~/.kde/share/apps/kscreen existed, but was empty, I don't know what the effect of that is. I can't really test it now, but I will asap and report back.

Kscreen 2 is enabled and running, according to System settings, but it could be lying, for all I know. In the list above the startup services, I see that Display Management isn't running - but this is the load-on-demand service, so it probably doesn't matter, and anyway, when I start it manually, it seems to stop again.
wolfi323
Registered Member
Posts
1129
Karma
11
OS
janpla wrote:wolfi323: thanks for helping out. I had a quick look - ~/.kde/share/apps/kscreen existed, but was empty, I don't know what the effect of that is. I can't really test it now, but I will asap and report back.

Well, if it is empty, there is no configuration saved, so kscreen will derive its own (in particular on Multimonitor setups).

Do I understand you correctly that this is empty even after you changed the configuration in Systemsettings->Display and Monitor->Display Configuration?

Kscreen 2 is enabled and running, according to System settings, but it could be lying, for all I know.

Again, you could also disable it. KDE would then just use the standard Xorg config, as used on the login screen too.
Otherwise you probably should configure it to your likings in Systemsettings->Display and Monitor->Display Configuration. You never said exactly how you set up your system manually...
janpla
Registered Member
Posts
71
Karma
0
Well, if it is empty, there is no configuration saved, so kscreen will derive its own (in particular on Multimonitor setups).

Do I understand you correctly that this is empty even after you changed the configuration in Systemsettings->Display and Monitor->Display Configuration?


That is correct.

Again, you could also disable it. KDE would then just use the standard Xorg config, as used on the login screen too.
Otherwise you probably should configure it to your likings in Systemsettings->Display and Monitor->Display Configuration. You never said exactly how you set up your system manually...


That is exactly how I have done: Systemsettings->Display and Monitor->Display Configuration -> Apply Changes. The changes get applied to the running screens, but not saved - or at least not saved where I'd expect. I tried strace:

Code: Select all
strace -f -o display.trc kcmshell4 display


The string 'kscreen' is listed a number of times in the trace, but the closest I get is something like:

Code: Select all
7439  lstat("/root/.kde/share/apps/kcm_kscreen", 0x7ffc93874be0) = -1 ENOENT (No such file or directory)
...


I noticed a thing I haven't seen before: In 'Display and Monitor' I now have a new item: 'Size & Orientation'. When I ran the strace above, I lost one of the monitors, and I had to go in to System Settings, open this new item and enable the screen that was missing. I would post a screenshot, but I'm not sure how.
wolfi323
Registered Member
Posts
1129
Karma
11
OS
janpla wrote:That is exactly how I have done: Systemsettings->Display and Monitor->Display Configuration -> Apply Changes. The changes get applied to the running screens, but not saved - or at least not saved where I'd expect. I tried strace:

Code: Select all
strace -f -o display.trc kcmshell4 display

Hm. When I run "kcmshell4 display" here, I get the Gamma settings.
Try "kcmshell4 kscreen" instead.

The string 'kscreen' is listed a number of times in the trace, but the closest I get is something like:

Code: Select all
7439  lstat("/root/.kde/share/apps/kcm_kscreen", 0x7ffc93874be0) = -1 ENOENT (No such file or directory)
...

Are you trying to run it as root?
You should run it as your user. Root's settings have no influence on your user's settings.

Or are you logged in as root?

I noticed a thing I haven't seen before: In 'Display and Monitor' I now have a new item: 'Size & Orientation'. When I ran the strace above, I lost one of the monitors, and I had to go in to System Settings, open this new item and enable the screen that was missing. I would post a screenshot, but I'm not sure how.

This doesn't sound like you are using kscreen, but rather the old, obsolete krandr.
What distribution are you using? There should be a package named "kscreen" or similar, check that you have it installed.

If you want to post a screenshot, you'd have to upload it to some picture sharing site first. Then just post a link, or use the IMG or thumb tags to embed it into your post.
janpla
Registered Member
Posts
71
Karma
0
Try "kcmshell4 kscreen" instead.


I tried - it makes no difference.

Or are you logged in as root?


I am indeed - naughty, I know, but that's the way it is. I know the arguments against, and I agree they make sense, but I have decided that it makes sense for me to do this, all the same.

This doesn't sound like you are using kscreen, but rather the old, obsolete krandr.
What distribution are you using? There should be a package named "kscreen" or similar, check that you have it installed.


I do have it:

Code: Select all
# dpkg -l kscreen
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                      Version           Architecture      Description
+++-=========================-=================-=================-========================================================
ii  kscreen                   1.0.2.1-1         amd64             KDE monitor hotplug and screen handling


I think what has happened is that the installation has broken during some upgrade; distribution is Debian - originally an unstable distibution, then upgraded:
Code: Select all
# lsb_release -a                                                                                                                       
LSB Version:    core-2.0-amd64:core-2.0-noarch:core-3.0-amd64:core-3.0-noarch:core-3.1-amd64:core-3.1-noarch:core-3.2-amd64:core-3.2-noarch:core-4.0-amd64:core-4.0-noarch:core-4.1-amd64:core-4.1-noarch:security-4.0-amd64:security-4.0-noarch:security-4.1-amd64:security-4.1-noarch                                                                                                                                             
Distributor ID: Debian                                                                                                                                   
Description:    Debian GNU/Linux 8.0 (jessie)                                                                                                                       
Release:        8.0                                                                                                                                                             
Codename:       jessie                                                                                                                                                         
wolfi323
Registered Member
Posts
1129
Karma
11
OS
janpla wrote:
Or are you logged in as root?


I am indeed - naughty, I know, but that's the way it is. I know the arguments against, and I agree they make sense, but I have decided that it makes sense for me to do this, all the same.

Well, I merely asked because changing root's settings won't have any effect for logging in as user. ;)

KScreen/the display configuration should work fine as root too. At least it does here, I just tried.

Your problem mainly seems to be that the configuration does not get saved.

Your strace output probably just mentions /root/.kde/share/apps/kcm_kscreen because the kcm tries to load its GUI files from there (if it doesn't exist, it falls back to the system locations).
The screen config itself is written by the daemon (KDED module) itself I think, that's why you don't see anything in the strace.

In addition to "kscreen", I also have two other packages installed here, libkscreen and libkscreen1. The latter seems to exist in Debian as well, so make sure you have it installed.

OTOH, if you have the old 'Size & Orientation' module, this might override KScreen's settings. And this would probably indicate a mixture of KDE packages from different versions. KScreen has been added in 4.11, so you probably have some KDE packages with a lower version. You should remove/update them (in particular kde-workspace and similar). And probably uninstall kde-workspace-randr if it is installed.

But, as mentioned, you could also disable the "KScreen 2" service, then KDE should just use the Xorg config. Unless it is overridden by krandr, of course...


Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot], rockscient