Dual-Monitor Support

From CS Support Wiki
Jump to: navigation, search

We do not officially support dual-monitor setups in the department. We would love to, but unfortunately, we simply don't have the budget to accommodate purchasing another monitor and dual-head video card on every desktop on the department.

If you have a dual-head card and second monitor, and you'd like to use them under Linux, you can configure them yourself. We grant everyone sudo access for the following:

Display-related commands for which everyone has sudo access

Raw X configuration file - contains resolution and screen layout settings

sudoedit /etc/X11/xorg.conf 

Nvidia driver installers

sudo /usr/bin/apt-get -y install nvidia-glx
sudo /usr/bin/apt-get -y install nvidia-settings

Nvidia driver configuration tool (GUI)

sudo /usr/bin/nvidia-xconfig

Nvidia driver configuration tool (command-line)

sudo /usr/bin/nvidia-settings

ATI driver installer

sudo /usr/bin/apt-get -y install xorg-driver-fglrx

ATI driver configuration tool

sudo /usr/bin/aticonfig

Nvidia driver dual-display setup

Notes from Dan Williams

Using the apt-get commands from root, I was able to get the driver as well as the settings and xconfig apps. Run the nvidia-xconfig sudo'd. When I did this, it complained about a driver not being there, but then I ran it again and didn't have a problem. Then, run nvidia-settings. Here it gets a little tricky you need to run as root to rewrite the /etc/X11/xorg.conf file, however, then you won't be able to your ~/.nvidia-settings-rc file. I basically redid all my options twice, once running as root and once running as myself.

Once you're running nvidia-settings, go to X Server Display Configuration. There should be one monitor with a name, and one that says "disabled." Click on the disabled one, then click Configure... Now you have to choose Separate X screen or Twinview. Twinview simply widens your current desktop, whereas separate X screen creates a second X Session. You have to play with them to see which you like. If you choose Separate X screen you have to restart X; otherwise with Twinview you should be done.

ATI driver dual-display setup

To be added. User contributions encouraged!

Notes from Zach Hill

I am victorious! But, not using the fglrx driver. I had to use the open-source ati driver "ati" in the xorg.conf file. The main problem with the restricted ati driver seems to be the monitor detection features. It wanted to default to using the VESA settings it detected from the monitor (max res of 1024x768).

The ati open source driver is interesting because it doesn't use the MergedFB. You can use Xinerama, but I chose to just use the XRandR for the monitor setup. To enable the extended display you just use the VIRTUAL setting in the "Display" subsection of the single "Screen" you use. I think the "Screen Resolution" utility in System->Preferences->Screen Resolution uses XRandR also so it ended up working okay with the "Virtual" mode in the xorg.conf file. But, the trick is that it will think that one of your monitors is not enabled since you are using a single virtual screen that is 2560x1024 (it shows as only 1280x1024 in the utility however). So, not intuitive, but it works.

I wasn't able to get Compiz working though because the max size it supports seems to be 2048x2048.

I briefly tried Xinerama and it seemed to work okay but hardware accel is questionable. ATI's restricted driver really sucks apparently, but the one in the Ubuntu distro isn't the newest available so there might be some luck if you have root and can download the new one with the new linux-version of the Catalyst Control Center (I couldn't install those because I don't have root).


Notes from Andrew Jurik

EnvyNG is a python application to detect the graphic card model (ATI or Nvidia), install the appropriate driver, and configure the Xserver automatically.

Originally my secondary monitor would flash periodically (that is, go black, then clone the first monitor, then go black again... continuously). After going through many rounds with installing the drivers listed above and trying to modify the xconfig file manually, I could get it to the point where the screens were somewhat operational (that is, I couldn't move windows from one screen to the other, but there was no flashing). When I locked the computer, however, only the primary monitor would darken (the secondary monitor just froze) and I could not get the password dialog box to show up again. That is, locking the computer essentially forced me to restart the Xserver (ctrl+alt+backspace).

As a solution, root can install the EnvyNG package, and would also need to run it using '/usr/bin/envyng -t'. (If permissions aren't granted, the prompt returns with 'user is not allowed to execute '/usr/bin/python interface.py' as root on [computer]'). After restarting, there was no further configuration required. The "Preferences -> Screen Resolution" dialog box shows one, uncloned monitor (3840x1200) (as opposed to two, separate uncloned monitors). Windows could be moved between screens and the computer could be locked and unlocked just fine.

For what it's worth, here's the xorg.conf file after running EnvyNG (the graphics card is an ATI Radeon HD 2400 XT):

# xorg.conf (X.Org X Window System server configuration file)
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
# Edit this file with caution, and see the xorg.conf manual page.
# (Type "man xorg.conf" at the shell prompt.)
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
#   sudo dpkg-reconfigure -phigh xserver-xorg

Section "Screen"
	Identifier	"Default Screen"
	Monitor		"Configured Monitor"
	Device		"Configured Video Device"
	Defaultdepth	24

Section "Device"
	Identifier	"Configured Video Device"
	Option		"VideoOverlay"	"on"
	Option		"OpenGLOverlay"	"off"
	Driver		"fglrx"

Section "InputDevice"
	Identifier	"Generic Keyboard"
	Driver		"kbd"
	Option		"XkbRules"	"xorg"
	Option		"XkbModel"	"pc105"
	Option		"XkbLayout"	"us"

Section "InputDevice"
	Identifier	"Configured Mouse"
	Driver		"mouse"
	Option		"CorePointer"

Section "ServerLayout"
	Identifier	"Default Layout"
  screen "Default Screen"

Section "Monitor"
	Identifier	"Configured Monitor"

Section "Extensions"
	Option		"Composite"	"Enable"


To be added. User contributions encouraged!