Corruption on windowed 3D apps running on dGPU (Intel/AMD)

Bug #1727401 reported by Timo Aaltonen on 2017-10-25
16
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mesa
Fix Released
Medium
OEM Priority Project
Critical
ethan.hsieh
mesa (Ubuntu)
Undecided
Timo Aaltonen
Xenial
Undecided
Unassigned
Artful
Undecided
Unassigned

Bug Description

[Impact]

Corruption is seen on windowed 3D apps running on dGPU

[Test case]

Get a certain Intel/AMD hybrid machine, run 'DRI_PRIME=1 glxgears', see how the window has corrupted gfx.

The fix is to patch Intel i965_dri driver.

[Regression potential]

There could be a slight loss of performance, but corruption free behaviour.

Timo Aaltonen (tjaalton) on 2017-11-08
Changed in mesa (Ubuntu):
assignee: nobody → Timo Aaltonen (tjaalton)
Changed in mesa:
importance: Unknown → Medium
status: Unknown → In Progress
Brian Murray (brian-murray) wrote :

Is this fixed in bionic yet?

Timo Aaltonen (tjaalton) wrote :

yes, but it's stuck in bionic-proposed until libva transition is done, aiui

Hello Timo, or anyone else affected,

Accepted mesa into artful-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/mesa/17.2.4-0ubuntu1~17.10.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-artful to verification-done-artful. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-artful. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in mesa (Ubuntu Artful):
status: New → Fix Committed
tags: added: verification-needed verification-needed-artful
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mesa - 17.2.4-0ubuntu2

---------------
mesa (17.2.4-0ubuntu2) bionic; urgency=medium

  * Import changes from 17.2.2-0ubuntu2
  * Make mesa-va-drivers enhance libva2 rather than libva1.
  * vulkan-mir.patch: Dropped, breaks radeon vulkan driver. (LP: #1720890)

 -- Timo Aaltonen <email address hidden> Wed, 08 Nov 2017 16:29:58 +0200

Changed in mesa (Ubuntu):
status: New → Fix Released
Adam Conrad (adconrad) wrote :

Hello Timo, or anyone else affected,

Accepted mesa into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/mesa/17.2.4-0ubuntu1~16.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in mesa (Ubuntu Xenial):
status: New → Fix Committed
tags: added: verification-needed-xenial
Changed in oem-priority:
importance: Undecided → Critical
ethan.hsieh (ethan.hsieh) wrote :

Cannot reproudce the issue on xenial.

A. Test Result:
1. DRI_PRIME=1 glxgear -info: Pass
2. Change Resolution: Pass
3. Scale for menu and title bars: Pass
4. Unigine_Heaven-4.0.run (5mins): Pass

B. Test Environment:
1. Ubuntu: Xenial 16.04
2. Graphic Card:
 a. AMD [1002:9874] (rev e2)
 b. Intel [8086:5917] (rev 07) + AMD [1002:6900] (rev ff)
3.Installed package: (Online Update: xenial-proposed: mesa)
libdrm-common all 2.4.83-1~16.04.1
libdrm2 amd64 2.4.83-1~16.04.1
libcapnp-0.5.3 amd64 0.5.3-2ubuntu1
libdrm-amdgpu1 amd64 2.4.83-1~16.04.1
libwayland-egl1-mesa amd64 17.2.4-0ubuntu1~16.04.2
libwayland-client0 amd64 1.12.0-1~ubuntu16.04.2
libwayland-server0 amd64 1.12.0-1~ubuntu16.04.2
libegl1-mesa amd64 17.2.4-0ubuntu1~16.04.2
libgbm1 amd64 17.2.4-0ubuntu1~16.04.2
libmircore1 amd64 0.26.3+16.04.20170605-0ubuntu1.1
libmircommon7 amd64 0.26.3+16.04.20170605-0ubuntu1.1
libmirprotobuf3 amd64 0.26.3+16.04.20170605-0ubuntu1.1
libmirclient9 amd64 0.26.3+16.04.20170605-0ubuntu1.1
libllvm5.0 amd64 1:5.0-3~16.04.1
libgl1-mesa-dri amd64 17.2.4-0ubuntu1~16.04.2

tags: added: verification-done-xenial
removed: verification-needed-xenial
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mesa - 17.2.4-0ubuntu1~16.04.2

---------------
mesa (17.2.4-0ubuntu1~16.04.2) xenial; urgency=medium

  * control: Relax build-dep on libclc-dev

 -- Timo Aaltonen <email address hidden> Wed, 22 Nov 2017 16:25:17 +0200

Changed in mesa (Ubuntu Xenial):
status: Fix Committed → Fix Released
Changed in oem-priority:
status: New → Fix Released
Łukasz Zemczak (sil2100) wrote :

Can we get this tested for artful as well?

Yuan-Chen Cheng (ycheng-twn) wrote :

per what I know, testing resource block by intel cpu bug testing.

Timo Aaltonen (tjaalton) wrote :

This patch broke the DRI driver on older gen4/4.5/5 Intel HW, see bugs 1735594 and 1741447

I've backported five commits from upstream to fix this properly, at least this backport doesn't crash on my HW anymore.

Changed in mesa (Ubuntu Xenial):
status: Fix Released → Triaged
Changed in mesa (Ubuntu):
status: Fix Released → In Progress
ethan.hsieh (ethan.hsieh) wrote :

@Timo

Here is the test result for mesa (17.2.4-0ubuntu1~16.04.3~1)

A. Test Result:
1. DRI_PRIME=1 glxgear: Pass
2. DRI_PRIME=1 glxgear -fulscreen: Pass
3. glxgear: Pass
4. glxgear -fulscreen: Pass
5. Change Resolution: Pass
6. Scale for menu and title bars: Pass
7. Unigine_Heaven-4.0.run (5mins): Pass
8. Unigine_Heaven-4.0.run (Fullscreen, 5mins): Pass

B. Test Environment:
1. Ubuntu: Xenial 16.04
2. Graphic Card:
 b. Intel [8086:5917] (rev 07) + AMD [1002:6900] (rev ff)
3.Installed package:
 a. Online Update
 b. mesa (17.2.4-0ubuntu1~16.04.3~1)
libglapi-mesa_17.2.4-0ubuntu1~16.04.3~1_amd64.deb
libgl1-mesa-dri_17.2.4-0ubuntu1~16.04.3~1_amd64.deb
libxatracker2_17.2.4-0ubuntu1~16.04.3~1_amd64.deb
libwayland-egl1-mesa_17.2.4-0ubuntu1~16.04.3~1_amd64.deb
libgl1-mesa-glx_17.2.4-0ubuntu1~16.04.3~1_amd64.deb
libgbm1_17.2.4-0ubuntu1~16.04.3~1_amd64.deb
libegl1-mesa_17.2.4-0ubuntu1~16.04.3~1_amd64.deb
4. src:
https://launchpad.net/~tjaalton/+archive/ubuntu/ppa/+files/mesa_17.2.4-0ubuntu1~16.04.3~1.dsc

Łukasz Zemczak (sil2100) wrote :

Hello Timo, or anyone else affected,

Accepted mesa into artful-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/mesa/17.2.4-0ubuntu1~17.10.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-artful to verification-done-artful. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-artful. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in mesa (Ubuntu):
status: In Progress → Fix Committed
Łukasz Zemczak (sil2100) wrote :

Hello Timo, or anyone else affected,

Accepted mesa into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/mesa/17.2.4-0ubuntu1~16.04.3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in mesa (Ubuntu Xenial):
status: Triaged → Fix Committed
tags: added: verification-needed-xenial
removed: verification-done-xenial
Changed in oem-priority:
status: Fix Released → Triaged
assignee: nobody → ethan.hsieh (ethan.hsieh)
ethan.hsieh (ethan.hsieh) wrote :

@Timo

Here is the test result of mesa (xenial-proposed)

A. Test Result:
1. DRI_PRIME=1 glxgear: Pass
2. DRI_PRIME=1 glxgear -fulscreen: Pass
3. glxgear: Pass
4. glxgear -fulscreen: Pass
5. Unigine_Heaven-4.0.run (5mins): Pass
6. Unigine_Heaven-4.0.run (Fullscreen, 5mins): Pass
7. DRI_PRIME=1 Unigine_Heaven-4.0.run (5mins): Pass
8. DRI_PRIME=1 Unigine_Heaven-4.0.run (Fullscreen, 5mins): Pass

B. Test Environment:
1. Ubuntu: Xenial 16.04
2. Graphic Card:
 b. Intel [8086:5917] (rev 07) + AMD [1002:6900] (rev ff)
3.Installed package:
 a. Online Update
 b. Enable xenial-proposed and then upgrade mesa
libglapi-mesa_17.2.4-0ubuntu1~16.04.3~1_amd64.deb
libgl1-mesa-dri_17.2.4-0ubuntu1~16.04.3~1_amd64.deb
libxatracker2_17.2.4-0ubuntu1~16.04.3~1_amd64.deb
libwayland-egl1-mesa_17.2.4-0ubuntu1~16.04.3~1_amd64.deb
libgl1-mesa-glx_17.2.4-0ubuntu1~16.04.3~1_amd64.deb
libgbm1_17.2.4-0ubuntu1~16.04.3~1_amd64.deb
libegl1-mesa_17.2.4-0ubuntu1~16.04.3~1_amd64.deb

tags: removed: verification-needed-xenial
Taihsiang Ho (taihsiangho) wrote :
Download full text (7.2 KiB)

Hi, I can't reproduce this issue with a fresh installed Artful on the I+A system[1] with gfx
  - Intel Corporation HD Graphics 520 [8086:1916] (rev 07)
  - Advanced Micro Devices, Inc. [AMD/ATI] Topaz XT [Radeon R7 M260/M265 / M340/M360 / M440/M445] [1002:6900] (rev 81)

I might need more information to reproduce and make sure this issue on Artful as well.

---

[1] Test machine - CID 201507-18697 - Dell Latitude E5570

[2] More information for reference (including package information)

ubuntu@201507-18697:~$ DISPLAY=:0 glxgears
Running synchronized to the vertical refresh. The framerate should be
approximately the same as the monitor refresh rate.
359 frames in 5.0 seconds = 71.667 FPS
300 frames in 5.0 seconds = 59.997 FPS
301 frames in 5.0 seconds = 60.002 FPS
300 frames in 5.0 seconds = 59.996 FPS
300 frames in 5.0 seconds = 60.000 FPS
301 frames in 5.0 seconds = 60.002 FPS
300 frames in 5.0 seconds = 59.996 FPS

ubuntu@201507-18697:~$ DISPLAY=:0 DRI_PRIME=1 glxgears
Running synchronized to the vertical refresh. The framerate should be
approximately the same as the monitor refresh rate.
302 frames in 5.0 seconds = 60.321 FPS
301 frames in 5.0 seconds = 59.996 FPS
301 frames in 5.0 seconds = 60.005 FPS
301 frames in 5.0 seconds = 59.989 FPS
301 frames in 5.0 seconds = 60.008 FPS

ubuntu@201507-18697:~$ uname -a
Linux 201507-18697 4.13.0-16-generic #19-Ubuntu SMP Wed Oct 11 18:35:14 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

ubuntu@201507-18697:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 17.10
Release: 17.10
Codename: artful
ubuntu@201507-18697:~$ apt-cache policy libdrm-amdgpu1
libdrm-amdgpu1:
  Installed: 2.4.83-1
  Candidate: 2.4.83-1
  Version table:
 *** 2.4.83-1 500
        500 http://us.archive.ubuntu.com/ubuntu artful/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu artful/main amd64 Packages
        100 /var/lib/dpkg/status

ubuntu@201507-18697:~$ apt-cache policy libgl1-mesa-dri
libgl1-mesa-dri:
  Installed: 17.2.2-0ubuntu1
  Candidate: 17.2.2-0ubuntu1
  Version table:
 *** 17.2.2-0ubuntu1 500
        500 http://us.archive.ubuntu.com/ubuntu artful/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu artful/main amd64 Packages
        100 /var/lib/dpkg/status

ubuntu@201507-18697:~$ dpkg -l libdrm-common libdrm2 libcapnp-0.5.3 libdrm-amdgpu1 libwayland-egl1-mesa libwayland-client0 libwayland-server0 libegl1-mesa libgbm1 libmircore1 libmircommon7 libmirprotobuf3 libmirclient9 libllvm5.0 libgl1-mesa-dri
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-=============================================-===========================-===========================-===============================================================================================
ii libcapnp-0.5.3:amd64 0.5.3-2ubuntu2 amd64 Cap'n Proto C++ library
ii libdrm-am...

Read more...

Taihsiang Ho (taihsiangho) wrote :
Download full text (6.2 KiB)

Test the same hardware as comment #15. This time I use proposed stack. I could not reproduce the issue.

More information for reference (including the package information):

ubuntu@201507-18697:~$ DISPLAY=:0 glxgears
Running synchronized to the vertical refresh. The framerate should be
approximately the same as the monitor refresh rate.
308 frames in 5.0 seconds = 61.559 FPS
299 frames in 5.0 seconds = 59.612 FPS
299 frames in 5.0 seconds = 59.598 FPS

ubuntu@201507-18697:~$ DISPLAY=:0 DRI_PRIME=1 glxgears
Running synchronized to the vertical refresh. The framerate should be
approximately the same as the monitor refresh rate.
325 frames in 5.0 seconds = 64.859 FPS
300 frames in 5.0 seconds = 59.990 FPS
300 frames in 5.0 seconds = 59.792 FPS
297 frames in 5.0 seconds = 59.214 FPS
298 frames in 5.0 seconds = 59.584 FPS
301 frames in 5.0 seconds = 60.008 FPS
301 frames in 5.0 seconds = 60.000 FPS

ubuntu@201507-18697:~$ uname -a
Linux 201507-18697 4.13.0-25-generic #29-Ubuntu SMP Mon Jan 8 21:14:41 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

ubuntu@201507-18697:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 17.10
Release: 17.10
Codename: artful
ubuntu@201507-18697:~$

ubuntu@201507-18697:~$ dpkg -l libdrm-common libdrm2 libcapnp-0.5.3 libdrm-amdgpu1 libwayland-egl1-mesa libwayland-client0 libwayland-server0 libegl1-mesa libgbm1 libmircore1 libmircommon7 libmirprotobuf3 libmirclient9 libllvm5.0 libgl1-mesa-dri
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-=============================================-===========================-===========================-===============================================================================================
ii libcapnp-0.5.3:amd64 0.5.3-2ubuntu2 amd64 Cap'n Proto C++ library
ii libdrm-amdgpu1:amd64 2.4.83-1 amd64 Userspace interface to amdgpu-specific kernel DRM services -- runtime
ii libdrm-common 2.4.83-1 all Userspace interface to kernel DRM services -- common files
ii libdrm2:amd64 2.4.83-1 amd64 Userspace interface to kernel DRM services -- runtime
ii libegl1-mesa:amd64 17.2.4-0ubuntu1~17.10.2 amd64 free implementation of the EGL API -- runtime
ii libgbm1:amd64 17.2.4-0ubuntu1~17.10.2 amd64 generic buffer management API -- runtime
ii libgl1-mesa-dri:amd64 17.2.4-0ubuntu1~17.10.2 amd64 free implementation of the OpenGL API -- DRI modules
ii libllvm5.0:amd64 1:5.0-3 amd64 Modular comp...

Read more...

tags: added: verification-done-xenial
Emmanuel Grumbach (egrumbach) wrote :

Thanks, I'll get to this on Sunday.

Timo Aaltonen (tjaalton) wrote :

Hello Timo, or anyone else affected,

Accepted mesa into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/mesa/17.2.4-0ubuntu1~16.04.4 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: added: verification-needed-xenial
removed: verification-done-xenial
tags: added: verification-done verification-done-artful verification-done-xenial
removed: verification-needed verification-needed-artful verification-needed-xenial
Timo Aaltonen (tjaalton) wrote :

looks like artful got verified

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mesa - 17.2.4-0ubuntu1~17.10.2

---------------
mesa (17.2.4-0ubuntu1~17.10.2) artful; urgency=medium

  * i965-disable-l3-cache-alloc-for-ext-buffers.diff:
    - Replaced with five backported commits from upstream
      (LP: #1727401, #1735594)

mesa (17.2.4-0ubuntu1~17.10.1) artful; urgency=medium

  * Backport to artful.
  * vulkan-mir.patch: Dropped, breaks radeon vulkan driver. (LP:
    #1720890)

mesa (17.2.4-0ubuntu1) bionic; urgency=medium

  * New upstream bugfix release. (LP: #1727390)
  * i965-disable-l3-cache-alloc-for-ext-buffers.diff: Fix corruption
    running windowed 3D apps on dGPU. (LP: #1727401)

 -- Timo Aaltonen <email address hidden> Tue, 09 Jan 2018 15:28:48 +0200

Changed in mesa (Ubuntu Artful):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for mesa has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mesa - 17.2.4-0ubuntu1~16.04.4

---------------
mesa (17.2.4-0ubuntu1~16.04.4) xenial; urgency=medium

  * control: Relax mesa-opencl-icd dependency on libclc. (LP: #1743018)

mesa (17.2.4-0ubuntu1~16.04.3) xenial; urgency=medium

  * i965-disable-l3-cache-alloc-for-ext-buffers.diff:
    - Replaced with five backported commits from upstream
      (LP: #1727401, #1735594)

 -- Timo Aaltonen <email address hidden> Sat, 13 Jan 2018 09:06:08 +0200

Changed in mesa (Ubuntu Xenial):
status: Fix Committed → Fix Released
Changed in oem-priority:
status: Triaged → Fix Released
Timo Aaltonen (tjaalton) on 2018-03-01
Changed in mesa (Ubuntu):
status: Fix Committed → Fix Released
Changed in mesa:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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