You are not logged in.

#1 2023-03-10 14:03:07

iamkarlson
Member
Registered: 2023-01-17
Posts: 28

[RESOLVED] sway and Xwayland doesn't start

Started to happen after interrupted system upgrade, however the issue is that Xwayland doesn't start. even with disabled Xwayland in sway, I can't run it to obtain logs. It says that server is already running:

_XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
_XSERVTransMakeAllCOTSServerListeners: server already running
(EE)
Fatal server error:
(EE) Cannot establish any listening sockets - Make sure an X server isn't already running(EE)

However, it's not. Also, during the shutdown/reboot, arch can't unmount /tmp. I tried to reinstall xwayland, and also install a different package (xwayland-git). But it's all the same error after.

Last edited by iamkarlson (2023-03-12 21:33:02)

Offline

#2 2023-03-10 14:27:38

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,471
Website

Re: [RESOLVED] sway and Xwayland doesn't start

Delete any existing Xwayland socket which by default would be at /tmp/.X11-unix/X0.  I gather your tmp is not actually a tmpfs though if this survived a reboot.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2023-03-10 20:44:21

iamkarlson
Member
Registered: 2023-01-17
Posts: 28

Re: [RESOLVED] sway and Xwayland doesn't start

Trilby wrote:

I gather your tmp is not actually a tmpfs though if this survived a reboot.

It's tmpfs, and all files are recreated on startup. If I ran sway with Xwayland disabled - I have no troubles rebooting. Is there any way to obtain xwayland logs? I'm quite sure there's some issue that blocks it from start. `journal -b` doesn't output anything meaningful for that.

Offline

#4 2023-03-10 22:51:45

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,352

Re: [RESOLVED] sway and Xwayland doesn't start

"pacman upgrade was interrupted" at which point? Pacman log?
Check the package integrity:

sudo LC_ALL=C pacman -Qkk | grep -v ', 0 altered files'

Are you trying to explicitly lauch xwayland?
Why? Are you sure there isn't indeed a server already running (spawned by some X11 client)?

stat /tmp/.X11-unix/X0
ps aux | grep -i xwayland

Online

#5 2023-03-11 08:52:38

iamkarlson
Member
Registered: 2023-01-17
Posts: 28

Re: [RESOLVED] sway and Xwayland doesn't start

seth wrote:

"pacman upgrade was interrupted" at which point? Pacman log?
Check the package integrity:

sudo LC_ALL=C pacman -Qkk | grep -v ', 0 altered files'

This gave me a bunch of warnings: https://pastebin.com/bLy2W4mq But I'm not sure what action do I have to take here.

seth wrote:

Are you trying to explicitly lauch xwayland?
Why? Are you sure there isn't indeed a server already running (spawned by some X11 client)?

stat /tmp/.X11-unix/X0
ps aux | grep -i xwayland

I tried to debug a problem, and first obvious solution was to disable xwayland via sway's config and try to launch it manually. However, it didn't help and I turned it back in config. Then I collected sway logs, and haven't found much there. This is yesterday's log https://pastebin.com/qWbiAx8B. I was surprised to see that Xwayland reported that it started correctly. Nonetheless, some apps (e.g. pycharm, slack) aren't displayed on the screen, but I can see them in the processes. However, I can't kill neither of the processes (e.g. Xwayland, pycharm). While pycharm can only be launched in Xwayland, Slack is an Electron app. So I tried to launch in wayland natively, and it worked but only if I disabled xwayland. To make things worse, some other apps are launched in xwayland with not problems or whatsoever.

Offline

#6 2023-03-11 09:12:29

iamkarlson
Member
Registered: 2023-01-17
Posts: 28

Re: [RESOLVED] sway and Xwayland doesn't start

It seems like SDDM caused troubles. I disabled this service, and it seems to be fixed. However, I would love to dig deeper to understand how to debug such problems. How can I identify if there's a conflict?

Offline

#7 2023-03-11 09:25:40

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,352

Re: [RESOLVED] sway and Xwayland doesn't start

some apps (e.g. pycharm, slack) aren't displayed on the screen, but I can see them in the processes. However, I can't kill neither of the processes (e.g. Xwayland, pycharm)

some other apps are launched in xwayland with not problems or whatsoever.

Please don't paraphrase, https://bbs.archlinux.org/viewtopic.php?id=57855

ps aux

and what's the response to kill attempts? And what signal(s) did you use? SIGTERM? SIGKILL?

Edit: F5…
However, the actual process state might matter.
Also do you https://wiki.archlinux.org/title/SDDM#R … er_Wayland ? Does it matter?

Last edited by seth (2023-03-11 09:27:04)

Online

#8 2023-03-11 15:51:35

iamkarlson
Member
Registered: 2023-01-17
Posts: 28

Re: [RESOLVED] sway and Xwayland doesn't start

seth wrote:

Sorry, I didn't mean too but I'm not very confident in terminology. Some applications (I mean GUI applications) are shown in process list but their window isn't displayed. I am afraid that they are displayed "somewhere" and this "somewhere" is just not on the screen. I'm not sure how to debug it.

seth wrote:
ps aux

and what's the response to kill attempts? And what signal(s) did you use? SIGTERM? SIGKILL?

❯ pkill Xwayland; echo $?; ps -aux |grep Xwayland
0
iamkarl+   23359  0.0  0.2 702528 108232 tty1    Dl+  15:56   0:00 Xwayland :0 -rootless -core -terminate 10 -listenfd 30 -listenfd 32 -displayfd 148 -wm 144
iamkarl+   36371  0.0  0.0   6572  2432 pts/1    S+   16:43   0:00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox Xwayland

pkill by default sends SIGTERM. I can retry to SIGTERM it several times, but process isn't killed.


seth wrote:

With disabled SDDM I'm getting now the same behavior now after a few hours of the system being on.

Offline

#9 2023-03-11 16:16:11

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,352

Re: [RESOLVED] sway and Xwayland doesn't start

Dl+
man ps wrote:

D    uninterruptible sleep (usually IO)

The process cannot be terminated in this state and if you're trying to run another instance while that server instance is present, you'll get the error that there's another server running.
Unless you get an Xwayland instance in strace to enter this state, you'll have to sysrq+w, https://wiki.archlinux.org/title/Keyboa … el_(SysRq)
https://stackoverflow.com/questions/341 … blocked-io

Online

#10 2023-03-11 17:39:47

iamkarlson
Member
Registered: 2023-01-17
Posts: 28

Re: [RESOLVED] sway and Xwayland doesn't start

seth wrote:

The process cannot be terminated in this state and if you're trying to run another instance while that server instance is present, you'll get the error that there's another server running.

I'm not really trying to run Xwayland manually or something. It's just sway with default xwayland settings. So if there's another instance of Xwayland then it's run by something that I'm not aware of.


seth wrote:

Unless you get an Xwayland instance in strace to enter this state, you'll have to sysrq+w

Did I understand you correctly that `strace`'ing this process would give me problematic IO? I'm not really sure how this process should look like. Maybe you can suggest what I have to look for?

edit: sysrq+w logs via dmesg https://pastebin.com/s40L2n2u

Last edited by iamkarlson (2023-03-11 17:45:19)

Offline

#11 2023-03-11 20:49:38

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,352

Re: [RESOLVED] sway and Xwayland doesn't start

Did I understand you correctly that `strace`'ing this process would give me problematic IO?

The strace would simply stall at the stalling syscall (which is typically but not necessarily some IO)

Why does nouveau show up in the sysrq dump?
Please post your Xorg log, https://wiki.archlinux.org/title/Xorg#General
Also

lspci

and

glinfo

(latter is in mesa-demos)

Online

#12 2023-03-11 21:46:44

iamkarlson
Member
Registered: 2023-01-17
Posts: 28

Re: [RESOLVED] sway and Xwayland doesn't start

I reproduced the error. After enabling SDDM back, Slack doesn't start after reboot.

Xwayland get into blocked state again:
https://pastebin.com/hwzTx31A

Here's Xorg logs:
https://pastebin.com/ugmDXKNw

And finally sway log https://pastebin.com/1vsTtELY

lspci:
https://pastebin.com/VUZwwy0R

glxinfo hangs for 5+ minutes, and doesn't return any values. Nonetheless, it's shown as working: https://pastebin.com/ZUKUB6xS

Edit 1:
found out another way to reproduce it. Starting without SDDM, running sway, exiting, running and get the same problem as with SDDM - xwayland apps doesn't run. xwayland sysrc: https://pastebin.com/Zvjcztxs

Last edited by iamkarlson (2023-03-11 22:04:27)

Offline

#13 2023-03-11 21:55:55

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,352

Re: [RESOLVED] sway and Xwayland doesn't start

"glinfo", no "x"

Edit:

[    13.945] (--) PCI: (1@0:0:0) 10de:1fbb:17aa:22cb rev 161, Mem @ 0xbd000000/16777216, 0x6040000000/268435456, 0x6050000000/33554432, I/O @ 0x00003000/128

is a turing chip, install the proprietary nvidia driver?

Last edited by seth (2023-03-11 21:59:12)

Online

#14 2023-03-11 22:06:57

iamkarlson
Member
Registered: 2023-01-17
Posts: 28

Re: [RESOLVED] sway and Xwayland doesn't start

seth wrote:

"glinfo", no "x"

The same behavior.

seth wrote:

is a turing chip, install the proprietary nvidia driver?

I do have nvidia cart but I gave up setting it up, and using Intel GPU.

Offline

#15 2023-03-11 22:16:10

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,352

Re: [RESOLVED] sway and Xwayland doesn't start

I gave up setting it up, and using Intel GPU.

Well, your xwayland dump says something else.
The GPU is still addressed and the code is blocking in the nouveau driver.
nouveau is on the record for this, even on simple lspci probes, so install the nvidia blob.
If you want to deactivat the nvidia GPU, do so correctly, https://wiki.archlinux.org/title/NVIDIA … phics_only

Online

#16 2023-03-12 20:43:40

iamkarlson
Member
Registered: 2023-01-17
Posts: 28

Re: [RESOLVED] sway and Xwayland doesn't start

Incredible, but it worked! I disabled discrete GPU with udev rules and no problems so far. thanks for the help!

Offline

#17 2023-03-12 21:22:26

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,352

Re: [RESOLVED] sway and Xwayland doesn't start

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Online

Board footer

Powered by FluxBB