Laptop External Monitor Support

I’m looking for suggestions on using openSUSE on my laptop. I work in an office and use an external monitor and my laptop screen 90% of the time. Usually about 3 - 4 times a day I have to take my laptop to go to a meeting. So, I unplug the monitor and off I go.

With linux, my system does not recognize that I have unplugged this extra monitor. The results are that anything I had on that extra monitor stay on that extra monitor, even though it’s not there. Plus, I can mouse to the left and be controlling dead space.

Is there anyway to get linux to auto-detect that I have unplugged my external monitor and move all windows back to the laptop screen?

BTW, I have NVIDIA GeForce 9400M.

Thanks!

If you don’t mind a simple manual approach, then consider using xrandr. I guess you could create a simple script with the required xrandr command. Then make that exectuable, and link it to an icon, so that clicking on it, executes it.

To get a list of display devices

xrandr -q

Based on the external display name (VGA for example), it should be able to issue a command like

xrandr --output VGA --off

This reference may be useful to you.

Further to the link you provided, I stumbled across an old year 2007 explanation of this: XRandR – finally, simple monitor configuration for Linux « Adrian’s Thoughts

Back in 2007, only the open source Intel, Radeon, and nv drivers supported XRandR-1.2; neither the ATI nor the nVidia proproprietary drivers supported. Its now two years later and I’m curious as to its state. Do the proprietary drivers now support it?

3 months ago I did with with dual-head mode under sax2, which I made a note of here: Using external display and slide projector - openSUSE Forums

I have two days of meetings coming up in 5 weeks, with lots of presentations and myself having to coordinate/support most of it. Hence I’m keen to find out fairly soon as to the best approach for me to adopt. I’ll probably have to take the laptop into work next week, and start playing around with a projector with it.

I like the xrandr approach, and I’m curious to see if it works with the proprietary fglrx driver.

Back in 2007, only the open source Intel, Radeon, and nv drivers supported XRandR-1.2; neither the ATI nor the nVidia proproprietary drivers supported. Its now two years later and I’m curious as to its state. Do the proprietary drivers now support it?

I’m no expert with xrandr, but I’m using the fglrx driver (with X300) chipset, and can change resolution on the fly with it, and it correctly reports various settings etc. I haven’t tried dual monitor configuration with it, but I don’t see why it wouldn’t work.

With your ATI X300, do you use xrandr to change resolution on the fly? Do you use aticonfig ? What ATI proprietary driver are you using? The ATI Catalyst™ 9.3 Proprietary Linux x86 Display Driver (as it is a legacy driver) ?

For my Radeon HD3450 in my Dell Studio 1537 laptop, I believe I currently have the ATI Catalyst™ 9.10 Proprietary Linux x86 Display Driver (released 22-Oct-2009) installed.

Away from my laptop at the moment, but will report back later. :slight_smile:

I’m fairly optimistic this driving an external monitor (a project in my case) will work well with this ATI Catalyst™ 9.10 Proprietary Linux x86 Display Driver .

The projector(s) are at work, so I need to take my laptop into the office. But I just typed “xrandr -q” and I obtained:

oldcpu@dell:~> xrandr -q
Screen 0: minimum 320 x 200, current 1440 x 900, maximum 1440 x 1440
LCD connected 1440x900+0+0 (normal left inverted right x axis y axis) 331mm x 207mm
   1440x900       60.0*+
   1152x864       60.0 +
   1280x768       60.0 +
   1280x720       60.0 +
   1024x768       60.0 +
   800x600        60.0 +
   720x480        60.0 +
   640x480        60.0 +
   640x400        60.0 +
   512x384        60.0 +
   400x300        60.0 +
   320x240        60.0 +
   320x200        60.0 +
DFP_EXTTMDS disconnected (normal left inverted right x axis y axis)
CRT1 disconnected (normal left inverted right x axis y axis)

and I also typed “aticonfig --query-monitor”:

oldcpu@dell:~> aticonfig --query-monitor                                              
Error: option --query-monitor is not supported when RandR 1.2 is enabled! 

which suggests to me on my 64-bit openSUSE-11.1 with KDE-4.3.2 that the /etc/X11/xorg.conf file that I have (which was created by sax2) is setup to use xrandr with this proprietary driver.

I’m hoping later this week, when I take the laptop to the office, that I can plug in the projector’s VGA cable to the laptop, type:
**xrandr -q **
to confirm the VGA input of the projector is observed on “CRT1”, and then hopefully only have to type:
xrandr --output CRT1 --autoto enable the external output to the projector and
xrandr --output CRT1 --off
just before I remove the VGA connector to the external projector.

Interested to see what results you get with xrandr oldcpu. You are clearly using newer hardware and drivers.

With your ATI X300, do you use xrandr to change resolution on the fly?

I can do this ok, but thats about it. My laptop has an analog vga port. I note that my display devices are not uniquely reported with xrandr. Strangely, if I do ‘xrandr -q’ the external VGA device modes get added to my laptop display modes.

The driver packages (openSUSE 11.0) are

ati-fglrxG01-kmp-pae-8.593_2.6.25.20_0.5.1-14.1
x11-video-fglrxG01-8.593-14.1

Anyway, I have been using the Catalyst Control Centre (launched via ‘amdcccle’ command) to configure the second display. With this, my external display can be setup dynamically as a clone (default) or as part of a ‘Big Desktop’. (BTW, I’m using KDE4, and it seems to work ok with these configurations).

I may get the chance later today, as there is a very brief period this afternoon where the conference room (with the projector I wish to test against) will be available.

I’m thinking the openSUSE wiki on ATI graphic hardware is in need of a major update to reflect the changes that have been made in openSUSE-11.2. Specifically:

  • xorg is moving away from requiring an /etc/X11/xorg.conf file. In fact in 11.2, for many PCs graphic hardware, that xorg.conf file is not needed. I believe words to that effect are needed in the wiki …
  • references to sax2 need to be reconsidered. Is the /etc/X11/xorg.conf file that is created by sax2 to be preferred over the /etc/X11/xorg.conf file that can be created by the program aticonfig ? SuSE-GmbH made the decision NOT to include sax2 in YaST (although it is available via menu) which suggests they are moving away from sax2
  • an update for nVidia, ATI and Intel graphic hardware (and possibly some others) describing how to drive multiple monitors is needed, especially given the latest changes to openSUSE and to the openGL and proprietary drivers, needs to be created. For example, your post above was the first reference I had noted to amdcccle being a GUI program that allows detailed configuration over the ATI driver’s controls. Surfing indicated “amdcccle” was indeed used by many - I especially obtained many hits by Ubuntu users struggling with it. I also note xrandr can be used in some cases, and the demarkation between the two (xrandr vs amdcccle) is very fuzzy to me.

Some old wiki, needing updating as of openSUSE-11.2:

I agree with you oldcpu.

references to sax2 need to be reconsidered. Is the /etc/X11/xorg.conf file that is created by sax2 to be preferred over the /etc/X11/xorg.conf file that can be created by the program aticonfig ? SuSE-GmbH made the decision NOT to include sax2 in YaST (although it is available via menu) which suggests they are moving away from sax2

Yes, with the move towards automatic detection of hardware and X-server configuration, it looks like they are deprecating (or discouraging) the use of sax2. I guess it makes sense that where manual configuration is necessary. and proprietary drivers are used, then they are probably best configured with proprietary tools such as ‘aticonfig’ and ‘amdcccle’, but I wish the documentation was updated to cater for these changes.

I tested the capability to drive an external monitor from my Dell Studio 1537 as we dicussed, and it was SIGNIFICANTLY easier and SIGNIFICANTLY more configurable than I anticipated. In summary, all I did was connect the vga cable, type “xrandr -q” and everything else was GUI controlled. Too simple!

Some more detail:

To refresh, my laptop is a 1 year old Dell Studio 1537 with a P8400 processor and 4GB of RAM. The laptop is running 64-bit openSUSE-11.1 with KDE-4.3.2. The laptop’s Graphics hardware is an ATI Radeon 3450HD. I have the latest proprietary ATI Catalyst™ 9.10 Proprietary Linux x86 Display Driver (released 22-Oct-2009) installed.

I installed this proprietary driver “the hardway” ATI/The Hard Way - openSUSE according to the openSUSE wiki web site, when in fact, the hardway is NOT hard once one knows how. The laptop has the special effects (cube rotation, transparencies, etc … ) with this proprietary driver. It retained these effects when projecting to an external monitor.

I was not able to test in the conference room I intended, so I went to a different conference room, testing with a different projector. The projector was a Texas Instrument “In Focus” projector.

With KDE-4.3.2 running, I plugged in the external cable from the projector. There was no response, as expected. I then typed “xrandr -q” and immediately I obtained this popup and I selected "configure):
http://thumbnails25.imagebam.com/5550/9db5e755496868.gif](http://www.imagebam.com/image/9db5e755496868)

The CRT1(Connected) size was “disabled”, and I then selected “1440x900 (Auto)”.
http://thumbnails19.imagebam.com/5550/42055655496871.gif](http://www.imagebam.com/image/42055655496871)

It offered me the CRT1 screen above the LCD screen:
http://thumbnails12.imagebam.com/5550/4f243555496873.gif](http://www.imagebam.com/image/4f243555496873)

and it offered me various rotations
http://thumbnails12.imagebam.com/5550/bd249055496875.gif](http://www.imagebam.com/image/bd249055496875)

… continued …

… continued from above post …

I selected “clone of” and “No Rotation”
http://thumbnails24.imagebam.com/5550/af5ea955496878.gif](http://www.imagebam.com/image/af5ea955496878)

There is a “power control” tab that I ignored. My experience is KDE4 is still buggy for Power Control and I’ve read of lockups, and I did not want to risk that.
http://thumbnails25.imagebam.com/5550/a16f9155496880.gif](http://www.imagebam.com/image/a16f9155496880)

I then selected “Apply” and obtained this menu:
http://thumbnails20.imagebam.com/5550/30eb8155496883.gif](http://www.imagebam.com/image/30eb8155496883)

… and that was it. The projector projected wonderful picture on the wall, of the proper resolution, identical to that on my Laptop’s LCD screen.

I tested unplugging the VGA and replugging a number of times. Each time I replugged the video immediately went to the projector. This is an essential feature for meetings, where projector’s VGA cables are often switched constantly between different user’s laptops.

When it came time to finally stop, I typed:

xrandr --output CRT1 --off

which stopped projecting the video to the projector.

Out of curiousity I also typed

xrandr --output CRT1 --auto 

and immediately the video from my laptop was properly projected to the monitor.

I tried that a few times (sending “–off”, followed by “–auto” ), confirming it was repeatable.

I’m impressed. I do not know anything about the capabilities of MS-Windows here, but I have seen users with both Vista and WinXP hot plug an external monitor, and the choices/flexbility I have here surpasses what those Vista/WinXP users showed me. Thats not to say this KDE4 menu system is better, but rather it is to say that what I saw today surpassed what was shown me in the past on WinXP/Vista.

Nice result oldcpu. :slight_smile: Its great when things like this just work, and good that xrandr works completely as one would hope.

With openSUSE 11, KDE 4.2.4, and an older version of the Catalyst driver (from ATI repo), I can get clone of laptop display, only by restarting the X-server, after plugging in the display, or by using the ‘amdcccle’ GUI. Although, I get a choice of resolutions, the native resolution of the (Acer) LCD is not available, unless I configure it via ‘aticonfig’ (xorg.conf configuration tool) first. However, this is not dynamic configuration that we’re interested in.

As far, as xrandr goes, I can query and/or set the available modes of the laptop display, and if the external display is connected, some of its modes are also reported in the same list - not as a separate display.

So there has definitely been an improvement.

Interesting. It reads like you do not get all the pop up dialog boxes that I get.

It does read there has been a substantial improvement.

I’m asking myself if I should copy and paste my posts from above and put them into a How To. …

… but it would be nice, for such a How To thread, to be able to add something similar with the latest KDE and the latest nVidia proprietary driver, and the latest gnome and the latest ATI/nVidia proprietary drivers.

… possibly also the same for Intel.

Only then would such a HowTo be complete.

Interesting. It reads like you do not get all the pop up dialog boxes that I get.

Thats correct. I’m guessing X-server + KDE desktop version are the key to the ‘intelligent’ behaviour here.

Yes, we now need others to replicate what you have tested with nVidia and Intel grapgics hardware, using

  1. openSUSE 11.1 and KDE 4.3 desktop environment.

  2. openSUSE 11.1 and Gnome desktop environment.

It will also be good to test with openSUSE 11.2 as well. Anyone else able to contribute here?

Turns out I was correct in that there are other out of date wiki … here is another: GNOME/Multiscreen - openSUSE where updating is needed.

Hello all. I have a Sony VAIO laptop with MESA DRI Intel 945GM 20080716 x86/MMX/SSE2, and the driver on 11.1 is 1.4 Mesa 7.2.

I have an external monitor Viewsonic vx2033wm that is supposed to run 1600x900. In YAST I could not increase the display size higher than 1280x800. I went into system/harware, enabled dual monitor mode and entered the information for the external monitor.

After rebooting, no change.

Am I doing something wrong here?

Have a look at one of the links that oldcpu listed ac ouple of posts ago. In particular, the xrandr one may be helpful for dynamic configuration. With your external monitor connected, see what ‘xrandr’ reports.

User deano_ferrari and I have different hardware, but we are trying to figure out how this is done for different hardware, different drivers, and different desktops. Ideally, if we can get enough information, we could create a good guide for users.

Are you a Gnome or a KDE user? If KDE, what version of KDE ?

It does appear that with KDE4 and possibly most graphic drivers/hardware, the command “xrandr -q” may provide some information.

Try typing “xrandr -q” without any external monitor plugged in, and then type “xrandr -q” with a monitor plugged in. Look at the differences, … then per deano_ferrari’s suggestion, look at the link on xrandr and see if you can configure the external monitor for a higher resolution. On KDE-4.3.2 with the proprietary ATI driver, I get a nice gui after typing ‘xrandr -q’ with external monitor plugged in, but I do not know what you will get with Intel graphics and an unknown desktop software.

Auto detect - well, not quite. But I (11.2 - gnome) had the same problem and installed lxrandr (there’s a one-click-install on Software.openSUSE.org). Great little tool, works like a charm.