Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
xrandr: changing one output resolution with dual screen?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
VinzC
Advocate
Advocate


Joined: 17 Apr 2004
Posts: 4782
Location: Dark side of the mood

PostPosted: Tue Jan 12, 2010 9:15 am    Post subject: xrandr: changing one output resolution with dual screen? Reply with quote

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...
GNU/Linux user #369763
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3431
Location: Hamburg

PostPosted: Tue Jan 12, 2010 9:45 am    Post subject: Reply with quote

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
View user's profile Send private message
VinzC
Advocate
Advocate


Joined: 17 Apr 2004
Posts: 4782
Location: Dark side of the mood

PostPosted: Tue Jan 12, 2010 10:45 am    Post subject: Reply with quote

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...
GNU/Linux user #369763
Back to top
View user's profile Send private message
VinzC
Advocate
Advocate


Joined: 17 Apr 2004
Posts: 4782
Location: Dark side of the mood

PostPosted: Wed Jan 13, 2010 7:51 am    Post subject: Reply with quote

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...
GNU/Linux user #369763
Back to top
View user's profile Send private message
gohmdoree
Guru
Guru


Joined: 12 Oct 2004
Posts: 533

PostPosted: Wed Feb 10, 2010 10:34 pm    Post subject: Reply with quote

Found this http://wiki.debian.org/XStrikeForce/HowToRandR12 looking for similar topics. If you care for more info.
Back to top
View user's profile Send private message
VinzC
Advocate
Advocate


Joined: 17 Apr 2004
Posts: 4782
Location: Dark side of the mood

PostPosted: Thu Feb 11, 2010 11:14 pm    Post subject: Reply with quote

Good to know, thanks.
_________________
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
GNU/Linux user #369763
Back to top
View user's profile Send private message
gohmdoree
Guru
Guru


Joined: 12 Oct 2004
Posts: 533

PostPosted: Thu Feb 11, 2010 11:46 pm    Post subject: Reply with quote

vinzc, did you make your xrandr options permanent by adding to your xorg.conf? or do you still do it manually?
Back to top
View user's profile Send private message
VinzC
Advocate
Advocate


Joined: 17 Apr 2004
Posts: 4782
Location: Dark side of the mood

PostPosted: Sun Feb 14, 2010 10:52 am    Post subject: Reply with quote

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...
GNU/Linux user #369763
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum