The online racing simulator
Issue with graphics card crashing (D3D device error)
Hi all,

For a few weeks now, I've been running into this issue in LFS where, when our races run (CESAV), the game will crash for a few seconds and then recover.

The problem is that this usually happens in the middle of our race event (around 23:00 - 23:10), which means I usually end up in a wall, crashed, and I have to retire from the race. This is becoming extremly frustrating, as I've lost a lot of points due to this ongoing issue.

Steps I took to remidiate the issue:
- Reinstall LFS (game still crashed).
- Wipe previous graphic card driver (via DDU) and reinstall it fresh (game still crashed).
- Install new version driver (game still crashed).
- Stop all automatic Windows and graphics auto-updates (yep, game still crashed).

The game until that point runs smooth, and after the crash, if I can proceed, also will run find. I can't find the issue that is causing this crash so far, so I ask for your help if anyone has found himself in the same pickle.

In case it's helpful, here are the PC specs:
- AMD Ryzen 5 7600X
- AMD Radeon RX 7800 XT
- Asus TUF Gaming B650-plus
- 32GB Corsair RAM (AMD SmartAccess Memory is enabled, but has been since the system was built)
- Samsung 990 PRO 1TB (where LFS is installed)
- Windows 11 (updated right now to latest version from a couple of weeks ago)

This has been 4 or 5 weeks running, so any suggestions are welcomed. I'll probably try with a fresh install of Windows as a next step, but I would like to avoid it if possible - especially since the system was built over a year ago and I run with no issues...
Check if the game is running on the graphics card or on the integrated card with the CPU. You can check this in LFS itself
Attached images
lfs_00000014.png
Do such crashes happen in any other gfx intesive app or a game? Can you observe your gfx card temperautre at the moment of crash, is there anything wierd about it? How much are cpu and gpu utilizitaion while game is running normaly? Are you using fps cap or vsinc in lfs? Is your ssd firmware up to date? Might be worth to post a crash log.
I have the same issue (also from spain but got the fla gof argentina for hotlaps) and I also found the same trouble, yesterday I was racing in RG Rally cup and also saw the temperature because one friend adviced me, he told me to lock to 90 FPS, didnt work btw, and the temperatures in the moment of the crash were 70ºC didn't even reached 90 which i believe is considered high. My GPU utilization usally gets to 100%, either its a virus or something that i have no idea...

I use 12th Gen Intel Core i5-12450H processor with 16 GB RAM.
Quote from rane_nbg :Do such crashes happen in any other gfx intesive app or a game?

I can tell from own experience that it doesnt happen when i play war thunder, rocket league and roblox xD
Today I got the same issue having 41% of GPU usage, it may be a Win 11 issue or no idea at all...
What changed a few weeks ago? Did you install a new graphics driver at that time? Can you try reverting to an older graphics driver? Nothing changed in LFS, so it sounds to me like a fault in the graphics driver or D3D.

Your thread title says "D3D device error" but you didn't include that in your report. If LFS gives this message it suggests that the instance of Direct3D 9 reported an error and had to be restarted. Could there be a problem with the D3D9 support, which is not used by most games now?

EDIT: It's possible there could be a clue in the deb.log file after the hang, a message including a D3DERR_xxx value.
Something like:

D3D device error : D3DERR_xxx

Maybe the missing part in place of 'xxx' can give us a clue.
-
(TheRubius192FE2) DELETED by TheRubius192FE2 : not useful nvm
Following.

Have the same issue, but not as frequent. Occurs at the most random time, although doesn't affect game crashing - just all cars disappear or all incoming data e.g veh position or chat pauses.
Hi,

To answer a few questions:
- GPU utilisation does not get over 40/50%. I have the game limited to 100fps since my monitor cannot refresh faster than that. This is something I have done for a few years now.
- Temps do not exceed 60 degrees on the GPU.
- When the freeze/crash happens, I see GPU utilisation shoot up to 100%, then it goes to 0% until it the game returns back to normal.
- Sometimes the freeze/crash is so bad that it has bluescreened Windows.

In regards to the GPU driver, I hadn't updated it since December last year. I did run a few races in December and January without issues, until early February, when the problems started.

Now, when I reinstalled the driver back to ensure it wasn't the issue, I installed a newer version that was just released. I still did run into the issue (hence the post), though the freeze was only maybe 10 secs instead of 30-40 secs.

I will try to see if I can get to the deb.log file and copy it here, and see if there are any clues that could help.

Thanks!
Here goes the log. I have attached as a file in the end.

The error that appears in the log was:
D3D device error : D3DERR_DEVICEHUNG
Attached images
Captura de pantalla 2025-03-14 164024.png
Adapter 0 - internal graphics ?
Doing a search based on the error D3DERR_DEVICEHUNG...

This isn't very helpful but according to Chuck Walbourn:
Quote :Other cases of failure are "DXGI device hung" or "DXGI device timeout". This typically means that there is either a driver/hardware bug

https://stackoverflow.com/questions/61915988/how-to-handle-direct3d-9ex-d3derr-devicehung-error#61944287

I don't think I can get involved at this time. It may be the people who write video card drivers don't do a lot of testing for Direct3D 9Ex these days, so errors might creep in.

It's better for me to continue spending my time on the D3D11 version that I am developing intensely already.
I'm running into the exact same issue as OP, though I'm on a completely different GPU. Intel Iris Xe Graphics.

Done the same things, re-installing graphics driver, updating them, updating Windows 11 to the latest version. I was tempted to say that it's some driver or hardware issue, but it's strange that both OP and I are getting very similar issues on completely different hardware.

Host Name: DESKTOP-VAVKSRA
OS Name: Microsoft Windows 11 Pro
OS Version: 10.0.26100 N/A Build 26100
OS Manufacturer: Microsoft Corporation
OS Configuration: Standalone Workstation
OS Build Type: Multiprocessor Free
Registered Owner: Ahmed El-Hajjar
Registered Organization: Atlas Playbook v0.4.1
Product ID: 00330-80000-00000-AA563
Original Install Date: 18-Oct-2024, 14:53:25
System Boot Time: 12-Mar-2025, 04:27:16
System Manufacturer: HP
System Model: HP Spectre x360 2-in-1 Laptop 14-ef2xxx
System Type: x64-based PC
Processor(s): 1 Processor(s) Installed.
[01]: Intel64 Family 6 Model 186 Stepping 3 GenuineIntel ~1700 Mhz

I don't have these issues in any of the other games I play on my system.

This is the log from LFS
Mar 12 15:06:13 Meshes : 17
Mar 12 15:07:07 D3D device error : D3DERR_DEVICEHUNG
Mar 12 15:07:08 Attempting recovery from : D3DERR_DEVICEHUNG
Mar 12 15:07:08 started Direct3D 9Ex
Mar 12 15:07:08 number of adapters : 4
Mar 12 15:07:08 adapter 0 - valid modes : 60
Mar 12 15:07:08 adapter 1 - valid modes : 66
Mar 12 15:07:08 adapter 2 - valid modes : 99
Mar 12 15:07:08 adapter 3 - valid modes : 196
Mar 12 15:07:08 using adapter : 0
Mar 12 15:07:08 Init: SetPresentParams (1)
Mar 12 15:07:08 Init: CreateDevice
Mar 12 15:07:08 Init: GetRenderTarget
Mar 12 15:07:08 Init: GetDepthStencilSurface
Mar 12 15:07:08 Init: return
Mar 12 15:07:09 Recovered from D3D device error
Mar 12 15:07:09 Next LOD
Mar 12 15:07:09 Next LOD
Mar 12 15:07:09 Next LOD

Quote from cdahmedeh :I was tempted to say that it's some driver or hardware issue, but it's strange that both OP and I are getting very similar issues on completely different hardware.

I guess that might point to an issue in Windows itself, in the Direct3D 9 support.

One thing that hasn't changed recently is LFS itself. Uhmm
Quote from Scawen :I don't think I can get involved at this time. It may be the people who write video card drivers don't do a lot of testing for Direct3D 9Ex these days, so errors might creep in.

This could be an issue. I'm not sure if it's the case for AMD, but Intel has given up on implementing DirectX 9 and prior in the drivers. Instead, they're using DXVK to translate D3D calls to Vulkan.
I may have found a workaround for this issue. It seems to work for me, but can some of you also try it?

Open System Settings
Navigate to System > Display > Graphics (It's all the way at the bottom)

Set the "Optimizations for windowed games" to Off

Microsoft has some documentation about this:
https://support.microsoft.com/ ... 7e-4ed0-9a5e-f9389e535952

I'm looking forward to the Direct3D 11 rewrite and the increased frequency for the physics calculations. The video seems really smooth that you uploaded on YouTube. Good luck!

EDIT: Nevermind, the issue still persists.
Quote from cdahmedeh :I'm running into the exact same issue as OP, though I'm on a completely different GPU. Intel Iris Xe Graphics.

Host Name: DESKTOP-VAVKSRA
OS Name: Microsoft Windows 11 Pro
OS Version: 10.0.26100 N/A Build 26100


Just my 2 cents here, one thing that could have changed lately is your latest windows install. Your build number 26100 means you are on the latest 24H2. Can you try to revert to windows 23H2?
I also think Vic is running 24H2.
I am keeping to 23H2 for various reasons...

Edit: Vic and I are racing in the same team Cesav-LCR, and we need him again to finish races badly!

FGED GREDG RDFGDR GSFDG