From mboxrd@z Thu Jan 1 00:00:00 1970
From: bugzilla-daemon@freedesktop.org
Subject: [Bug 102008] DRI_PRIME causes X Error of failed request: BadAlloc
(insufficient resources for operation)
Date: Tue, 01 Aug 2017 21:20:24 +0000
Message-ID:
Bug ID
102008
Summary
DRI_PRIME causes X Error of failed request: BadAlloc (insuff=
icient resources for operation)
Product
Mesa
Version
17.2
Hardware
x86-64 (AMD64)
OS
Linux (All)
Status
NEW
Severity
critical
Priority
medium
Component
Drivers/Gallium/radeonsi
Assignee
dri-devel@lists.freedesktop.org
Reporter
bartos.petr@gmail.com
QA Contact
dri-devel@lists.freedesktop.org
Hi,
I'm on Fedora using git mesa from che/mesa Copr repository. From build bas=
ed
on commit 5ffe0c9 I am encountering problem with using discrete Radeon R5 M=
240
via DRI_PRIME. When using wine, it crashes with message:
X Error of failed request: BadAlloc (insufficient resources for operation)
Major opcode of failed request: 148 ()
Minor opcode of failed request: 2
Serial number of failed request: 4615
Current serial number in output stream: 4616
Steam via wine with DRI_PRIME starts, but crashes whenever any game is star=
ted
or when system information dialog is invoked (with above message).
Native Steam with DRI_PRIME does not start at all, some native games work
(Amnesia), some not (Serious Sam Fusion), however message printed when using
wine does not appear.
Last mesa built which works for me is based on commit 7250cba.
I'm using modesetting driver for both GPUs. Programs with DRI_PRIME starts =
when
DRI3 is disabled via LIBGL_DRI3_DISABLE, however in that case image is
distorted and thus unusable.
I thought it might be some problem related to 101867 or 101876, however the=
se
should be fixed and latest mesa build based on commit b8bea9a still does not
work for me.
Please track down which commit exactly broke it.
So I have some partial results. First problem I've encoutered is that I had to use patch from https://bugs.freedesktop.org/show_bug.= cgi?id=3D101774 in order to be able to build mesa between 7250cbafb90271579a1d07160498e902996cbc97 and 5ffe0c9e1be0257de1943135244419cbc86a6d84 so I hope it does not affect these results. Second problem I found is that problem is connected with using modesetting = DDX drivers, and between working and non-working commits is some problem causing segfault with modesetting drivers (X do not start). So I have tested not on= ly particular commits, but also DDX driver combinations: intel - IGPU, DRI3, SNA accel radeon - DGPU, DRI3, glamor accel modesetting - both, default settings So far I managed to find this (I have not finished bisecting yet, so these commits are ones I've found so far): f33d8af7aa354d00808f8bfd55028c396c706635 intel, radeon - OK intel, modesetting - OK modesetting, radeon - ERROR modesetting, modesetting - ERROR 81fb1547772d42c527318837d4207ecdb6899e5d intel, radeon - OK intel, modesetting - SEGFAULT modesetting, radeon - SEGFAULT modesetting, modesetting - SEGFAULT 3645268748c44825ce8d37bf03f684731eb2652a intel, radeon - OK intel, modesetting - SEGFAULT modesetting, radeon - SEGFAULT modesetting, modesetting - SEGFAULT 84ed8b67c56b323cd834d463151e1a3c0430c53e intel, radeon - OK intel, modesetting - OK modesetting, radeon - OK modesetting, modesetting - OK So it seems between somewhere between 84ed8b67c56b323cd834d463151e1a3c0430c= 53e and f33d8af7aa354d00808f8bfd55028c396c706635 (https://cgit.freedesktop.org/mesa/mesa/log/?qt=3Drange&q=3D84e= d8b67c56b323cd834d463151e1a3c0430c53e..f33d8af7aa354d00808f8bfd55028c396c70= 6635) modesetting driver started to segfault which was fixed, but this fix probab= ly also caused problem which I have reported. It also seems there is no problem when using only intel+radeon DDX drivers.=
| What | Removed | Added |
|---|---|---|
| CC | mike@fireburn.co.uk |
I've been seeing this too, out of interest Bartos do 32bit app= s render correctly with DRI_PRIME I've been getting a black screen?
I also have this problem to with my laptop (Intel Skylake iGPU= + AMD TOPAZ dGPU) The issue is only with opengl, radv works fine. The BadAlloc only happens with some window sizes. It can be easily tested w= ith glxgears. For instance, there is no problem with 1600x900 or default size, 300x300. With this height (300), I can resize the width between 257 and 448 without hitting a BadAlloc. With a width of 192, I have no problem with the following heights: 123, 124, 129, 123, 131, 132, 134, 135, 136, 139, 140, 145, 146, 147, 148, = 150, 151, 152, 155, 156, 161 I have a BadAlloc with those heights: 125, 126, 127, 128, 133, 137, 138, 141, 142, 143, 144, 149, 153, 154, 157, = 158, 159, 160
| What | Removed | Added |
|---|---|---|
| Component | Drivers/Gallium/radeonsi | Drivers/DRI/i965 |
| QA Contact | dri-devel@lists.freedesktop.org | intel-3d-bugs@lists.freedesktop.org |
| Assignee | dri-devel@lists.freedesktop.org | intel-3d-bugs@lists.freedesktop.org |
So after applying patch to avoid segfault (from 655a32f729a46176c1fc0c1727b33c15c69cad78) I was able to further bisect and found that error is caused by commit 34e1ccbfbe851ecf4ebbfc86d70da384d176d994 Therefore I have also changed component from radeonsi to i965. As for rendering, Mike, I am using plasma where I must disable kwin composi= tor for full screen apps, else I see also blackscreen (but I did not notice, th= at is is related to 32 or 64bit apps)