Repository navigation
Description
Describe the bug
On a Raspberry Pi 4B (4GB version), running a game that uses Vulkan for rendering results in GPU hang and reset.
The same exact game with the same exact setup, works without problems when using OpenGL. The game is an old Windows (2005) game, run through Wine (11.0-amd64-wow64 version) + DXVK-Sarek (1.14.1 version). The amd64 Wine runs through Box64 arm64 version (v0.4.4 version with dynarec) in order for everything to work. When using WineD3D (OpenGL) by removing the DXVK (Vulkan) acceleration/translation layer from the chain everything works as expected (albeit slowly).
Steps to reproduce the behaviour
- Make a working directory, and download the relevant Wine and DXVK builds in the
buildssubdirectory - Add a d3d9 game to the
gamessubdirectory alongside thebuildssubdirectory - Add the
game-runscript from bellow alongside thebuildsandgamesdirectory - Launch
game-runscript
Builds used:
wine-11.0-amd64-wow64
dxvk-sarek-1.14.1
batocera-bcm2711-44-20261116
game-run script
# cat game-run
#!/bin/bash
export WORKDIR="$(realpath $(dirname $0))"
export WINE_BUILD="$WORKDIR/builds/wine-11.0-amd64-wow64"
export DXVK_BUILD="$WORKDIR/builds/dxvk-sarek-1.14.1/build"
export GAME_BUILD="$WORKDIR/games/sample-game"
export GAME_EXECUTABLE="game.exe"
echo "using wine: $WINE_BUILD"
echo "using dxvk: $DXVK_BUILD"
echo "using game: $GAME_BUILD"
export PATH="$PATH:$WINE_BUILD/bin"
export WINEPREFIX="$WORKDIR/prefixes/.wine"
export WINEDLLOVERRIDES="mscoree,mshtml="
[ ! -e "$WINEPREFIX" ] && wineboot --init
cp $DXVK_BUILD/x64/*.dll "$WINEPREFIX/drive_c/windows/system32"
cp $DXVK_BUILD/x32/*.dll "$WINEPREFIX/drive_c/windows/syswow64"
export WINEDLLOVERRIDES="$WINEDLLOVERRIDES;d3d8,d3d9,d3d10core,d3d11,dxgi=n,b"
export DXVK_HUD=1
export DISPLAY=
export LOG_PATH="$WORKDIR/logs"
rm -rf "$LOG_PATH"
mkdir -p "$LOG_PATH"
export MESA_VK_ABORT_ON_DEVICE_LOSS=1
export WINEDEBUG=+vulkan,+timestamp
export DXVK_LOG_LEVEL=debug
export DXVK_LOG_PATH="$LOG_PATH"
dmesg -C
export WINEDLLOVERRIDES="$WINEDLLOVERRIDES;dinput8=n,b"
cd "$GAME_BUILD"
wine "$GAME_EXECUTABLE" 2>&1 | tee "$LOG_PATH/wine.log"
dmesg > "$LOG_PATH/dmesg.log"
Device (s)
Raspberry Pi 4 Mod. B
System
System info:
Model: Raspberry_Pi_4_Model_B_Rev_1_2
System: Linux 6.18.54-v8
Architecture: aarch64
Board: bcm2711
CPU Cores: 4
CPU Max Frequency: 1500 MHz
CPU Features: asimd
Available Memory: 3190/3723 MB
Display Server: wayland
Display Compositor: labwc
Display Output: HDMI-A-1
Display Resolution: 1920x1080
Display Refresh Rate: 60.000Hz
OS version: 44Ou1 2026/11/16 01:23
Specific versions:
# uname -a
Linux batocera 6.18.54-v8 #1 SMP PREEMPT Mon Nov 16 01:34:28 CET 2026 aarch64 GNU/Linux
# box64 --version
Box64 arm64 v0.4.4 nogit with Dynarec built on Nov 16 2026 01:19:56
# wine --version
wine-11.0
Logs
dmesg logs:
# cat logs/dmesg.log
[ 1067.326137] v3d fec00000.v3d: [drm:v3d_reset [v3d]] *ERROR* Resetting GPU for hang.
[ 1067.326254] v3d fec00000.v3d: [drm:v3d_reset [v3d]] *ERROR* V3D_ERR_STAT: 0x00001000
[ 1068.350122] v3d fec00000.v3d: [drm:v3d_reset [v3d]] *ERROR* Resetting GPU for hang.
[ 1068.350205] v3d fec00000.v3d: [drm:v3d_reset [v3d]] *ERROR* V3D_ERR_STAT: 0x00001000
[ 1069.406127] v3d fec00000.v3d: [drm:v3d_reset [v3d]] *ERROR* Resetting GPU for hang.
[ 1069.406196] v3d fec00000.v3d: [drm:v3d_reset [v3d]] *ERROR* V3D_ERR_STAT: 0x00001000
[ 1070.430122] v3d fec00000.v3d: [drm:v3d_reset [v3d]] *ERROR* Resetting GPU for hang.
[ 1070.430178] v3d fec00000.v3d: [drm:v3d_reset [v3d]] *ERROR* V3D_ERR_STAT: 0x00001000
(nothing relevant is written before or after these)
Additional context
No response
Activity
mairacanal commentedon Nov 23, 2026
@popcornmix I'm taking a look at this issue and I'll get back with a diagnostic soon.
popcornmix commentedon Nov 23, 2026
Thanks - was just about to ping you. I can reproduce and confirm issue occurs on pi5 too.
agorgl commentedon Nov 23, 2026
Is there a simpler way to reproduce this than my setup? I'm wondering what steps did you take to find the root of this problem (as I was trying to do this myself too)
popcornmix commentedon Nov 23, 2026
I followed your instructions. I used a free 2005-era 32-bit D3D9 demo (Irrlicht 1.8.5, the Quake3Map example).
mairacanal commentedon Nov 23, 2026
I believe this is a Box64 bug, not a kernel or Mesa bug. I reproduced the issue with Box64 v0.4.4, but when I tested Box64 main branch (commit ptitSeb/box64@5e5eb2a), I wasn't able to reproduce the issue.
Notice that due to a Box64 v0.4.4 bug, we are unable to run Box64 with 16K pages. This issue is also addressed in the main branch.
Therefore, I'd recommend you to update your Box64 version.
agorgl commentedon Nov 23, 2026
Are you sure this is a Box64 bug? Because with
Box64 -> wine -> wined3d -> gameit works, but withBox64 -> wine -> dxvk -> gameit hangs the GPU, and from the wine / dxvk logs it seems like that some vulkan submission causes the v3d/v3dv driver to crash.Also, if you are talking about virtual memory page size, in my system is:
so I suppose the 16K pages bug is irrelevant?
popcornmix commentedon Nov 23, 2026
Pi 4 doesn't do 16k pagesize, so that's not your problem.
I've tried building latest box64 and it fixed it for me too.
mairacanal commentedon Nov 23, 2026
I understand your point, but I wasn't able to reproduce your issue on the main branch, even though I reproduced it on v0.4.4. This is what made me conclude that it's a Box64 issue.
I used the same compilation configuration on both branches, with the same kernel and Mesa version, the same Wine and DXVK, and the same game. Therefore, the only thing that changed was Box64.
Could you please test it on your end and confirm if it fixes the issue? If you still can reproduce the issue with ptitSeb/box64@5e5eb2a, please share the name of the game you are playing, so that I can test the exact same game.
The 16K pages bug is just a "fun fact", as it's something that caught my attention when running Box64 on RPi 5.
agorgl commentedon Nov 23, 2026
I'm cross compiling box64 for arm64 right now from master, give me some time and I'll report my results back
agorgl commentedon Nov 23, 2026
Well, I can still reproduce the issue with box64 master
Cross compiled using:
The game is
Need for Speed Most Wanted (2005)(speed.exe) with ThirteenAG's Widescreen Fix applied.popcornmix commentedon Nov 23, 2026
Can you confirm if you see the issue with Irrlicht 1.8.5? I had issue with v0.4.4 but not with v0.4.5.
agorgl commentedon Nov 24, 2026
I can confirm that for
games/irrlicht-1.8.5/bin/Win32-VisualStudio/02.Quake3Map.exewith the(b) Direct3D 9.0crenderer on bothBox64 arm64 v0.4.4andBox64 arm64 v0.4.5 5e5eb2adbI get the exact same gpu hang/reset.popcornmix commentedon Nov 24, 2026
Not what I get. Are you 100% sure you are running the box you've built (including any dependent libraries)?
Going further I can identify the exact Box commit that causes the failure.
Bisecting Box64 between v0.4.4 (hangs) and 5e5eb2a (no hang) on a Pi 5 (4K page kernel, Mesa 26.2.2, Wine 11.0 + DXVK-Sarek 1.14.1, Irrlicht Quake3Map D3D9 demo, 90s per run) gives:
ptitSeb/box64@f9d5835
[CUSTOMMEM] Fixed race between concurrent mmaps silently overwriting guest mappings (#4394)Every build before it gave
V3D_ERR_STAT: 0x00001000GPU resets; every build from it onwards ran without any.agorgl commentedon Nov 24, 2026
Yes, I performed the test several times for each box64 version, each one from a clean boot with all its accompanying libraries. I followed very cautious steps and carefully checked the logs at the start of every wine process that showed the box64 version. My tests are on a pi4b 4gb so it might have to do a bit with the gpu too?
mairacanal commentedon Nov 24, 2026
@agorgl, I reproduced your issue with Need for Speed Most Wanted and after investigation, I concluded that it's not a v3dv issue, it's a DXVK-Sarek violation of the Vulkan spec.
Using the Vulkan Validation Layers, I got the following error:
Taking a look at DXVK-Sarek, I noticed that they always creates its Vulkan render passes with 8 color attachment slots, even when the game only draws to one of them. The unused slots are marked "unused", but the count is still 8. This is problematic, because the RPi 4 GPU (V3D 4.2) only supports at most 4 color attachments, and v3dv tells applications so (maxColorAttachments = 4). Asking for 8 is invalid Vulkan usage.
I tested a hack in the v3dv driver to ignore color attachments bigger than 4 and it fixed the issue. This was only a hack for local testing, the bugfix must happen in DXVK-Sarek.
This issue doesn't happen in RPi 5 because, for V3D 7.1, maxColorAttachments = 8.
I suggest you try other DXVK flavour or open an issue on DXVK-Sarek.
agorgl commentedon Nov 24, 2026
This is fantastic news, thanks for the explanation! I will open an issue to DXVK-Sarek for this, you may close this one.
As a final note, its kinda weird that this violation triggers a GPU hang/reset, I would expect some kind of userland error instead.
Thanks again for taking a look into this!
mairacanal commentedon Nov 24, 2026
I'm working at the moment to add some assertion or something in v3dv. Thank you for your report!
agorgl commentedon Nov 24, 2026
For future readers:
Changing this limit from 8 to 4 in DXVK-Sarek and using the latest box64 version (commit 5e5eb2adb at the time) makes both of the above games playable!
mairacanal commentedon Nov 27, 2026
Based on this bug report, I opened a Mesa MR [1] with an optimization to stop counting trailing unused attachments as render targets. I also added an
assertto make sure that the number of color attachments equal or smaller than 4.As DXVK-Sarek only uses one attachment and the rest of the attachments are unused, this MR will discard the unused attachments and it will allow running D3D9 games on RPi 4.
Thank you again for the detailed report!
[1] https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/46857
v3dv: don't count trailing unused color attachments as render targets