You are not logged in.

#1 2024-09-22 21:05:33

山猿
Member
Registered: 2023-07-27
Posts: 44

[SOLVED] Running wm from .xinitrc causes logout to ly dm

I am running the 6.10.10-arch1-1 kernel. My wm is spectrwm and my dm is ly.

Previously, I believe I installed spectrwm via a makefile from the github page and this worked well. I wished to upgrade to the newest version, and use a package manager.

Previously, spectrwm was installed to /usr/local/bin/, with a library libswmhack.so installed to /usr/local/lib/.

I moved the spectrwm file from the aforementioned location to $HOME and deleted the libraries. As yay was not able to execute commands (I cannot recall the exact error message), I git cloned the repository and ran makepkg to reinstall yay (required per the instructions below).

Following this, as per instructions from the spectrwm github wiki, I installed the package via yay.

Though this works and I can log in via ly into spectrwm, after around a minute, something (methods to determine the as yet unknown cause below) causes me to log out and kicks me back to the ly dm screen, where I can log in again.

This occurs irrespective of whether I log in via the xinit option on ly, or the spectrwm option.

I have tried using journalctl, dmesg, and the following command;

echo exit | strace bash -li |& grep '^open'

Which led me to delete libswmhack.so as it was causing errors.

I can paste further text files if required but I was not sure what to include. For now, I thought best to include my .xinitrc file;

#!/bin/sh

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

sleep 1;xset dpms 0 0 0

xset s off

# merge in defaults and keymaps

if [ -f $sysresources ]; then







    xrdb -merge $sysresources

fi

if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
fi

if [ -f "$userresources" ]; then







    xrdb -merge "$userresources"

fi

if [ -f "$usermodmap" ]; then
    xmodmap "$usermodmap"
fi

xrdb ~/.Xresources

# start some nice programs

if [ -d /etc/X11/xinit/xinitrc.d ] ; then
 for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
  [ -x "$f" ] && . "$f"
 done
 unset f
fi

# for polkit
#/usr/bin/lxpolkit &

# for audio
#playerctld daemon &

# for volume pipe
_volume_pipe=/tmp/.volume-pipe
[[ -S $_volume_pipe ]] || mkfifo $_volume_pipe

# for wallpaper
#./.config/spectrwm/scripts/reload.sh &

# for terminal
wal -Rn
# must be after above cmd
. /home/tester/.config/contour/reload.sh

# for kana
fcitx5 &

# for keyboard
sxhkd &

# for mouse
xsetroot -cursor_name left_ptr

[ -f /etc/xprofile ] && . /etc/xprofile
[ -f ~/.xprofile   ] && . ~/.xprofile

# xclock -geometry 50x50-1+1 &
# xterm -geometry 80x50+494+51 &
# xterm -geometry 80x20+494-0 &
# exec xterm -geometry 80x66+0+0 -name login

exec spectrwm

EDIT: This is the most recent journalctl file I could get, with the time at 06:09:23 being when I was logged out;

Sep 23 06:09:20 sys bluetoothd[800]: Endpoint unregistered: sender=:1.105758 path=/MediaEndpoint/A2DPSource/faststream_duplex
Sep 23 06:09:20 sys bluetoothd[800]: Endpoint unregistered: sender=:1.105758 path=/MediaEndpoint/A2DPSink/opus_05
Sep 23 06:09:20 sys bluetoothd[800]: Endpoint unregistered: sender=:1.105758 path=/MediaEndpoint/A2DPSource/opus_05
Sep 23 06:09:20 sys bluetoothd[800]: Endpoint unregistered: sender=:1.105758 path=/MediaEndpoint/A2DPSink/opus_05_duplex
Sep 23 06:09:20 sys bluetoothd[800]: Endpoint unregistered: sender=:1.105758 path=/MediaEndpoint/A2DPSource/opus_05_duplex
Sep 23 06:09:20 sys systemd[1]: Started Getty on tty3.
Sep 23 06:09:20 sys systemd-logind[803]: Removed session 7.
Sep 23 06:09:23 sys ly[929]: pam_systemd_home(ly:auth): New sd-bus connection (system-bus-pam-systemd-home-929) opened.
Sep 23 06:09:23 sys ly[929]: pam_unix(ly:session): session opened for user tester(uid=1000) by tester(uid=0)
Sep 23 06:09:23 sys ly[929]: pam_systemd(ly:session): New sd-bus connection (system-bus-pam-systemd-929) opened.
Sep 23 06:09:47 sys ly[929]: pam_unix(ly:session): session closed for user tester
Sep 23 06:09:51 sys login[735643]: pam_systemd_home(login:auth): New sd-bus connection (system-bus-pam-systemd-home-735643) opened.
Sep 23 06:09:53 sys login[735643]: pam_unix(login:session): session opened for user tester(uid=1000) by tester(uid=0)
Sep 23 06:09:53 sys login[735643]: pam_systemd(login:session): New sd-bus connection (system-bus-pam-systemd-735643) opened.
Sep 23 06:09:53 sys systemd-logind[803]: New session 8 of user tester.
Sep 23 06:09:53 sys systemd[1]: Started Session 8 of User tester.
Sep 23 06:09:53 sys login[735643]: LOGIN ON tty3 BY tester
Sep 23 06:09:55 sys wireplumber[973]: default: Failed to get percentage from UPower: org.freedesktop.DBus.Error.NameHasNoOwner
Sep 23 06:09:55 sys wireplumber[973]: spa.bluez5.midi: org.bluez.GattManager1.RegisterApplication() failed: GDBus.Error:org.bluez.Error.AlreadyExists: Already Exists
Sep 23 06:09:55 sys bluetoothd[800]: Endpoint registered: sender=:1.110352 path=/MediaEndpoint/A2DPSource/ldac
Sep 23 06:09:55 sys bluetoothd[800]: Endpoint registered: sender=:1.110352 path=/MediaEndpoint/A2DPSink/aptx_hd
Sep 23 06:09:55 sys bluetoothd[800]: Endpoint registered: sender=:1.110352 path=/MediaEndpoint/A2DPSource/aptx_hd
Sep 23 06:09:55 sys bluetoothd[800]: Endpoint registered: sender=:1.110352 path=/MediaEndpoint/A2DPSink/aptx
Sep 23 06:09:55 sys bluetoothd[800]: Endpoint registered: sender=:1.110352 path=/MediaEndpoint/A2DPSource/aptx
Sep 23 06:09:55 sys bluetoothd[800]: Endpoint registered: sender=:1.110352 path=/MediaEndpoint/A2DPSink/aac
Sep 23 06:09:55 sys bluetoothd[800]: Endpoint registered: sender=:1.110352 path=/MediaEndpoint/A2DPSource/aac
Sep 23 06:09:55 sys bluetoothd[800]: Endpoint registered: sender=:1.110352 path=/MediaEndpoint/A2DPSink/opus_g
Sep 23 06:09:55 sys bluetoothd[800]: Endpoint registered: sender=:1.110352 path=/MediaEndpoint/A2DPSource/opus_g
Sep 23 06:09:55 sys bluetoothd[800]: Endpoint registered: sender=:1.110352 path=/MediaEndpoint/A2DPSink/sbc
Sep 23 06:09:55 sys bluetoothd[800]: Endpoint registered: sender=:1.110352 path=/MediaEndpoint/A2DPSource/sbc
Sep 23 06:09:55 sys bluetoothd[800]: Endpoint registered: sender=:1.110352 path=/MediaEndpoint/A2DPSource/aptx_ll_1
Sep 23 06:09:55 sys bluetoothd[800]: Endpoint registered: sender=:1.110352 path=/MediaEndpoint/A2DPSource/aptx_ll_0
Sep 23 06:09:55 sys bluetoothd[800]: Endpoint registered: sender=:1.110352 path=/MediaEndpoint/A2DPSource/aptx_ll_duplex_1
Sep 23 06:09:55 sys bluetoothd[800]: Endpoint registered: sender=:1.110352 path=/MediaEndpoint/A2DPSource/aptx_ll_duplex_0
Sep 23 06:09:55 sys bluetoothd[800]: Endpoint registered: sender=:1.110352 path=/MediaEndpoint/A2DPSource/faststream
Sep 23 06:09:55 sys bluetoothd[800]: Endpoint registered: sender=:1.110352 path=/MediaEndpoint/A2DPSource/faststream_duplex
Sep 23 06:09:55 sys bluetoothd[800]: Endpoint registered: sender=:1.110352 path=/MediaEndpoint/A2DPSink/opus_05
Sep 23 06:09:55 sys bluetoothd[800]: Endpoint registered: sender=:1.110352 path=/MediaEndpoint/A2DPSource/opus_05
Sep 23 06:09:55 sys bluetoothd[800]: Endpoint registered: sender=:1.110352 path=/MediaEndpoint/A2DPSink/opus_05_duplex
Sep 23 06:09:55 sys bluetoothd[800]: Endpoint registered: sender=:1.110352 path=/MediaEndpoint/A2DPSource/opus_05_duplex

Last edited by 山猿 (2024-09-22 22:25:39)

Offline

#2 2024-09-22 21:30:42

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,100

Re: [SOLVED] Running wm from .xinitrc causes logout to ly dm

You're likely not being "logged out" but spectrewm will crash.
Replace "exec spectrwm" w/ "exec xterm" and run "spectrwm" from the xterm that keeps your session.
If you don't get a coredump, https://wiki.archlinux.org/title/Core_d … _core_dump try to "gdb spectrewm" for that but there might also be an obvious error about unresolvable libraries etc.

Offline

#3 2024-09-22 21:49:14

山猿
Member
Registered: 2023-07-27
Posts: 44

Re: [SOLVED] Running wm from .xinitrc causes logout to ly dm

seth wrote:

You're likely not being "logged out" but spectrewm will crash.
Replace "exec spectrwm" w/ "exec xterm" and run "spectrwm" from the xterm that keeps your session.

Thanks very much for your help with this, that has been useful in drawing out what the issue might be. Running exec xterm from .xinitrc opens without incident, as you suggested.

If you don't get a coredump, https://wiki.archlinux.org/title/Core_d … _core_dump try to "gdb spectrewm" for that but there might also be an obvious error about unresolvable libraries etc.

I tried two methods here;

  • First of all, I ran exec spectrwm; this crashed and returned me to ly

  • Secondly, I tried simply spectrwm; this also crashed but I could see the error this time, provided below

The error I was given in xterm was as follows;

X Error of failed request:  BadLength (poly request too large or internal Xlib length error)
  Major opcode of failed request:  139 (RENDER)
  Minor opcode of failed request:  20 (RenderAddGlyphs)
  Serial number of failed request:  985
  Current serial number in output stream:  65048

I additionally received an error for one of the scripts I had written;

/home/tester/.config/spectrwm/scripts/vol_ctrl.sh: line 12: echo: write error: Broken pipe

I will test running the command again, without this script and I will just edit this post to add the results of 'gdb spectrwm'. Thank you again for your help.

EDIT: Running gdb spectrwm, as well as;

# coredumpctl info PID

Did not yield any results (with the above command stating 'No coredumps found.'). When I disabled all scripts in the spectrwm bar, however, the wm does not seem to crash and has not crashed since starting without these scripts.

I am not quite sure what is causing the error in the scripts now, seemingly, where there was none before, but I will now try running spectrwm directly via .xinitrc with those scripts disabled.

Last edited by 山猿 (2024-09-22 22:05:14)

Offline

#4 2024-09-22 22:25:19

山猿
Member
Registered: 2023-07-27
Posts: 44

Re: [SOLVED] Running wm from .xinitrc causes logout to ly dm

This post is to add that the following solved the issue of logging out intermittently without seeming explanation;

  • Removing 'exec spectrwm' from ~/.xinitrc

  • Adding 'exec xterm' to ~/.xinitrc

  • Running 'spectrwm' from xterm after logging in

  • Noting the crash errors (see above)

  • Consequently disabling ~/.config/spectrwm/baraction.sh by commenting out the relevant line in ~/.config/spectrwm/spectrwm.conf (note disabling the first script as mentioned in the post above did not resolve the issue, as multiple scripts complained of a 'Broken pipe'; these scripts are user created)

  • Running 'spectrwm' in xterm after logging in again, to test

  • Replacing 'exec xterm' with 'exec spectrwm' in ~/.xinitrc after the above step did not lead to a crash in xterm

This solves the issue, and I will mark the topic as such, but it would be nice to understand why the scripts, which had worked before in a previous version of spectrwm, now no longer do. I will investigate and depending on the scope of the issue, either open this as a new topic, or append a reply here, but any pointers as to where to look would be very useful.

Thank you again for your help in resolving this.

Offline

#5 2024-09-22 22:32:46

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,100

Re: [SOLVED] Running wm from .xinitrc causes logout to ly dm

This will have been the fixing move:

Consequently disabling ~/.config/spectrwm/baraction.sh by commenting out the relevant line in ~/.config/spectrwm/spectrwm.conf (note disabling the first script as mentioned in the post above did not resolve the issue, as multiple scripts complained of a 'Broken pipe'; these scripts are user created)

X Error of failed request:  BadLength (poly request too large or internal Xlib length error)
  Major opcode of failed request:  139 (RENDER)
  Minor opcode of failed request:  20 (RenderAddGlyphs)
  Serial number of failed request:  985
  Current serial number in output stream:  65048

looks font related - and there're multiple hits reg. some emoji font: https://www.google.com/search?q=%22BadL … rAddGlyphs

# coredumpctl info PID

The PID there is a placeholder, you first check "coredumpctl" to just list the coredumps you can then inspect.

First of all, I ran exec spectrwm; this crashed and returned me to ly

https://man.archlinux.org/man/core/man-pages/exec.1p.en wrote:

If exec is specified with command, it shall replace the shell with command without creating a new process.

Edit: https://github.com/LukeSmithxyz/st/issues/130

Last edited by seth (2024-09-22 22:34:01)

Offline

#6 2024-09-22 22:50:26

山猿
Member
Registered: 2023-07-27
Posts: 44

Re: [SOLVED] Running wm from .xinitrc causes logout to ly dm

seth wrote:

This will have been the fixing move:

Consequently disabling ~/.config/spectrwm/baraction.sh by commenting out the relevant line in ~/.config/spectrwm/spectrwm.conf (note disabling the first script as mentioned in the post above did not resolve the issue, as multiple scripts complained of a 'Broken pipe'; these scripts are user created)

X Error of failed request:  BadLength (poly request too large or internal Xlib length error)
  Major opcode of failed request:  139 (RENDER)
  Minor opcode of failed request:  20 (RenderAddGlyphs)
  Serial number of failed request:  985
  Current serial number in output stream:  65048

looks font related - and there're multiple hits reg. some emoji font: https://www.google.com/search?q=%22BadL … rAddGlyphs

Thank you very much. I had ttf-noto-emoji-monochrome to use as some simple glyphs but these did not seem to work any longer and were showing as tofu for some time.

# coredumpctl info PID

The PID there is a placeholder, you first check "coredumpctl" to just list the coredumps you can then inspect.

Apologies; what I meant is that I was also using this as a placeholder in this post; I attempted the command a few times and no longer had the PIDs used to hand.

First of all, I ran exec spectrwm; this crashed and returned me to ly

https://man.archlinux.org/man/core/man-pages/exec.1p.en wrote:

If exec is specified with command, it shall replace the shell with command without creating a new process.

Thank you for that link, that is useful to know if testing this again.

This solved the font issue above (although did not have the emoji I was looking for, it no longer crashes, and I will test with new fonts for the remaining glyphs that do not appear) so thank you again for your help on this.

Offline

Board footer

Powered by FluxBB