[Atelier Lulua, Lydie & Suelle, Ryza, Ryza2] Yuzu nearly freezes linux system with FAULT_PDE ACCESS_TYPE_VIRT_WRITE and FAULT_PDE ACCESS_TYPE_VIRT_READ

Hi,

My OS specific is:
Archlinux
i7-10750H, 16gb ram
RTX 2070 Max-Q w 8gb

I tried Atelier Lulua, Lydie & Suelle, Ryza, Ryza2 under both yuzu mainline 462 and EA 1211. They all cause system to freeze, with a lot of dmesg messages about NVRM.

In the log file there are a lot of
[ 343.809572] Service.NVDRV core/hle/service/nvdrv/devices/nvmap.cpp:IocParam:200: (STUBBED) called type=1
[ 343.810669] Service.NVDRV core/hle/service/nvdrv/devices/nvmap.cpp:IocParam:200: (STUBBED) called type=1
[ 343.811839] Service.NVDRV core/hle/service/nvdrv/devices/nvmap.cpp:IocFree:245: (STUBBED) called

and dmesg:
[20186.778269] NVRM: Xid (PCI:0000:01:00): 31, pid=47130, Ch 00000026, intr 00000000. MMU Fault: ENGINE GRAPHICS HUBCLIENT_FE faulted @ 0x2_0510e000. Fault is of type FAULT_PDE ACCESS_TYPE_VIRT_WRITE
[20187.426368] NVRM: Xid (PCI:0000:01:00): 31, pid=47130, Ch 00000026, intr 00000000. MMU Fault: ENGINE GRAPHICS HUBCLIENT_FE faulted @ 0x2_05106000. Fault is of type FAULT_PDE ACCESS_TYPE_VIRT_WRITE
[20187.510367] NVRM: Xid (PCI:0000:01:00): 31, pid=47130, Ch 00000026, intr 00000000. MMU Fault: ENGINE GRAPHICS HUBCLIENT_FE faulted @ 0x2_050fe000. Fault is of type FAULT_PDE ACCESS_TYPE_VIRT_WRITE
[20187.589613] NVRM: Xid (PCI:0000:01:00): 31, pid=47130, Ch 00000026, intr 00000000. MMU Fault: ENGINE GRAPHICS HUBCLIENT_FE faulted @ 0x2_050f6000. Fault is of type FAULT_PDE ACCESS_TYPE_VIRT_WRITE
[20187.672556] NVRM: Xid (PCI:0000:01:00): 31, pid=47130, Ch 00000026, intr 00000000. MMU Fault: ENGINE GRAPHICS HUBCLIENT_FE faulted @ 0x2_050ee000. Fault is of type FAULT_PDE ACCESS_TYPE_VIRT_WRITE
[20187.754517] NVRM: Xid (PCI:0000:01:00): 31, pid=47130, Ch 00000026, intr 00000000. MMU Fault: ENGINE GRAPHICS HUBCLIENT_FE faulted @ 0x2_050e6000. Fault is of type FAULT_PDE ACCESS_TYPE_VIRT_WRITE
[20187.837858] NVRM: Xid (PCI:0000:01:00): 31, pid=47130, Ch 00000026, intr 00000000. MMU Fault: ENGINE GRAPHICS HUBCLIENT_FE faulted @ 0x2_050de000. Fault is of type FAULT_PDE ACCESS_TYPE_VIRT_WRITE
[20188.019307] NVRM: Xid (PCI:0000:01:00): 31, pid=47130, Ch 00000026, intr 00000000. MMU Fault: ENGINE GRAPHICS GPCCLIENT_PE_1 faulted @ 0x1_01270000. Fault is of type FAULT_PTE ACCESS_TYPE_VIRT_READ
[20188.232825] NVRM: Xid (PCI:0000:01:00): 31, pid=47130, Ch 00000026, intr 00000000. MMU Fault: ENGINE GRAPHICS GPCCLIENT_T1_8 faulted @ 0x2_050bd000. Fault is of type FAULT_PDE ACCESS_TYPE_VIRT_READ
[20188.352839] NVRM: Xid (PCI:0000:01:00): 31, pid=47130, Ch 00000026, intr 00000000. MMU Fault: ENGINE GRAPHICS HUBCLIENT_FE faulted @ 0x2_050ad000. Fault is of type FAULT_PDE ACCESS_TYPE_VIRT_WRITE
[20188.763297] NVRM: Xid (PCI:0000:01:00): 31, pid=47130, Ch 00000026, intr 00000000. MMU Fault: ENGINE GRAPHICS HUBCLIENT_FE faulted @ 0x2_050a5000. Fault is of type FAULT_PDE ACCESS_TYPE_VIRT_WRITE
[20188.827659] NVRM: Xid (PCI:0000:01:00): 31, pid=47130, Ch 00000026, intr 00000000. MMU Fault: ENGINE GRAPHICS HUBCLIENT_FE faulted @ 0x2_0509d000. Fault is of type FAULT_PDE ACCESS_TYPE_VIRT_WRITE
[20188.897142] NVRM: Xid (PCI:0000:01:00): 31, pid=47130, Ch 00000026, intr 00000000. MMU Fault: ENGINE GRAPHICS HUBCLIENT_FE faulted @ 0x2_05095000. Fault is of type FAULT_PDE ACCESS_TYPE_VIRT_WRITE
[20188.973033] NVRM: Xid (PCI:0000:01:00): 31, pid=47130, Ch 00000026, intr 00000000. MMU Fault: ENGINE GRAPHICS HUBCLIENT_FE faulted @ 0x2_0508d000. Fault is of type FAULT_PDE ACCESS_TYPE_VIRT_WRITE
[20189.041483] NVRM: Xid (PCI:0000:01:00): 31, pid=47130, Ch 00000026, intr 00000000. MMU Fault: ENGINE GRAPHICS HUBCLIENT_FE faulted @ 0x2_05085000. Fault is of type FAULT_PDE ACCESS_TYPE_VIRT_WRITE
[20189.118182] NVRM: Xid (PCI:0000:01:00): 31, pid=47130, Ch 00000026, intr 00000000. MMU Fault: ENGINE GRAPHICS HUBCLIENT_FE faulted @ 0x2_0507d000. Fault is of type FAULT_PDE ACCESS_TYPE_VIRT_WRITE
[20189.191802] NVRM: Xid (PCI:0000:01:00): 31, pid=47130, Ch 00000026, intr 00000000. MMU Fault: ENGINE GRAPHICS HUBCLIENT_FE faulted @ 0x2_05074000. Fault is of type FAULT_PDE ACCESS_TYPE_VIRT_WRITE
[20189.364061] NVRM: Xid (PCI:0000:01:00): 31, pid=47130, Ch 00000026, intr 00000000. MMU Fault: ENGINE GRAPHICS GPCCLIENT_PE_0 faulted @ 0x1_3cf11000. Fault is of type FAULT_PTE ACCESS_TYPE_VIRT_READ
[20189.481395] NVRM: Xid (PCI:0000:01:00): 31, pid=47130, Ch 00000026, intr 00000000. MMU Fault: ENGINE GRAPHICS GPCCLIENT_PE_0 faulted @ 0x1_42365000. Fault is of type FAULT_PTE ACCESS_TYPE_VIRT_READ
[20189.693557] NVRM: Xid (PCI:0000:01:00): 31, pid=47130, Ch 00000026, intr 00000000. MMU Fault: ENGINE GRAPHICS HUBCLIENT_FE faulted @ 0x2_05034000. Fault is of type FAULT_PDE ACCESS_TYPE_VIRT_WRITE
[20190.154882] NVRM: Xid (PCI:0000:01:00): 31, pid=47130, Ch 00000026, intr 00000000. MMU Fault: ENGINE GRAPHICS HUBCLIENT_FE faulted @ 0x2_0502c000. Fault is of type FAULT_PDE ACCESS_TYPE_VIRT_WRITE
[20190.215479] NVRM: Xid (PCI:0000:01:00): 31, pid=47130, Ch 00000026, intr 00000000. MMU Fault: ENGINE GRAPHICS HUBCLIENT_FE faulted @ 0x2_05024000. Fault is of type FAULT_PDE ACCESS_TYPE_VIRT_WRITE
[20190.280506] NVRM: Xid (PCI:0000:01:00): 31, pid=47130, Ch 00000026, intr 00000000. MMU Fault: ENGINE GRAPHICS HUBCLIENT_FE faulted @ 0x2_0501c000. Fault is of type FAULT_PDE ACCESS_TYPE_VIRT_WRITE
[20190.349495] NVRM: Xid (PCI:0000:01:00): 31, pid=47130, Ch 00000026, intr 00000000. MMU Fault: ENGINE GRAPHICS HUBCLIENT_FE faulted @ 0x2_05014000. Fault is of type FAULT_PDE ACCESS_TYPE_VIRT_WRITE
[20190.424776] NVRM: Xid (PCI:0000:01:00): 31, pid=47130, Ch 00000026, intr 00000000. MMU Fault: ENGINE GRAPHICS HUBCLIENT_FE faulted @ 0x2_0500b000. Fault is of type FAULT_PDE ACCESS_TYPE_VIRT_WRITE
[20190.501126] NVRM: Xid (PCI:0000:01:00): 31, pid=47130, Ch 00000026, intr 00000000. MMU Fault: ENGINE GRAPHICS HUBCLIENT_FE faulted @ 0x2_05003000. Fault is of type FAULT_PDE ACCESS_TYPE_VIRT_WRITE
[20190.581918] NVRM: Xid (PCI:0000:01:00): 31, pid=47130, Ch 00000026, intr 00000000. MMU Fault: ENGINE GRAPHICS HUBCLIENT_FE faulted @ 0x2_04ffb000. Fault is of type FAULT_PDE ACCESS_TYPE_VIRT_WRITE
[20190.770443] NVRM: Xid (PCI:0000:01:00): 31, pid=47130, Ch 00000026, intr 00000000. MMU Fault: ENGINE GRAPHICS GPCCLIENT_PE_0 faulted @ 0x1_42365000. Fault is of type FAULT_PTE ACCESS_TYPE_VIRT_READ
[20197.137139] NVRM: Xid (PCI:0000:01:00): 31, pid=47130, Ch 00000026, intr 00000000. MMU Fault: ENGINE GRAPHICS HUBCLIENT_FE faulted @ 0x2_04fd3000. Fault is of type FAULT_PDE ACCESS_TYPE_VIRT_WRITE
[20197.578457] NVRM: Xid (PCI:0000:01:00): 31, pid=47130, Ch 00000026, intr 00000000. MMU Fault: ENGINE GRAPHICS HUBCLIENT_FE faulted @ 0x2_04fcb000. Fault is of type FAULT_PDE ACCESS_TYPE_VIRT_WRITE
[20197.626104] NVRM: Xid (PCI:0000:01:00): 31, pid=47130, Ch 00000026, intr 00000000. MMU Fault: ENGINE GRAPHICS HUBCLIENT_FE faulted @ 0x2_04fc3000. Fault is of type FAULT_PDE ACCESS_TYPE_VIRT_WRITE
[20197.673547] NVRM: Xid (PCI:0000:01:00): 31, pid=47130, Ch 00000026, intr 00000000. MMU Fault: ENGINE GRAPHICS HUBCLIENT_FE faulted @ 0x2_04fbb000. Fault is of type FAULT_PDE ACCESS_TYPE_VIRT_WRITE
[20197.729168] NVRM: Xid (PCI:0000:01:00): 31, pid=47130, Ch 00000026, intr 00000000. MMU Fault: ENGINE GRAPHICS HUBCLIENT_FE faulted @ 0x2_04fb2000. Fault is of type FAULT_PDE ACCESS_TYPE_VIRT_WRITE
[20197.781802] NVRM: Xid (PCI:0000:01:00): 31, pid=47130, Ch 00000026, intr 00000000. MMU Fault: ENGINE GRAPHICS HUBCLIENT_FE faulted @ 0x2_04faa000. Fault is of type FAULT_PDE ACCESS_TYPE_VIRT_WRITE
[20197.835036] NVRM: Xid (PCI:0000:01:00): 31, pid=47130, Ch 00000026, intr 00000000. MMU Fault: ENGINE GRAPHICS HUBCLIENT_FE faulted @ 0x2_04fa2000. Fault is of type FAULT_PDE ACCESS_TYPE_VIRT_WRITE
[20197.887683] NVRM: Xid (PCI:0000:01:00): 31, pid=47130, Ch 00000026, intr 00000000. MMU Fault: ENGINE GRAPHICS HUBCLIENT_FE faulted @ 0x2_04f9a000. Fault is of type FAULT_PDE ACCESS_TYPE_VIRT_WRITE
[20197.945085] NVRM: Xid (PCI:0000:01:00): 31, pid=47130, Ch 00000026, intr 00000000. MMU Fault: ENGINE GRAPHICS HUBCLIENT_FE faulted @ 0x2_04f92000. Fault is of type FAULT_PDE ACCESS_TYPE_VIRT_WRITE
[20197.999493] NVRM: Xid (PCI:0000:01:00): 31, pid=47130, Ch 00000026, intr 00000000. MMU Fault: ENGINE GRAPHICS HUBCLIENT_FE faulted @ 0x2_04f8a000. Fault is of type FAULT_PDE ACCESS_TYPE_VIRT_WRITE
[20203.088916] NVRM: Xid (PCI:0000:01:00): 31, pid=47130, Ch 00000026, intr 00000000. MMU Fault: ENGINE GRAPHICS HUBCLIENT_FE faulted @ 0x2_04f82000. Fault is of type FAULT_PDE ACCESS_TYPE_VIRT_WRITE
[20203.143032] NVRM: Xid (PCI:0000:01:00): 31, pid=47130, Ch 00000026, intr 00000000. MMU Fault: ENGINE GRAPHICS HUBCLIENT_FE faulted @ 0x2_04f7a000. Fault is of type FAULT_PDE ACCESS_TYPE_VIRT_WRITE
[20203.198119] NVRM: Xid (PCI:0000:01:00): 31, pid=47130, Ch 00000026, intr 00000000. MMU Fault: ENGINE GRAPHICS HUBCLIENT_FE faulted @ 0x2_04f71000. Fault is of type FAULT_PDE ACCESS_TYPE_VIRT_WRITE
[20203.254294] NVRM: Xid (PCI:0000:01:00): 31, pid=47130, Ch 00000026, intr 00000000. MMU Fault: ENGINE GRAPHICS HUBCLIENT_FE faulted @ 0x2_04f69000. Fault is of type FAULT_PDE ACCESS_TYPE_VIRT_WRITE
[20203.545463] NVRM: Xid (PCI:0000:01:00): 31, pid=47130, Ch 00000026, intr 00000000. MMU Fault: ENGINE GRAPHICS HUBCLIENT_FE faulted @ 0x2_04f61000. Fault is of type FAULT_PDE ACCESS_TYPE_VIRT_WRITE
[20204.306705] NVRM: Xid (PCI:0000:01:00): 31, pid=47130, Ch 00000026, intr 00000000. MMU Fault: ENGINE GRAPHICS HUBCLIENT_FE faulted @ 0x2_04f59000. Fault is of type FAULT_PDE ACCESS_TYPE_VIRT_WRITE
[20204.442740] NVRM: Xid (PCI:0000:01:00): 31, pid=47130, Ch 00000026, intr 00000000. MMU Fault: ENGINE GRAPHICS HUBCLIENT_FE faulted @ 0x2_04f51000. Fault is of type FAULT_PDE ACCESS_TYPE_VIRT_WRITE
[20204.501794] NVRM: Xid (PCI:0000:01:00): 31, pid=47130, Ch 00000026, intr 00000000. MMU Fault: ENGINE GRAPHICS HUBCLIENT_FE faulted @ 0x2_04f49000. Fault is of type FAULT_PDE ACCESS_TYPE_VIRT_WRITE

For Atelier Lulua or Lydie & Suelle, freezing occurs after starting a new game; for ryza and ryza 2, freezing occurs at intro menu. Music continues to play.

From free -m and nvidia-smi, RAM for both CPU and GPU are far from depletion.

Uploaded a log sample for Ryza 2 and yuzu EA 1211:

yuzu_log_sample.txt (2.2 MB)

In order for us to provide better support, we need to see the log generated by Citra. This guide will walk you through how you can obtain the log file: How to Upload the Log File.

System Information for Support

Client Version                                yuzu Early Access 1211 HEAD-be3e4d589
Operating System                              Arch Linux
CPU                                           Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz | AVX2 | FMA
Graphics API                                  OpenGL 4.6.0
Graphics Renderer                             GeForce RTX 2070 with Max-Q Design/PCIe/SSE2
GPU Driver Version                            455.45.01
Use Async GPU                                 [x]
BCAT Backend                                  none
GPU Emulation Accuracy Level                  Normal

I did not find anything wrong in your log file. Please wait for a moderator to assist.

I’m not familiar with this game in particular, but the kernel log would signify that these are the same or similar issues as with Fire Emblem: Three Houses or similar games. Basically, yuzu is emitting invalid shaders. You may be able to get around it by running the game in Vulkan, or you can try disabling assembly shaders, but invalid shaders sometimes transcend the API.

The real solution here is to wait for improvements from yuzu, since, as I implied earlier, this issue is not restricted to this game.

System Information for Support

Client Version                                yuzu Early Access 1211 HEAD-be3e4d589
Operating System                              Arch Linux
CPU                                           Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz | AVX2 | FMA
Graphics API                                  OpenGL 4.6.0
Graphics Renderer                             GeForce RTX 2070 with Max-Q Design/PCIe/SSE2
GPU Driver Version                            455.45.01
Use Async GPU                                 [x]
BCAT Backend                                  none
GPU Emulation Accuracy Level                  Normal

I did not find anything wrong in your log file. Please wait for a moderator to assist.

I tried Ryza 2 with OpenGL with assembly shaders but still freezes, dmesg still complains about FAULT_PDE. Then I tried Vulkan, now it can enter game at 1-2 FPS with system stuttering. No FAULT_PDE in Vulkan.

I found something interesting in the logs:

  1. In both OpenGL and vulkan, I found a line with:
    [ 18.232557] Debug video_core/shader/decode/arithmetic_integer.cpp:DecodeArithmeticInteger:132: Assertion Failed! Condition codes generation in ISCADD is not implemented
    [ 18.232565] HW.GPU video_core/shader/shader_ir.cpp:SetInternalFlagsFromInteger:393: Condition codes implementation is incomplete
  2. In vulkan, I found
    [ 114.659909] HW.GPU video_core/shader/control_flow.cpp:ScanFlow:701: Failed to remove all the gotos!:

Update:
Atelier Lulua under vulkan shares the same problem with Ryza 2 with ISCADD unimplemented and failure to remove all the gotos so I think these 4 games share the same problem.

FE3H runs smoothly in yuzu for me, I played around 1-2 hrs without problem.

I attached the log files of opengl (disabling assem shaders) and vulkan here.yuzu_log_opengl_disable_shader.txt (2.2 MB) yuzu_log_vulkan.txt (2.7 MB)