Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple games crash with Ryzen 3xxx #2927

Closed
kisak-valve opened this issue Jul 31, 2019 · 128 comments
Closed

Multiple games crash with Ryzen 3xxx #2927

kisak-valve opened this issue Jul 31, 2019 · 128 comments

Comments

@kisak-valve
Copy link
Member

kisak-valve commented Jul 31, 2019

There's some reports of users upgrading their hardware to Ryzen 3xxx processors and games that were previously working for them are now failing with SGDT instruction cannot be used by applications. in dmesg and large Proton logs that are mostly full of access violations.

This issue report is to track the general umip compatibility of that processor generation.

References:
#1417 (comment)
#2386 (comment)
#2909 (comment) #2909 (comment)
#2997

Workaround:
Add clearcpuid=514 as a kernel boot option to disable UMIP support.

@Leopard1907
Copy link

https://www.pcgamer.com/amd-wants-destiny-2-players-to-help-test-a-beta-chipset-driver-for-third-gen-ryzen/

Windows users suffered from this , might be a similar issue.

@MuchiMuchiPink
Copy link

@kisak-valve hey, I saw you asking someone else for line counts for this issue. Are you still interested in this for some other game ( Devil May Cry 5)? :)
grep c0000005 steam-601150.log | wc -l gives me 903 lines.

@MuchiMuchiPink
Copy link

Tested this with Monster Hunter World. Same result
"MonsterHunterWo[11594] ip:14dc8d588 sp:227108: SGDT instruction cannot be used by applications." in dmesg

@vandergail
Copy link

vandergail commented Aug 1, 2019

Ryzen 3700X owner. Just installed Fedora 30 today with an updated iso to get around the rdrand instruction bug affecting systemd. Both Monster Hunter World (582010) and Resident Evil 2 (883710) crash at launch. Proton log is 63MB for Monster Hunter World and 1.1GB for Resident Evil 2.

Same results in dmesg:
MonsterHunterWo[5868] ip:14dc8d588 sp:227108: SGDT instruction cannot be used by applications.
re2.exe[7974] ip:15330398d sp:527338: SGDT instruction cannot be used by applications.

@MuchiMuchiPink
Copy link

MuchiMuchiPink commented Aug 1, 2019

I found this, if this helps.

umip is one Intel security function, which protect(#GP exception)
  below instructions in user mode:
    * SGDT - Store Global Descriptor Table
    * SIDT - Store Interrupt Descriptor Table
    * SLDT - Store Local Descriptor Table
    * SMSW - Store Machine Status Word
    * STR - Store Task Register

@jalabb
Copy link

jalabb commented Aug 1, 2019

Ryzen 3700X, Wolfenstein Youngblood :
grep c0000005 steam-1056960.log | wc -l gives 152 lines.
grep exception steam-1056960.log | wc -l gives 907 lines.
[ 9920.972119] umip: Youngblood_x64v[25225] ip:14d481e87 sp:327358: SGDT instruction cannot be used by applications.
I tried GTA V, no problem.

@joeknock90
Copy link

I believe this issue is also happening on the Epic Games store version of Metro Exodus (in case that helps at all) I'm also experiencing it with Shadow of the Tomb raider.

@jarrard
Copy link

jarrard commented Aug 2, 2019

And here I have my shiny new 3600 next to me, ready to install sometime next week... sigh.

@shmerl
Copy link

shmerl commented Aug 2, 2019

AMD pushed out updates to AGESA that fixes RDRAND issue (for example Asrock X570 Taichi got it already). Is SGDT problem related too?

@jarrard
Copy link

jarrard commented Aug 2, 2019

Yeah my board has AGESA 1.0.0.3 ABB update recently. Hope thats the one.

@shmerl
Copy link

shmerl commented Aug 2, 2019

Please post if it fixes that for you or not.

@jarrard
Copy link

jarrard commented Aug 2, 2019

I won't know until sometime next week, believe it or not I'm waiting for this new thermal paste to show up before I install the 3600. Bios is updated in preparation non the less.

@jalabb
Copy link

jalabb commented Aug 2, 2019

I updated the BIOS on my Asus Prime B450M-A to version 1804
Update AGESA 1.0.0.3 Patch AB to improve compatibility;
It doesn't help with Wolfenstein Youngblood.

@shmerl
Copy link

shmerl commented Aug 2, 2019

@poke86: same SGDT issue? Can you please report it to AMD directly? I'm still waiting for my new CPU, so can't do it yet.

@grigorig
Copy link

grigorig commented Aug 2, 2019

UMIP provides fixups/fallbacks for certain instructions, including SGDT. However, this excludes processes in long mode (i.e. 64 bit applications). See the documentation here:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/x86/kernel/umip.c#n289

So, as far as I can see, everything works as it should and the game or wine is at fault here.

@shmerl
Copy link

shmerl commented Aug 2, 2019

everything works as it should and the game or wine is at fault here.

But they apparently work with older Zen processors, and only Zen 2 is a problem. Why is that?

@MuchiMuchiPink
Copy link

I flashed my Gigabyte board today with the AGESA 1.0.0.3 update (F42a) and still the same.

@jarrard
Copy link

jarrard commented Aug 2, 2019

have you guys also tried to roll back to proton 4.2-9? 4.11-1 has some issues.

@grigorig
Copy link

grigorig commented Aug 2, 2019

That's a good question, but as far as I can tell, Zen 2 is the first AMD architecture to support UMIP. Does anyone know which Intel CPU architectures support it?

Edit: it certainly isn't available (or enabled) on my Skylake system even though support for it is compiled into the kernel. You can check with dmesg | grep UMIP. It should print "x86/cpu: User Mode Instruction Prevention (UMIP) activated" if it is enabled.

@jalabb
Copy link

jalabb commented Aug 2, 2019

have you guys also tried to roll back to proton 4.2-9? 4.11-1 has some issues.

I tried it with 4.2-9 and 3.16-9 before 4.11-1 came out and it doesn't change anything, for Youngblood at least.

@MuchiMuchiPink
Copy link

Yeah, I tried older versions of Proton too.

@Berobad
Copy link

Berobad commented Aug 2, 2019

Edit: it certainly isn't available (or enabled) on my Skylake system even though support for it is compiled into the kernel.
You can check with dmesg | grep UMIP. It should print "x86/cpu: User Mode Instruction Prevention (UMIP) activated" if it is enabled.

Nothing on Ryzen 2000 too.

Has someone tried a custom kernel with UMIP disabled?

CONFIG_X86_INTEL_UMIP=n
or
Processor type and feature - Intel User Mode Instruction Prevention

btw the feature isn't available if you disable support for Intel CPUs in the kernel

@grigorig
Copy link

grigorig commented Aug 2, 2019

There also is a chance that UMIP is disabled by firmware/BIOS on many (older?) mainboards and notebooks even though the CPU technically supports it. It's hard to find information about this feature.

@Termuellinator
Copy link

It seems "clearcpuid=514" in the Bootoptions should disable UMIP without the need to compile a custom kernel - maybe some zen2 owner could test it?

@jalabb
Copy link

jalabb commented Aug 2, 2019

Maybe Valve could put up a kernel with UMIP disabled on their PPA, like they did for fsync?

@laichiaheng
Copy link

laichiaheng commented Aug 2, 2019

Has anyone tried the clearcpuid=514 boot option?
I can't test it, because I can't reboot now.

@maverck
Copy link

maverck commented Aug 2, 2019

i am willing to try but do not know how, can you elaborate on where i add that?

@Termuellinator
Copy link

Termuellinator commented Aug 2, 2019

when using grub: https://askubuntu.com/questions/19486/how-do-i-add-a-kernel-boot-parameter

i wouldn't make it permanent, but just try it for one boot by pressing "e" and adding it there :)

@CristianPi
Copy link

i'm running fedora 32 with kernel 5.7.10-201.fc32.x86_64
i'm unable to launch the game, it show a black screen at startup, ryzen 3900x, rx580.

I tried everything, any suggestion?

@Suta00
Copy link

Suta00 commented Oct 18, 2020

This bug was seen on my setup as well and the workaround was the huge. I tried many OSes/versions of wine/compiling from source etc. This was the ultimate issue (as the workaround finally resolved the issue). This app (Everquest) worked previously with my different/old hardware. Disabling UMIP worked.
Ryzen 3800x.

@mrpippy
Copy link
Contributor

mrpippy commented Jan 4, 2021

With Linux 5.10 (released last month), all 5 UMIP instructions are now emulated/spoofed in both 32- and 64-bit processes. There shouldn't be any reason to use clearcpuid=514 any more. If anyone with a Ryzen 3xxx or newer has a crash that is fixed by clearcpuid=514, please let me know.

To recap:

  • For as long as Linux has enabled UMIP, there has been emulation for SGDT, SIDT, and SMSW for 32-bit processes.
  • Linux 5.4 added emulation for SGDT, SIDT, and SMSW for 64-bit processes
  • Linux 5.10 added emulation for SLDT and STR instructions on both 32- and 64-bit processes.
  • I never added emulation support to Wine itself, a newer kernel is required.

@kisak-valve
Copy link
Member Author

Thanks @mrpippy, I think we're done here. Closing.

@eNTi
Copy link

eNTi commented Jan 6, 2021

Hi,
I've just updated my kernel today to

Linux eNTi 5.10.4-107-tkg-cfs #1 TKG SMP PREEMPT Sat, 02 Jan 2021 12:06:24 +0000 x86_64 GNU/Linux

and started to see exactly this issue. I'm playing World of Warcraft Classic via wine-tgk for over 3 months now and have never seen this. I just started today after the kernel upgrade.

@eNTi
Copy link

eNTi commented Jan 7, 2021

I'vé added clearcpuid=514 to my boot parameters (EFISTUB) and now the messages are gone but the freezes (game hangs for 2-3 seconds, no crashes yet) are still happening... this is getting weirder by the minute.

@MartB
Copy link

MartB commented Feb 2, 2021

I'vé added clearcpuid=514 to my boot parameters (EFISTUB) and now the messages are gone but the freezes (game hangs for 2-3 seconds, no crashes yet) are still happening... this is getting weirder by the minute.

Did you ever figure the freezes out?

@eNTi
Copy link

eNTi commented Feb 2, 2021

Frogging-Family/wine-tkg-git#254

@3DRaven
Copy link

3DRaven commented May 7, 2023

Hogwarts legacy produce this error without kernel parameter clearcpuid=514
uname -r: 6.2.14-1-liquorix-amd64
CPU: AMD Ryzen 9 5900HX
Video: Nvidia RTX 3080 for laptop

@davidhaley
Copy link

Intel i9-13900K

umip: Diablo IV.exe[38327] ip:1cce107a sp:2c0eeb08: SIDT instruction cannot be used by applications.

Nvidia 535.54.03
Proton Experimental
Diablo IV

@roman-larin
Copy link

Hi, guys!

Added clearcpuid=514, than reboot and got black screen.

PC:
AMD Ryzen 5950x
ASUS ROG Crosshair VIII Extreme

Indicators show that system is booted (temperature/voltage etc. on led screen). I think so.

OS: Fedora Linux 38 KDE
Kernel: ~6.3.8

How can I roll back? Clear CMOS didn't work for me.

@ipr ipr mentioned this issue Jul 4, 2023
2 tasks
@Dehir
Copy link

Dehir commented Jul 25, 2023

Intel i9-13900K

umip: Diablo IV.exe[38327] ip:1cce107a sp:2c0eeb08: SIDT instruction cannot be used by applications.

Nvidia 535.54.03 Proton Experimental Diablo IV

Experiencing same error with r7-5800x3d and GTX 1080 (Latest Nvidia drivers also)

@DanMan
Copy link

DanMan commented Jul 26, 2023

Which Linux kernel?

@TheAquabat
Copy link

EA WRC 2023 suffers from this too

[ 450.909665] umip: WRC.exe[9395] ip:1549d5e71 sp:b9e3a0: SGDT instruction cannot be used by applications. [ 450.909668] umip: WRC.exe[9395] ip:1549d5e71 sp:b9e3a0: For now, expensive software emulation returns the result. [ 450.909811] umip: WRC.exe[9395] ip:1554c9aa5 sp:b9e438: SGDT instruction cannot be used by applications. [ 450.909812] umip: WRC.exe[9395] ip:1554c9aa5 sp:b9e438: For now, expensive software emulation returns the result. [ 450.919954] umip: WRC.exe[9395] ip:14eb106fd sp:b9e898: SGDT instruction cannot be used by applications.

@kisak-valve
Copy link
Member Author

Hello @TheAquabat, umip: WRC.exe[9395] ip:1549d5e71 sp:b9e3a0: For now, expensive software emulation returns the result. means that the issue tracked in this issue report has been resolved back in the 5.10 series Linux kernel.

The issue reported here has been resolved for years and anyone seeing kernel messages that also say that software emulation is happening means that this is a false lead in troubleshooting and the issue you're troubleshooting is elsewhere.

@ValveSoftware ValveSoftware locked as resolved and limited conversation to collaborators Nov 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests