DRI_PRIME with radeon/intel windows do not draw

Bug #1430888 reported by Simon K
60
This bug affects 11 people
Affects Status Importance Assigned to Milestone
X.Org X server
New
Undecided
Unassigned
mesa (Ubuntu)
Fix Released
High
Timo Aaltonen
Declined for Vivid by Timo Aaltonen

Bug Description

I'm using Ubuntu 15.04 and Xorg version 1:7.7+7ubuntu2

Step to reproduce:
start "DRI_PRIME=1 steam" (or any other complex 3D program like minecraft)

What is expected:
the program should show it's window(s), those should have the same content as if started without "DRI_PRIME".

What actually happens:
most times the program just shows a "freezed" version of the background the window appeared on.

Additional Informations:
I have the newest BIOS version.

ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: xorg 1:7.7+7ubuntu2
ProcVersionSignature: Ubuntu 3.19.0-7.7-generic 3.19.0
Uname: Linux 3.19.0-7-generic x86_64
NonfreeKernelModules: wl
.tmp.unity.support.test.0:

ApportVersion: 2.16.2-0ubuntu2
Architecture: amd64
CompizPlugins: No value set for `/apps/compiz-1/general/screen0/options/active_plugins'
CompositorRunning: compiz
CompositorUnredirectDriverBlacklist: '(nouveau|Intel).*Mesa 8.0'
CompositorUnredirectFSW: true
Date: Wed Mar 11 17:01:13 2015
DistUpgraded: Fresh install
DistroCodename: vivid
DistroVariant: ubuntu
DkmsStatus:
 bcmwl, 6.30.223.248+bdcom, 3.18.0-13-generic, x86_64: installed
 bcmwl, 6.30.223.248+bdcom, 3.19.0-7-generic, x86_64: installed
 virtualbox, 4.3.24, 3.19.0-7-generic, x86_64: installed
ExtraDebuggingInterest: Yes
GraphicsCard:
 Intel Corporation Core Processor Integrated Graphics Controller [8086:0046] (rev 02) (prog-if 00 [VGA controller])
   Subsystem: Hewlett-Packard Company Device [103c:1486]
 Advanced Micro Devices, Inc. [AMD/ATI] Park [Mobility Radeon HD 5430/5450/5470] [1002:68e0] (rev ff) (prog-if ff)
MachineType: Hewlett-Packard HP TouchSmart tm2 Notebook PC
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.19.0-7-generic root=UUID=35d0b52c-aa5e-48d2-9eec-f7a6036f2a56 ro splash drm.rnodes=1 vt.handoff=7
SourcePackage: xorg
SystemImageInfo:
 current build number: 0
 device name:
 channel: daily
 last update: Unknown
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 02/18/2011
dmi.bios.vendor: Insyde
dmi.bios.version: F.25
dmi.board.asset.tag: Base Board Asset Tag
dmi.board.name: 1486
dmi.board.vendor: Hewlett-Packard
dmi.board.version: 83.20
dmi.chassis.asset.tag: CNU0250216
dmi.chassis.type: 10
dmi.chassis.vendor: Hewlett-Packard
dmi.chassis.version: Chassis Version
dmi.modalias: dmi:bvnInsyde:bvrF.25:bd02/18/2011:svnHewlett-Packard:pnHPTouchSmarttm2NotebookPC:pvr0489200000252A20001220000:rvnHewlett-Packard:rn1486:rvr83.20:cvnHewlett-Packard:ct10:cvrChassisVersion:
dmi.product.name: HP TouchSmart tm2 Notebook PC
dmi.product.version: 0489200000252A20001220000
dmi.sys.vendor: Hewlett-Packard
version.compiz: compiz 1:0.9.12.1+15.04.20150303-0ubuntu1
version.ia32-libs: ia32-libs N/A
version.libdrm2: libdrm2 2.4.59-0ubuntu1
version.libgl1-mesa-dri: libgl1-mesa-dri 10.5.0-0ubuntu1
version.libgl1-mesa-dri-experimental: libgl1-mesa-dri-experimental N/A
version.libgl1-mesa-glx: libgl1-mesa-glx 10.5.0-0ubuntu1
version.xserver-xorg-core: xserver-xorg-core 2:1.16.2.901-1ubuntu4
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev 1:2.9.0-1ubuntu2
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:7.4.0-2ubuntu2
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.99.917-1~exp1ubuntu2
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:1.0.11-1ubuntu2
xserver.bootTime: Tue Mar 10 10:39:26 2015
xserver.configfile: default
xserver.logfile: /var/log/Xorg.0.log
xserver.outputs:
 product id 38164
 vendor AUO
xserver.version: 2:1.16.2.901-1ubuntu4

Revision history for this message
Simon K (octav14n) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in xorg (Ubuntu):
status: New → Confirmed
Revision history for this message
Wolfgang Wallner (wolfgang-wallner) wrote :

This bug is already present in 14.10.

My system is a HP Pavilion laptop with a muxless Intel/AMD combination (Intel Sandybridge HD graphics and AMD Radeon HD6770).

A Workaround that works most of the time is to press Win+D again and again to switch between desktop and game application.
After a few iterations the problem is usually gone: once a game (or steam) starts drawing, everything works fine.

Revision history for this message
Simon K (octav14n) wrote :

Could you please check your "/var/log/Xorg.0.log" to see if it contains the following Text:
reporting 7 6 5 37

For me it repeats very often if I've started an 3D program with DRI_PRIME where this Error appears.
This Message will repeat very often like:

[ 1033.178] reporting 7 6 5 37
[ 1033.280] reporting 7 6 5 37
[ 1046.783] reporting 7 6 5 37
[ 1083.116] reporting 7 6 5 37

Revision history for this message
Wolfgang Wallner (wolfgang-wallner) wrote :

In my case, starting steam causes the text 'reporting 9 5 33 271' to be added to "/var/log/Xorg.0.log" three times.
It's always printed twice in a row and again a few seconds later.
For example these are two starts of steam:

[ 17002.853] reporting 9 5 33 271
[ 17002.878] reporting 9 5 33 271
[ 17006.628] reporting 9 5 33 271
[ 17021.267] reporting 9 5 33 271
[ 17021.297] reporting 9 5 33 271
[ 17025.236] reporting 9 5 33 271

But this does happen with and without DRI_PRIME=1, so I don't know if it is related to this bug.

Revision history for this message
Wolfgang Wallner (wolfgang-wallner) wrote :

Additional note regarding compositing:

*) The problem happens regardless if compositing is enabled or disabled.
*) Enabling compositing fixes the problem (as far as I can tell always).

If I start with compositing on, I need to toggle it for the problem to be gone.
If I start with compositing off, I just need to enable it.

--> Something that is done when compositing is turned on fixes the problem.

(I use KDE and use Shift+Alt+F12 to enable/disable compositing)

Revision history for this message
Wolfgang Wallner (wolfgang-wallner) wrote :

The problem is also independent of multi-monitor configurations.
I use a dual monitor setup, and it happens regardless if both monitors are activated or just one of them.

Revision history for this message
Wolfgang Wallner (wolfgang-wallner) wrote :

I tried to reproduce the problem with glxgears.
It can happen, but it is harder to reproduce than with steam.
For steam it happens every time, for glxgears it only happened twice out of ~15 tries.

But when it happens in glxgears, no "reporting 9 5 33 271" lines are added to Xorg.0.log, so I think these are two different issues.

The compositing-enable trick also works for glx_gears.

As far as I can tell the problem only happens with certain programs.
I think it depends on whether or not OpenGL is used for drawing.
For me it happens for

*) Steam
*) Games (both Steam and others like e.g. supertuxkart)
*) glxgears

It does not happen for typical office programs that use GUI toolkits like Qt or GTK, e.g. okular, gedit, etc.

According to [1] Steam uses a custom toolkit called VGUI, which is also uses by their Source engine.
Thus I would guess that it is also drawn using OpenGL.

[1] http://stackoverflow.com/questions/2389717/what-gui-toolkit-does-valve-use-for-steam

Changed in xorg (Ubuntu):
importance: Undecided → High
Revision history for this message
Christoph Buchner (bilderbuchi) wrote :

I see this too with Steam, only for me the log string is " reporting 6 8 17 141". Ctrl-Win-D workaround seems to work.
Any updates on this in the meantime?

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

I think this is a compiz bug

affects: xorg (Ubuntu) → compiz (Ubuntu)
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

more probably candidate is mesa, please test yakkety which has 12.0.1

commit 9ee3f097b65398250e836785a7e87520eda8298d
Author: Michel Dänzer <email address hidden>
Date: Thu Jun 9 15:15:19 2016 +0900

    st/dri: Clear drawable texture_mask in dri2_invalidate_drawable

    This makes sure that dri_set_tex_buffer2 -> dri_drawable_validate_att
    will re-create the front left attachment buffer after the drawable got
    invalidated.

    Fixes window contents not updating until the window is resized when
    using DRI2 PRIME.

    Reviewed-by: Nicolai Hähnle <email address hidden>
    Reviewed-by: Marek Olšák <email address hidden>

affects: compiz (Ubuntu) → mesa (Ubuntu)
Changed in mesa (Ubuntu):
assignee: nobody → Timo Aaltonen (tjaalton)
status: Confirmed → Incomplete
Revision history for this message
Alessandro Viprati (vipri-alessandro) wrote :

Similar problem in Ubuntu 16.04.1 (Unity), with AMD APU (AMD A4-7210 APU with AMD Radeon R3 Graphics "MULLINS") + AMD GPU (AMD Radeon R5 M330) on a Lenovo Yoga 500-14ACL.

Everytime I launch a 3D game application with DRI_PRIME=1, the system hangs and returns to the lightdm login screen.

I also tried to use a xubuntu session (installing xubuntu-core package) with xfwm or compton, but the problem persists.

tags: added: xenial
Revision history for this message
Alessandro Viprati (vipri-alessandro) wrote :

Tell me if you need any info or log file, this is a really critical bug and, for now, I can't use my dedicated GPU on Ubuntu.

Revision history for this message
munbi (gabriele) wrote :

Same problem here: Dell Latitude E6540 with Intel HD4000 + AMD Radeon HD8790M (OLAND), Ubuntu 16.04 updated.
Some OpenGL programs do not refresh the windows and shows only artifacts from background when using DRI_PRIME=1 to lunch (e.g. with kicad pcbnew)

Followed comment #11 suggestion and tried latest Oibaf PPA ( https://launchpad.net/~oibaf/+archive/ubuntu/graphics-drivers?field.series_filter=xenial ) with:

- mesa 12.1~git1608230730.96ea75~gd~x
- xserver-xorg-video-ati 1:7.7.99+git1608230731.b08670~gd~x
- xserver-xorg-video-intel 2:2.99.917+git1608121931.c8fc7f~gd~x
- libdrm 2.4.70+git1608210630.b214b0~gd~x
- llvm-toolchain-3.9 1:3.9~+rc2-1~exp1~gd~x

with same result, so updating to mesa 12.1 seems does not solve the problem.

Revision history for this message
munbi (gabriele) wrote :

Don't know if it can help, but enabling DRI3 solves the problem for me.
Just added this to /usr/share/X11/xorg.conf.d/20-intel.conf :

Section "Device"
    Identifier "Card0"
    Driver "Intel"
    Option "DRI" "3"
EndSection

ad restarted X

Revision history for this message
Luigi R. (xluigi84) wrote :

Same for me on Ubuntu 16.0.1. I get a black screen by using DRI_PRIME=1 glxgears but the frame is highen the Intel card.

Is it normal that xrandr --listproviders returns 2 providers for the AMD/ATI card?

Providers: number : 3
Provider 0: id: 0x6b cap: 0x9, Source Output, Sink Offload crtcs: 3 outputs: 5 associated providers: 2 name:Intel
Provider 1: id: 0x43 cap: 0x6, Sink Output, Source Offload crtcs: 4 outputs: 0 associated providers: 2 name:CAICOS @ pci:0000:01:00.0
Provider 2: id: 0x43 cap: 0x6, Sink Output, Source Offload crtcs: 4 outputs: 0 associated providers: 2 name:CAICOS @ pci:0000:01:00.0

lspci | grep -E 'VGA|Display'
00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Seymour [Radeon HD 6400M/7400M Series] (rev ff)

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

I'm going to assume this is fixed with mesa 12.0.6 and if you enable DRI3 or uninstall xserver-xorg-video-intel (which lets it fall back on -modeset which uses DRI3)

Changed in mesa (Ubuntu):
status: Incomplete → Fix Released
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.