Closed kisak-valve closed 3 years ago
Windows users suffered from this , might be a similar issue.
@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.
Tested this with Monster Hunter World. Same result "MonsterHunterWo[11594] ip:14dc8d588 sp:227108: SGDT instruction cannot be used by applications." in dmesg
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.
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
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.
Found some googling on that exception that indicates this shouldn't be generating an exception at all: "For instance, programs running on WineHQ and DOSEMU2 rely on some of these instructions to function. ... In order to not change the behavior of the system (i.e., a SIGSEGV signal should not be generated when using these instructions), this implementation traps the #GP fault generated by the CPU and emulates SGDT, SIDT and SMSW. with dummy returned values."
It seems like this feature of UMIP may not be working.
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.
And here I have my shiny new 3600 next to me, ready to install sometime next week... sigh.
AMD pushed out updates to AGESA that fixes RDRAND issue (for example Asrock X570 Taichi got it already). Is SGDT problem related too?
Yeah my board has AGESA 1.0.0.3 ABB update recently. Hope thats the one.
Please post if it fixes that for you or not.
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.
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.
@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.
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.
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?
I flashed my Gigabyte board today with the AGESA 1.0.0.3 update (F42a) and still the same.
have you guys also tried to roll back to proton 4.2-9? 4.11-1 has some issues.
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.
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.
Yeah, I tried older versions of Proton too.
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
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.
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?
Maybe Valve could put up a kernel with UMIP disabled on their PPA, like they did for fsync?
Has anyone tried the clearcpuid=514
boot option?
I can't test it, because I can't reboot now.
i am willing to try but do not know how, can you elaborate on where i add that?
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 :)
It looks like the first Intel CPU architecture to support UMIP is Cannonlake. Cannonlake doesn't really exist in practice, so it's not a surprise that nobody has noticed the issue yet.
So i added clearcpuid=514 to my grub and booted and Monster Hunter World launched correctly. It does seem like this is the cause. Edit - Assassin's Creed Odyssey also works now. I am currently running a r9 3900x, 1080ti on pop os
Great, thank you! I'll try it for Wolfenstein Youngblood when I get home... In 10 hours or so ^^
Is there a way to use this fix without having grub?
Is there a way to use this fix without having grub?
How come you use linux without grub? Are you from the stone age and still use LiLo?
BTW: I'll try the grub tweak tonight, and give soem feedback about it.
Is there a way to use this fix without having grub?
How come you use linux without grub? Are you from the stone age and still use LiLo?
Maybe systemd-boot?
Can anyone try it with Resident Evil 2 Remake, I have to wait for 26 hours to test it.
Is there a way to use this fix without having grub?
How come you use linux without grub? Are you from the stone age and still use LiLo?
Maybe systemd-boot?
Does he use Arch? (since centos/debian/ubuntu/fedora still use grub2)
@ashmonger I use Solus, and it doesn't use grub, in theory it uses goofiboot.
It works with MHW and DMC 5. Should work with RE2, too. Thanks.
Is there any benefit to use non-grub2 bootloader?
Looks like it's the kernel bug wine or any program shouldn't know this protection and use the empty table. Probably after that https://marc.info/?l=linux-msdos&m=147876036616306&w=2 they remove the original approach.
I'm not sure that this is a kernel bug, as the point of UMIP is to prevent userspace calling this functions. I think it's more wine/proton bug that the blocked call yields a crash?
Confirming that adding clearcpuid=514 to kernel boot options now allows Shadow of the Tomb Raider AND Metro Exodus to boot for me.
I had started a wine bug report about this not knowing what the cause was originally.
I've updated with this info.
Is there a way to use this fix without having grub?
You'll have to search how to append kernel parameters to whatever boot loader you are using.
Just to be clear, because it seems that some take this as a solution: UMIP is a security feature and disabling it is a workaround at best. Plus, there is a chance that "clearcpuid" will be removed as a boot option in future kernels.
For anyone interested why it's 514, see here. It's surely not a solution, but a workaround.
Hope a proper fix turns up soon.
From here: https://lwn.net/Articles/738209/
When enabled, however, UMIP will change the behavior that certain applications expect from the operating system. For instance, programs running on WineHQ and DOSEMU2 rely on some of these instructions to function. [...] In order to not change the behavior of the system (i.e., a SIGSEGV signal should not be generated when using these instructions), this implementation traps the #GP fault generated by the CPU and emulates SGDT, SIDT and SMSW. with dummy returned values. This should be sufficient to not break the applications mentioned above.
Does this mean that workaround is broken and Wine is expecting something else?
Wolfenstein Youngblood runs after applying the workaround.
From here: https://lwn.net/Articles/738209/
When enabled, however, UMIP will change the behavior that certain applications expect from the operating system. For instance, programs running on WineHQ and DOSEMU2 rely on some of these instructions to function. [...] In order to not change the behavior of the system (i.e., a SIGSEGV signal should not be generated when using these instructions), this implementation traps the #GP fault generated by the CPU and emulates SGDT, SIDT and SMSW. with dummy returned values. This should be sufficient to not break the applications mentioned above.
Does this mean that workaround is broken and Wine is expecting something else?
I posted this as comment 7 on this thread, based on the error giving a general protection fault it would appear this workaround isn't in place at all - note that that patch was written by an Intel employee, it may be that it was only applied to Intel processors featuring UMIP and AMD hasn't gotten to including theirs in the same workaround.
It's also possible that since this was written the plan changed. I think we would need someone with an Intel Cannon Lake CPU to verify if this is an AMD specific issue or not, as I don't believe any Intel CPUs older than Cannon Lake support UMIP.
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: https://github.com/ValveSoftware/Proton/issues/1417#issuecomment-516725375 https://github.com/ValveSoftware/Proton/issues/2386#issuecomment-516802877 https://github.com/ValveSoftware/Proton/issues/2909#issuecomment-515681003 https://github.com/ValveSoftware/Proton/issues/2909#issuecomment-516275599
2997
Workaround: Add
clearcpuid=514
as a kernel boot option to disable UMIP support.