Bug 276069 - Kernel panic (Page fault) when trying to play any DirectX12 game under emulators/wine using vkd3d
Summary: Kernel panic (Page fault) when trying to play any DirectX12 game under emulat...
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 14.0-STABLE
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-01 23:14 UTC by Alexander Vereeken
Modified: 2024-03-03 14:08 UTC (History)
5 users (show)

See Also:


Attachments
small-kernel-message-DX12-VKD3D.log (2.31 KB, text/plain)
2024-01-01 23:14 UTC, Alexander Vereeken
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Vereeken 2024-01-01 23:14:39 UTC
Created attachment 247401 [details]
small-kernel-message-DX12-VKD3D.log

Hello,

when i try to play any DirectX12 game which makes usage of vkd3d then the kernel panics within seconds.

I also have this problem with DirectX9 games which makes usage of DXVK but less frequently but maybe should be not ignored as well i guess.

GPU: AMD RX 6700 XT using Mesa 23.3.1
VKD3D Ver: 2.11.1
DXVK Ver: 2.3
OS VER: 14.0-STABLE (ab71e3480)

This problem exists since i can run vkd3d/DX12 stuff in general but thought that's maybe getting better but now it got worse over time.

I do have attached the kernel message that gets displayed when it happened, i currently don't have an debug kernel installed but can do re-run on it as well if needed.

I am quite unsure where i should report it first since other components like Mesa, drm-kmod etc.. could also be the suspects so i leave this bug report here first.

Thank you in advance!
Comment 1 Sean Farley freebsd_committer freebsd_triage 2024-01-15 22:11:25 UTC
I doubt it is wine directly but rather wine just happens to be triggering it.  The interesting part from glancing at the panic is the reference to linux_file_ioctl().  It is probable that it is related to the kernel module for the AMD GPU as it uses the linuxkpi module where linux_file_ioctl() is defined.

Since you are using STABLE, did you rebuild the drm-515-kmod port after installing 14-STABLE?  There could have been an ABI mismatch causing the panic.

I found someone else having issues very recently, albeit using 14-RELEASE:  https://forums.freebsd.org/threads/star-labs-starbook-amd-version-kernel-dump.91848/

I am using an Nvidia card with 14-STABLE and have not experienced the panic with wine-devel-9.0.r5,1 and DXVK 2.2
Comment 2 Alexander Vereeken 2024-01-16 04:18:16 UTC
Hello,

thank you for your answer.

I do build them always from source.

So it could be drm-kmod as i thought, I will create an issue at their GitHub repository as well then.
Comment 3 Sean Farley freebsd_committer freebsd_triage 2024-01-17 00:59:43 UTC
(In reply to Alexander Vereeken from comment #2)

I am glad to help.  Please add the upstream issue to this bug once you do open it.
Comment 4 Bartek Jasicki 2024-01-18 07:31:13 UTC
Another possibility: Wine is known to not working with the newest version of Vulkan. You could try:

1. Downgrade Vulkan version to 1.3.266. This version works with Nvidia cards.
2. Try to use wine-devel. It should have fixed the problem.
3. Build the newest version of wine, 9.0. It has solved the issue, according to its changelog.
Comment 5 annakenna 2024-01-29 04:29:02 UTC
MARKED AS SPAM
Comment 6 Alexander Vereeken 2024-02-08 06:35:16 UTC
I can tell that using this branch from wulf7 for drm 515 kmod seems to have the problem solved. https://github.com/wulf7/drm-kmod/tree/5.15-lts-focal 

I was able to have vkd3d dx12 sessions without any panic for now.
Comment 7 Gerald Pfeifer freebsd_committer freebsd_triage 2024-03-03 14:08:27 UTC
I believe we have identified this isn't actually a bug in Wine,
rather a bug Wine triggers, so moving from ports@ to bugsq.