RetroArch icon indicating copy to clipboard operation
RetroArch copied to clipboard

[Linux]Garbled video output when running under wayland.

Open Inu90 opened this issue 4 years ago • 10 comments

Description

Running retroarch under wayland and vulkan drivers gives out https://files.catbox.moe/dc6paw.png Came from X a couple weeks ago where it was running with no issues. No other program is having any similar behavior, any video source, any other game (native or otherwise) is working as intended.

Expected behavior

Non garbled video output.

Actual behavior

As the picture shows.

Steps to reproduce the bug

  1. Launch retroarch

Bisect Results

Like I said, only when running under wayland, with a small extra thing to notice: I'm currently running on an Asus FX505DY (Vega 8 IGPU+Radeon RX560M DGPU). If I launch it on the vega it works, but the performance suffers a bit for anything above PS1 with some filters.

Version/Commit

retroarch -v
[INFO] [Config]: Loading default config.
[INFO] [Config]: Looking for config in: "/home/cfsa/.config/retroarch/retroarch.cfg".
[INFO] RetroArch 1.9.13 (Git fca72f67d1)

Environment information

  • OS: Arch, up to date. Edit: Here's the rest of the -v output
[INFO] === Build =======================================
[INFO] CPU Model Name: AMD Ryzen 5 3550H with Radeon Vega Mobile Gfx  
[INFO] Capabilities:  MMX MMXEXT SSE SSE2 SSE3 SSSE3 SSE4 SSE4.2 AES AVX AVX2
[INFO] Built: Nov 13 2021
[INFO] Version: 1.9.13
[INFO] Git: fca72f67d1
[INFO] =================================================
[INFO] [Input]: Found input driver: "x".
[INFO] [Environ]: SET_PIXEL_FORMAT: RGB565.
[INFO] Version of libretro API: 1
[INFO] Compiled against API: 1
[INFO] [Audio]: Set audio input rate to: 48000.00 Hz.
[INFO] [Video]: Video @ fullscreen
[INFO] [Vulkan]: Vulkan dynamic library loaded.
[INFO] [Vulkan]: Found vulkan context: vk_wayland
[INFO] [Vulkan]: Detecting screen resolution 0x0.
[INFO] [Vulkan]: Found GPU at index 0: AMD RADV RAVEN
[INFO] [Vulkan]: Found GPU at index 1: AMD RADV POLARIS11
[INFO] [Vulkan]: Using GPU index 1.
[INFO] [Vulkan]: Using fences for WSI acquire.
[INFO] [Vulkan]: Using GPU: AMD RADV POLARIS11
[INFO] [Vulkan]: Queue family 0 supports 1 sub-queues.
[INFO] [Vulkan]: Using resolution 1920x1080
[INFO] [Vulkan]: Using RGB565 format.
[INFO] [Vulkan]: Loading stock shader.
[INFO] [Joypad]: Found joypad driver: "udev".
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Wayland]: Enabling idle inhibitor
[INFO] [Video]: Found display server: null
[INFO] [PulseAudio]: Requested 24576 bytes buffer, got 18432.
[INFO] [Display]: Found display driver: "vulkan".
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[WARN] [XMB] Asset missing: /usr/share/retroarch/assets/xmb/systematic/png/disc.png
[INFO] [SRAM]: SRAM will not be saved.
[INFO] [Playlist]: Loading history file: [/home/cfsa/.config/retroarch/content_history.lpl].
[INFO] [Playlist]: Loading history file: [/home/cfsa/.config/retroarch/content_music_history.lpl].
[INFO] [Playlist]: Loading history file: [/home/cfsa/.config/retroarch/content_video_history.lpl].
[INFO] [Playlist]: Loading history file: [/home/cfsa/.config/retroarch/content_image_history.lpl].
[INFO] [Playlist]: Loading favorites file: [/home/cfsa/.config/retroarch/content_favorites.lpl].
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Config]: Saved new config to "/home/cfsa/.config/retroarch/retroarch.cfg".
[INFO] [Core]: Content ran for a total of: 00 hours, 00 minutes, 00 seconds.
[INFO] [PulseAudio]: Pausing.
[INFO] [Core]: Unloading core..
[INFO] [Core]: Unloading core symbols..
[INFO] [Video]: Does not have enough samples for monitor refresh rate estimation. Requires to run for at least 4096 frames.
[INFO] [Video]: Does not have enough samples for monitor refresh rate estimation. Requires to run for at least 4096 frames.

Inu90 avatar Nov 22 '21 03:11 Inu90

A year ago, when i hadn't updated ubuntu and it didn't famously 'downgrade' Wayland from the default, i had to build retroarch myself to get the 'real' wayland version of retroarch running, because it was running in XWayland.

Depending of what you're installing, it would not surprise me at all if this was the case for you. I don't think RA supports 'wayland and x11' at the same time, though i could be wrong.

You can check with 'xeyes' which is a dumb program that shows some 'eyes' looking at the cursor. If the 'eyes' move on top of a program in wayland, it's running XWayland (because the wayland protocol made the cursor position on programs other than the current 'privileged information' to other applications, among other things).

edit: also my excuses, i didn't open your screenshot before writing this. That's some nasty corruption right there.

i30817 avatar Nov 22 '21 05:11 i30817

Checking with xeyes it doesn't seem to be running XWayland. On the other hand, I noticed something. It was basically the only time time I had ever run it windowed and with a mouse instead of XMB+controller and the mouse cursor changes to the default theme (adwaita) instead of keeping my current one.

Inu90 avatar Nov 22 '21 06:11 Inu90

Try disable all anti anliasing and vertical synz settings in your video card

Augusto7743 avatar Nov 27 '21 02:11 Augusto7743

Try disable all anti anliasing and vertical synz settings in your video card

Isn't that basically impossible under wayland?

Inu90 avatar Nov 28 '21 03:11 Inu90

@Inu90 Do you reproduce the issue with glcore video driver ?

Thank you.

gouchi avatar Jan 30 '22 20:01 gouchi

@gouchi glcore works correctly, tested menu and in-game. Should I post any logs?

Inu90 avatar Feb 01 '22 19:02 Inu90

I made a quick test and I can't reproduce the issue on Wayland using Sway with Intel HD.

snes

n64

gouchi avatar Aug 14 '22 13:08 gouchi

@Inu90 Please retest against latest nightly version/master

LibretroAdmin avatar Sep 02 '22 00:09 LibretroAdmin

@Inu90 Is it still an issue ?

gouchi avatar Oct 10 '23 12:10 gouchi

@Inu90 Is it still an issue or can we close this issue ? Thank you.

gouchi avatar Aug 13 '24 14:08 gouchi