Bug 183143 - Display Settings are Lost on Logout (FYI: use KScreen instead)
Summary: Display Settings are Lost on Logout (FYI: use KScreen instead)
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_randr (show other bugs)
Version: 4.9.2
Platform: Unlisted Binaries Linux
: NOR normal
Target Milestone: ---
Assignee: Gustavo Pichorim Boiko
URL:
Keywords:
: 190553 193139 193473 198834 220033 221136 228565 228991 229385 232471 232500 235000 239832 239873 240988 242404 244438 245416 247323 256943 257351 261285 283625 292438 292751 292846 292937 293006 325518 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-02-04 11:09 UTC by Eugene Markow
Modified: 2015-10-02 20:07 UTC (History)
71 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.11.0


Attachments
Patch to fix display settings being lost on logout (6.85 KB, patch)
2010-05-04 23:46 UTC, linux fan
Details
Patch to fix display settings being lost on logout (improved) (5.75 KB, patch)
2010-05-15 16:02 UTC, linux fan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene Markow 2009-02-04 11:09:52 UTC
Version:            (using KDE 4.2.0)
OS:                Linux
Installed from:    Unspecified Linux

With KDE 4.2, the Display Settings (Size & Refresh Rate) are lost after a Logout.

When using KDE to set your Display settings, [System > System Settings > Display], after logging out from the system, the settings you indicated are lost. The settings you chose aren't 'retained'.

The temporary fix is to set xorg.conf to the precise resolution and dpi you want. If this must be the case, then what's the sense of having the display settings option if it doesn't work.

Linux Distribution: Arch Linux
Graphics Card: Nvidia GeForce4 MX 440 AGP 8x
Comment 1 Raphael Kubo da Costa 2009-05-19 21:13:24 UTC
*** Bug 193139 has been marked as a duplicate of this bug. ***
Comment 2 Raphael Kubo da Costa 2009-05-19 21:13:39 UTC
*** Bug 190553 has been marked as a duplicate of this bug. ***
Comment 3 Dario Andres 2009-05-22 04:49:25 UTC
*** Bug 193473 has been marked as a duplicate of this bug. ***
Comment 4 linux fan 2010-04-04 18:35:59 UTC
The problem is still present in KDE 4.4.2
Comment 5 linux fan 2010-04-04 18:38:21 UTC
*** This bug has been confirmed by popular vote. ***
Comment 6 linux fan 2010-04-08 00:43:50 UTC
# patch
file location = $KDE_PREFIX/bin
--- startkde.orig
+++ startkde
@@ -81,7 +81,7 @@
 kcminputrc Mouse cursorSize ''
 ksplashrc KSplash Theme Default
 ksplashrc KSplash Engine KSplashX
-kcmrandrrc Display ApplyOnStartup false
+kcmrandrrc Display ApplyOnStartup true
 kcmrandrrc [Screen0]
 kcmrandrrc [Screen1]
 kcmrandrrc [Screen2]

# ~/.xinitrc
export kcmrandrrc_display_applyonstartup=true
export kcmrandrrc_screen0_width=1024
export kcmrandrrc_screen0_height=768
export kcmrandrrc_screen0_refresh=70
exec dbus-launch --exit-with-session startkde

startx applies width=1024, height=768, refresh=70 to screen

The suggestion is bugs in
kdebase-workspace-4.4.2/startkde.cmake
kdebase-workspace-4.4.2/kstartupconfig/kstartupconfig.cpp
kdebase-workspace-4.4.2/kstartupconfig/kdostartupconfig.cpp

Have not yet found a way to pass the variables via kdm.
Comment 7 linux fan 2010-04-08 01:45:26 UTC
(In reply to comment #6)
> export kcmrandrrc_display_applyonstartup=true
> export kcmrandrrc_screen0_width=1024
> export kcmrandrrc_screen0_height=768
> export kcmrandrrc_screen0_refresh=70

Those can be added to ~/.bash_profile and kdm will use.
Comment 8 Christoph Feck 2010-04-22 16:51:13 UTC
*** Bug 235000 has been marked as a duplicate of this bug. ***
Comment 9 Christoph Feck 2010-04-22 16:53:05 UTC
*** Bug 232500 has been marked as a duplicate of this bug. ***
Comment 10 Christoph Feck 2010-04-22 16:53:43 UTC
*** Bug 220033 has been marked as a duplicate of this bug. ***
Comment 11 Christoph Feck 2010-04-22 16:54:31 UTC
*** Bug 229385 has been marked as a duplicate of this bug. ***
Comment 12 Christoph Feck 2010-04-22 16:55:01 UTC
*** Bug 228565 has been marked as a duplicate of this bug. ***
Comment 13 Christoph Feck 2010-04-22 16:57:04 UTC
*** Bug 221136 has been marked as a duplicate of this bug. ***
Comment 14 Christoph Feck 2010-04-22 16:57:58 UTC
*** Bug 232471 has been marked as a duplicate of this bug. ***
Comment 15 Christoph Feck 2010-04-22 17:05:26 UTC
*** Bug 198834 has been marked as a duplicate of this bug. ***
Comment 16 Christoph Feck 2010-04-22 17:26:52 UTC
*** Bug 228991 has been marked as a duplicate of this bug. ***
Comment 17 linux fan 2010-05-03 18:15:50 UTC
In kdebase-workspace/kstartupconfig, kdostartupconfig.cpp which compiles to kdostartupconfig4 is broken with regard to the "screen". In the first place, there is never any file named kcmrandrrc which is seen in startupconfigkeys. Even if krandrrc is copied to kcmrandrrc so that kdostartupconfig4 could read it, it fails to parse anything that could be used to set the size or refresh rate. As a result, the script ~/.kde/share/config/startupconfig it produces only contains comments, e.g., # kcmrandrrc [Screen0], and no actual settings.
Comment 18 linux fan 2010-05-04 23:46:58 UTC
Created attachment 43253 [details]
Patch to fix display settings being lost on logout

This seems to fix it for screen0 with one exception:
Krandrtray does not save an overriden refresh rate to krandrrc.

"System Settings" -> "Display" will save the refresh rate to krandrrc.
"kcmshell4 randr" also will save the refresh rate to krandrrc.

In startkde, changed kcmrandrrc to krandrrc because there is never any file named kcmrandrrc.
Comment 19 George R. Goffe 2010-05-05 10:14:50 UTC
Linux Fan,

I guess I'm a fan as well.

Sorry to bother you and for the stupid question. I keep my systems closely up to date. How can I know when to start looking for this fix? 

Regards and THANKS for your help!

George...


"It's not what you know that hurts you, It's what you know that ain't so." Wil Rogers

--- On Tue, 5/4/10, linux fan <linuxscratch@gmail.com> wrote:

From: linux fan <linuxscratch@gmail.com>
Subject: [Bug 183143] Display Settings are Lost on Logout
To: grgoffe@yahoo.com
Date: Tuesday, May 4, 2010, 2:47 PM

https://bugs.kde.org/show_bug.cgi?id=183143





--- Comment #18 from linux fan <linuxscratch gmail com>  2010-05-04 23:46:58 ---
Created an attachment (id=43253)
 --> (http://bugs.kde.org/attachment.cgi?id=43253)
Patch to fix display settings being lost on logout

This seems to fix it for screen0 with one exception:
Krandrtray does not save an overriden refresh rate to krandrrc.

"System Settings" -> "Display" will save the refresh rate to krandrrc.
"kcmshell4 randr" also will save the refresh rate to krandrrc.

In startkde, changed kcmrandrrc to krandrrc because there is never any file
named kcmrandrrc.
Comment 20 linux fan 2010-05-15 16:02:29 UTC
Created attachment 43609 [details]
Patch to fix display settings being lost on logout (improved)
Comment 21 Christoph Feck 2010-05-28 12:55:20 UTC
*** Bug 239832 has been marked as a duplicate of this bug. ***
Comment 22 Christoph Feck 2010-05-29 05:42:23 UTC
*** Bug 239873 has been marked as a duplicate of this bug. ***
Comment 23 Christoph Feck 2010-06-07 13:33:34 UTC
*** Bug 240988 has been marked as a duplicate of this bug. ***
Comment 24 Christoph Feck 2010-06-21 21:03:26 UTC
*** Bug 242404 has been marked as a duplicate of this bug. ***
Comment 25 Rex Dieter 2010-06-23 18:54:50 UTC
(to linuxfan mostly), I tried giving the supplied patch a try, and it doesn't seem to work.  See downstream tracking bug,
https://bugzilla.redhat.com/show_bug.cgi?id=607180

Any suggestions?
Comment 26 linux fan 2010-06-23 21:04:11 UTC
(In reply to comment #25)
> (to linuxfan mostly), I tried giving the supplied patch a try, and it doesn't
> seem to work.  See downstream tracking bug,
> https://bugzilla.redhat.com/show_bug.cgi?id=607180
> 
> Any suggestions?

Er, umphhh, uh,

In the first place, startkde, which is a shell script that is generated by startkde.cmake, has: "kcmrandrrc Display ApplyOnStartup false" which caused (at least for me) no possibility to apply the settings on startup no matter what.

In the second place, there never is or was any file named kcmrandrrc in any subdirectory of ~/.kde and so it would never be read no matter what.

In the third place, even if the first two obstacles were magically overcome, kdostartupconfig4, which is generated from kdostartupconfig.cpp, has absolutely no method for parsing krandrrc in ~/.kde subdir and thus there is no magic key to unlock the magic black box.

Those are the facts with respect to my particular encounter.

Looking at comment #7 , I found that setting particular environment variables durin the "login" had the effect of utimately executing an xrandr command with the settings that I wanted to be applied.

Further tearing out hair led me to the patch which worked in my particular encounter.

I had only one screen which was named "Output default" by kde "display settings" which appeared in the krandrrc file in the subdir of ~/.kde.

So, for me, the patch altered the name kcmrandrrc to krandrrc which is a file that actually exists. It then plows through that file to parse out the display settings. It is possible that in other installations, the format of the entries in krandrrc may be vastly different than what I encountered.

Due to there being only 80 votes on this bug, I can only imaging that everybody else has a magic system, and I do not.
Comment 27 Rex Dieter 2010-06-25 17:05:59 UTC
For posterity, my ~/.kde/share/config/krandrrc contains:

[Screen_0]
OutputsUnified=true
UnifiedRect=0,0,800,600
UnifiedRotation=1

[Screen_0_Output_LVDS1]
Active=true
Rect=0,0,1024,768
RefreshRate=60.0038414001465
Rotation=1

but my LVSD laptop display reverted to (default) 1280x800 in X session restart.
Comment 28 linux fan 2010-06-25 18:24:00 UTC
(In reply to comment #27)
my ~/.kde/share/config/krandrrc contained
[Screen_0]
OutputsUnified=false
UnifiedRect=0,0,0,0
UnifiedRotation=1

[Screen_0_Output_default]
Active=true
Rect=0,0,1024,768
RefreshRate=70
Rotation=1

I see "Screen_0_Output_" is common to both, but yours need to be "LVDS1" where mine was "default"

Programming kde is not something I know how to do, but I try to learn.
Comment 29 Christoph Feck 2010-07-13 00:20:12 UTC
*** Bug 244438 has been marked as a duplicate of this bug. ***
Comment 30 hurdman 2010-08-04 10:49:03 UTC
probably the same bug (or not ?)

Hello,

in mandriva 2010.1 :
Description of problem:
I have got a two display configuration with a  radeon/fglrx.
I have one display in absolute 0x0 and the second right of the first.
I can change the conf, but if i restart my computer, i have to re-go into the
systemsettings to reconfigure the display.
The settings are not saves.

I have had the same problem into the mdv 2010.0 with the same conf ( but don't have
made a bug report, sorry ... ).

( link to mdv bug report : https://qa.mandriva.com/show_bug.cgi?id=60473 )

thanks
hurdman
Comment 31 Maher Hawash 2010-08-04 14:27:31 UTC
I've submitted this bug months ago and still not a descent resolution.  How can I force this manually?  Belows is the output from xrandr.

Screen 0: minimum 320 x 200, current 3360 x 1080, maximum 8192 x 8192
LVDS-1 connected 1440x900+1920+0 (normal left inverted right x axis y axis) 367mm x 230mm
   1440x900       60.0*+
   1152x864       60.0  
   1024x768       59.9  
   800x600        59.9  
   640x480        59.4  
   720x400        59.6  
   640x400        60.0  
   640x350        59.8  
VGA-1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 477mm x 268mm
   1920x1080      59.9*+
   1600x1200      60.0  
   1680x1050      60.0  
   1280x1024      60.0  
   1440x900       59.9  
   1280x960       60.0  
   1280x800       59.8  
   1024x768       60.0  
   800x600        60.3     56.2  
   640x480        60.0  
DVI-D-1 disconnected (normal left inverted right x axis y axis)
Comment 32 Carl 2010-08-11 12:27:35 UTC
I wish to add my voto for an option to save the settings. I occasionally connect an extra display, and always need to configure it from scratch. I would like to be able to save a profile for each external monitor I connect, so that upon connecting it I get the correct desktop layout and resolution.
Comment 33 Lubos Lunak 2010-08-31 15:55:54 UTC
SVN commit 1170315 by lunakl:

- move the somewhat long krandr setup code from startkde
  into its own separate script that is called from startkde
- use properly krandrrc instead of kcmrandrrc in the script
- implement support for randr1.2 (non-legacy) setup, which
  is done by kcm_krandr simply saving a list of CLI xrandr commands
  and those are executed by the script
- add a buttom to kcm_krandr to save the current setup
  as the default to be used during desktop startup

FEATURE: 157839
FEATURE: 219704
FEATURE: 235883
FEATURE: 238278
FEATURE: 163707
FEATURE: 141999
FEATURE: 229529
BUG: 246298
FEATURE: 183143



 M  +5 -0      kcontrol/randr/CMakeLists.txt  
 AM            kcontrol/randr/krandrstartup  
 M  +5 -1      kcontrol/randr/legacyrandrconfig.cpp  
 M  +22 -0     kcontrol/randr/legacyrandrscreen.cpp  
 M  +1 -0      kcontrol/randr/legacyrandrscreen.h  
 M  +46 -0     kcontrol/randr/randrconfig.cpp  
 M  +2 -0      kcontrol/randr/randrconfig.h  
 M  +8 -1      kcontrol/randr/randrconfigbase.ui  
 M  +31 -2     kcontrol/randr/randrdisplay.cpp  
 M  +3 -1      kcontrol/randr/randrdisplay.h  
 M  +31 -0     kcontrol/randr/randroutput.cpp  
 M  +1 -0      kcontrol/randr/randroutput.h  
 M  +11 -0     kcontrol/randr/randrscreen.cpp  
 M  +1 -0      kcontrol/randr/randrscreen.h  
 M  +7 -48     startkde.cmake  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1170315
Comment 34 Aaron J. Seigo 2010-09-07 06:57:30 UTC
*** Bug 245416 has been marked as a duplicate of this bug. ***
Comment 35 Steven Robbins 2010-09-12 05:03:54 UTC
Just reported in Debian as http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=596473

What release of KDE is this fix in?
Comment 36 Tommi Tervo 2010-09-13 12:17:30 UTC
Fix is committed only to trunk, so 4.6 will be first release where fix is in.
Comment 37 Giovanni Venturi 2010-09-13 12:47:34 UTC
Is it difficult to backport to 4.5 branch?
Comment 38 Jay Schieber 2010-10-03 01:35:47 UTC
I just did a fresh install of Kubuntu today, and this problem is still there.  So how come this is listed and "resolved" and "fixed"?  Usage of these terms in this context does not jive with my understanding of the English language.
Comment 39 hurdman 2010-10-03 12:19:35 UTC
Jay Shieber,
in #36 
"Fix is committed only to trunk, so 4.6 will be first release where fix is in."

into the http://www.kubuntu.org/ : the last RC use 4.5.1

So the fix isn't into that version.

regards.
hurdman
Comment 40 Jay Schieber 2010-10-03 13:39:45 UTC
So what I am supposed to do?
Comment 41 linux fan 2010-10-03 18:49:08 UTC
Wait for 4.6, or you could try comment #7
Comment 42 Timo Boettcher 2010-10-13 21:54:29 UTC
#35, #37_
I adapted the fix from #33 for 4.4.5 from debian squeeze.
The debian bug contains the neccessary patches.
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=596473#24
Comment 43 brian carr 2010-10-14 21:02:39 UTC
is it best to wait for 4.6 ?
Comment 44 Christoph Feck 2010-11-15 02:26:41 UTC
*** Bug 256943 has been marked as a duplicate of this bug. ***
Comment 45 Amit Ugol 2011-02-07 15:39:52 UTC
Testing it now with a dell vostro, Arch and 4.6.00, and I see that after every logout the screen reverts back to the laptop's resolution.
for me the solution was very easy since the time the bug was reported, I just did an xrandr bash script:
1. check if more than one monitors,
2. if true, get info from xrandr as to what is the prefered monitor, 
3. set LVDS1 as nonprimary and VGA1 to preferred and primary and right-of LVDS1

I think this should either be reopened or if this is a new issue than a new bug should be opened.
Comment 46 Rex Dieter 2011-02-07 15:41:42 UTC
As I understand it, this bug is only for setting resolution in a user session (ie, allows for the ability to restore on next login).
Comment 47 George R. Goffe 2011-02-07 21:08:37 UTC
Howdy,

Am I missing something here? How can this be resolved as fixed? It was working quite well but a recent update (past two weeks) seems to have back leveled something.

Unfortunately I update every day but don't always reboot or restart KDE.

I'm willing to test any potential fixes, with in reason of course.

THANKS!

George...
Comment 48 Amit Ugol 2011-02-08 11:30:06 UTC
Update,
same version, 4.6.0.0, I have installed xorg-xrandr which wasn't there before (I wanted to try arandr) I have no idea if it has anything to do with it, but now, a week or so after 4.6 is out in Arch the resolution is saved. I still think something there is not working as it should because it did not work for the first week of usage.
erogo this spesific area of code might be fixed, but something else is not allowing saving the resolution at all times.
Comment 49 George R. Goffe 2011-02-08 12:00:01 UTC
Howdy,

This problem has been resolved for me... for unknown reasons.

Ran yum update. Rebooted... Problem is gone.

George...
Comment 50 apodtele 2011-04-23 04:50:59 UTC
Current way of saving the default configuration does not work for me.

This fails:
StartupCommands=xrandr --output "DVI-0" --pos 1280x0 --mode 1920x1080
 --refresh 60\nxrandr --output "VGA-0" --pos 0x0 --mode 1280x1024
 --refresh 60.0197\nxrandr --noprimary

This works:
StartupCommands=xrandr --output "DVI-0" --pos 1280x0 --output "VGA-0"
 --left-of "DVI-0" --noprimary

Please use a single xrandr command.
Comment 51 gene smith 2011-04-23 07:48:50 UTC
Basically the bug seems to be that you can setup your dual monitors correctly in KDE but on re-login, they revert to a "default" state this is probably not what you want. Here is my description of what I see as posted on the fedora kde list. (I don't think this bug is resolved or fixed as it is currently classified!):

I have two monitors (1600*1200) with DVI0 on right and DVI1 on left. 
DVI0 has the panel and begins at x,y = 1600,0 with DVI0 at 0,0 so the 
mouse moves horizontally across both monitors as expected. After doing 
this initial setup in KDE it worked fine for several days but I never 
logged off.

Then upgrade to kde 4.6.2 required logoff/on and the dual monitor 
configuration was not preserved and it returned to the original default 
(when moving mouse pointer on right monitor to the left edge it stops 
and if moved past right edge of right monitor it reappears on left edge 
of left monitor). Effectively this mean that DVI0 is at 0,0 and DVI1 is 
at 1600,0 which is probably the most used default. This time I reset the 
coordinates as described in my first paragraph and it worked correctly 
again. However, this time I decided to set this as the default hoping 
this would cause KDE or whatever to keep my settings after an X restart 
or logoff/on. (Note: The help screen for monitor setup in KDE is grayed 
out so not really sure what "set as default" really means.)

However, now after logoff/on the monitors come up "cloned" with the same 
stuff on both (and having the same coordinates I think). Again, using 
the monitor config KDE screen I was able to get my desired setup back.

There is probably a workaround to this such as reversing my monitor 
cables and setting the right monitor (now DVI1) to "primary" so it 
contains the panel. However, it still appears to be a bug that my 
settings are not preserved across reboots or logins.
Comment 52 gene smith 2011-04-28 02:40:38 UTC
(In reply to comment #50)
> Current way of saving the default configuration does not work for me.
> 
> This fails:
> StartupCommands=xrandr --output "DVI-0" --pos 1280x0 --mode 1920x1080
>  --refresh 60\nxrandr --output "VGA-0" --pos 0x0 --mode 1280x1024
>  --refresh 60.0197\nxrandr --noprimary
> 
> This works:
> StartupCommands=xrandr --output "DVI-0" --pos 1280x0 --output "VGA-0"
>  --left-of "DVI-0" --noprimary
> 
> Please use a single xrandr command.

On my original system discussed in comment 51 having a DVI-0 and DVI-1 at resolution 1600x1200 having a single xrandr call containing both output, as described under "This works:" above finally fixed the problem. Now I can log off and back on and it keeps the desired screen coordinates.

However, on the system I am currently using I attempted to set-up dual monitors with VGA-0 and DVI-0 and it made no difference whether I used multiple xrandr calls separated by \n or if they were consolidated into one.

But another problem is that the "size and orientation" configuration screen often does not cause a change in the krandrrc file when the change is "applied" or after a logoff/on cycle. 

Another problem with the "size and orientation" screen is that there is no "help" available (button remains grey) and it is not clear (and definitely not documented with online help) what it means to "save as default" having two choices: "save as default" and "reset". Then even if you do a "save as default" the "Defaults" button remains grey.
Comment 53 apodtele 2011-04-28 04:31:10 UTC
(In reply to comment #52)

Please, "Save as default" your desired setup and post that broken StartupCommands line here, so that I can try to work around it for you.

"Apply" is meant for temporarily adjusting settings for overhead projectot, etc.
and you do not want to save it.
"Save as Default" if you like it and want it to last
Comment 54 gene smith 2011-04-29 07:21:10 UTC
(In reply to comment #53)
> (In reply to comment #52)
> 
> Please, "Save as default" your desired setup and post that broken
> StartupCommands line here, so that I can try to work around it for you.

On the system I am using now (vga and dvi monitors) it is basically working with multiple xrandr calls separated by newlines (\n) so can't send anything.

On the other system (two dvi monitors) it *does* require the single xrandr call as you point out and won't work correctly unless that is done. So I have the workaround for that already (and don't have that system here right now to test). 

> "Apply" is meant for temporarily adjusting settings for overhead projectot,
> etc.
> and you do not want to save it.
> "Save as Default" if you like it and want it to last

I don't remember other kde config screens having the concept of "save as default". On all others the "apply" button saves things that survives a reboot and come back again the way you set them. When you hit the "apply" button on monitor set-up it gives you several seconds to decide if you want to keep the new screen configuration and it implies the changes is permanent. It doesn't say anything about it being a temporary change at all. However, I think you are right since unless you do the "save as default" the screen always comes back the way it originally was after a re-login.

I would think "apply" should change your setting permanently and survive a restart or re-login. "Save as default" should save your setting as the possible default setting that can be re-set by hitting the "defaults" button followed by apply again. (However, defaults button remains always gray even if "save as default" is done. Also don't need "reset" selection under "save as default" since there is already a "reset" button that also is always gray/disabled.)

Also, I noticed that sometimes you can change things (like Position) and the apply button remains disabled/gray. You have to change something else, like Size, and then change it back so you can "apply" your desired position change. This doesn't happen every time.
Comment 55 gene smith 2011-04-29 17:14:51 UTC
(In reply to comment #53)
> (In reply to comment #52)
> 
> Please, "Save as default" your desired setup and post that broken
> StartupCommands line here, so that I can try to work around it for you.
> 

Here's my results for the system with two DVI and resolution 1600x1200.

Monitor "size and orientation" config screen set like this:

DVI-0 (Connected)
Size: 1600x1200 (auto)
Refresh: 60 Hz
Orientation: No rotation
Position Absolute 1600 0

DVI-0 (Connected)
Size: 1600x1200 (auto)
Refresh: 60 Hz
Orientation: No rotation
Position: Left of DVI-0 (or Absolute: 0 0 -- same result)

Saved to krandrrc by doing "apply" and then "save as default" produces this StartupCommands in krandrrc:
StartupCommands=xrandr --output "DVI-0" --pos 1600x0 --mode 1600x1200 --refresh 60\nxrandr --output "DVI-1" --pos 0x0 --mode 1600x1200 --refresh 60\nxrandr --output "DVI-0" --primary
After just apply, this produces the expected results. But this comes up "cloned" (same on both monitors) after logoff / login:

Edit ~/.kde/share/config/krandrrc to this and logoff / login then works as expected:
StartupCommands=xrandr --output "DVI-0" --right-of "DVI-1" --mode 1600x1200 --refresh 60\nxrandr --output "DVI-1" --pos 0x0 --mode 1600x1200 --refresh 60\nxrandr --output "DVI-0" --primary

This also works as expected after logoff / login (single consolidated xrandr call):
StartupCommands=xrandr --output "DVI-0" --pos 1600x0 --mode 1600x1200 --refresh 60 --primary --output "DVI-1" --pos 0x0 --mode 1600x1200 --refresh 60
Comment 56 Scott Fines 2011-05-01 01:15:33 UTC
Hello, all,

I recently installed Kubuntu 11.04 (which comes pre-installed with KDE 4.6.2) and immediately started seeing this issue, and I tried the various solutions proposed in this bugtracker, to no avail. However, the thing that DID finally work for me was the following:

The hardware that I'm using is an ATI Radeon FirePro V4800, which has a DisplayPort and a DVI out: I have one monitor plugged into each output for a dual-head display. Since this is a desktop machine, every time I booted I saw this issue rear its ugly head. To work around it, I would have to:
    1. Open the activities pane
    2. Create a new activity
    3. Open that new activity
    4. Stop the old activity

Once I did that, my windows returned without trouble. However, when I restarted, I would have this issue, plus an issue where my dual-headed desktop configurations were replaced with a single, cloned configuration. 

What finally fixed it for me was to install the ATI proprietary driver. Once I did that, I had to configure the Catalyist control center to be in "Multi-display desktop with displays(s) 1", which solved both issues for me.

Hope this helps, and please let me know if there's any information I can provide to help with the tracking down of this issue.

Scott Fines
Comment 57 George R. Goffe 2011-05-07 05:49:51 UTC
Howdy,

The problem with settings not being saved AND the panel size at the bottom of the desktop size settings seems to have been resolved now.

The fix came in via yum update that was run this morning.

Good work AND MANY THANKS!

George...
Comment 58 Ac17 2011-05-08 15:01:24 UTC
This is not solved. Non of the patches work for me, I have update every day so...
That I notice it first now is because a other user ask about it, I haven´t try it.
Comment 59 gene smith 2011-05-08 19:19:21 UTC
(In reply to comment #55)

Typo error corrected below:

> Monitor "size and orientation" config screen set like this:
> 
> DVI-0 (Connected)
> Size: 1600x1200 (auto)
> Refresh: 60 Hz
> Orientation: No rotation
> Position Absolute 1600 0
> 
> DVI-0 (Connected)   <----typo: Should say "DVI-1 (Connected)
> Size: 1600x1200 (auto)
> Refresh: 60 Hz
> Orientation: No rotation
> Position: Left of DVI-0 (or Absolute: 0 0 -- same result)
>
Comment 60 George R. Goffe 2011-05-10 07:00:09 UTC
Hi,

This is really odd. I have not put any patches on my system. My system is currently up to date. BY the way, my system is at FC 14. The problem went away after I ran yum update.

I did try the "save as default" but that did not help.

I wonder if abandoning .kderc and .kde and re-configuring would help?

George...
Comment 61 Rupert Peddle 2011-05-26 22:58:08 UTC
I was having the problem with dual-head settings not getting saved and the screens returning to clones after restarting X after installing openSuse 11.4.

I figured out what the problem was by starting X, opening a terminal and running the command in the 'StartupCommands' line from krandrrc and it told me the modes were unkown. I removed the modes and refresh settings from the command and it works on restart now!

I've had some trouble with modes on my monitors before so I expect it's something to do with that.....but hopefully if you have trouble with this you can run the command in the same way and get some useful feedback why it might not be working!

rups
Comment 62 Philippe Cloutier 2011-06-10 23:27:55 UTC
People still having problems with this on KDE 4.6 should probably check #275360.
Comment 63 Giovanni Venturi 2011-06-11 15:51:07 UTC
It's not fixed st all. The display settings are lost.
Comment 64 George R. Goffe 2011-06-12 07:09:22 UTC
Hi,

I just realized that this problem has been fixed in kde-4.6.3 from Fedora in my Fedora core 14 system.

George...
Comment 65 Giovanni Venturi 2011-06-12 10:04:43 UTC
Hello George,
can you contact Fedora patcher to help fix this bug in the KDE source? Thank you :) .
Comment 66 Peter Roots 2011-07-29 09:38:50 UTC
I had this problem with Kubuntu 11.04 - affected me with dual monitors but with just the laptop screen the default setting was the correct one for the screen size.
Yesterday I upgraded to KDE 4.6.5 in the hope that this and some other issues might be resolved.
Now every time I restart the display defaults to 1024x768. If I change to 1366x 768 the desktop now fills the screen but the task bar at the bottom does not and has to be manually resized (and conky stays put part way across the desktop)
Even if I 'save as default' the screen drops back to 1024x768 at the next restart.

Rather interestingly I have just noticed that if I click on KrandrTray the config display shows 1366x768(auto) for LVDS1. A right click of KrandrTray shows LVDS1 as screen size 1366x768 BUT mouse over KrandrTray and I get LVDS1 Resolution: 1024x768

So not a fixed bug (at least not in 4.6.5)
Comment 67 Peter Roots 2011-07-29 10:21:50 UTC
OK so I was a little bit premature.
After 4 or 5 reboots, resetting the laptop screen resolution each time and saving as default, the resolution is now sticking at the correct value.
If I now restart with a second monitor plugged in, both the built in and external monitors start off with the saved settings I want (ie resolutions to match the monitor size, not cloned, one above the other).
If I plug second monitor in, after starting up, then I am prompted to configure the monitors - get almost what I want after selecting the right resolution for the second monitor but the background, for this one, is not the one I get (and want) when the second monitor is present at start up - this I can live with though.

So it does work, but rather odd that 4 or 5 reboots were needed to get there
Comment 68 Paulo Fidalgo 2011-11-14 11:02:29 UTC
After upgrading to Fedora 16 with KDE 4.7.3 this still happens.
Every time I boot I need to configure the displays.
In my opinion the sugestion of https://bugs.kde.org/show_bug.cgi?id=265959 would be a nice to have.
Comment 69 Mebuntu 2011-11-14 11:23:04 UTC
I'm running Oneiric with kernel 3.1.0-030100-generic.  This and the previous kernel plus the current standard xorg drivers don't seem to lose the display settings any more.  I'm running a sandy bridge mb and have one monitor on the displayport and one on the VGA.
Comment 70 Chris 2012-01-06 21:23:26 UTC
I too am having this same problem.  I'm using Kubuntu 10.04 and have an NVidia card.  After reading through this thread I decided to try Kubuntu 12.04A1 since it uses KDE 4.7.97 (KDE 4.8 RC1) to see if the problem has been corrected.  It has not.  The problem also exists in Kubuntu 10.10, 11.04 and 11.10 as well.

What is the fix?  This bug is now almost 3 years old.

We got tired of the problems/changes in Ubuntu with the loss of Gnome and the switch to Unity.   KDE is a lot farther ahead on thier big changes.

I see that the "save as default" bar shows up, and it does, for the most part save your changes in ~/.kde/share/config/krandrrc.  It does NOT save the --right-of or --left-of flags.

Updating the file manually still does not make any difference on a reboot/restart.

In addition, sometimes the file is left as it was (unchanged) prior to the reboot.  Either way, it appears that it does not read this file upon startup.

Is there a generic user location to make this change to?  Why does the save as default option save this to a file that is not ever used?

The change is persistent with a logout and a re-login, but after a restart it goes back to the "standard install" settings.

Is this problem still being actively worked?

Thanks,
-Chris
Comment 71 Dean 2012-01-06 23:44:54 UTC
I see that the "save as default" bar shows up, and it does, for the most part
save your changes in ~/.kde/share/config/krandrrc.  It does NOT save the
--right-of or --left-of flags.

My understanding is that it uses '--pos' like this

 cat ~/.kde4/share/config/krandrrc
[Display]
ApplyOnStartup=true
StartupCommands=xrandr --output "LVDS1" --pos 0x0 --mode 1680x1050 --refresh 60.0012\nxrandr --output "VGA1" --pos 1680x0 --mode 1366x768 --refresh 59.7895\nxrandr --output "LVDS1" --primary

This openSUSE thread may be helpful

http://forums.opensuse.org/english/get-technical-help-here/applications/451827-my-dual-monitor-settings-wont-stick.html#post2270043

There is some information about getting it executed upon login as well.
Comment 72 Chris 2012-01-10 17:36:11 UTC
Dean -

Thanks for jumping in on this.  I presume that you mean that you believe that it is to use the "--pos" to determine which monitor is left/right or above/below.

And I could see how xrandr could make that determination from that information.

I visited the link you suggested.  It's unclear to me how that might help me.  However, the ubuntu link I thought might be useful since I'm using that, however, that link is no longer valid.

My original idea was to get the krandr command to work in the CLI and then use that command somewhere during login to make the change.  However, I can't seem to get it to work.  When I type xrandr at the CLI, I get the following error message.

No protocol specified
Can't open display :0

It doesn't matter if I copy the command from the file it is saved in, if I use a basic line only addressing one monitor, or no input I get the same error.

I think this might be the underlying problem.  I have an NVidia card with DVI and VGA output.

Also, many of the posts on the thread you referenced, and threads referenced on that thread indicate opporutnites to place the command in various areas.  One was in the .kde/Autostart directory, but on my system that is an empty directory.  Other suggestions were in the user home directory and other places.  In one suggestion it was suggested to add the xrandr command in /etc/X11/xinit/xinit.common.   In that directory I have and xinit file, but not and xinit.common.

But I think I need to figure out why the xrandr command produces an error first.  

Do you have any suggestions for that problem?

Thank you,
-Chris

(In reply to comment #71)
> I see that the "save as default" bar shows up, and it does, for the most part
> save your changes in ~/.kde/share/config/krandrrc.  It does NOT save the
> --right-of or --left-of flags.
> My understanding is that it uses '--pos' like this
>  cat ~/.kde4/share/config/krandrrc
> [Display]
> ApplyOnStartup=true
> StartupCommands=xrandr --output "LVDS1" --pos 0x0 --mode 1680x1050 --refresh
> 60.0012\nxrandr --output "VGA1" --pos 1680x0 --mode 1366x768 --refresh
> 59.7895\nxrandr --output "LVDS1" --primary
> This openSUSE thread may be helpful
> http://forums.opensuse.org/english/get-technical-help-here/applications/451827-my-dual-monitor-settings-wont-stick.html#post2270043
> There is some information about getting it executed upon login as well.
Comment 73 Chris 2012-01-10 17:45:01 UTC
Dean -

My video card is an nVidia G98 which is a GeForce 8400 GS.  

-Chris
Comment 74 Dean 2012-01-11 07:56:07 UTC
Are you using the proprietary driver? The nvidia driver is not fully compliant with with the RandR 1.3 extensions AFAIU. The above approach will only work with open source Xorg drivers. Instead, the 'nvidia-settings' utility needs to be used.
Comment 75 Paulo Fidalgo 2012-01-11 09:45:58 UTC
Dean: this bug isn't related with proprietary drivers only, since In my laptop with an Intel card I have the same issues.
Comment 76 m.wege 2012-01-11 10:00:30 UTC
I have the problems with intel drivers too. I have a docking station for my Thinkpad. It would be great, if KDE would remember the seetings when my laptop is docked.And if easy switching was possible when I want to undock.
Comment 77 Mebuntu 2012-01-11 10:29:22 UTC
I'm using a Sandy Bridge H67 chipset and Oneiric - this issue seems to have been resolved on this platform for some time.
Comment 78 Chris 2012-01-11 19:15:32 UTC

Dean/All -

I am not using the proprietary drivers.  However I tried them on an Ubuntu 10.04 machine, same results, "no protocol specified".

I will also try the proprietary drivers on an Ubuntu 12.04A1 machine.   It's the same result too.

Isn't "X11" the protocol?  I believe that the "no protocol specified" and "unable to open the display" are the problems I need to fix, and it might just work.

The work "protocol" does not show up in the xrandr help nor in the nvidia-settings help.

Thoughts?

Thanks,
-Chris
Comment 79 Dean 2012-01-12 08:19:22 UTC
Chris, the nvidia-settings utility is only relevant if using the proprietary nvidia driver (and may need to be installed first).

Are you opening a terminal within a desktop environment? (It won't work if your switching to a VT say with CTRL-ALT-f2 for example). Otherwise, I'm not sure what is going on.
Comment 80 Chris 2012-01-12 16:27:18 UTC
Dean -

I'm using a Terminal Window inside the X-Session, not opening a VT.

What can I do to move towards determining the problem/solution for the "Can't open display" error message from xrandr?

Does anyone have the persistent problem with the dual monitors working on Ubuntu/Kubuntu, and if so what versions of Ubuntu/KDE are you running, and how did you fix it?   What video card are you using?

Thanks,
-Chris

Thanks,
-Chris
Comment 81 Giovanni Venturi 2012-01-12 17:06:55 UTC
I still have this problem.
I can suggest to close this bug as WONTFIX. So we can forget about it.
Another bug on Plasma opened from 3 years was fixed after a flame in less than 30 minutes, maybe it was a simpler bug of course. It's not the case to do the same. I think this bug has to be closed also if still not fixed. I can suggest to let open a window when someone set the values in the windows settings: "Hello user, this settings will be lost at the KDE logout or system reboot, so it's suggested to reapply again when needed" or similar.
Comment 82 Franky 2012-01-14 13:33:48 UTC
Hi,

heres the same. Any modifications of krandrrc, like using only one  xrandr command, do not work. Everytime i logout, restart the xserver and login will show cloned desktops. Seems to me like this file isn't read at startup anytime...

I am using a ATI HD 5450 Graphicscard, non proprietary driver with two Displays. KDE Version is 4.7.97.

xrandr shows my two displays correct:

Screen 0: minimum 320 x 200, current 1680 x 1050, maximum 8192 x 8192
HDMI-0 disconnected (normal left inverted right x axis y axis)
DVI-0 connected 1680x1050+0+0 (normal left inverted right x axis y axis) 473mm x 296mm
[...]

VGA-0 connected 1680x1050+0+0 (normal left inverted right x axis y axis) 474mm x 296mm
[...]

Doing xrandr-command "xrandr --output DVI-0 --pos 1680x0 --mode 1680x1050 --refresh 59.8518" in a terminal window works fine. Two different Desktops.

Is there any abilitity to debug the startup, so i could see if the file krandrrc is involved and works properly?
Comment 83 Carl 2012-01-15 17:16:56 UTC
Apart from saving display settings, would it be possible to just restore the default LVDS settings when an external screen is unhooked? It is a major pain having to think of reconfiguring the display settings before you disconnect an external monitor. If you don't, you are either faced with a blank screen (if you had LVDS turned off), or your windows are invisible etc. This is actually getting a bit long in the tooth. KDE has never worked 100% correctly with external monitors. Ever....
Comment 84 Franky 2012-01-15 20:06:42 UTC
Hi,

i've testet the "/usr/bin/krandrstartup"-script by adding some echo-lines like:

echo "Var:  $krandrrc_display_applyonstartup" >> /home/kaputtnik/krandrstartup.log

if test "$krandrrc_display_applyonstartup" = "true"; then
    echo "Var:  $krandrrc_display_applyonstartup" >> /home/kaputtnik/krandrstartup.log
    if test -n "$krandrrc_display_startupcommands"; then
        # new way of simply storing the commands
        eval "$krandrrc_display_startupcommands"
	echo "2. if: $krandrrc_display_startupcommands" >> /home/kaputtnik/krandrstartup.log

I found, that the the first if query return allways "false"... the variable "$krandrrc_display_applyonstartup" is empty. The lines within the if-query whre not processed.

I do not know, where or how the variables are set. The first lines of my "~/.kde/share/config/krandrrc" looks like this:

[Display]
ApplyOnStartup=true
StartupCommands=xrandr --output DVI-0 --pos 1680x0 --mode 1680x1050 --refresh 59.8518\nxrandr --output VGA-0 --pos 0x0 --mode 1680x1050 --refresh 59.8833\nxrandr --noprimary

How are the variables set?

Thanks for a reply
Comment 85 Maxim Levitsky 2012-01-25 01:37:42 UTC
I have the same issue. How really these variables are set?
Comment 86 George R. Goffe 2012-01-25 05:22:36 UTC
I don't understand why this works for me unless it's the Fedora Core 16 + KDE at 4.7.4-2.

George...
Comment 87 Franky 2012-01-25 07:37:28 UTC
There are several files involved in the startup to configure the screen. It seems to me, that there is a different behavior if a restricted driver is used ore not and if a /etc/X11/xorg.conf is present ore not. If you are using a restricted driver, its maybe better to configure your screens with the related configtool (nvidiasettings or fglrx-amdcccle).

I guess(!), the related variables are set with /usr/bin/kstartupconfig4 wich reads the file ~/.kde/share/config/startupconfigkeys

The ~/.kde/share/config/startupconfigkeys is set with /usr/bin/startkde where you find a block like:

cat >$kdehome/share/config/startupconfigkeys <<EOF
kcminputrc Mouse cursorTheme 'Oxygen_Black'
kcminputrc Mouse cursorSize ''
ksplashrc KSplash Theme Default
ksplashrc KSplash Engine KSplashX
krandrrc Display ApplyOnStartup false
krandrrc Display StartupCommands ''
krandrrc [Screen0]
krandrrc [Screen1]
krandrrc [Screen2]
krandrrc [Screen3]
kcmfonts General forceFontDPI 0
kdeglobals Locale Language '' # trigger requesting languages from KLocale
kdeglobals Locale Country ''
EOF

In KDE Version 4.7.97 this block misses the krandrrc entries but maybe in this KDE-version the variables are set in another way? Copying these entries in the /usr/bin/startkde at the same block will not work.

As i mentioned above, this startup procedure is what i guess! Without any documentation how the startup works, its like to look for a needle in a haystack.
Comment 88 Jussi Kekkonen 2012-01-26 07:49:43 UTC
*** Bug 292438 has been marked as a duplicate of this bug. ***
Comment 89 Jussi Kekkonen 2012-01-26 07:55:51 UTC
After reading all of the comments, I can only say that I too have the problem of krandrrc not being applied. In my case, for whatever reasons, after upgrading to KDE SC 4.8 made krandrrc contain also ApplyOnStartup=false, which I turned to true with no effect.
Comment 90 Thomas Lübking 2012-01-30 10:05:29 UTC
*** Bug 292846 has been marked as a duplicate of this bug. ***
Comment 91 Victor Varvaryuk 2012-01-31 19:54:00 UTC
Does anyone know a workaround for this? How to manually fix this in my KDE? Thanks.

P.S. I feel this is a trivial bug to fix... for someone who knows the KDE booting procedure.
Comment 92 Dominic Lyons 2012-01-31 20:19:56 UTC
My workaround is to run the xrandr-command from ~/.kde/shar/config/krandrrc afer every logon...

Not the best solution but better than recreating the configuration after each login.
Comment 93 Kapcsándi István 2012-02-10 09:00:14 UTC
My workaround was to patch of /usr/bin/startke on kubuntu 11.10 and kde 4.8.
--- startkde    2012-01-25 01:49:00.000000000 +0100
+++ /usr/bin/startkde   2012-02-09 17:34:45.776396391 +0100
@@ -103,6 +103,12 @@
 kcminputrc Mouse cursorSize ''
 ksplashrc KSplash Theme Default
 ksplashrc KSplash Engine KSplashX
+krandrrc Display ApplyOnStartup true
+krandrrc Display StartupCommands ''
+krandrrc [Screen0]
+krandrrc [Screen1]
+krandrrc [Screen2]
+krandrrc [Screen3]
 kcmfonts General forceFontDPI 0
 kdeglobals Locale Language '' # trigger requesting languages from KLocale                                              
 kdeglobals Locale Country ''
Comment 94 Chris 2012-02-10 18:25:48 UTC
All -

I tried Kapcsándi István's solution posted above on Kubuntu 10.04 (LTS) and KDE 4.4.5 and it did not fix the persistent problem for me.

Other suggestions?

Thanks,
-Chris
Comment 95 Chris 2012-02-10 18:29:21 UTC
Dominic Lyons  -

Can you provide more details on your fix you used in post #92?

Where did you insert the command at each login, or are you doing it manually at the terminal window each time you log in?

Which specific xrandr-command are you using?

Thanks,
-Chris
Comment 96 Dominic Lyons 2012-02-10 22:21:00 UTC
@all, reply to comment #93 from Kapcsándi István 

This solution worked for me, too.

These lines are still included in the current version on git: https://projects.kde.org/projects/kde/kde-workspace/repository/revisions/10faac70019d6e6ccdeeaedd76dfdea6bd6015c1/entry/startkde.cmake

So it seems to be a packaging problem (or a config tool messes this up).


To explain what is happening (as far as I understood it):

* startkde is a shell script that is run after logging in
* startkde calls kstartupconfig4 which reads a user specific "startupconfigkeys" file which generates "startupconfigfiles" and a shell script "startupconfig"
* This generated script is now sourced/started
* To give some default values startkde "hacks" some options to startupconfigkeys. This is arranged by this crazy looking part:
    cat >$kdehome/share/config/startupconfigkeys <<EOF
    kcminputrc Mouse cursorTheme 'Oxygen_White'
    ...
    EOF
    kstartupconfig4
* kstartupconfig4 looks into the real config files and replaces the default values by the values defined there (if there are any) on generating the mentioned files
* If the krandrrc settings are neither mentioned in the startupconfigkeys files nor in the default options in startkde, kstartupconfig4 will *not* look for options in the krandrc file! This is what caused this problem.
* Later on startkde sources the script krandrstartup. If krandrstartup doesn't find the environment variables which ought to be set by startupconfig then no settings will be applied. This results in staying at default/fallback settings.

Details on kstartupconfig4 can be found in the source comment at https://projects.kde.org/projects/kde/kde-workspace/repository/revisions/0ebd1199ef994b89340cef50abc98a8689daa542/entry/kstartupconfig/kstartupconfig.c



@Chris, reply to comment #94:

What did you exactly try? You have to insert these 6 lines
    krandrrc Display ApplyOnStartup true
    krandrrc Display StartupCommands ''
    krandrrc [Screen0]
    krandrrc [Screen1]
    krandrrc [Screen2]
    krandrrc [Screen3]
to startkde in between the "cat <... <<EOF" and the "EOF".


@Chris, reply to comment #95:

This was just a workaround. I manually executed the xrandr command I found in ~/.kde/shar/config/krandrrc after each login.
Comment 97 Chris 2012-02-10 22:30:21 UTC
Dominic Lyons -

Yes, I added those six lines to the file specified and then I rebooted the machine.

My dual screen settings/preferences were lost on the reboot.  I went and looked at the file to ensure my 6 lines were still there, and they were.

Do you think that this might not work with Kubuntu 10.04 (LTS) and KDE 4.4.5?

Do I also have to run the xrandr command you pointed out in your last post too to make it persistent?

Thanks,
-Chris
Comment 98 Dominic Lyons 2012-02-10 22:43:56 UTC
@Chris:

I'm not sure if your problem is caused by the same fault.

But to give it a try: Before this https://projects.kde.org/projects/kde/kde-workspace/repository/revisions/042d95483f4dfa6e5b26552b08eb788e50005503 revision from August 2011 the options were slightly different:	
    kcmrandrrc Display ApplyOnStartup false
    kcmrandrrc [Screen0]
    kcmrandrrc [Screen1]
    kcmrandrrc [Screen2]
    kcmrandrrc [Screen3]
According to diff https://projects.kde.org/projects/kde/kde-workspace/repository/revisions/042d95483f4dfa6e5b26552b08eb788e50005503 there is no "StartupCommands"-line
Comment 99 Chris 2012-02-10 22:55:15 UTC
Dominic Lyons -

I commented out that line and rebooted and my changes are not persistent.

v/r
-Chris
Comment 100 Dominic Lyons 2012-02-10 23:02:23 UTC
Have you seen that it was "kcmrandrrc" on older versions an now "krandrrc"?
So you likely have to take the first one (with "cm" between "k" and "randrrc").
Comment 101 Maxim Levitsky 2012-02-12 11:40:13 UTC
maxim@maxim-laptop:~/kde-workspace-4.8.0b/debian/patches$ 
maxim@maxim-laptop:~/kde-workspace-4.8.0b/debian/patches$ 
maxim@maxim-laptop:~/kde-workspace-4.8.0b/debian/patches$ ls 
50_icon_in_oxygen_title_bar.diff    kdm_xreset_hook_framework.diff               kubuntu_plasma_netbook_for_small_screens.diff
enable_debianabimanager.diff        kubuntu_always_show_kickoff_subtext.diff     kubuntu_remove_empty_librarypath_key.diff
enable_dlrestrcitions.diff          kubuntu_disable_remote_widgets_browser.diff  kubuntu_remove_startkde_cruft.diff
genkdmconf.diff                     kubuntu_fix_username_icon_alignment.diff     kubuntu_screensaver_restricted_install.diff
genkdm_make.diff                    kubuntu_gtk2_engines_oxygen_config.diff      kubuntu_startkde_set_country.diff
initialize_variables_crashfix.diff  kubuntu_homepage.diff                        kubuntu_upstart_session_events.diff
kdm_does_not_wreak_havoc.diff       kubuntu_inotify_add_watch_ibus.diff          place_global_config_in_etc.diff
kdm_no_custom.diff                  kubuntu_kdewallpapers_install.diff           plasma_netbook_fix_autostart.diff
kdm_override_docs.diff              kubuntu_kdm_plymouth_transition.diff         qguiplatformplugin_kde_NULL_check.diff
kdmrc_defaults_kubuntu.diff         kubuntu_kdmrc_defaults.diff                  series
kdm_vt_switching_on_kfreebsd.diff   kubuntu_kubuntu_knewstuff.diff
kdm_X_path.diff                     kubuntu_netbook_favourites.diff
maxim@maxim-laptop:~/kde-workspace-4.8.0b/debian/patches$ cat ./kubuntu_remove_startkde_cruft.diff
Index: kde-workspace-4.7.3/startkde.cmake
===================================================================
--- kde-workspace-4.7.3.orig/startkde.cmake     2011-11-23 17:59:40.000000000 +0000
+++ kde-workspace-4.7.3/startkde.cmake  2011-11-23 18:00:49.000000000 +0000
@@ -81,12 +81,6 @@
 kcminputrc Mouse cursorSize ''
 ksplashrc KSplash Theme Default
 ksplashrc KSplash Engine KSplashX
-krandrrc Display ApplyOnStartup false
-krandrrc Display StartupCommands ''
-krandrrc [Screen0]
-krandrrc [Screen1]
-krandrrc [Screen2]
-krandrrc [Screen3]
 kcmfonts General forceFontDPI 0
 kdeglobals Locale Language '' # trigger requesting languages from KLocale
 EOF
maxim@maxim-laptop:~/kde-workspace-4.8.0b/debian/patches$ 



Awesome, isn't it? Yep, reverted this kubuntu patch, and sure bug gone.
Cruft.... yea, kubuntu is the cruft.
Comment 102 Philip Muškovac 2012-02-12 19:48:31 UTC
Ok. I've spent a while looking at this today and I would like it if someone could tell me what is *supposed* to set the resolution on startup in 4.8.

kstartupconfig4 using 'krandrrc [Screen0]' ?
No, krandrrc has no [Screen0] section, so this won't work
kstartupconfig4 using 'StartupCommand'?
No, that is zeroed by startkde, and I don't have a StartupCommand in my kranddrc
Also, since startkde sets ApplyOnStartup = false, krandrstartup doesn't do a thing in the first place which is why the mentioned kubuntu patch shouldn't make a difference.
krandrtray?
I tried it, it doesn't restore any settings.

Is there anything left I didn't try?
Here's my krandrrc:
[Screen_0]
OutputsUnified=false
UnifiedRect=0,0,0,0
UnifiedRotation=1

[Screen_0_Output_LVDS1]
Active=true
Rect=0,0,800,600
RefreshRate=60.3165397644043
Rotation=1

[Screen_0_Output_VGA1]
Active=true
Rect=0,0,800,600
RefreshRate=60.3165397644043
Rotation=1

Philip Muskovac
Kubuntu Developer
Comment 103 Dominic Lyons 2012-02-12 21:01:12 UTC
After setting up your display and clicking on the "Save as Default"-button you should have a section like
    [Display]
    ApplyOnStartup=true
    StartupCommands=xrandr ...
in krandrrc. kstartupconfig4 reads this out. See comment #96
Comment 104 Philip Muškovac 2012-02-12 21:24:08 UTC
Thanks, shows that I don't usually use krandr. This was a legacy patch that got updated and re-enabled by accident for 4.8. It's now removed from the 11.10 backports. Sorry for this.
Comment 105 Dominic Lyons 2012-02-12 22:35:54 UTC
Thanks!

So this will close this bug and https://bugs.launchpad.net/kdebase-workspace/+bug/898390 ?

BTW: Yes, it is a bit sad that there is no central (desktop and tool independent) configuration file for randr.
Comment 106 Dominic Lyons 2012-02-12 22:42:39 UTC
Possible duplicates that maybe also could be closed:
* Bug #292419
* Bug #290240
* Bug #283625
Comment 107 Philip de Leon 2012-03-07 09:11:41 UTC
Is there a simple way a non technical old man such as myself can import this information without having to copy it letter by letter?
Comment 108 Dominic Lyons 2012-03-08 00:59:32 UTC
@Philip de Leon:
If this problem appears on Kubuntu it should be enough to install all updates.
Comment 109 m.wege 2012-04-03 21:27:44 UTC
I am using Oneric with the latest backports and still have the problem. I have an external monitor which I configure to show above the laptop screen. Saving and rebooting does not help KDE/Kubuntu to keep the settings.
Comment 110 Martin Flöser 2012-04-14 21:27:45 UTC
*** Bug 247323 has been marked as a duplicate of this bug. ***
Comment 111 Martin Flöser 2012-04-14 21:27:59 UTC
*** Bug 257351 has been marked as a duplicate of this bug. ***
Comment 112 Daniel Franke 2012-04-14 21:35:31 UTC
Haven't read all the history, but as one who filed one of the many duplicates and just in case it matters: the problem has resolved itself for me a while ago (Kubuntu 11.10, up to date)?!
Comment 113 Martin Bříza 2012-06-20 11:21:45 UTC
This bug is reported in the Red Hat Bugzilla for Fedora 17 (KDE SC 4.8.3) on https://bugzilla.redhat.com/show_bug.cgi?id=825410 that has been closed as a duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=766545 reported for Fedora 16 (KDE SC 4.7.3).

Also, I found a few duplicates of this bug on bugs.kde.org while triaging it, they may have been already reported but not yet closed:
https://bugs.kde.org/show_bug.cgi?id=292937
https://bugs.kde.org/show_bug.cgi?id=293006
https://bugs.kde.org/show_bug.cgi?id=292751
https://bugs.kde.org/show_bug.cgi?id=261285
Comment 114 Mathias Dietrich 2012-08-09 11:48:27 UTC
I still have this issue under Kubuntu 12.04 with KDE 4.9.
Comment 115 Mathias Dietrich 2012-08-09 20:38:15 UTC
Btw, the "Save as Default"-Button is no solution for this problem. Lets assume you use an external screen, e.g. on your notebook and you deactivate the notebook's screen. Save this configuration as "Default".
If you boot your notebook without the connected screen. KDE tries to use the saved "Default" configuration after login and you got a black screen. -.-

So it would be better if there would be at least a kind of fallback if the display is not connected.
Comment 116 Lamarque V. Souza 2012-08-20 01:51:27 UTC
*** Bug 261285 has been marked as a duplicate of this bug. ***
Comment 117 Lamarque V. Souza 2012-08-20 01:51:31 UTC
*** Bug 292751 has been marked as a duplicate of this bug. ***
Comment 118 Lamarque V. Souza 2012-08-20 01:51:37 UTC
*** Bug 293006 has been marked as a duplicate of this bug. ***
Comment 119 Lamarque V. Souza 2012-08-20 01:51:43 UTC
*** Bug 292937 has been marked as a duplicate of this bug. ***
Comment 120 Martin Bříza 2012-09-17 12:36:52 UTC
As I wrote in the report for Fedora, it seems xrandr fills empty gaps in screen when the displays are added, so (for example) if you want to add a 1680x1050 display to position 1280x0, it will move it to 0x0 as there is nothing there yet.
When ran for second time, the script works because the display on 0x0 already exists and covers the whole area up to 1280x0.
Comment 121 Tristan Miller 2012-10-10 15:13:38 UTC
Confirming bug still exists with KDE 4.9.2 on openSUSE 12.2 (x86-64).
Comment 122 Jekyll Wu 2012-10-11 01:30:49 UTC
*** Bug 283625 has been marked as a duplicate of this bug. ***
Comment 123 Giovanni Venturi 2012-10-11 19:38:28 UTC
Why does nodoby close this bug forever? After 4 years we have to see this bug still here? Developes don't want to fix it. It's clear. This bug it's not important. Just close it! Please! Close it as "WONTFIX".
Comment 124 Gita Benadi 2012-10-11 19:50:10 UTC
(In reply to comment #123)
> Why does nodoby close this bug forever? After 4 years we have to see this
> bug still here? Developes don't want to fix it. It's clear. This bug it's
> not important. Just close it! Please! Close it as "WONTFIX".

I think you're wrong. See here: http://www.progdan.cz/2012/09/display-management-in-kde/?utm_source=rss&utm_medium=rss&utm_campaign=display-management-in-kde

Seems to me like the developers want to fix this bug.
Comment 125 Giovanni Venturi 2012-10-11 19:56:49 UTC
It's just an article that say what they want to do. The bug was opened in the first quarter of the 2009... now we are around the end of 2012 and it's still there. That's all.
Comment 126 Evengard 2012-10-11 20:16:24 UTC
It was fixed a long time ago, isn't it?
Comment 127 Giovanni Venturi 2012-10-11 20:19:08 UTC
Yes and nobody knows about it ;) . It's been fixed in KDE 6.0.
Comment 128 Frans Leerink 2012-10-11 21:11:01 UTC
Hello, 
I added my openSUSE bug 757273 as additional comments below to stress the importance. The bug still exists in openSUSE 12.1 final and also in openSUSE12.2 final.

System loses "system settings / display and monitor / seize & orientation" settings after shutdown

Hallo 
On a new installed system (openSUSE 12.1 (i586) + KDE:4.7.2 (4.7.2) "release 5)
with all updates installed the system loses "system settings / display and
monitor / seize & orientation" settings  after  a shutdown of the system. These
settings were made to set the second display screen (DVI-I-1) in the Position
"Right of" Primary output VGA-1. During the whole session these settings are
saved and worked correctly.

CPU Information
Processor (CPU):   Intel(R) Pentium(R) D CPU 3.00GHz
  Speed:  2.800,00 MHz
  Cores:  2
  Memory Information
Total memory (RAM):  2,9 GiB
  Free memory:  1,9 GiB (+ 438,2 MiB Caches)
  Free swap:  2,0 GiB
Display Info
Vendor:  nVidia Corporation
  Model:  GeForce 6700 XL
  2D driver:  nouveau
  3D driver:  nouveau Gallium (7.11

After selecting "Kickoff Application Launcher / Leave / Shut down" I noticed
strange system behavior. The pop-up "shutdown window" flikkered, so it is not
easy to confirm shutdown.

Please let me know if you need more info.


Regards,   Frans

Reproducible: Always

Steps to Reproduce:
1. Make the described settings and save them
2. Shutdown the system (Notice strange behavior 
3. Reboot the system and check the settings  "system settings / display and
monitor / seize & orientation"
Actual Results:  
Notice that the settings are changed to "Clone Of" VGA-1

Expected Results:  
The settings "Right of" Primary output VGA-1 should have been still there.

[reply] [-] Comment 1 Frans Leerink 2012-10-11 20:12:38 UTC

Hello,

This problem still exists in openSUSE 12.2 final, started from openSUSE 12.2
KDE LiveCD x86-64.iso
I could test this only in the liveCD version of openSUSE 12.2-final by logging
out of KDE. Logging in again resulted in the same behavior (Size & Orientation
settings not saved) as with shutdown/booting-in as reported in the original
757273 bug report.

Please let me know what info you need to tackle this problem
Comment 129 George R. Goffe 2012-10-12 10:51:15 UTC
I still don't quite understand how it works for me and not for other people. It must be that my particular options don't fail?

I have only one monitor... I set the display size to max... it always seems to work.

George...
Comment 130 Victor Varvaryuk 2012-10-12 10:58:01 UTC
The bug is for multiple monitors
(In reply to comment #129)
> I still don't quite understand how it works for me and not for other people.
> It must be that my particular options don't fail?
> 
> I have only one monitor... I set the display size to max... it always seems
> to work.
> 
> George...
Comment 131 Franky 2012-10-12 13:13:26 UTC
Here is everything fine now. But i could not say with which Version it is fixed.  The only thing i could say, is: 

Don't use the proprietary driver. Don't have a /etc/X11/xorg.conf file. If you are using a proprietary driver, it would be better to adjust the Screensettings within xorg.conf. 

My System:
$ lspci -nnk | grep -i -A2 vga
02:00.0 VGA compatible controller [0300]: Advanced Micro Devices [AMD] nee ATI Cedar PRO [Radeon HD 5450] [1002:68f9]
        Subsystem: ASUSTeK Computer Inc. Device [1043:03ca]
        Kernel driver in use: radeon

Working with two Monitors with this graphicscard, one left, one right.:

$ xrandr
Screen 0: minimum 320 x 200, current 3360 x 1050, maximum 8192 x 8192
HDMI-0 disconnected (normal left inverted right x axis y axis)
DVI-0 connected 1680x1050+1680+0 (normal left inverted right x axis y axis) 473mm x 296mm
   1680x1050      59.9*+
 [...]
VGA-0 connected 1680x1050+0+0 (normal left inverted right x axis y axis) 474mm x 296mm
   1680x1050      59.9*+
 [...]

The left is VGA-0, the right one is DVI-0. The resolution is on both Screen 1680x1050. The DVI-0 position is: Absolute, 1680x0 The VGA-0 position is Left from DVI-0.

You have to save your settings explicitly with the Button "Save as Default" beneath the " Identify Outputs"-Button.

Sorry, but for me this Bug is solved.
Comment 132 Frans Leerink 2012-10-12 16:44:01 UTC
On Friday 12 October 2012 13:13 you wrote:
> https://bugs.kde.org/show_bug.cgi?id=183143
> 
> --- Comment #131 from Franky <kaputtnik@kabelmail.de> ---
> Here is everything fine now. But i could not say with which Version it
> is fixed.  The only thing i could say, is:
> 
> Don't use the proprietary driver. Don't have a /etc/X11/xorg.conf
> file. If you are using a proprietary driver, it would be better to
> adjust the Screensettings within xorg.conf.
> 
> My System:
> $ lspci -nnk | grep -i -A2 vga
> 02:00.0 VGA compatible controller [0300]: Advanced Micro Devices [AMD]
> nee ATI Cedar PRO [Radeon HD 5450] [1002:68f9]
>         Subsystem: ASUSTeK Computer Inc. Device [1043:03ca]
>         Kernel driver in use: radeon
> 
> Working with two Monitors with this graphicscard, one left, one
> right.:
> 
> $ xrandr
> Screen 0: minimum 320 x 200, current 3360 x 1050, maximum 8192 x 8192
> HDMI-0 disconnected (normal left inverted right x axis y axis)
> DVI-0 connected 1680x1050+1680+0 (normal left inverted right x axis y
> axis) 473mm x 296mm
>    1680x1050      59.9*+
>  [...]
> VGA-0 connected 1680x1050+0+0 (normal left inverted right x axis y
> axis) 474mm x 296mm
>    1680x1050      59.9*+
>  [...]
> 
> The left is VGA-0, the right one is DVI-0. The resolution is on both
> Screen 1680x1050. The DVI-0 position is: Absolute, 1680x0 The VGA-0
> position is Left from DVI-0.
> 
> You have to save your settings explicitly with the Button "Save as
> Default" beneath the " Identify Outputs"-Button.
> 
> Sorry, but for me this Bug is solved.
Comment 133 Gita Benadi 2012-10-12 17:04:11 UTC
For me this bug isn't solved. Pressing the button "Save as Default" indeed does save the settings, but this is no solution for me. At work I use a docking station and connect my laptop to an external monitor. The laptop's lid is closed, so I want the laptop screen switched off and the external monitor set to its maximum resolution. At home and when travelling I use the laptop screen. If I save the work configuration as default, I get a black screen when I start the laptop at home. With Unity, Gnome Shell and XFCE,  the system automatically checks whether an external monitor is connected or not, and adjusts the display settings accordingly. Only KDE (4.9.2 on Kubuntu 12.04.1) does not do that. However, you could argue that that is a different bug from the one reported here, I suppose.
Comment 134 Franky 2012-10-12 17:39:55 UTC
@ Gita Benadi: Yes, ithink your Bug is different from the one reported here, because you want to switch between two Monitorsettings.

I forgot to report, which Distirbution i use: Its Kubuntu 12.04 with actual KDE 4.9.2. But this issue was allways fixed for me before April 2012. Don't know which KDE-Version it was. Maybe KDE 4.7.xx

@ Frans: Seems that  your Post was truncated. I trie to put missing here:
Is this output after reboot, or after you set the Settings in KDE?
>xrandr
>Screen 0: minimum 320 x 200, current 3360 x 1050, maximum 4096 x 4096
>VGA-1 connected 1680x1050+0+0 (normal left inverted right x axis y axis) 474mm x 296mm
 >  1680x1050      60.0*+
>DVI-I-1 connected 1680x1050+1680+0 (normal left inverted right x axis y 
axis) 474mm x 296mm
>   1680x1050      60.0*+

> How do you actually save the "Display Settings in System 
Settings/Display and Monitor/Seize and Orientation after you have 
corrected them.
> What I actually do is: 
>1       Correct the settings
>2       Press the  "Save as default button"
>3       Press the "Apply button"
>4       Press  the "Accept Configuration button in the pop up window"
Yes, i do it in this way. But actually i do not have to do this ;)

You use the KDE-Version 4.7.2 As described in https://bugs.kde.org/show_bug.cgi?id=183143#c87 i used in January the KDE-Version 4.7.97.
Comment 135 Frans Leerink 2012-10-12 21:43:25 UTC
Hello Franky, 
In openSUSE 12.1 the problem is solved as you follow the following steps to save the
corrected settings in System Settings/Display and Monitor/Seize & Orientation:
1       Press the  "Save as default button"
2       Press the "Apply button"
3       Press  the "Accept Configuration button in the pop up window"

After this the xrandr command displayed the following:
Screen 0: minimum 320 x 200, current 3360 x 1050, maximum 4096 x 4096
VGA-1 connected 1680x1050+0+0 (normal left inverted right x axis y axis) 474mm x 296mm
   1680x1050      60.0*+
   1280x1024      75.0     60.0  
   1440x900       75.0     59.9  
   1280x960       60.0  
   1152x864       75.0  
   1024x768       75.1     70.1     60.0  
   832x624        74.6  
   800x600        72.2     75.0     60.3     56.2  
   640x480        72.8     75.0     66.7     60.0  
   720x400        70.1  
DVI-I-1 connected 1680x1050+1680+0 (normal left inverted right x axis y axis) 474mm x 296mm
   1680x1050      60.0*+
   1280x1024      75.0     60.0  
   1440x900       75.0     59.9  
   1280x960       60.0  
   1360x768       60.0  
   1152x864       75.0  
   1024x768       75.1     70.1     60.0  
   832x624        74.6  
   800x600        72.2     75.0     60.3     56.2  
   640x480        72.8     75.0     66.7     60.0  
   720x400        70.1  

In openSUSE 12.2 KDE LiveCD x86-64.iso the situation is different. The corrected Seize & Orientation settings, saved as described above, generate the same xrandr display. However logging out of KDE and logging back in does not use the corrected settings while the xrandr command display is still the same as described above. To correct the situation you have to reexecute the  Seize & Orientation settings and save them as described.

Regards,  Frans
Comment 136 Franky 2012-10-13 09:26:34 UTC
The behavior of a Live-Sessio is maybe different? So i do not know, if the directory /home/user in a Live-Session on logout still exists.
Comment 137 Frans Leerink 2012-10-17 20:51:04 UTC
Hello Franky,

I have now installed openSUSE 12.2 / KDE from the LiveCD x86-64.iso, but unfortunately the display settings are not saved, so the problem still exists in:
OS Information
OS:  Linux 3.4.11-2.16-desktop x86_64
  Current user:  frans@MD8800-openSUSE-12-2
  System:  openSUSE 12.2 (x86_64)
  KDE:  4.8.5 (4.8.5) "release 2"
  Display Info
Vendor:  nVidia Corporation
  Model:  GeForce 6700 XL
  2D driver:  nouveau
  3D driver:  nouveau Gallium (8.0.4)

After correcting the display settings and saving as described earlier, the command xrandr shows the following:
frans@MD8800-openSUSE-12-2:~> xrandr
Screen 0: minimum 320 x 200, current 3360 x 1050, maximum 4096 x 4096
VGA-1 connected 1680x1050+0+0 (normal left inverted right x axis y axis) 474mm x 296mm
   1680x1050      60.0*+
   1280x1024      75.0     60.0  
   1440x900       75.0     59.9  
   1280x960       60.0  
   1152x864       75.0  
   1024x768       75.1     70.1     60.0  
   832x624        74.6  
   800x600        72.2     75.0     60.3     56.2  
   640x480        72.8     75.0     66.7     60.0  
   720x400        70.1  
DVI-I-1 connected 1680x1050+1680+0 (normal left inverted right x axis y axis) 474mm x 296mm
   1680x1050      60.0*+
   1280x1024      75.0     60.0  
   1440x900       75.0     59.9  
   1280x960       60.0  
   1360x768       60.0  
   1152x864       75.0  
   1024x768       75.1     70.1     60.0  
   832x624        74.6  
   800x600        72.2     75.0     60.3     56.2  
   640x480        72.8     75.0     66.7     60.0  
   720x400        70.1  
frans@MD8800-openSUSE-12-2:~> 

I have forgotten to run  xrandr command before I made the display settings but I will do that after I save this additional commend and send it as an additional comment.

Regards, Frans
Comment 138 Frans Leerink 2012-10-17 21:07:53 UTC
Hello Franky,

This is xrandr output before making the correction to the display settings: 
frans@MD8800-openSUSE-12-2:~> xrandr
Screen 0: minimum 320 x 200, current 1680 x 1050, maximum 4096 x 4096
VGA-1 connected 1680x1050+0+0 (normal left inverted right x axis y axis) 474mm x 296mm
   1680x1050      60.0*+
   1280x1024      75.0     60.0  
   1440x900       75.0     59.9  
   1280x960       60.0  
   1152x864       75.0  
   1024x768       75.1     70.1     60.0  
   832x624        74.6  
   800x600        72.2     75.0     60.3     56.2  
   640x480        72.8     75.0     66.7     60.0  
   720x400        70.1  
DVI-I-1 connected 1680x1050+0+0 (normal left inverted right x axis y axis) 474mm x 296mm
   1680x1050      60.0*+
   1280x1024      75.0     60.0  
   1440x900       75.0     59.9  
   1280x960       60.0  
   1360x768       60.0  
   1152x864       75.0  
   1024x768       75.1     70.1     60.0  
   832x624        74.6  
   800x600        72.2     75.0     60.3     56.2  
   640x480        72.8     75.0     66.7     60.0  
   720x400        70.1  
frans@MD8800-openSUSE-12-2:~>

For me the before and after xrandr output are exactly the same so there must be an other reason why they are not picked up.

The problem stayed the same after running the system updates currently available.

Regard,  Frans
Comment 139 Franky 2012-10-18 06:25:20 UTC
(In reply to comment #138)
> This is xrandr output before making the correction to the display settings: 
> frans@MD8800-openSUSE-12-2:~> xrandr
> Screen 0: minimum 320 x 200, current 1680 x 1050, maximum 4096 x 4096
> VGA-1 connected 1680x1050+0+0 (normal left inverted right x axis y axis)
> 474mm x 296mm
> DVI-I-1 connected 1680x1050+0+0 (normal left inverted right x axis y axis)
> 474mm x 296mm
> For me the before and after xrandr output are exactly the same so there must
> be an other reason why they are not picked up.
No, its not the same: Look at the "current"-Resolution for "Screen 0:" Screen defines the Overall-Resolution wich expands over all Monitors.

The next differnce is the third Value of "DVI-1". The Meaning of this Values are:

> DVI-I-1 connected WIDTHxHEIGHT+BEGINNINGfromLEFTof SCREEN+BEGINNINGfromTOPofSCREEN

I don't know, if SUSE or Kubuntu changes some of config-files, because in Kubuntu it works. 

You could adjust the Settings in a Terminal with the Command xrandr. So this is the commandline for my Settings:

> xrandr --output DVI-0 --pos 1680x0 --mode 1680x1050 --refresh 59.8518 --output VGA-0 --pos 0x0 --mode 1680x1050 --refresh 59.8833 --output DVI-0 --primary

As a workaraound you could write a script with the correct xargs commands and place it in the autostartfolder. Or create a file /etc/X11/Xsession.d/45custom_xrandr-settings. If you could understand german, look at the wiki-page http://wiki.ubuntuusers.de/RandR

I am only a user, not a KDE maintainer so i could not say whats wrong.
Comment 140 Franky 2012-10-18 06:29:03 UTC
Sorry, it has to be xrandr commands:

"As a workaraound you could write a script with the correct xrandr commands"
Comment 141 Frans Leerink 2012-10-18 22:02:08 UTC
Hello,

This is to correct my statement in comment 137.

In openSUSE 12.2 / KDE installed from the LiveCD x86-64.iso the display settings are now saved.

I tried to save the corrected display settings in System Settings/Display and Monitor/Seize & Orientation with the following steps: 
1 Set Primary Output to VGA-1
2 Press the "Save as default button" 
3 Press the "Apply button" 
4 Press the "Accept Configuration button in the pop up window"

I just found out that the system saves the display setting if I select by step 1 "None" in stead of "VGA-1" and execute step 2,3 and 4 as described.

Lucky me

Regards,   Frans
Comment 142 Tristan Miller 2012-10-19 08:38:10 UTC
On Friday 19 October 2012, you wrote:
> In openSUSE 12.2 / KDE installed from the LiveCD x86-64.iso the display
> settings are now saved.
> 
> I tried to save the corrected display settings in System
> Settings/Display and Monitor/Seize & Orientation with the following
> steps:
> 1 Set Primary Output to VGA-1
> 2 Press the "Save as default button"
> 3 Press the "Apply button"
> 4 Press the "Accept Configuration button in the pop up window"
> 
> I just found out that the system saves the display setting if I select
> by step 1 "None" in stead of "VGA-1" and execute step 2,3 and 4 as
> described.

Doesn't work for me.  I'm using KDE 4.9.2 on openSUSE 12.2 (x86-64).
Comment 143 jarlgjessing 2012-11-19 15:36:33 UTC
I too experience this on openSUSE 12.2 :-( And it is every time which means I need to configure the screen each time I log in..
And its on KDE 4.9.80 release 2
Comment 144 Compuglobe 2012-12-09 02:53:32 UTC
Hello all! I have a solution to autostart a screen rwsolution;

1.make a autostart laucher opening gedit and adding these codes:

Name=Screen Resolution 
Categories=Application;System 
Comment=Screen Resolution 
Encoding=UTF-8 Exec=xrandr --output VGA1 --mode 1280x1024 --pos 0x0 --rotate normal Hidden=false Terminal=true T
ype=Application 
Version=1.0 
Icon=

2.then save this bach as a Screen-Resolution.desktop 
3.goto user(your name or anyone you user's name have)press ctrl + h simultaniusly to show hidden files
4.goto /User/.config and put the launcher there, then reboot

"Remember you must to be logged as root to copy to that directory!" to do that you can type in Terminal gksudo nautilus and browse directory or you can use the copy command in Terminal.

Good Luck!
Comment 145 Tristan Miller 2013-03-22 13:53:05 UTC
Problem still exists with KDE 4.10.1 (openSUSE 12.3).
Comment 146 Tristan Miller 2013-03-22 13:56:05 UTC
Here's the URL of the openSUSE bug report mentioned in Comment #128: https://bugzilla.novell.com/show_bug.cgi?id=757273
Comment 147 Mathias Dietrich 2013-04-01 09:09:56 UTC
This bugs is finally fixed for me using KScreen.

My dual display config is remembered as soon as i connect my display and without the display it only uses the single display.
Comment 148 bkorb 2013-04-07 14:20:01 UTC
This needs a real fix.
Comment 149 Kevin Kofler 2013-04-07 14:43:01 UTC
The fix is that KScreen will replace kcm_randr in 4.11.

This bug has been in kcm_randr since at least 4.2, so I wouldn't hold my breath for it getting fixed there. :-(
Comment 150 bkorb 2013-04-07 16:51:31 UTC
Nice.  Now, what is KScreen and how do I use it?  I'm afraid I'm just a user who just installed KDE 4.10 with openSuSE 12.3, obliterating the work I had done to make my right-hand screen be to the right of the main screen.  (Long story)  I think I fiddled the /etc/X11/xorg.conf.d files, but my backup (previous/12.2) file system got clobbered.
Comment 151 bkorb 2013-04-07 18:05:03 UTC
Never mind.  I went back to the nvidia driver and it configures it permanently and correctly.  Thanks.
Comment 153 Niklas Andersson 2013-05-16 22:45:26 UTC
Bug still persist as of KDE 4.10 in Fedora 19 pre-beta TC3 17:th of May 2013.
Comment 154 bkorb 2013-05-17 00:22:11 UTC
(In reply to comment #152)
Thank you.  It's sparsity of documentation leads me to believe it is incomplete.
> https://fedoraproject.org/wiki/Features/KScreen
That's the real description of what it is.  Thanks!  The how to use it can wait until it is prime time ready. (If it is not documented pretty fully, then it is not ready yet.)

So the answer is that one must still edit /etc/X11 config files.
Comment 155 Kevin Kofler 2013-05-17 12:31:41 UTC
> Bug still persist as of KDE 4.10 in Fedora 19 pre-beta TC3 17:th of May 2013.

That's not normal. Fedora 19 uses KScreen, which should be saving settings just fine. Please file a new bug against KScreen.
Comment 156 Tristan Miller 2013-09-17 09:23:45 UTC
The problem was still reproducible for me on KDE 4.10.2 through 4.10.5 on openSUSE 12.3. However, yesterday I upgraded to KDE 4.11.1 and now the display settings are (eventually) correctly applied on login.  However, the process is a bit annoying in that immediately after logging in, the display settings are incorrect (that is, the relative position of my two monitors is wrong).  It's only after several seconds (and after several applications already get loaded, and display in the wrong places) that the orientation gets switched to my preferred settings.  So it's still buggy, but much less buggy than before.
Comment 157 Mathias Dietrich 2013-09-17 09:56:03 UTC
@Tristan Miller: Since KDE 4.11, display settings are managed by KScreen instead of kcm_randr. 
If you still have issues with restoring your display settings, please file a new bug report for KScreen, that the KScreen maintainers can fix them.
Comment 158 Christoph Feck 2013-10-02 20:19:43 UTC
*** Bug 325518 has been marked as a duplicate of this bug. ***
Comment 159 JKAbrams 2013-10-19 19:01:20 UTC
https://bugs.kde.org/show_bug.cgi
Finally found a workaround!
* Remove the krandrrc file
cd ~/.kde/share/config/
mv krandrrc krandrrc _bakup
* Comment out nvidia-config resolution lines from /etc/X11/xorg.conf
#    Option         "nvidiaXineramaInfoOrder" "CRT-0"
#    Option         "metamodes" "CRT-0: nvidia-auto-select +0+0, CRT-1: nvidia-auto-select +1680+0"

Reboot, and the autoconfig will configure it in default "one desktop spanning two displays with independant widget sets per screen" -mode.

And stay away from nvidia-config or the kde display-settings panel as it will undo the changes above.
Comment 160 bkorb 2013-10-19 20:04:23 UTC
Congratulations, JK!  Unfortunately, on my Debian system, the /etc/X11 tree has been improved and "xorg.conf" and "xorg.conf.d" have been conveniently melded into a different collection of files.  I don't want to go experimenting as I know what happens when the X configuration gets frummitzed.

Is this really and truly rocket science?  I mean, DANG!  Just how hard *can* it be to leave my frigging configuration alone anyway?  Every single time I boot up, I have to go find "Display and Monitor" in "system settings", change "clone" to be "to the right of" and then confirm that what I want to do every day always is, in fact, what I want to do this time, too.

I am on 4.8.4 and *FOUR* years have passed.  Please, guys.  Fix it.  (And, yes, I understand that my freshly downloaded, new distribution contains a version of KDE so old that you won't maintain it anymore.)
Comment 161 Jekyll Wu 2013-10-19 21:16:08 UTC
This particular ticket probably will only be closed as 'UNMAINTAINED" instead of "FIXED", because this component is unmaintained and kscreen is the new and better replacement.
Comment 162 Dean 2013-10-21 08:36:42 UTC
(In reply to comment #160)
> Congratulations, JK!  Unfortunately, on my Debian system, the /etc/X11 tree
> has been improved and "xorg.conf" and "xorg.conf.d" have been conveniently
> melded into a different collection of files.  I don't want to go
> experimenting as I know what happens when the X configuration gets
> frummitzed.

You can still use the legacy xorg.conf file if desired. The newer separated config files in the /etc/X11/ xorg.conf.d/ directory, essentially represent the corresponding sections in the legacy config file.

> I am on 4.8.4 and *FOUR* years have passed.  Please, guys.  Fix it.  (And,
> yes, I understand that my freshly downloaded, new distribution contains a
> version of KDE so old that you won't maintain it anymore.)

Consider upgrading to 4.11 and you can leave  kcm_randr issues behind. (I'm glad that KScreen has finally been implemented.)
Comment 163 bkorb 2013-10-21 18:17:46 UTC
    $ sudo find /etc/X11 -type d
    /etc/X11
    /etc/X11/Xresources
    /etc/X11/cursors
    /etc/X11/fonts
    /etc/X11/fonts/misc
    /etc/X11/fonts/75dpi
    /etc/X11/fonts/Type1
    /etc/X11/fonts/100dpi
    /etc/X11/app-defaults
    /etc/X11/Xreset.d
    /etc/X11/xinit
    /etc/X11/xkb
    /etc/X11/Xsession.d

I was able to cope with the xorg.conf -> xorg.conf.d change a couple of years ago.  There are 103 files in that tree.

Anyway, "Consider upgrading to 4.11".  Aren't the odd numbered minor releases experimental?  I have enough problems just using the "stable releases".  These problems don't exactly encourage me to go traipsing down the experimental installation path all on my own.  Instead, can I encourage a stable 4.12 release sooner rather than later?  Then I can grab a distro that uses it and install that.  Then I only have to download all the apps that are not default and reconfigure my system again.  Please forgive me for being so crotchety.  This stuff gets old.
Comment 164 Dean 2013-10-22 01:19:00 UTC
(In reply to comment #163)

> I was able to cope with the xorg.conf -> xorg.conf.d change a couple of
> years ago.  There are 103 files in that tree.

You're mistaken. The config files are in /etc/X11/xorg.conf.d (only a handful).

> Anyway, "Consider upgrading to 4.11".  Aren't the odd numbered minor
> releases experimental?

No, not the case at all. KDE 4.11 is current stable release:

http://www.kde.org/announcements/4.11/
Comment 165 Kevin Kofler 2013-10-24 17:29:35 UTC
Closing this bug. PLEASE KEEP IT CLOSED! This is fixed in 4.11 by the switch to KScreen. (I close it as "fixed in 4.11.0" rather than "unmaintained" so that it shows up in the list of fixed bugs in 4.11.0.) If you are still seeing related issues WITH 4.11.0 OR NEWER, please file a new bug against KScreen. If you are still using kde-workspace 4.10.x or older, YOUR ANCIENT KDE WORKSPACE IS NOT SUPPORTED ANYMORE, bugs will not and cannot be fixed in it.
Comment 166 JKAbrams 2013-11-17 21:43:12 UTC
Here's the related bug in Kscreen: https://bugs.kde.org/show_bug.cgi?id=325277
Comment 167 JKAbrams 2013-11-17 22:32:51 UTC
(In reply to comment #166)
> Here's the related bug in Kscreen:
> https://bugs.kde.org/show_bug.cgi?id=325277

After spending heaps of time on this thing I finally realized I didn't have Kscreen installed in KDE 4.11.3 (it's not installed by default in the Arch Linux KDE-packages), actually installing the package solved the problem for good! Looks like KDE is falling back to the old way of doing things if kscreen is not installed...
Comment 168 George R. Goffe 2013-11-18 06:42:49 UTC
Fedora 19 x86_64:

I have experienced a similar problem where switching from a quasi dual display mode to single display causes the desktop manager to loose it's mind. I see that it's suggested that kscreen resolves this problem but my system DOES have kscreen installed and I still have the problem.

George...