How to prevent applications from crashing when switching between TTYs on X11?

I need to use X11 to run Unreal Editor because wayland (or xwayland in this case I suppose) is a broken piece of shitware.

So to do this, i just run openbox and run unreal editor in that on tty2 while my main environment on a wayland compositor is on tty1.

And this works fine, tty2 is a sanctuary from all the wayland issues on tty1, a true blessing. Until I start switching between tty1 and tty2, which causes the unreal editor to crash. I got this error specifically: VK_ERROR_DEVICE_LOST, and only when using my nvidia gpu (prime)

This ain’t exactly new about X, programs crashing when you switch between ttys is something i’ve noticed throughout the years before.

But now that I actually really need one: Is there a way to prevent programs from crashing when switching between ttys?

(The alternative is spending 3-4 hours compiling the unreal engine with wayland support. I don’t wanna!, and it’d suck real bad if i did that and it still had enough problems that would lead to me using it on X anyways)

There’s a bin version aur/unreal-engine-bin, have you tried that?
Or are you already running it?

I’m using it, it doesn’t come with wayland support, which is why i’d have to compile it myself. It has wayland support, it’s just disabled in the binary version for some reason, possibly an oversight.

Anyhow I actually managed to solve this issue!

In /etc/X11/xorg.conf.d/00-igpu.conf

Section "Device"
   Identifier  "Radeon"
   Driver      "amdgpu"
   Option "TearFree" "true"
EndSection

Creating a device for the igpu in xorg.conf apparently fixes the problem, however there was still an issue with weird framerate issues when i switched back to X, (it looked like it was being rendered in slowmo, and only really wanted to be rendered at a maximum of 60fps but i’m on a 240hz display).

The tearfree option solved that issue as well so now it works perfectly well for me.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.