I'm running Kubuntu 12.10. I have a nVidia GT-430 video card with a large 27" 2560x1550 monitor hooked up with dual-link DVI and a smaller 21" 1920x1080 monitor hooked up with HDMI. Before I log on, the login manager appears to be using both monitors separately (the list of userids is spread across both monitors), but as soon as I log in, it makes them clones of each other. I have to go in and change the "Position" of the smaller monitor from "Clone of" to "Left of". It doesn't matter whether I click "Save as Default" or not, I still have to reset it every time.

I look in .kde/share/config/startupconfig and I see what looks like the right commands:

# krandrrc Display ApplyOnStartup false
# krandrrc Display StartupCommands ''
krandrrc_display_startupcommands='xrandr --output DVI-I-1 --pos 1920x0 --mode 2560x1440 --refresh 59.9506
xrandr --output HDMI-0 --pos 0x0 --mode 1920x1080 --refresh 60
xrandr --output DVI-I-1 --primary'
# krandrrc [Screen0]
# krandrrc [Screen1]
# krandrrc [Screen2]
# krandrrc [Screen3]

Note the --pos 1920x0 for DVI-I-1, which is correct. Similarly, .kde/share/config/krandrrc also appears to have the correct offset of the big screen to put it to the right of the small screen:

StartupCommands=xrandr --output DVI-I-1 --pos 1920x0 --mode 2560x1440 --refresh 59.9506\nxrandr --output HDMI-0 --pos 0x0 --mode 1920x1080 --refresh 60\nxrandr --output DVI-I-1 --primary





How can I get this working the way it's supposed to? I'd like to get this working because in a month or two I'm going to buy a second GT-430 and a second 27" monitor, and I'd like to have this all working.


Not a perfect solution by any means, but I seem to have a work-around - I brought up the nvidia-settings program, and clicked on "X Server Display Configuration", made sure it was showing the layout I wanted, and clicked "Save to X Configuration File", and saved it to /etc/X11/xorg.conf.

Credit to http://www.muktware.com/articles/3081/how-set-dual-monitor-kde-nvidia-settings#.UPBmByZQAx4


This is my workaround.

nano ~/.kde4/Autostart/setupscreens.sh

fill with the following code

foo=$(sed '3q;d' $HOME/.kde4/share/config/krandrrc)


save (ctrl-o) and exit (ctrl-x)

now make it executable

chmod +x ~/.kde4/Autostart/setupscreens.sh

What it does is run the xrandr command generated by the system settings GUI when you setup your screen. I have no idea why for many this is not properly executed on login but for me this was a simple fix that works if I change my setup in the future using the system settings.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.