Problem with xwayland in 6.1

I’m currently use kde 6.1 (wayland) launched from console without display manager.

I have these issues:

  • I cannot launch Xwayland app terminal (such as wine or when setting QT_QPA_PLATFORM=xcb, only from GUI app
  • I exported the environment variable GDK_SCALE=1.25, but it does not work.

I do not have these issues with swaywm or hyprland

How are you launching Plasma from the console? Can you share the command line?

I tried running

/usr/lib/plasma-dbus-run-session-if-needed /usr/bin/startplasma-wayland

by typing it into console or run it from a bash script. Both methods don’t work.

So my first thought was that you are running kwin_wayland without the --xwayland flag - but startplasma-wayland should do that properly.

Then I went back and read the OP and I noticed that you never said what was wrong. Can you please expand on “cannot launch”? Do you get an error? what is the error text?

This is my output when I run winecfg from terminal

006c:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
006c:err:winediag:nodrv_CreateWindow L"The explorer process failed to start."
006c:err:systray:initialize_systray Could not create tray window
0084:fixme:wineusb:query_id Unhandled ID query type 0x5.
0024:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
0024:err:winediag:nodrv_CreateWindow L"Make sure that your X server is running and that $DISPLAY is set correctly."

When I run some apps with QT_QPA_PLATFORM=xcb:

Qt warning: could not connect to display :0 

Can you show the command line that kwin_wayland was used to execute it? For example by using ps?

From commandline

    PID TTY          TIME CMD
   2991 pts/1    00:00:00 zsh
   3533 pts/1    00:00:00 ps

Run From kde launcher:

    PID TTY          TIME CMD
   1656 ?        00:00:00 systemd
   1658 ?        00:00:00 (sd-pam)
... omitted...
   7528 ?        00:00:00 sh
   7529 ?        00:00:00 ps

I apologize - this isn’t what I meant and I should have been explicit - can you please run the following command and post the result:

ps auxw | grep kwin
dvn       136053  0.0  0.0 151016 11092 ?        Ssl  14:03   0:00 /usr/bin/kwin_wayland_wrapper --xwayland
dvn       136058  7.9  1.0 3380448 174808 ?      Sl   14:03   0:06 /usr/bin/kwin_wayland --wayland-fd 7 --socket wayland-0 --xwayland-fd 8 --xwayland-fd 9 --xwayland-display :0 --xwayland-xauthority /run/user/1000/xauth_kjvSoD --xwayland
dvn       138668  0.0  0.0  10304  1492 pts/1    S+   14:05   0:00 grep kwin

What happens when you try to run:

xlogo

And what about:

DISPLAY=:0 xlogo

Both:

Authorization required, but no authorization protocol specified

Error: Can't open display: :0

That’s good information. Can you check what is the output of

echo $XAUTHORITY

and does it match the value of the --xwayland-authority argument of the kwin_wayland command?

echo $Xauthority:

/run/user/1000/Xauthority

It is different:

/run/user/1000/xauth_kjvSoD 

Ok. Solved. I set Xauthority in my file before. After I unset it, it works. Thank you.