View previous topic :: View next topic |
Author |
Message |
VinzC Watchman
Joined: 17 Apr 2004 Posts: 5098 Location: Dark side of the mood
|
Posted: Tue Jan 12, 2010 9:15 am Post subject: xrandr: changing one output resolution with dual screen? |
|
|
Hi all.
My laptop has a display panel 1920x1080 and an ATI Radeon HD3670. I am using xf86-video-ati. When X starts and a second monitor is connected to either HDMI or VGA, the external monitor indeed extends the desktop to the right but the laptop's panel always takes the same resolution as the external monitor, despite the Virtual clause in xorg.conf -- so far external monitors I've used were all 1680x1050. OTOH when no external monitor is connected X starts at the panel's native resolution, that's fine.
Here are the related sections in my xorg configuration file.
Code: | Section "ServerLayout"
Identifier "Simple Layout"
Screen "Screen[ati]"
EndSection
Section "Monitor"
Identifier "LVDS"
Option "DPMS" "On"
EndSection
Section "Monitor"
Identifier "HDMI" # Or VGA, SVID,... whatever!
Option "RightOf" "LVDS"
Option "DPMS" "On"
EndSection
Section "Device"
Identifier "ati-HD3670"
Driver "ati"
BoardName "Radeon Mobility X1400"
Option "PanelSize" "1920x1080"
Option "DynamicClocks" "On"
Option "AccelMethod" "EXA"
Option "AccelDFS" "On"
Option "EnablePageFlip" "On"
Option "monitor-HDMI-0" "HDMI"
Option "monitor-LVDS" "LVDS"
EndSection
Section "Screen"
Identifier "Screen[ati]"
Device "ati-HD3670"
DefaultDepth 24
SubSection "Display"
Virtual 3600 1080
Depth 24
EndSubSection
EndSection |
So far I always run the following command to have both the panel and the external monitor at their native resolution:
Code: | xrandr -s 1920x1080; sleep 3s; xrandr --auto; sleep 3s; xrandr --output HDMI-0 --right-of LVDS |
What the command does is force the panel resolution but in the meantime it disconnects the external screen. Next xrandr --auto switches to clone mode and then (and only then) I can extend the desktop with the external screen to the right.
Is there a trick to switch only the panel to its native resolution and keep the external monitor instead of using an intermediate state (clone)?
Thanks in advance for any hint/suggestion. _________________ Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739! |
|
Back to top |
|
|
toralf Developer
Joined: 01 Feb 2004 Posts: 3922 Location: Hamburg
|
Posted: Tue Jan 12, 2010 9:45 am Post subject: |
|
|
With this scriptlet Code: | INT=$(xrandr | grep ^LVDS | cut -f1 -d' ')
EXT=$(xrandr | grep -v ^LVDS | grep ' connected' | cut -f1 -d' ')
case $EXT in
VGA*)
xrandr --output $INT --auto --output $EXT --above $INT --auto
;;
HDMI-2|DVI2)
xrandr --output $INT --off --output $EXT --auto
sleep 1
;;
HDMI2)
xrandr --output $INT --off --output $EXT --auto
sleep 1
;;
*) logger "$0: INT=$INT EXT=$EXT ?!?"
exit 1
;;
esac
| I manage my environment (laptop with 1440x900, external either VGA with 1280x1024 or DVI port with 1680x1050). This works with an intel card and current vanilla kernel (2.6.31.10 and 2.6.32.3, KMS, i915), x11-base/xorg-server-1.6.5-r1, x11-drivers/xf86-video-intel-2.9.1 and without a xorg.conf. |
|
Back to top |
|
|
VinzC Watchman
Joined: 17 Apr 2004 Posts: 5098 Location: Dark side of the mood
|
Posted: Tue Jan 12, 2010 10:45 am Post subject: |
|
|
Thanks a lot. I didn't know --auto could apply to outputs as well. I'll try xrandr --output LVDS --auto --output HDMI-0 --right-of LVDS --auto and report here. _________________ Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739! |
|
Back to top |
|
|
VinzC Watchman
Joined: 17 Apr 2004 Posts: 5098 Location: Dark side of the mood
|
Posted: Wed Jan 13, 2010 7:51 am Post subject: |
|
|
Code: | xrandr --output LVDS --auto --output HDMI-0 --right-of LVDS --auto |
That worked! One instruction instead of three. Thanks, man! _________________ Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739! |
|
Back to top |
|
|
gohmdoree Guru
Joined: 12 Oct 2004 Posts: 533
|
|
Back to top |
|
|
VinzC Watchman
Joined: 17 Apr 2004 Posts: 5098 Location: Dark side of the mood
|
Posted: Thu Feb 11, 2010 11:14 pm Post subject: |
|
|
Good to know, thanks. _________________ Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739! |
|
Back to top |
|
|
gohmdoree Guru
Joined: 12 Oct 2004 Posts: 533
|
Posted: Thu Feb 11, 2010 11:46 pm Post subject: |
|
|
vinzc, did you make your xrandr options permanent by adding to your xorg.conf? or do you still do it manually? |
|
Back to top |
|
|
VinzC Watchman
Joined: 17 Apr 2004 Posts: 5098 Location: Dark side of the mood
|
Posted: Sun Feb 14, 2010 10:52 am Post subject: |
|
|
gohmdoree wrote: | vinzc, did you make your xrandr options permanent by adding to your xorg.conf? or do you still do it manually? |
I'm planning to not use xorg.conf anymore -- but I have to use the latest xf86-video-ati driver, which is not stable enough for me yet. I still have one but I'm typing the command everytime Xorg doesn't use full resolution on both my laptop and/or the external monitor.
Currently Xorg always extends my desktop to the right whenever an external monitor is present. However, when the external monitor's resolution is lower than my laptop's, the latter is set to the same resolution as the former. In that case I run the command manually. _________________ Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739! |
|
Back to top |
|
|
|