Bug 312190 - Display size and orientation module does not load saved values.
Summary: Display size and orientation module does not load saved values.
Status: RESOLVED UNMAINTAINED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_randr (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Gustavo Pichorim Boiko
URL:
Keywords:
: 335336 336080 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-12-25 15:13 UTC by anton
Modified: 2015-08-14 11:53 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Screenshot (74.66 KB, image/png)
2013-03-12 17:18 UTC, Earl Ruby
Details
Screen settings config file (744 bytes, text/plain)
2013-03-12 17:37 UTC, Earl Ruby
Details

Note You need to log in before you can comment on or make changes to this bug.
Description anton 2012-12-25 15:13:06 UTC
KDE  4.9.90 "release 1" from opensuse repository, but this problem lasts from many older kde versions I can remember.

I have 2 displays connected with DVI - 1 monitor 1280x1024 (shown as DVI-1) and one TV 1920x1080 (shown as DVI-1). Primary output is set to DVI-1.

Position of TV DVI-0 is set to absolute, position of monitor DVI-1 is set to "left of DVI-0". For me this is comfortable configuration - motor DVI-0 is primary output, TV provides additional screen space to the right of the main desktop.

So this "position" value is not loaded when the system is restarted. When the system is restarted, position of monitor DVI-1 is set to "clone of DVI-0", resolution of DVI-0 is set to 800x600.

Using "Save as default" option does not help.


Reproducible: Always
Comment 1 Earl Ruby 2013-03-12 17:18:59 UTC
Created attachment 77985 [details]
Screenshot
Comment 2 Earl Ruby 2013-03-12 17:27:54 UTC
I can confirm this bug. It's also reported in 311641, 309356, and 307589.

In my case I have 3 monitors on one video card. The card and all three monitors are detected correctly, but after I reboot the "Position" settings have all reverted to what they were when I first installed KDE. (Other settings may or may not be getting saved, the only thing I'm changing are the position settings.)

I can change the position settings back to the correct settings, click "Save as Default", log  out, log in, and the position settings have once again reverted to what they were when I first installed KDE.

The file ~/.kde4/share/config/krandrrc is getting updated when I click "Save as Default". It looks like it's saving a mangled version of the screen size as the position value, rather than "left of", "right of" or "absolute".

I just uploaded a screen shot of the screen as it looks when I click save defaults. I'll also upload a copy of ~/.kde4/share/config/krandrrc so you can see what's actually being saved.
Comment 3 Earl Ruby 2013-03-12 17:37:19 UTC
Created attachment 77986 [details]
Screen settings config file

After studying the config file a bit more I think I now understand the --pos values that it's saving. I have:

screen: DVI-D-0: Left of DVI-I-1, config: 0x0
screen: DVI-I-1: Absolute, config: 1680,0
screen: DP-0: Right of DVI-I-1, config: 3360x0

... and that makes sense if the config file values are (x,y) coordinates. So it looks like the config file has the correct values, but when I boot up I get the old values, as if the system isn't reading the file and it's making the same "best guess" every time about how the system should be set up, rather than using the saved values in the file.
Comment 4 Earl Ruby 2013-03-18 20:25:41 UTC
Installed OpenSUSE 12.3 over the weekend. The bug is still there.
Comment 5 Earl Ruby 2013-03-18 20:28:56 UTC
Gustavio:

If you want me to try something or send you some other version or debug information let me know.

-- Earl
Comment 6 Earl Ruby 2013-03-23 06:03:24 UTC
Found a work-around:

Get your monitors set up the way you want them using Configure Desktop > Display and Monitor and click "Save as Default." This updates ~/.kde4/share/config/krandrrc.

Open ~/.kde4/share/config/krandrrc, copy everything on the line after "StartupCommands=".

Create a new script called ~/bin/workaround-for-kde-bug-312190.sh

Paste the line into the script file. In my case the line is "xrandr --output DVI-I-1 --pos 1680x0 --mode 1680x1050 --refresh 60\nxrandr --output DP-0 --pos 3360x0 --mode 1680x1050 --refresh 60\nxrandr --output DVI-D-0 --pos 0x0 --mode 1680x1050 --refresh 60\nxrandr --output DVI-I-1 --primary"

Make it executable:
chmod +x ~/bin/workaround-for-kde-bug-312190.sh

Run the script ~/bin/workaround-for-kde-bug-312190.sh. Your monitors should still be set up correctly. If they're messed up, you probably didn't cut and paste the line correctly. Repeat the above steps again.

Pick Autostart from the KDE menu. (Use the Search function if you can't figure out where it's buried.)

Click "Add Script" and paste the line "~/bin/workaround-for-kde-bug-312190.sh" into the "Shell script path" text box.

Click OK, click OK.

The next time you restart KDE it will still start up with the wrong configuration, then Autostart will execute ~/bin/workaround-for-kde-bug-312190.sh and fix the problem.
Comment 7 A.Yerenkow 2013-12-05 08:49:37 UTC
Maybe related, in my case KDE isn't remember which output need to be primary.

Seems config is not applied fully (or maybe primary command need to be launched first)

[Display]
ApplyOnStartup=true
StartupCommands=xrandr --output HDMI1 --pos 1920x0 --mode 1920x1200 --refresh 59.9502\nxrandr --output HDMI2 --pos 0x0 --mode 1920x1200 --refresh 59.9502\nxrandr --output HDMI2 --primary

[Screen_0]
OutputsUnified=false
UnifiedRect=0,0,0,0
UnifiedRotation=1

[Screen_0_Output_HDMI1]
Active=true
Rect=1920,0,1920,1200
RefreshRate=59.9501724243164
Rotation=1

[Screen_0_Output_HDMI2]
Active=true
Rect=0,0,1920,1200
RefreshRate=59.9501724243164
Rotation=1
Comment 8 Christoph Feck 2014-05-25 22:30:06 UTC
*** Bug 335336 has been marked as a duplicate of this bug. ***
Comment 9 stefan 2014-06-09 21:04:15 UTC
Had a similar problem as A.Yerenkow in a laptop + external monitor setup. Display settings wouldn't apply the relative position of the monitors (-pos command). The problem is that if the second monitor is not turned on yet the 'pos' command for the first one gets ignored. This means that the order of commands is also important. In A.Yerenkow case "xrandr --output HDMI2 --pos 0x0 --mode 1920x1200 --refresh 59.9502" should be applied before "xrandr --output HDMI1 --pos 1920x0 --mode 1920x1200 --refresh 59.9502", if HDMI2 is not turned on yet.
Comment 10 Christoph Feck 2014-06-14 13:17:52 UTC
*** Bug 336080 has been marked as a duplicate of this bug. ***
Comment 11 David Edmundson 2015-01-22 12:10:15 UTC
Thanks for reporting your bug.

Since reporting Krandr has since been replaced by KScreen. It is available in the Plasma 4 series, and is default in Plasma 5 onwards.

I hope this solves your issue. If you still have a problem after upgrading please reopen a new bug under kscreen.

Thanks
Comment 12 ovl 2015-08-14 11:53:09 UTC
*** This bug has been confirmed by popular vote. ***