Is it possible to run a specific program in Xorg while in Wayland?

3 years ago by Xirup to c/linux

First of all, I know xWayland already does this when in a Wayland session but RPCS3 (PS3 emulator) runs disgustingly bad inside Wayland on my PC, and during an Xorg session the same emulator runs perfectly, and it's not a FPS issue or framerate, it is a problem that any game is simply unplayable because it suddenly gives stutters that do not exist in Xorg.

KDE Plasma honestly feels extremely buggy and slow on Xorg and so I don't want to use Xorg, I would like to use Wayland and not have to log into an Xorg session every time I want to use RPCS3.

Now, I am using KDE Plasma 5.27 with Wayland and using Nvidia proprietary drivers (515).

(If Linux4Noobs existed on Lemmy I would have posted this there)

communist 4 points 3 years ago path: 0 118770, hotness: undefined, score: 4, children: 2
Xirup 0 points 3 years ago

In fact you are right, although unfortunately it didn't help, and I have a doubt, how can you find so quickly the information of commands or specific variables that solve something?

I mean, of course, before asking in a community I try to investigate on my own but many times I don't find anything useful and that's why I have to ask.

path: 0 118770 147105, hotness: undefined, score: 0, children: 1
communist 1 point 3 years ago

I have had to force xwayland a number of times, so, I was familiar with it beforehand, it took me forever to find the first time!

In this case, you're going to want to post a bug report to the rpcs3 issue tracker, this sounds like something they need to resolve on their end.

path: 0 118770 147105 147106, hotness: undefined, score: 1, children: 0
NicKoehler 2 points 3 years ago

Try with: env -u WAYLAND_DISPLAY appname

path: 0 131786, hotness: undefined, score: 2, children: 0
Nuuskis 2 points 3 years ago

PS3 emulator is so niche app that I recommend you to ask its community or more ratherly devs.

path: 0 139174, hotness: undefined, score: 2, children: 1
Xirup 2 points 3 years ago

Good point, gonna try that.

path: 0 139174 140667, hotness: undefined, score: 2, children: 0
Aman9das 2 points 3 years ago

Which distro?

I would suggest filling a bug report to RPCS3 with all the system details you can

path: 0 133136, hotness: undefined, score: 2, children: 0
vividspecter 2 points 3 years ago

I don't see anyway around XWayland. You could run X in a separate VT but that wouldn't be "in" Wayland and while you wouldn't need to login, you'd still need to spawn it.

You could try running RPCS3 in gamescope as a workaround, but it's probably Nvidia + Wayland that's the issue.

EDIT: Have you tried running RPCS3 with both Wayland and XWayland? RPCS3 supports native Wayland as well so if it's an XWayland only issue then that should fix it. Conversely if native Wayland is actually what is breaking it you could try:

QT_QPA_PLATFORM=xcb rpcs3

which would force XWayland. Presumably it's QT_QPA_PLATFORM=wayland for wayland support, although it's the default on my system.

path: 0 117806, hotness: undefined, score: 2, children: 1
Xirup 1 point 3 years ago

I tried it but it doesn't work, even though the game starts I just get a blank screen, thanks anyway.

Fuck Nvidia.

path: 0 117806 132908, hotness: undefined, score: 1, children: 0
Alexmitter 1 point 3 years ago
path: 0 136874, hotness: undefined, score: 1, children: 0
StefanT 1 point 3 years ago

The stutters are a problem of the Nvidia driver. Been there (Geforce 1070 with those drivers). Now with an AMD card it does not happen. But heads up, what I have read it gets much better with newer Nvidia driver versions.

path: 0 119614, hotness: undefined, score: 1, children: 0
themoonisacheese 0 points 3 years ago

At some point no matter what you do, whatever was rendered in xorg will have to be converted to a Wayland surface to show it on screen. Xwayland just does that with internal x components instead of converting a whole canvas, so if anything it should be faster. I don't think there is a way for you to decide this to happen, but I think there is a bug to raise with both the xwayland team (because it's not working properly and they should be able to tell quite easily why) and the prcs3 team (because they can migrate to Wayland in not that much time, it's not one-click but it should be quite easy for talented devs like this)

path: 0 136935, hotness: undefined, score: 0, children: 3
Xirup 0 points 3 years ago

In fact checking their Github it seems that it is an open issue from January 2022 that has not received any attention.

path: 0 136935 136936, hotness: undefined, score: 0, children: 2
themoonisacheese 2 points 3 years ago

That is unfortunate. During the Wayland transition period, sadly this is bound to happen though I have to admit xwayland is otherwise really powerful and has not caused me many issues.

I'd just put a comment on this issue asking for status. Debian 12 recently released and it uses Wayland by default now so the issue is bound to happen more and more.

path: 0 136935 136936 136937, hotness: undefined, score: 2, children: 1
Xirup 1 point 3 years ago

Wow, Debian 12 using Wayland by default? I didn't know, it's about time!

And thanks for asking the status of the issue, I'll check back later for an answer.

path: 0 136935 136936 136937 138619, hotness: undefined, score: 1, children: 0
boerbiet 0 points 3 years ago

Maybe you can try running the application with QT_QPA_PLATFORM=xcb. I have to do so for Webex for my work, since it won't run properly on Wayland. You can edit the application's shortcut in KDE and set environment variables in the Application tab.

path: 0 140670, hotness: undefined, score: 0, children: 2
Xirup 1 point 3 years ago

I tried but still I have the same problem... Probably Nvidia related.

path: 0 140670 140694, hotness: undefined, score: 1, children: 1
swodig 1 point 3 years ago

Also try unsetting GDK_BACKEND

path: 0 140670 140694 202350, hotness: undefined, score: 1, children: 0
linux
linux

@lemmy.ml

login for more options
68145
9470
5670

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

  • Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
  • No misinformation
  • No NSFW content
  • No hate speech, bigotry, etc

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

go to feed...