[BUG]: Full system crash when alt-tabbing on fullscreen with the appimage (Wayland only maybe?)
Describe the Bug
I had already talk on the discord, so I'm posting this here as hopefully gets fixed and to warn other people
The issue is the following:
On KDE Plasma EndeavourOS (Aka arch linux) there is a quiet common issue where alt-tabbing while having the emulator on full screen will cause the system to crash, showing an still image of the game but the audio will loop on a 5 second interval, all functions like keyboard and mouse stop working and the only way to get out is by forcing a reboot/shutdown of the whole system.
This issue may only be related to wayland or KDE, but I don't drive my x11 drive at all so I could not tell + idk if its even an issue of how pcsx2 handles alt-tabbing full screen on xwayland, if it's kde implemention or what exactly it is :')
Reproduction Steps
- get the official appimage from the website
- Start game on fullscreen
- Get lucky and alt-tab out and in to pcsx2
- after doing it an amount of times the system should lock up.
Expected Behavior
Alt-tabbing not causing the whole system to have a meltdown
PCSX2 Revision
PCSX2 v1.7.5825
Operating System
Linux (64bit) - Specify distro below
If Linux - Specify Distro
EndeavourOS (Arch Linux based distro)
Logs & Dumps
Sadly none, always forget to get a new log, will try to get one next time it happens
Probably related to (what I'm suspecting) is a conflict between system xcb libs and those in the appimage.... appimage is such a terrible concept when you're mixing the two.
Something changed recently, and meme linux started corrupting memory. Outside of our control regardless, but I'll try unbundling all the xcb libs I guess...
Haven't been able to reproduce it myself, but it looks to be a Mesa issue. I can see several MRs related to incorrectly returning SUBOPTIMAL on image acquire. Specifically with XWayland. Seems like it should be fixed in Mesa 24.1, which was released today.
We're doing the correct thing and recreating the swap chain upon receiving SUBOPTIMAL.
Haven't been able to reproduce it myself, but it looks to be a Mesa issue. I can see several MRs related to incorrectly returning SUBOPTIMAL on image acquire. Specifically with XWayland. Seems like it should be fixed in Mesa 24.1, which was released today.
We're doing the correct thing and recreating the swap chain upon receiving SUBOPTIMAL.
I tested with both the new version of stable mesa and the git version of it, same log spam of vulkan complaining and it seems to only affect RDNA2 cards or just specifically the rx6600? literally nobody else can reproduce this issue, I had tried everything except nuking my whole OS and Idk what to do, the crashes seems to had stopped at least but I would need to test further...|
The error as in:
[ 428,0588] (BeginPresent) vkAcquireNextImageKHR() failed: (1000001003: VK_SUBOPTIMAL_KHR)
[ 428,0590] Creating a swap chain with 3 images in present mode VK_PRESENT_MODE_IMMEDIATE_KHR
[ 428,4760] (BeginPresent) vkAcquireNextImageKHR() failed: (1000001003: VK_SUBOPTIMAL_KHR)
[ 428,4761] Creating a swap chain with 3 images in present mode VK_PRESENT_MODE_IMMEDIATE_KHR
[ 428,8430] (BeginPresent) vkAcquireNextImageKHR() failed: (1000001003: VK_SUBOPTIMAL_KHR)
[ 428,8431] Creating a swap chain with 3 images in present mode VK_PRESENT_MODE_IMMEDIATE_KHR
[ 429,1433] (BeginPresent) vkAcquireNextImageKHR() failed: (1000001003: VK_SUBOPTIMAL_KHR)
[ 429,1435] Creating a swap chain with 3 images in present mode VK_PRESENT_MODE_IMMEDIATE_KHR
[ 429,4602] (BeginPresent) vkAcquireNextImageKHR() failed: (1000001003: VK_SUBOPTIMAL_KHR)
[ 429,4604] Creating a swap chain with 3 images in present mode VK_PRESENT_MODE_IMMEDIATE_KHR
[ 429,7939] (BeginPresent) vkAcquireNextImageKHR() failed: (1000001003: VK_SUBOPTIMAL_KHR)
[ 429,7941] Creating a swap chain with 3 images in present mode VK_PRESENT_MODE_IMMEDIATE_KHR
[ 430,0942] (BeginPresent) vkAcquireNextImageKHR() failed: (1000001003: VK_SUBOPTIMAL_KHR)
[ 430,0944] Creating a swap chain with 3 images in present mode VK_PRESENT_MODE_IMMEDIATE_KHR
[ 430,4612] (BeginPresent) vkAcquireNextImageKHR() failed: (1000001003: VK_SUBOPTIMAL_KHR)
[ 430,4613] Creating a swap chain with 3 images in present mode VK_PRESENT_MODE_IMMEDIATE_KHR
[ 430,7615] (BeginPresent) vkAcquireNextImageKHR() failed: (1000001003: VK_SUBOPTIMAL_KHR)
[ 430,7617] Creating a swap chain with 3 images in present mode VK_PRESENT_MODE_IMMEDIATE_KHR
[ 431,0618] (BeginPresent) vkAcquireNextImageKHR() failed: (1000001003: VK_SUBOPTIMAL_KHR)
[ 431,0620] Creating a swap chain with 3 images in present mode VK_PRESENT_MODE_IMMEDIATE_KHR
[ 431,3788] (BeginPresent) vkAcquireNextImageKHR() failed: (1000001003: VK_SUBOPTIMAL_KHR)
[ 431,3789] Creating a swap chain with 3 images in present mode VK_PRESENT_MODE_IMMEDIATE_KHR
[ 431,6458] (BeginPresent) vkAcquireNextImageKHR() failed: (1000001003: VK_SUBOPTIMAL_KHR)
[ 431,6461] Creating a swap chain with 3 images in present mode VK_PRESENT_MODE_IMMEDIATE_KHR
[ 431,8960] (BeginPresent) vkAcquireNextImageKHR() failed: (1000001003: VK_SUBOPTIMAL_KHR)
[ 431,8961] Creating a swap chain with 3 images in present mode VK_PRESENT_MODE_IMMEDIATE_KHR
[ 432,1629] (BeginPresent) vkAcquireNextImageKHR() failed: (1000001003: VK_SUBOPTIMAL_KHR)
[ 432,1631] Creating a swap chain with 3 images in present mode VK_PRESENT_MODE_IMMEDIATE_KHR
[ 432,4466] (BeginPresent) vkAcquireNextImageKHR() failed: (1000001003: VK_SUBOPTIMAL_KHR)
[ 432,4468] Creating a swap chain with 3 images in present mode VK_PRESENT_MODE_IMMEDIATE_KHR
[ 432,7969] (BeginPresent) vkAcquireNextImageKHR() failed: (1000001003: VK_SUBOPTIMAL_KHR)
[ 432,7970] Creating a swap chain with 3 images in present mode VK_PRESENT_MODE_IMMEDIATE_KHR