PDA

View Full Version : [ubuntu] Trouble setting up seperate X screens 9.04



Krumar
June 4th, 2009, 06:24 AM
Hey,

I just upgraded to Ubuntu 9.04 and am looking for the best set up for my two monitors. Right now I have separate X sessions set up using "Nvidia X Server Settings" I have a GeForce 9800 GT graphics card, one monitor is 1680x1050 pixels and another monitor that is 1440x900.

Right now I'm unable load programs on the 1440x900 monitor. Like if I try to open Nautilus on the 1440x900 monitor the window opens on my 1680x1050. On 8.10 I was using separate X sessions and I could run programs in the 1440x900.

I have the "NVIDIA accelerated graphics driver (version 180)" installed. Here is my xorg.conf file:


# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings: version 1.0 (buildd@palmer) Sun Feb 1 20:21:04 UTC 2009

Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0" 1440 0
Screen 1 "Screen1" 0 0
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
EndSection

Section "Files"
EndSection

Section "Module"
Load "dbe"
Load "extmod"
Load "type1"
Load "freetype"
Load "glx"
EndSection

Section "ServerFlags"
Option "Xinerama" "0"
EndSection

Section "InputDevice"
# generated from default
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/psaux"
Option "Emulate3Buttons" "no"
Option "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
# generated from default
Identifier "Keyboard0"
Driver "kbd"
EndSection

Section "Monitor"
# HorizSync source: edid, VertRefresh source: edid
Identifier "Monitor0"
VendorName "Unknown"
ModelName "SceptreX20WG-Naga"
HorizSync 30.0 - 81.0
VertRefresh 40.0 - 76.0
Option "DPMS"
EndSection

Section "Monitor"
# HorizSync source: edid, VertRefresh source: edid
Identifier "Monitor1"
VendorName "Unknown"
ModelName "ViewSonic NX1932w"
HorizSync 30.0 - 82.0
VertRefresh 50.0 - 75.0
Option "DPMS"
EndSection

Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "GeForce 9800 GT"
BusID "PCI:1:0:0"
Screen 0
EndSection

Section "Device"
Identifier "Device1"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "GeForce 9800 GT"
BusID "PCI:1:0:0"
Screen 1
EndSection

Section "Screen"
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24
Option "TwinView" "0"
Option "metamodes" "DFP: nvidia-auto-select +0+0"
SubSection "Display"
Depth 24
EndSubSection
EndSection

Section "Screen"
Identifier "Screen1"
Device "Device1"
Monitor "Monitor1"
DefaultDepth 24
Option "TwinView" "0"
Option "metamodes" "CRT: nvidia-auto-select +0+0"
SubSection "Display"
Depth 24
EndSubSection
EndSection



Can anyone help me set this up so that run programs on both monitors? Let me know if you need anymore information.

Krumar
June 4th, 2009, 06:02 PM
bump

crazy181
June 21st, 2009, 09:06 AM
Same issue here all programs are loading in one display, however for some reason firefox works in my 2nd display?

systemgod
June 23rd, 2009, 03:25 PM
Same thing here. Some apps start fine on the second screen but most start on the first screen when I try to start them from the start menu on the second screen.

It's possible to force (some of) them to start on the second screen by changing the menu item and adding an option like '--display=:0.1' but this doesn't always work as the screen identifier may change if there are other people using this pc too.

Strangely this worked fine before I upgraded to 9.04

Old setup: 8.10 AMD64 with ATI graphics -> ok
New setup: 9.04 i386 with NVIDIA graphics -> most applications insist on starting on the wrong screen

This is very annoying :-(

jonny90046
July 5th, 2009, 07:02 PM
I've got the same problem.....exactly, even down to firefox opening fine on the target screen....has anyone found a solution to this?

MavisCruet
September 20th, 2009, 01:43 AM
I haven't even got this far, I have at last managed to install proprietary drivers to have snazzy effects but x server won't enable my second screen. It knows it's there and it worked on the default drivers but if I try to activate it as a seperate x screen or as twinview the monitor just stays off.

It says...
cannot apply changes due to (among other things) an X screen has been added or removed.

That was kind of the point...

Any ideas?

stefanadelbert
September 23rd, 2009, 11:41 PM
The best setup for two monitors and an NVidia card is to use nvidia-settings (as root) to enable both monitors and use TwinView. Using two X screens creates some hassles that are unnecessary if you're using only two monitors off one card.

After making changes that involve X (creating, removing X screens, positions, etc.) you'll need to restart X (Ctrl-Alt-Bkspc or log out and back in or 'sudo /etc/init.d/gdm restart'). If you're making changes using nvidia-settings, make sure you're running as root ('sudo nvidia-settings') else you won't be able to save the changes to the xorg.conf file.

I'm trying to get four monitors working off two cards (one PCIe and one PCI) and it seems like I need to setup two X screens and then use Xinerama to "join" them. I can get the two X screens working, but cannot get Xinerama going (X won't restart).

Unfortunately this kind of tinkering takes a lot of time to get right. If you get something working, make a backup of the xorg.conf file (/etc/X11/xorg.conf). If you make a mistake then you can always revert to a working backup. Also, take small steps. Don't try to do it all in one go. At least, that's what I've learnt.

nikkkko
September 25th, 2009, 08:44 AM
Same problem with slight twist. I'm running off a laptop and plug into a large screen when I get to the office. I switch the output to the big screen from the keyboard then have to manually adjust the resolution, disabling the laptop screen.

I would like to plug in my second screen, switch the output and for it to just work, but how?

MavisCruet
September 25th, 2009, 05:26 PM
Thanks a lot stefanadelbert, i wasn't running as root. And yes twinview serves just fine. Thank you

chassum
October 5th, 2009, 07:49 PM
I _really_ want separate x-screens with the ability to launch apps correctly from either screen. Has anyone come up with a workable solution?

karlson
October 5th, 2009, 09:25 PM
Section "ServerFlags"
Option "Xinerama" "0"
EndSection



Can anyone help me set this up so that run programs on both monitors? Let me know if you need anymore information.


Have you tried enabling Xinerama? You will need either Xinerama or TwinView to run both screens as one.

karlson
October 5th, 2009, 09:55 PM
I'm trying to get four monitors working off two cards (one PCIe and one PCI) and it seems like I need to setup two X screens and then use Xinerama to "join" them. I can get the two X screens working, but cannot get Xinerama going (X won't restart).

I am running 4 screens successfully off 2 cards and you will need both TwinView and Xinerama Enabled.

With Jaunty there is a patch to X that will need to be applied otherwise your mouse will show up on both pairs of screens.

Here is the example xorg.conf



Section "Device"
Identifier "NVIDIA1"
Driver "nvidia"
#Option "NoLogo" "True"
Option "TwinView" "True"
Option "TwinViewOrientation" "RightOf"
Option "UseEdidFreqs" "True"
Option "MetaModes" "1680x1050,1680x1050; 1280x1024,1280x1024"
BusID "PCI:2:0:0"
EndSection

Section "Device"
Identifier "NVIDIA2"
Driver "nvidia"
#Option "NoLogo" "True"
Option "TwinView" "True"
Option "TwinViewOrientation" "RightOf"
Option "UseEdidFreqs" "True"
Option "MetaModes" "1680x1050,1680x1050; 1280x1024,1280x1024"
BusID "PCI:1:0:0"
EndSection

Section "Monitor"
Identifier "Monitor1"
EndSection

Section "Monitor"
Identifier "Monitor2"
EndSection

Section "Monitor"
Identifier "Monitor3"
EndSection

Section "Monitor"
Identifier "Monitor4"
EndSection

Section "Screen"
Identifier "Screen1"
Device "NVIDIA1"
Monitor "Monitor1"
Defaultdepth 24
EndSection

Section "Screen"
Identifier "Screen2"
Device "NVIDIA1"
Monitor "Monitor2"
Defaultdepth 24
EndSection

Section "Screen"
Identifier "Screen3"
Device "NVIDIA2"
Monitor "Monitor3"
Defaultdepth 24
EndSection

Section "Screen"
Identifier "Screen4"
Device "NVIDIA2"
Monitor "Monitor4"
Defaultdepth 24
EndSection

Section "ServerLayout"
Identifier "Default Layout"
Screen "Screen1" 0 0
Screen "Screen2" RightOf "Screen1"
Screen "Screen3" RightOf "Screen2"
Screen "Screen4" RightOf "Screen3"
EndSection

Section "ServerFlags"
Option "Xinerama" "on"
EndSection

spinoza666
November 22nd, 2009, 02:23 AM
Hey Krumar, I thought I should add my thoughts about the matter since I have the same card (GeForce 9800GT), and have experienced the same problems. I've been on this for days now, but finally it's been resolved. I'm using separate x screen, without Xinerama, and it's running smooth. I can open apps at will in both screens without any hassle.

The solution was almost embarrassingly simple:

Do not use the merge option when saving the xorg.conf file!

I've tried all kinds of configs before going for the current one, and it seems that an old setting has lingered or something. Yes I know, very stupid of me:)

Just so you know. You should still be able to starts apps in the second monitor by running Alt+F2 and then entering the app in question, eg. vlc. So if my solution doesn't work for you, you should still be able to start apps in it this way.

systemgod
November 22nd, 2009, 10:23 AM
BTW. This is fixed for me in 9.10. I can now properly setup 2 independent displays and start all applications from the menus and they end up where I expect them to end up. I can even start nautilus on both displays at the same time (although they crash simultaneuously when I try dragging anything, I don't mind, I'm not a nautilus user anyway :-)

Nico

spinoza666
November 22nd, 2009, 09:31 PM
Well, I spoke too soon.... Unticking the merge option worked for one boot, but now I'm back to Alt+F2'ing and DISPLAY=:0.1'ing.......

Good to hear it seems to be sorted in 9.10, but I'm not touching that thing until at least a couple of more months;) I tried upgrading a couple of days after the release, and that ended in a complete reinstall, so...

njsharp
November 22nd, 2009, 10:13 PM
I too have been fighting for a long time to understand and control dual head with best resolutions, and have just succeeded. This then is sharing in case it is useful to others.

HW: Toshiba Satellite A10 1Gb DRAM 40Gb HD 1024x768 screen
from lspci:
00:02.0 VGA compatible controller: Intel Corporation 82852/855GM Integrated Graphics Device (rev 01)

Polyview V17E LCD (1280x1024@60Hz preferred best resolution/rate)

SW: Ubuntu 9.04 so far, though I am running 9.10 on other single head desktops. This laptop is my main workhorse, and my 9.10 trials make me still a little nervous of the upgrade or reinstall!

Method:

1

sudo gedit and change virtual - mine was 2048 768 - in /etc/X11/xorg.conf to:
Section "Screen"
Identifier "Default Screen"
Monitor "Configured Monitor"
Device "Configured Video Device"
SubSection "Display"
Virtual 2048 2048<<<<<<<<<<<<<<<
EndSubSection

That's the max this Intel chip can manage.

2 logout and back in, to enable the above. Do xrandr -q to confirm:

Screen 0: minimum 320 x 200, ... maximum 2048 x 2048<<<
and to make sure VGA offers eg:
1280x1024 60.0+ 75.0 60.0
or #3 below won't work.

VGA is at this point still set to:

VGA connected 1024x768+0+0
which is a complete overlap with LVDS ie mirror desktop. Seems desktop appears on the virtual screen at that location and size.



3

xrandr --output VGA --mode 1280x1024 --rate 60.0 --pos 0x768

In English: set the second screen to 1280x1024 at 60Hz and put it BELOW the laptop screen (LVDS) in the virtual screen by 768 pixels

I then had to use the Polyview menu to correct the horizontal position because the image was about 1/5 screen to the right - don't know or care why!

DONE! the KEY xrandr -q lines are now:
Screen 0: minimum 320 x 200, current 1280 x 1792, maximum 2048 x 2048
VGA connected 1280x1024+0+768 (normal left inverted right x axis y axis) 338mm x 270mm
1280x1024 60.0*+ 75.0 60.0*
LVDS connected 1024x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
1024x768 60.0*+

Problems?:
YES I have to do the above xrandr command again every login, but that could be automated
YES it is not so intuitive because the physical screen is RIGHT of the laptop whereas logically it is BELOW. Get used to it! I CANNOT logically put 1280 wide VGA to the right of LVDS because that would demand a vitual screen wider than 2048, which is the chip limit.
NO the menu System/Preferences/Display does NOT allow me to change things. I get:

Could not apply the selected configuration
Method "ApplyConfiguration" with signature "" on interface "org.gnome.SettingsDaemon.XRANDR" doesn't exist

Again, past knowing why or caring! IT WORKS!

YES I have to unmaximise a window before I move it to VGA or LVDS, then I can maximise it again and it will then take the max for the destination monitor.

4 Your arrangements and desires may vary, so play!

For example, your hardware may offer higher resolutions, or you might want the VGA to become the desktop with the laptop screen as a supplementary, in which case rearrange both like this:

xrandr --output VGA --mode 1280x1024 --rate 60.0 --pos 0x0 --output LVDS --mode 1024x768 --rate 60.0 --pos 0x1024

though you may find this a little awkward because you are now typing directly ahead of you on the laptop while looking sideways to the VGA, which logically is above the laptop. Hmm, your choice!

Good luck