114b9 xrandr on laptop with second monitor - The FreeBSD Forums
The FreeBSD Forums  

Go Back   The FreeBSD Forums > Desktop Usage > Window Managers > Other Window Managers

Other Window Managers XFCE, Fluxbox, Enlightenment, IceWM, WindowMaker, ION, etc.

Reply
 
Thread Tools Display Modes
  #1  
Old April 11th, 2010, 21:30
gpatrick gpatrick is offline
Member
 
Join Date: Jul 2009
Posts: 247
Thanks: 55
Thanked 16 Times in 10 Posts
Default xrandr on laptop with second monitor

Have a second 23" monitor that is connected to the VGA port. The laptop has a resolution of 1366x768 and the monitor has a resolution of 1920x1080.

Currently I have the laptop screen set to 1366x768 but with Windowmaker my dockapps are not on the right of the screen and cannot be moved. They're only 2/3's of the way to the right. I have the external screen to the left of the laptop and it is set using xrandr to 1920x1080.

How do I set it so the external screen is set to the left using 1920x1080 and the laptop to 1366x768. I also want the external screen to be an additional screen while currently it is a duplicate of the laptop monitor.

This is what I want but get the following error:
Code:
$ xrandr --output VGA-0 --mode 1920x1080 --left-of LVDS --output LVDS --mode 1366x768
xrandr: screen cannot be larger than 1920x1920 (desired size 3286x1080)
Code:
$ xrandr -q
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 1920 x 1920
VGA-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 510mm x 287mm
   1920x1080      60.0*+
   1680x1050      60.0  
   1280x1024      60.0  
   1440x900       59.9  
   1280x800       59.8  
   1152x864       75.0  
   1024x768       70.1     60.0  
   800x600        60.3     56.2  
   640x480        66.7     59.9  
   720x400        70.1  
LVDS connected 1366x768+0+0 (normal left inverted right x axis y axis) 344mm x 194mm
   1366x768       60.0*+
   1280x720       59.9  
   1152x768       59.8  
   1024x768       59.9  
   800x600        59.9  
   640x480        59.4  
HDMI-0 disconnected (normal left inverted right x axis y axis)
I found this on an xrandr wiki and I put it in a file that is called before wmaker in the .xinitrc. However my mouse doesn't work and the screens are clones:
Code:
# If an external monitor is connected, place it with xrandr
 
# External output may be "VGA" or "VGA-0" or "DVI-0" or "TMDS-1"
EXTERNAL_OUTPUT="VGA-0"
INTERNAL_OUTPUT="LVDS"
# EXTERNAL_LOCATION may be one of: left, right, above, or below
EXTERNAL_LOCATION="left"
 
case "$EXTERNAL_LOCATION" in
       left|LEFT)
               EXTERNAL_LOCATION="--left-of $INTERNAL_OUTPUT"
               ;;
       right|RIGHT)
               EXTERNAL_LOCATION="--right-of $INTERNAL_OUTPUT"
               ;;
       top|TOP|above|ABOVE)
               EXTERNAL_LOCATION="--above $INTERNAL_OUTPUT"
               ;;
       bottom|BOTTOM|below|BELOW)
               EXTERNAL_LOCATION="--below $INTERNAL_OUTPUT"
               ;;
       *)
               EXTERNAL_LOCATION="--left-of $INTERNAL_OUTPUT"
               ;;
esac
 
xrandr |grep $EXTERNAL_OUTPUT | grep " connected "
if [ $? -eq 0 ]; then
    xrandr --output $INTERNAL_OUTPUT --auto --output $EXTERNAL_OUTPUT --auto $EXTERNAL_LOCATION
    # Alternative command in case of trouble:
    # (sleep 2; xrandr --output $INTERNAL_OUTPUT --auto --output $EXTERNAL_OUTPUT --auto $EXTERNAL_LOCATION) &
else
    xrandr --output $INTERNAL_OUTPUT --auto --output $EXTERNAL_OUTPUT --off
fi

Last edited by gpatrick; April 11th, 2010 at 22:04.
Reply With Quote
  #2  
Old April 12th, 2010, 00:09
adamk adamk is offline
Senior Member
 
Join Date: Nov 2008
Posts: 1,605
Thanks: 6
Thanked 262 Times in 243 Posts
Default

Code:
xrandr: screen cannot be larger than 1920x1920 (desired size 3286x1080)
You need to create an xorg.conf file and add a Virtual directive in the Display SubSection. Something alone these lines:

Code:
Section "Screen"
        Identifier "ati"
        Device     "ati"
        DefaultDepth    24
        SubSection "Display"
                Viewport   0 0
                Depth     24    
                Virtual   3286 1080
        EndSubSection
EndSection
Reply With Quote
  #3  
Old April 14th, 2010, 20:49
gpatrick gpatrick is offline
Member
 
Join Date: Jul 2009
Posts: 247
Thanks: 55
Thanked 16 Times in 10 Posts
Default

Thanks that worked. Now though since I reinstalled I am having a problem that VGA-0 becomes the primary screen at boot and LVDS is blank.

When I run
Code:
$ xrandr --output VGA-0 --mode 1920x1080 --left-of LVDS --output LVDS --mode 1366x768
It is setting VGA-0 to the correct resolution, but LVDS is blank. Below is the output of 'xrandr -q'

Code:
$ xrandr -q
Screen 0: minimum 320 x 200, current 3286 x 1080, maximum 3286 x 1080
VGA-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 510mm x 287mm
   1920x1080      60.0*+
   1680x1050      60.0  
   1280x1024      60.0  
   1440x900       59.9  
   1280x800       59.8  
   1152x864       75.0  
   1024x768       70.1     60.0  
   800x600        60.3     56.2  
   640x480        66.7     59.9  
   720x400        70.1  
LVDS connected 1366x768+1920+0 (normal left inverted right x axis y axis) 344mm x 194mm
   1366x768       60.0*+
   1280x720       59.9  
   1152x768       59.8  
   1024x768       59.9  
   800x600        59.9  
   640x480        59.4  
HDMI-0 disconnected (normal left inverted right x axis y axis)
I have a subsection with a line of 'Virtual 3286 1080' in xorg.conf.
Code:
$ cat /etc/X11/xorg.conf
Section "ServerLayout"
	Identifier     "X.org Configured"
	Screen      0  "Screen0" 0 0
	InputDevice    "Mouse0" "CorePointer"
	InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
	ModulePath   "/usr/local/lib/xorg/modules"
	FontPath     "/usr/local/lib/X11/fonts/misc/"
	FontPath     "/usr/local/lib/X11/fonts/TTF/"
	FontPath     "/usr/local/lib/X11/fonts/OTF"
	FontPath     "/usr/local/lib/X11/fonts/Type1/"
	FontPath     "/usr/local/lib/X11/fonts/100dpi/"
	FontPath     "/usr/local/lib/X11/fonts/75dpi/"
EndSection

Section "Module"
	Load  "dbe"
	Load  "dri"
	Load  "dri2"
	Load  "extmod"
	Load  "glx"
	Load  "record"
EndSection

Section "InputDevice"
	Identifier  "Keyboard0"
	Driver      "kbd"
EndSection

Section "InputDevice"
	Identifier  "Mouse0"
	Driver      "mouse"
	Option	    "Protocol" "auto"
	Option	    "Device" "/dev/sysmouse"
	Option	    "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
	#DisplaySize	  340   190	# mm
	Identifier   "Monitor0"
	VendorName   "LGD"
	ModelName    "d801"
EndSection

Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
        ### [arg]: arg optional
        #Option     "NoAccel"            	# [<bool>]
        #Option     "SWcursor"           	# [<bool>]
        #Option     "Dac6Bit"            	# [<bool>]
        #Option     "Dac8Bit"            	# [<bool>]
        #Option     "BusType"            	# [<str>]
        #Option     "CPPIOMode"          	# [<bool>]
        #Option     "CPusecTimeout"      	# <i>
        #Option     "AGPMode"            	# <i>
        #Option     "AGPFastWrite"       	# [<bool>]
        #Option     "AGPSize"            	# <i>
        #Option     "GARTSize"           	# <i>
        #Option     "RingSize"           	# <i>
        #Option     "BufferSize"         	# <i>
        #Option     "EnableDepthMoves"   	# [<bool>]
        #Option     "EnablePageFlip"     	# [<bool>]
        #Option     "NoBackBuffer"       	# [<bool>]
        #Option     "DMAForXv"           	# [<bool>]
        #Option     "FBTexPercent"       	# <i>
        #Option     "DepthBits"          	# <i>
        #Option     "PCIAPERSize"        	# <i>
        #Option     "AccelDFS"           	# [<bool>]
        #Option     "IgnoreEDID"         	# [<bool>]
        #Option     "DisplayPriority"    	# [<str>]
        #Option     "PanelSize"          	# [<str>]
        #Option     "ForceMinDotClock"   	# <freq>
        #Option     "ColorTiling"        	# [<bool>]
        #Option     "VideoKey"           	# <i>
        #Option     "RageTheatreCrystal" 	# <i>
        #Option     "RageTheatreTunerPort" 	# <i>
        #Option     "RageTheatreCompositePort" 	# <i>
        #Option     "RageTheatreSVideoPort" 	# <i>
        #Option     "TunerType"          	# <i>
        #Option     "RageTheatreMicrocPath" 	# <str>
        #Option     "RageTheatreMicrocType" 	# <str>
        #Option     "ScalerWidth"        	# <i>
        #Option     "RenderAccel"        	# [<bool>]
        #Option     "SubPixelOrder"      	# [<str>]
        #Option     "ShowCache"          	# [<bool>]
        #Option     "DynamicClocks"      	# [<bool>]
        #Option     "VGAAccess"          	# [<bool>]
        #Option     "ReverseDDC"         	# [<bool>]
        #Option     "LVDSProbePLL"       	# [<bool>]
        #Option     "AccelMethod"        	# <str>
        #Option     "DRI"                	# [<bool>]
        #Option     "ConnectorTable"     	# <str>
        #Option     "DefaultConnectorTable" 	# [<bool>]
        #Option     "DefaultTMDSPLL"     	# [<bool>]
        #Option     "TVDACLoadDetect"    	# [<bool>]
        #Option     "ForceTVOut"         	# [<bool>]
        #Option     "TVStandard"         	# <str>
        #Option     "IgnoreLidStatus"    	# [<bool>]
        #Option     "DefaultTVDACAdj"    	# [<bool>]
        #Option     "Int10"              	# [<bool>]
        #Option     "EXAVSync"           	# [<bool>]
        #Option     "ATOMTVOut"          	# [<bool>]
        #Option     "R4xxATOM"           	# [<bool>]
	Identifier  "Card0"
	Driver      "radeon"
	VendorName  "ATI Technologies Inc"
	BoardName   "Unknown Board"
	BusID       "PCI:1:5:0"
EndSection

Section "Screen"
	Identifier "Screen0"
	Device     "Card0"
	Monitor    "Monitor0"
	SubSection "Display"
		Viewport   0 0
		Depth     1
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     4
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     8
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     15
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     16
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     24
		Virtual   3286 1080
	EndSubSection
EndSection
Want LVDS to be the primary display at boot and VGA-0 to not be a clone but just an extended desktop. Using xfce4 right now but may go back to Windowmaker.
Reply With Quote
  #4  
Old April 14th, 2010, 21:20
adamk adamk is offline
Senior Member
 
Join Date: Nov 2008
Posts: 1,605
Thanks: 6
Thanked 262 Times in 243 Posts
Default

There is no way to force LVDS to be primary at boot, or even at X start. You can use 'xrandr --output LVDS --primary' to force it to be primary once X starts. However, from what I'm understanding, the LVDS just stays blank now no matter what?

Adam
Reply With Quote
The Following User Says Thank You to adamk For This Useful Post:
gpatrick (April 16th, 2010)
  #5  
Old April 15th, 2010, 22:53
aragon aragon is offline
Giant Locked
 
Join Date: Nov 2008
Location: Cape Town, South Africa
Posts: 2,031
Thanks: 68
Thanked 253 Times in 203 Posts
Default

Quote:
Originally Posted by adamk View Post
There is no way to force LVDS to be primary at boot, or even at X start.
There is, but it'll require the OP to switch to the radeonhd driver and adding something like this to xorg.conf:

Code:
Option "RROutputOrder" "DVI-I_1/digital VGA_1"
Reply With Quote
The Following User Says Thank You to aragon For This Useful Post:
gpatrick (April 16th, 2010)
  #6  
Old April 16th, 2010, 05:19
gpatrick gpatrick is offline
Member
 
Join Date: Jul 2009
Posts: 247
Thanks: 55
Thanked 16 Times in 10 Posts
Default

If I use
Code:
xrandr --output VGA-0 --off
Then LVDS comes on of course, but when I run
Code:
xrandr --auto --output VGA-0 --mode 1920x1080 --left-of LVDS --auto
Then LVDS goes blank and VGA-0 becomes the desktop. And if I'm using Windowmaker, then icons at the bottom for Firefox, for example, are not at the bottom of the screen but only two-thirds down.

For some reason I can't get LVDS to activate with VGA-0 active at the same time, though I had it before I reinstalled.

If I run this script I found
Code:
# External output may be "VGA" or "VGA-0" or "DVI-0" or "TMDS-1"
EXTERNAL_OUTPUT="VGA-0"
INTERNAL_OUTPUT="LVDS"
# EXTERNAL_LOCATION may be one of: left, right, above, or below
EXTERNAL_LOCATION="left"
 
case "$EXTERNAL_LOCATION" in
       left|LEFT)
               EXTERNAL_LOCATION="--left-of $INTERNAL_OUTPUT"
               ;;
       right|RIGHT)
               EXTERNAL_LOCATION="--right-of $INTERNAL_OUTPUT"
               ;;
       top|TOP|above|ABOVE)
               EXTERNAL_LOCATION="--above $INTERNAL_OUTPUT"
               ;;
       bottom|BOTTOM|below|BELOW)
               EXTERNAL_LOCATION="--below $INTERNAL_OUTPUT"
               ;;
       *)
               EXTERNAL_LOCATION="--left-of $INTERNAL_OUTPUT"
               ;;
esac
 
xrandr |grep $EXTERNAL_OUTPUT | grep " connected "
if [ $? -eq 0 ]; then
    xrandr --output $INTERNAL_OUTPUT --auto --output $EXTERNAL_OUTPUT --auto $EXTERNAL_LOCATION
    # Alternative command in case of trouble:
    # (sleep 2; xrandr --output $INTERNAL_OUTPUT --auto --output $EXTERNAL_OUTPUT --auto $EXTERNAL_LOCATION) &
else
    xrandr --output $INTERNAL_OUTPUT --auto --output $EXTERNAL_OUTPUT --off
fi
it returns this
Code:
VGA-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 510mm x 287mm
And only VGA-0 is displayed. LVDS is blank.

What is very, very bizarre, is that after a 10 minute (or so, never timed) timeout (probably power saving) when I go back to use the laptop, both screens are available.

Last edited by gpatrick; April 16th, 2010 at 16:33.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple Monitors - xrandr error QuinRiva X.Org 7 March 19th, 2013 08:35
Monitor ServeRAID Status? dave System Hardware 2 June 23rd, 2010 09:02
intel GMA + xrandr + 720p = black vertical bar van_Zeller X.Org 0 February 24th, 2010 00:37
Hanns-G or other monitor recommendations roddierod Off-Topic 7 January 11th, 2010 22:41
turn off monitor by Gnome mfaridi GNOME 2 November 15th, 2009 10:56


All times are GMT +1. The time now is 03:23.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
The mark FreeBSD is a registered trademark of The FreeBSD Foundation and is used by The FreeBSD Project with the permission of The FreeBSD Foundation.
Web protection and acceleration provided by CloudFlare
0