flathub / org.yuzu_emu.yuzu

https://flathub.org/apps/details/org.yuzu_emu.yuzu
22 stars 45 forks source link

Metroid Prime Remastered Extreme Graphical Glitches (Flatpak Version) #927

Open TriVoxel opened 1 year ago

TriVoxel commented 1 year ago

yuzu Version

Mainline 1339 (Flathub)

Description

Models seemingly pop in and out all over the place and get all mixed up. Sometimes I have a pole attached to my morph ball, sometimes the enemies turn into hallways, panels and doors disappear, doors open up to a giant pile of junk, my spaceship is stuck in a tree... Basically, it seems like models are just randomly swapping places and attaching themselves to different things. Tried updating my keys, tried OpenGL and Vulkan, tried disabling all graphical settings, disabling extended memory and async shader compiling... I cannot get the issues to go away. My game file is good because it works flawlessly in Ryujinx and was a clean rip. This is the first Switch game I've had behave like this.

Here is video proof: https://youtu.be/DnPHDivm80Y

This does not happen in the AppImage version.

System Information

CPU: AMD Ryzen™ 7 3700X × 16
GPU/Driver: AMD Radeon™ RX 5700 XT
RAM: 64 GB
OS: Fedora Linux 37 (Workstation Edition)
Desktop: GNOME (Wayland)
Additional notes: Issue exists on latest system updates and with/without "resizable BAR"/"above 4G encoding" in BIOS. Latest stable MESA driver, recent Linux kernel, etc.

INXI:

System:
  Host: steamyfeds Kernel: 6.1.10-200.fc37.x86_64 arch: x86_64 bits: 64
    compiler: gcc v: 2.38-25.fc37 Desktop: GNOME v: 43.2 Distro: Fedora
    release 37 (Thirty Seven)
Machine:
  Type: Desktop Mobo: ASUSTeK model: TUF GAMING X570-PLUS (WI-FI)
    v: Rev X.0x serial: <superuser required> UEFI: American Megatrends
    v: 4403 date: 04/27/2022
Battery:
  Device-1: hid-90:9c:4a:0b:08:20-battery model: Magic Keyboard with
    Numeric Keypad charge: N/A status: discharging
  Device-2: hid-a8:91:3d:30:49:b8-battery model: Caden Mitchell’s
    Magic Mouse charge: N/A status: discharging
  Device-3: wiimote_battery_cc:fb:65:61:76:2b model: N/A charge: N/A
    status: N/A
CPU:
  Info: 8-core model: AMD Ryzen 7 3700X bits: 64 type: MT MCP arch: Zen 2
    rev: 0 cache: L1: 512 KiB L2: 4 MiB L3: 32 MiB
  Speed (MHz): avg: 2374 high: 3741 min/max: 2200/4426 boost: enabled
    cores: 1: 2200 2: 2196 3: 2198 4: 2194 5: 2073 6: 3592 7: 2200 8: 2200
    9: 2200 10: 2196 11: 2200 12: 2198 13: 2200 14: 3741 15: 2200
    16: 2200 bogomips: 114983
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3
    svm
Graphics:
  Device-1: AMD Navi 10 [Radeon RX 5600 OEM/5600 XT / 5700/5700 XT]
    vendor: Gigabyte driver: amdgpu v: kernel arch: RDNA-1 bus-ID: 0a:00.0
  Display: wayland server: X.Org v: 22.1.8 with: Xwayland v: 22.1.8
    compositor: gnome-shell driver: X: loaded: amdgpu dri: radeonsi
    gpu: amdgpu resolution: 3840x2160~60Hz
  API: OpenGL v: 4.6 Mesa 22.3.4 renderer: AMD Radeon RX 5700 XT
    (navi10 LLVM 15.0.7 DRM 3.49 6.1.10-200.fc37.x86_64)
    direct-render: Yes
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    vendor: ASUSTeK driver: r8169 v: kernel port: f000 bus-ID: 04:00.0
  IF: enp4s0 state: up speed: 1000 Mbps duplex: full
    mac: 24:4b:fe:de:7d:ab
  Device-2: Intel Wireless-AC 9260 Bluetooth Adapter type: USB
    driver: btusb bus-ID: 3-5:2
Drives:
  Local Storage: total: 8.19 TiB used: 5.32 TiB (65.0%)
Info:
  Processes: 427 Uptime: 5h 54m Memory: 62.71 GiB used: 3.67 GiB (5.9%)
  Init: systemd target: graphical (5) Compilers: gcc: 12.2.1
  clang: 15.0.7 Packages: 46 note: see --rpm Shell: Bash v: 5.2.15
  inxi: 3.3.25

Logs

yuzu_log.txt yuzu_log.txt.old.txt

Remarks

Happens even on a fresh install of Yuzu from Flathub. I also heard a user in my other issue say the following:

I've not only had the same problem on the flathub version of yuzu but also when using self compiled versions of it by using AUR scripts like yuzu-mainline-git, yuzu-git and yuzu-early-access. However, by using the official pre-compiled binary (yuzu-mainline-bin) the issue goes away. I imagine that points to a dependency mismatch or more broadly a build environment issue?

This is 100% reproducable no matter what settings I use. Like mentioned, this does not happen in the AppImage, even with resolution and other enhancements.

rapenne-s commented 1 year ago

I reproduce this as well using the flatpak version on an Nvidia 1060, in OpenGL or Vulkan.

liushuyu commented 1 year ago

This is a Mesa issue. The official binary is not affected because it used a copy of Mesa libraries from Ubuntu (which has LTO disabled). Arch Linux/Fedora/Flatpak, AFAIK, currently have LTO enabled for Mesa, which caused optimization errors in Mesa code.

See Mesa's upstream report for this issue: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6911

Bitwolfies commented 1 year ago

Does mesa even come into play on NV gpus? I have the same issues on my 3080.

liushuyu commented 1 year ago

Does mesa even come into play on NV gpus? I have the same issues on my 3080.

No. Then yours may be a different issue. The OP uses an AMD GPU hence my comment about Mesa.

Bitwolfies commented 1 year ago

Does mesa even come into play on NV gpus? I have the same issues on my 3080.

No. Then yours may be a different issue. The OP uses an AMD GPU hence my comment about Mesa.

Its very odd cause its the same symptoms, extreme graphical issues with model pop in and swaping on flatpak, but appimage is perfect.

hilloftheking commented 1 year ago

Does mesa even come into play on NV gpus? I have the same issues on my 3080.

No. Then yours may be a different issue. The OP uses an AMD GPU hence my comment about Mesa.

Its very odd cause its the same symptoms, extreme graphical issues with model pop in and swaping on flatpak, but appimage is perfect.

I am having the exact same issue with an RTX 3060 TI. Flatpak has graphical artifacts and the AppImage doesn't.

kekonn commented 1 year ago

Just chiming in with some extra test data. I run arch with an aur yuzu that's compiled everytime and it has the same issues. Switching to the appimage fixed the random geometry and texture issues.

ghost commented 1 year ago

It actually isn't mesa. I looked around and noticed that yuzu uses vcpkg for boost and some other stuff, i will assume that is what they use in appimage as there is no submodule related to boost in .gitmodules.

I tried using boost from vcpkg in my PKGBUILD and there were no glitches in yuzu just like the appimage.

So, either the problem is boost or some other dependency fetched using vcpkg.

dependencies listed in vcpkg config "boost-algorithm", "boost-asio", "boost-bind", "boost-config", "boost-container", "boost-context", "boost-crc", "boost-functional", "boost-icl", "boost-intrusive", "boost-mpl", "boost-process", "boost-range", "boost-spirit", "boost-test", "boost-timer", "boost-variant", "fmt", "lz4", "nlohmann-json", "zlib", "zstd"

Here is my PKGBUILD if you want to see it https://pastebin.com/hmTxGVt5

kekonn commented 1 year ago

@Emerald-glitch This has been fixed already. One of the recent commits downgrades the boost dependency and I can personally verify that the severe mesh glitches are gone now.

flibitijibibo commented 1 year ago

Tested on Steam Deck with the latest package and can confirm the issue is fixed.

(Also, as a game dev by trade, I absolutely love that a bug this explosive was somehow caused by Boost, of all things)