Bug 100760 - Rapid flickering when an app is placed on the second Nouveau ZaphodHeads display
Summary: Rapid flickering when an app is placed on the second Nouveau ZaphodHeads display
Status: RESOLVED NOTOURBUG
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/nouveau (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium major
Assignee: Nouveau Project
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-22 22:39 UTC by mrj
Modified: 2017-06-01 13:45 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description mrj 2017-04-22 22:39:02 UTC
For many years I've configured my second monitor as a separate X display because this allows the monitors to have an independent sets of virtual desktops. With five virtual desktops on each monitor, I could select and display 25 combinations instead of the five with Xinerama.

This worked fine with the "separate X displays" mode of the proprietary Nvidia driver. But eventually the second display couldn't display a background image (black only). Later, apps started from a panel or terminal on the second display would come up on the first unless I set the DISPLAY variable to :0.1 on the command lines of both launchers and terminal commands. I could live with both of these problems.

When the proprietary Nvidia driver no longer supported my graphics card in the latest X, I moved to Nouveau, using the ZaphodHeads option to get the equivalent of the "separate X displays" mode. This worked, though I still had the same problems with getting stuff to appear on the second display.

This was with Fedora 23. I've just upgraded to Fedora 25, and although the second X monitor and display still comes up (black only, but a pointer can be moved around it), nothing can be placed on it. If I run "DISPLAY=:0.1 mate-terminal" on the first display, the terminal does appear on the second, but there is a rapid flickering of both displays, sometimes ending in a machine crash, and the new terminal cannot be used. This happens with both Mate and Gnome 3.

Xinerama mode (empty xorg.conf) works fine, though of course I've now got only five instead of 25 virtual desktop combinations.

The current Fedora 25 Nouveau version is xorg-x11-drv-nouveau.x86_64 1:1.0.14-2.fc25, and the Kernel version is 4.10.10-200.fc25.x86_64.

* Is this a Nouveau problem?
* Is this a known problem?
* Is this unlikely to be fixed because "Zaphod mode is a legacy feature" https://bugs.freedesktop.org/show_bug.cgi?id=99103#c6 ?
* Is there another way to get dedicated sets of virtual desktops for each monitor?
Comment 1 mrj 2017-04-22 23:45:23 UTC
Further information:

1. The graphics card is a GeForce 7600 GT (NV4B/G73). Would ZaphodHeads be more likely to work in a recent card?

2. The working single-X-display mode is using XRandR (I said Xinerama).
Comment 2 Ilia Mirkin 2017-04-23 02:31:54 UTC
While Zaphod is considered a legacy feature, that doesn't mean that things should break. Just that it's unlikely to be extended to support new things.

There has recently been some bugs introduced into xserver which break non-xrandr setups. There are also some issues in the nouveau driver. One of those was fixed in xf86-video-nouveau 1.0.15. For the xserver issues, see bug #100293.

I cannot comment on any bugs that happen in MATE/whatever other software as a result of multi-screen displays. Note that these are not commonly tested. If you can do 'DISPLAY=:0.1 xterm', then everything else is down to the X clients.

Please try the above fixes and see if they improve things. If they don't, you're going to have to debug this, or provide sufficient info for others to debug it.
Comment 3 mrj 2017-04-23 05:22:21 UTC
Many thanks Ilia for those helpful suggestions.

The results of the experiments are, that in ZaphodHeads mode:

1. Running "DISPLAY=:0.1 gnome-terminal" under all window managers makes the terminal display correctly, but on display :0.0.

2. Running "DISPLAY=:0.1 mate-terminal" or "DISPLAY=:0.1 xterm" under Gnome 3, Gnome Classic, or Gnome on X (rather than Wayland) makes the terminal appear on display :0.1 without flickering, but there's no window border, and any typing goes to the original terminal.

3. Running "DISPLAY=:0.1 mate-terminal" or "DISPLAY=:0.1 xterm" under MATE causes the same as above plus the intense flickering.

So the flickering is a MATE problem, but the inability to use the second display is an X problem. This matches my experience with the problems starting under the proprietary driver, with the background image and menus going first, and later requiring the explicit setting of DISPLAY.

I've found independent virtual desktops such a productive feature, I'm disappointed it's going away.

I suppose other than the fix-it-myself option you suggest, I could:

1. Try to install an X (and maybe also a MATE) downgrade, such as the one that was working on F23,

2. Get a new graphics card to see whether that works with twin X-displays on either Nouveau or the proprietary driver (again the hardware will have outlasted the software). Is anyone successfully using Zaphod on a current distro?, or

3. Wait for an X update that fixes this.
Comment 4 Ilia Mirkin 2017-04-23 12:53:21 UTC
If you have a second machine you can ssh in from, I'd recommend taking MATE/etc out of the equation.

What I mean by that is that on the target machine, start X by just running "X" on the terminal. This should light up both screens but have a black background (as the old greyish mask was removed some time back). Then ssh in and run DISPLAY=:0.1 xterm . If this doesn't work, that means that your second screen (by which I mean X screen btw) is not set up properly. In such a case, please provide your xorg log and xorg.conf.

Most people use Zaphod to merge heads from multiple GPUs into a single logical screen with Xinerama. However I believe at least Mario Kleiner has, in the past, tested something more akin to your use-case (and helped diagnose/fix related bugs).
Comment 5 mrj 2017-06-01 02:50:56 UTC
Thanks Ilia. I haven't done the ssh test yet, but I've got further data on the problem:

Under Nouveau my computer started crashing about once a day. (The screens suddenly go black, and trying to play audio from a known open terminal fails, so X was probably crashing, and a hardware reset is required, after which the logs often showed Cron processes doing stuff after the crash, so the Kernel wasn't crashing.)

A 304xx proprietary Nvidia driver that works on the latest X had since been released, so I tried that.

Results:

1. My computer is no longer crashing. A potential cause of the crashes under Nouveau is high GPU idle usage -- the GPU temp is permanently at least 20 degrees C lower under the proprietary driver. My card is a mid-range card with extensive passive cooling, so fan speed control by Nouveau is no help.

https://forums.opensuse.org/showthread.php/456958-Nouveau-driver-and-GPU-temperature
http://www.phoronix.com/scan.php?page=article&item=nouveau_comp_2011&num=19
https://forums.gentoo.org/viewtopic-t-837855-start-0.html

2. The proprietary driver has "Separate X Screen" and "TwinView" modes. "Separate X Screen" was what I had been using, and this no longer works on the latest X (the second screen is black, only the pointer appears). So, as suspected, the loss of "Zaphod" is an X issue rather than a Nouveau issue. There's no flickering in Mate however, so this _is_ a Nouveau issue.

So I'm currently using TwinView, which is the same as the XRandR Nouveau mode. I'm still adapting to the loss of separate sets of virtual desktops.
Comment 6 Ilia Mirkin 2017-06-01 13:15:07 UTC
Unfortunately I don't have a second monitor here, but I'm fairly sure that your assertions about multiple X screens not working in recent Xorg is false. People complain about stuff like that pretty quickly. Unfortunately you chose not to follow my instructions (never tested putting a regular application on :0.1, only weird things like gnome-terminal which do who-knows-what in the name of user friendliness), nor get any help with debugging the issue.

Either way, as you've lost interest in this, can I close the issue?

[The crashes with nouveau are, btw, most likely due to your environment using 3D acceleration. Using such an environment is not recommended.]


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.