2

I'm running Kubuntu 10.04 x64 on a Lenovo ThinkPad R500, with an external monitor attached.

If I configure extended desktop, everything works fine. The settings look like this:

extended desktop OK

After a reboot, these settings are reset and both screens are mirrored. The settings look like this:

extended desktop broken

I had my extended desktop working just fine under Ubuntu/GNOME, so I'm assuming there's something different about how KDE handles this config, I just can't seem to find the answer.

Does anyone know how to get my configuration to stick?

3 Answers 3

3
+200

You can try a script using RandR, described here and here.

Example:

xrandr -q # identify the screen names: LVDS for laptop screen, VGA-0 for external monitor
xrandr --output VGA-0 --pos 1024x0 # to move the VGA screen 1024 pixels to the right.

You will also need to tweak the xorg.conf file, adding to the Screen section a Virtual definition, where the width is the maximum width of the displays added together, by the height of the biggest height.

EDIT

See thinkwiki.org for more info on xrandr.
The section "Now automate it on login" is probably the one that interests you the most.
The section "GUIs" lists GUI front-ends for xrandr.

7
  • I'm trying to figure out how it's done in regular Ubuntu/GNOME, because it works just fine there. I use my laptop with and without the external screen all the time, and I'd prefer something that just magically works. Jul 13, 2010 at 7:09
  • @Graeme Donaldson: See my edit.
    – harrymc
    Jul 13, 2010 at 8:08
  • You can add your xandr configuration call to the kdm startup file.
    – txwikinger
    Jul 13, 2010 at 16:20
  • @harrymc: Here you go
    – txwikinger
    Jul 13, 2010 at 16:21
  • Thanks, but this isn't much better. It takes me about 30 seconds every day to get my dual screen config the way I want it. I'd rather keep doing that than spend countless hours trying to figure out convoluted instructions like that wiki page. Jul 15, 2010 at 12:47
1

I replaced my xorg.conf with xrandr in /etc/gdm/Init/Default. For KDM this change can be done in /etc/kde4/kdm/Xsetup. See the Ubuntu Wiki and also the Debian Wiki. These also provide examples on resolving the problem using xorg.conf.

I added the following code to run only on my main display . (I also have a number of vncserver configurations.)

if [ -x "/etc/gdm/Init/xrandr${DISPLAY}" ];
then
        /etc/gdm/Init/xrandr${DISPLAY}
fi

My /etc/gdm/Init/xrandr:0 configuration file is:

#!/bin/bash
xrandr --newmode 1280x1024    108.00  1280 1376 1488 1800   960  961  964 1000 +hsync +vsync
xrandr --addmode VGA-0        1280x1024
xrandr --output  VGA-0 --mode 1280x102
# EOF

You will need to set the frame buffer size with the --fb option to a size large enough for both screens. Check the end of the man page for xrandr. From your example you may be able to get away with a line like:

xrandr --fb 2560x1024 --output LVDS1-o --auto --output VGA1-0 --auto --right-of LVDS1-0

Verify with xrandr that the modes are available.

0

You will need to manually configure a /etc/X11/xorg.conf file. It is now being generated on the fly. Your old file may work, but you will likely need to strip out most of the non-monitor related stuff.

7
  • This was a fresh install, I haven't got an old file. Any pointers for what I should put in it? Jun 8, 2010 at 7:39
  • You will need the sections: Monitor, Screen, and ServerLayout. Try 'Xorg -configure' and strip out the non-display components. Check the contents of /var/log/Xorg.0.log to see what is being configured.
    – BillThor
    Jun 8, 2010 at 19:22
  • Will have to try that when I'm at work on Monday. Right now I'm at home and I don't have an external display. Jun 12, 2010 at 19:26
  • I had stop stop kdm first, else "Xorg -configure" complains that the server is already running. My xorg.conf.new file is here: dl.dropbox.com/u/279025/xorg.conf.new, but the screen/monitor section seems very plain. Jun 29, 2010 at 7:40
  • I expect the output from configure will be fairly plain. You will likely have to read the documentation on the configuration file to add the second monitor and specify its location.
    – BillThor
    Jun 29, 2010 at 23:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .