Forum Discussion

NightShiftEa's avatar
4 months ago
Solved

Battlefield 2042 - Direct X Error - Direct x function "hr" failed

The error appears when launching the game on Windows 11. I am attaching a screenshot and DxDiag report. Please, help.

  • Steeve_BF's avatar
    Steeve_BF
    4 months ago

    Thank you,

    That's good, this error is less problematic. Now follow these steps, which should normally solve your problem:

    - Open the Registry Editor - 
    1 -Press Windows + R
    2 -Type: regedit
    3 -Press Ctrl + Shift + Enter (this opens it as an administrator).
    4 -Click Yes if window appear
    5 -Go to the registry key
    6 -In the address bar at the top of the Registry Editor, paste:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography\


    BEFORE IMPORTANT-> In Cryptography, right-click -> Exportsave a .reg file

    - Change the MachineGUID value -
    In the right pane, locate MachineGUID
    Right-click ->Modify


    Replace the current value with:
    d1eb246e-6243-4460-a88e-5d4e52b1ef6b
    -Click OK
    -Restart your PC
    The changes will only take effect after restarting

    Let me know 😉

9 Replies

  • Hi NightShiftEa​ 
    First of all, thank you for your DxDiag,
    After analyzing your error and your Dxdiag, I noticed that you still have the Intel UHD 770 iGPU enabled alongside your RTX 3070 Ti. It's not ideal, but normally it shouldn't cause any problems. You just need to do the following: 

    In Windows ->Display settings -> Graphics settings -> assign your Battlefield 2042 to “High performance (RTX 3070 Ti)".

    Next, we will focus on your error.
    Often, this error is related to a corrupted cache, which frequently triggers an E_UNEXPECTED error.....


    - Press Windows + R


    - A page will open (image) enter: %LOCALAPPDATA%\D3DSCache
    - A window will open 
    - Select everything (file) and delete it. (Windows will automatically recreate them)
    - Do the same for: %LOCALAPPDATA%\NVIDIA\DXCache

    Next, I recommend installing Nvidia driver version 577.0 -> https://www.nvidia.com/en-us/drivers/ 
    This driver is currently the most stable for Battlefield 2042.

    - Restart your computer
    - Start the game 

    Let me know ! 😄

  • Hello! I did everything as you described. But there is new error. Also i can't delete all files in %LOCALAPPDATA%\NVIDIA\DXCache. Also i have for some reason two BF2042.exe in Graphics. All in screenshots :(

     

  • Steeve_BF's avatar
    Steeve_BF
    Seasoned Ace
    4 months ago

    Thank you,

    That's good, this error is less problematic. Now follow these steps, which should normally solve your problem:

    - Open the Registry Editor - 
    1 -Press Windows + R
    2 -Type: regedit
    3 -Press Ctrl + Shift + Enter (this opens it as an administrator).
    4 -Click Yes if window appear
    5 -Go to the registry key
    6 -In the address bar at the top of the Registry Editor, paste:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography\


    BEFORE IMPORTANT-> In Cryptography, right-click -> Exportsave a .reg file

    - Change the MachineGUID value -
    In the right pane, locate MachineGUID
    Right-click ->Modify


    Replace the current value with:
    d1eb246e-6243-4460-a88e-5d4e52b1ef6b
    -Click OK
    -Restart your PC
    The changes will only take effect after restarting

    Let me know 😉

  • yes it worked but now my computer after ~30 minutes of playing suddenly goes into reboot for no reason :( 
    before I reinstalled the OS to Windows 11 - the game worked perfectly with exactly the same PC specs

  • Steeve_BF's avatar
    Steeve_BF
    Seasoned Ace
    4 months ago

    Great now we just need to find the "reboot" problem.

    You can try the following:
    -Install version 577.0 of your NVIDIA graphics card > https://www.nvidia.com/en-us/drivers/ 
    -After installing the update, restart your PC.
    -Then launch your game.

    Let me know !

  • Steeve_BF's avatar
    Steeve_BF
    Seasoned Ace
    4 months ago

    You're welcome
    Feel free to open another thread if you encounter any problems 😄
    Don't forget to mark this thread as resolved to help other players who have the same problem.

Featured Places