Automatic recognition of external monitor at startup

Hello alle,

I work on my laptop and use it both at the office and at home. Both of my desks have external monitors. Sometimes, however, I work in the train or in other places and then I use my laptop’s built in monitor. Mainly I work with external monitors though.

On my current system (OpenSUSE 11.3 64-bit KDE) I have to set my monitor resolution every time I startup my system. I know that in Ubuntu the system’s able to recognize e.g. when another monitor is connected and the laptop is closed, so that the screen is shown on the external monitor with its optimal resolution. Is there a way to do that in OpenSUSE?
I thought about trying to make a startup script that always sets up the resolution of my external monitors, but that wouldn’t be too great of an idea because I don’t always work with them and their resolution is higher than my laptop’s, meaning that (I assume) I’d have problems if I started up without being connected to a monitor.

Thanks!
Daniel

Hi,

What is you graphic card? If you have a nvidia card, I think it is possible to set this through the nvidia config applet, but I am not sure.

I’ve got an Intel laptop, I think that means I’ve got no graphic card and that everything runs on the processor.

Hardware info has under “Display → Model”: Intel Arrandale Integrated Graphics Controller"

Does anybody else have any ideas? I’d try the nvidia applet, but I don’t have an nvidia card so it doesn’t make much sense.

I’m slightly puzzled by your question because, at least since 11.3, whenever I attach to a projector, KDE4 automatically adjusts the screen resolution - normally stretching the screen on my laptop - so that the picture fills both the projector screen and my laptop screen, albeit the latter with some slight distortion. The only problem I have when I disconnect is that the panel has been shortened to match the projector and, unlike everything else on the desktop, does not resume its normal size. So I have to adjust it manually. I would have thought this would apply to any external monitor. (I also have Intel graphics).

Hmm… Mine doesn’t do that. My resolution is set to 1024x768 on both screens, which is a huge distortion on both of them. Which would be an alright resolution for most projectors, but not for my widescreen monitors. The screen is only automatically recognized and used if I already have the VGA cable connected at boot time.
Oh - that’s probably also relevant, I’m using an analog video output. Don’t have a digital or HDMI port.

Another problem is that both of my monitors have different resolutions - at home and at work - so that the appropriate resolution really needs to be set manually each time - I can’t just script it to start at the correct resolution every time, because depending on whether I’m using my laptop without a monitor, using the work monitor or the home monitor, it’s always different.

Maybe it’s got to do with KDE? Ubuntu recognizes the external monitors and sets the right resolution automatically. It also recognizes that I only want to use the external monitor if I leave my laptop closed.

Hi,

I am using KDE too, maybe it is related. I’ll test with my other laptop, it has GNOME…

Anyway, I have the same symptoms as erget with HDMI connection. It doesn’t adjust the resolution when I ouptut it on my TV for example.

I stumble on this link, maybe it could help. I didn’t try it and I didn’t read it that much, so bare with me, it is a suggestion : Linux Tipps & More: Automatically switch to connected External Display on Boot with XRandR :slight_smile: I don’t know if this tiop will adjust resolution though…

Flying a kite here - I have never attempted to define the second monitor resolution because I connect to different projectors at different locations. Does defining the second monitor resolution shut out the automatic configuration that I am experiencing?

Well, I am not sure to undersyand what you mean here???

Erget said he had to set the resolution every time; I was wondering whether, even though that isn’t picked up properly, setting a resolution results in the values being stored somewhere which then inhibits the automatic adjustment which I am experiencing. He also said that he got the same resolution on both screens resulting in distortion on both. I don’t; I get distortion only on the widescreen because the narrower projector screen is stretched to fill the widescreen but, after the projector is disconnected, the screen reverts to normal resolution at the next login.

So I was wondering whether I am having a different experience because I have never tried to set any values at any time but simply accepted what KWin (presumably) was offering.

Hmm, I guess I must have accidentally deleted one of the notifications that there’d been a reply; I’d assumed that there was nothing new on this thread over the weekend.

I checked out the link that DaaX had sent and it didn’t directly help, but got me on track to using xrandr. That’s apparently X Server’s way of modifying displays without restarting. You can read what displays are plugged in, set them, rotate them, etc. I experimented with the command a little bit and ended up settling for this one as a line in my startup script:

xrandr --output VGA1 --preferred

This tells xrandr to set the preferred resolution and refresh rate for the output VGA1, so that the VGA monitor gets the optimal settings. The script runs when I log on, so that after a few seconds the monitor sets itself to the optimal settings. If no monitor’s attached, everything stays normal.

Thanks for the ideas! I hope this helps others that might be looking for the same solutions.

Hi erget,

I’m glad it helped. :slight_smile:

This has been a problem for me too since openSUSE dropped SAX to configure monitors which created a xorg.conf file. I too have an Intel laptop with oS11.3 and it always just used the laptops resolution (1024x768) on the external screen (which should be 1280x1024) when I docked it. Even after setting the display correctly on the external screen, if then opened the laptop I’d have the 1280x1024 resolution on the laptop screen and would have to “pan and scan” around the screen. This didn’t happen oS11.1 when it used xorg.conf.

The only way around it for me was to create a xorg.conf file which sort of defeats the auto configuration that supposed to be happening. Clearly the auto configuration doesn’t work properly, at least on my (and yours) Intel platforms.

This is not really the answer as it’s using a method now obsolete but it works but you can look at this post of mine from another similar thread where I pasted the contents of a xorg.conf file produced by sax in oS11.2. You can use it as a template to create one for your set up to experiment with. Add as many additional monitors as you need. You can always just delete it if you don’t want to use it.