PDA

View Full Version : [gnome] Xinerama not working?



Eddles
January 17th, 2011, 06:11 PM
Hello all,

Am using Ubuntu 10.10 with a nVidia graphics card using nVidia own drivers - have done since using 9.10 on this computer. I've got 2 monitors, primary on the right, and secondary on the left. I've always used Xinerama which places everything on the primary monitor (usually, but not always) unless I drag windows over to the secondary monitor. The top and bottom taskbar only fits on the primary monitor, doesn't stretch to the secondary monitor, and when maximising windows, it only fits on one monitor, not across both monitors. Dialog boxes pops up in the middle of the primary monitor. All good so far.

However, after doing a system update yesterday, and getting the whole "broken video every time after updating" yet again meaning I have to manually edit xorg.conf to switch back to the "nv" driver and then reinstalling the "nvidia" driver hullabaloo, which put everything back in its place[1]. I noticed that the video setup is now in "Twinview" mode which treats both monitors as a single monitor, i.e. stretching the taskbars across both monitors and when maximising windows, they stretch across both monitors, and dialog boxes pops up in the middle of the desktop - i.e. half on one monitor, and half on the other monitor. This is rather annoying, so I started nvidia-settings and found that "xinerama" is no longer an option.

What am I doing wrong, and how do I re-enable "xinerama" please?

Thank you very much for your time in advance!

[1] Did not happen with 9.10, or 10.4, only with 10.10.

Lukiwuki
January 17th, 2011, 07:13 PM
Try changing your xorg.conf to:

Section "ServerLayout"
Option "Xinerama" "on"
Option "Clone" "off"
EndSection


And maybe sth like this:

Section "ServerLayout"
Screen 0 "first-screen"
Screen 1 "second-screen" LeftOf "first-screen"
EndSectio

Let me know the result.

Eddles
January 17th, 2011, 11:07 PM
No luck. Here's my xorg.conf as generated by nvidia-settings.


Section "Monitor"
Identifier "Monitor0"
VendorName "Unknown"
ModelName "Samsung SyncMaster"
HorizSync 30.0 - 81.0
VertRefresh 56.0 - 75.0
Option "DPMS"
# HorizSync source: edid, VertRefresh source: edid
EndSection

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

Section "Module"
Load "glx"
EndSection

Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0" 0 0
Option "Xinerama" "on"
# commented out by update-manager, HAL is now used and auto-detects devices
# Keyboard settings are now read from /etc/default/console-setup
# InputDevice "Keyboard0" "CoreKeyboard"
# commented out by update-manager, HAL is now used and auto-detects devices
# Keyboard settings are now read from /etc/default/console-setup
# InputDevice "Mouse0" "CorePointer"
EndSection

Section "Device"
Identifier "Device0"
VendorName "NVIDIA Corporation"
BoardName "GeForce 8600 GTS"
Driver "nvidia"
Option "NoLogo" "True"
# Driver "nvidia"
EndSection


If I change
Option "TwinView" "1" to
Option "TwinView" "0" the second monitor is disabled.


Option "Xinerama" "on" doesn't make any effect. Viewing the log shows the following snippets:

[ 18765.465] (**) Option "Xinerama" "on"
..
[ 18765.466] (**) Xinerama: enabled
..
[ 18766.396] (II) Initializing built-in extension XINERAMA


Thanks for your help so far, and I appreciate your time!

Lukiwuki
January 17th, 2011, 11:17 PM
Try to change it to


Option "TwinView" "2"

If it does not work try to set xinerama:


Option "Xinerama"

or


Option "Xinerama" "2"

Krytarik
January 18th, 2011, 08:01 AM
Disable TwinView by setting the option to "0", enable Xinerama by setting its option to "1". Do not enable both at the same time.
https://wiki.archlinux.org/index.php/Xorg#Multiple_monitors.2FDual_screen

About the mandatory driver install after a kernel upgrade: I suppose, you are running the proprietary driver installed directly from Nvidia's website, try those instead, they regularily build the against the current kernel, thus if the kernel gets upgraded those driver packages get upgraded too, no need to build/install them on your own after a kernel upgrade:
https://launchpad.net/~ubuntu-x-swat/+archive/x-updates

Good luck!

Eddles
January 23rd, 2011, 05:04 PM
Sorry for the delay in responding.

After a few attempts of tinkering, the xorg.conf file got horribly complicated and it completely broke X (don't remember what happened) so I decided to trash it and copy the failsafe config file just to get an usable set-up working for a few days.

I now had some spare time today, so I decided to focus on the problem again - to start troubleshooting, I reinstalled the driver, ran nvidia-settings and it now works exactly in the way I wanted, so problem solved without any effort, luckily.


About the mandatory driver install after a kernel upgrade: I suppose, you are running the proprietary driver installed directly from Nvidia's website, try those instead, they regularily build the against the current kernel, thus if the kernel gets upgraded those driver packages get upgraded too, no need to build/install them on your own after a kernel upgrade:
https://launchpad.net/~ubuntu-x-swat/+archive/x-updates

Not sure if I described my problem clearly... with 10.4, the boot screen is graphical, and each time the kernel got upgraded, I get an error message on X start-up warning that the graphics is not configured properly, but it lets me log on Gnome and reinstall the driver using System->Administration->Additional Drivers (or whatever it used to be called). I never use the drivers from nVidia's website. I don't have a problem with this.

But now with 10.10, I get a text based boot screen (which I'm not bothered about), and each time the kernel gets upgraded, I get dumped to a text log-in with no indication of X, no graphical log-in, no dialog box saying the graphics is messed up, no error message, no nothing. After delving into the log files I figured out the graphics driver needed reinstalling, but I could not do that because I had no Gnome and could not run "Additional Drivers". It took a while for me to try and remember how to fix it - figured it out to change "nvidia" to "nv" in the xorg.conf file and restarting, then use "Additional Drivers" to reinstall the "nvidia" driver.

I'm lucky that I have Linux experience, but I just worry that less experienced people, faced with a text log-in and no indication of what's wrong will be put off with Ubuntu. 10.4's method of automatically falling back to "nv" and popping a dialog box saying that the drivers are messed up but lets me get on with things and fix it later is a lot better way of handling things. Or is there something broken with my computer that is preventing this from happening?

Thanks to you all for your help the both of you, I really appreciate it!

Krytarik
January 23rd, 2011, 10:05 PM
I run 10.04, as you can see, and I'm also running the appropriate proprietary (say that 3 times LOL) driver for my rather old card, running version 96. I also installed it via "Hardware Drivers" (in my case), and I never had to re-install it after a kernel upgrade.
I had to do that only when I installed the driver manually, back in Gutsy 7.10. But by the package install as of now, that should not be necessary.

If the xorg.conf is messed up, it would be sufficient to write a new one this way:
- go to "System -> Administration -> NVIDIA X Server Settings"
- click at "X Server Display Configuration" on the left side
- check/choose your desired configuration
- click at "Save to X Configuration File"
- enter your "root"-password when asked
- choose replace, not merge!

I recommend to do this also now, it saves also your current screen resolution.
Maybe that fixes the mandatory re-install also, I don't know.
You may also try to fix it by re-installing all packages you find by searching for "nvidia" in Synaptic.

Eddles
January 24th, 2011, 03:29 PM
I am guessing that the issue is that there isn't a compatiable video driver available at boot-up for 10.10 - with 10.4, I get a graphical boot-up screen and I guess X is able to fall back on that - however, on 10.10, I get a text-only boot-up screen. Not sure why.

Krytarik
January 24th, 2011, 09:09 PM
Try this workarounds, from the plymouth readme (/usr/share/doc/plymouth/README.Debian):

High-color graphics on nVidia, ATI and other cards
--------------------------------------------------

Our default configuration uses low-color graphics on cards or drivers
for which "Kernel Mode Setting" (in-kernel graphics drivers) are not
available.

This is because the driver that permits high-color graphics tends to
cause issues with suspend and resume, and we opted to prefer that
working.

For nVidia and ATI users, the default "nouveau" and "radeon"
drivers are Kernel Mode Setting enabled, but do not always
provide 3D capability at the current time. By switching to
using the restricted/non-free nvidia-glx or fglrx drivers,
you will gain 3D capability at the loss of a high-color
splash screen.

You can however chose to enable high-color (and resolution) console
if you find it doesn't affect suspend/resume for you, or you don't
use that feature.

There are various methods of doing this, the most robust is the
following four steps:

Append video=vesafb to the GRUB_CMDLINE_LINUX_DEFAULT in
/etc/default/grub
sudo update-grub

echo FRAMEBUFFER=y | sudo tee /etc/initramfs-tools/conf.d/splash
sudo update-initramfs -u

Eddles
January 25th, 2011, 11:52 AM
Try this workarounds, from the plymouth readme (/usr/share/doc/plymouth/README.Debian):

Cheers for this - unfortunately doesn't work, however have upgraded GRUB from 0.97 to 1.98. Oh well, never mind! :-)