Cairo drawing coordinates are broken w/nouveau (affects xfwm4)

Bug #1606122 reported by Ryan Prichard
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
xorg (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

I'm using xfwm4 with Xubuntu 16.04. With compositing enabled, and when I cycle through windows with Alt-Tab, xfwm4 draws an opaque rectangle bordering a candidate window, and it fills that rectangle with a semi-transparent blue color. When I use the nouveau driver, the filled rectangle is clipped. The problem does not reproduce with the proprietary nvidia driver.

It seems as though a drawing command should be issued using a window-relative coordinate, but sometimes is instead issued using a screen-relative coordinate.

I extracted relevant bits of xfwm4 into a small test program that reproduces the problem. The test program creates a transparent XWindow at (100,100) with size (210,210). It draws six rectangles centered inside the window of varying parameters. Two of them are drawn at the wrong place.

xfwm4 should be off-the-hook, I think, unless it's doing something wrong (e.g. unspecified/undefined behavior).

$ lsb_release -rd
Description: Ubuntu 16.04.1 LTS
Release: 16.04

$ apt-cache policy xserver-xorg-video-nouveau
xserver-xorg-video-nouveau:
  Installed: 1:1.0.12-1build2
  Candidate: 1:1.0.12-1build2
  Version table:
 *** 1:1.0.12-1build2 500
        500 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
        100 /var/lib/dpkg/status

$ apt-cache policy xfwm4
xfwm4:
  Installed: 4.12.3-1ubuntu2
  Candidate: 4.12.3-1ubuntu2
  Version table:
 *** 4.12.3-1ubuntu2 500
        500 http://us.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
        100 /var/lib/dpkg/status

I created a video demonstrating the problem in xfwm4: https://www.youtube.com/watch?v=8dZN80tMA6M. If you look closely, you can see that the opaque blue border is positioned correctly, while the semi-transparent overlay isn't.

FWIW, I'm using an NVIDIA GeForce GTX 750 Ti card.

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: xorg 1:7.7+13ubuntu3
ProcVersionSignature: Ubuntu 4.4.0-31.50-generic 4.4.13
Uname: Linux 4.4.0-31-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: amd64
CurrentDesktop: XFCE
Date: Mon Jul 25 00:50:21 2016
InstallationDate: Installed on 2016-07-19 (6 days ago)
InstallationMedia: Xubuntu 16.04 LTS "Xenial Xerus" - Release amd64 (20160420.1)
SourcePackage: xorg
Symptom: display
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Ryan Prichard (ryan-prichard) wrote :
Revision history for this message
Ryan Prichard (ryan-prichard) wrote :

Here's what the test program's output *should* look like, using the NVIDIA driver.

$ apt-cache policy nvidia-361
nvidia-361:
  Installed: 361.42-0ubuntu2
  Candidate: 361.42-0ubuntu2
  Version table:
 *** 361.42-0ubuntu2 500
        500 http://us.archive.ubuntu.com/ubuntu xenial/restricted amd64 Packages
        100 /var/lib/dpkg/status

Revision history for this message
Ryan Prichard (ryan-prichard) wrote :

Here's the test program's output with the nouveau driver.

Revision history for this message
Ryan Prichard (ryan-prichard) wrote :

The bug doesn't reproduce anymore. Both the extracted-from-xfwm4.c test program and xfwm4 now work, on my Ubuntu 16.04 machine with the NVIDIA GeForce 750 Ti card. I configured it back to nouveau and enabled compositing.

I'm guessing an update fixed it?

$ lsb_release -rd
Description: Ubuntu 16.04.2 LTS
Release: 16.04

$ uname -a
Linux atom 4.4.0-77-generic #98-Ubuntu SMP Wed Apr 26 08:34:02 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

$ apt-cache policy xorg
xorg:
  Installed: 1:7.7+13ubuntu3
  Candidate: 1:7.7+13ubuntu3
  Version table:
 *** 1:7.7+13ubuntu3 500
        500 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
        100 /var/lib/dpkg/status

$ apt-cache policy xserver-xorg-video-nouveau
xserver-xorg-video-nouveau:
  Installed: 1:1.0.12-1build2
  Candidate: 1:1.0.12-1build2
  Version table:
 *** 1:1.0.12-1build2 500
        500 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
        100 /var/lib/dpkg/status

(I suppose I should have included libcairo2 originally?)

$ apt-cache policy libcairo2
libcairo2:
  Installed: 1.14.6-1
  Candidate: 1.14.6-1
  Version table:
 *** 1.14.6-1 500
        500 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
        100 /var/lib/dpkg/status

(The xfmw4 version number is bogus -- I'm using my own patched version to work around an incompatibility with VirtualBox.)

$ apt-cache policy xfwm4
xfwm4:
  Installed: 4.12.3-9ubuntu2
  Candidate: 4.12.3-9ubuntu2
  Version table:
 *** 4.12.3-9ubuntu2 100
        100 /var/lib/dpkg/status
     4.12.3-1ubuntu2 500
        500 http://us.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages

Revision history for this message
Ryan Prichard (ryan-prichard) wrote :

Xubuntu 16.04.2 LiveCD ==> bug does not reproduce
Xubuntu 16.04 LiveCD ==> bug reproduces

Downgrading the kernel on the 16.04.2 installation didn't reintroduce the bug.

Revision history for this message
Paul White (paulw2u) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. We are sorry that we do not always have the capacity to review all reported bugs in a timely manner.

Ubuntu 16.04 (xenial) reached end-of-standard-support on April 29, 2021.

I'm setting the status of this bug to 'Incomplete' as it's not seen any activity for some time. If this is still an issue when using a currently maintained release of Ubuntu then please let us know which one(s) otherwise this bug report can be left to expire in approximately 60 days time.

Changed in xorg (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for xorg (Ubuntu) because there has been no activity for 60 days.]

Changed in xorg (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.