You are not logged in.

#1 2022-01-04 12:06:29

tigerjack
Member
Registered: 2017-08-20
Posts: 62

[SOLVED] DBus failures/errors on sway launch

Trying to understand what is going on with my sway configuration (I keep having freezes), I'm trying to get the stdout/stderr of each program autostarted with sway.

First of all, this is my login script

# To increase performance on Nvidia cards
export VGL_READBACK=pbo

# To use the system theme on calibre
export CALIBRE_USE_SYSTEM_THEME=true

# To use an ASKPASS program
export SUDO_ASKPASS=/usr/bin/lxqt-openssh-askpass

# Other export path for my X bins
export PATH="$PATH:$HOME/bin/x"

# To enable wayland on firefox
export MOZ_ENABLE_WAYLAND=1

# TEST for sway
# export QT_WAYLAND_FORCE_DPI=physical
export QT_QPA_PLATFORMTHEME="qt5ct"
# export QT_QPA_PLATFORMTHEME="wayland"
export QT_QPA_PLATFORM=wayland-egl
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
export ECORE_EVAS_ENGINE=wayland_egl
export ELM_ENGINE=wayland_egl
export SDL_VIDEODRIVER=wayland
export _JAVA_AWT_WM_NONREPARENTING=1
# export CLUTTER_BACKEND=wayland
export WLR_DRM_DEVICES=/dev/dri/card0
# new ones
export XDG_SESSION_TYPE="wayland"
export XDG_SESSION_DESKTOP="sway"
export XDG_CURRENT_DESKTOP="sway"
export DESKTOP_SESSION=sway
#
export LIBSEAT_BACKEND="logind"

exec dbus-run-session /usr/bin/sway    

Then, this is an alias that allows me to launch sway from tty (FIRST_DISPLAY is just a random environment variable that I'm using for other purposes)

alias zw='export FIRST_DISPLAY='\''1'\'' && /home/simone/bin/sway_launch.sh >/mnt/internal/LinuxData/logs/sway/sway.log 2>&1'

The sway.log file contains these lines at startup

2022-01-04 12:41:31 - [swaybg-1.1/main.c:321] Found config * for output eDP-1 (Unknown 0x07D8 0x00000000)
dbus-daemon[194941]: [session uid=1000 pid=194941] Activating service name='org.freedesktop.systemd1' requested by ':1.1' (uid=1000 pid=195019 comm="dbus-update-activation-environment --systemd DISPL")
dbus-daemon[194941]: [session uid=1000 pid=194941] Activated service 'org.freedesktop.systemd1' failed: Process org.freedesktop.systemd1 exited with status 1
dbus-update-activation-environment: warning: error sending to systemd: org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.freedesktop.systemd1 exited with status 1
dbus-daemon[194941]: [session uid=1000 pid=194941] Activating service name='org.a11y.Bus' requested by ':1.4' (uid=1000 pid=195007 comm="nm-applet --indicator ")
dbus-daemon[194941]: [session uid=1000 pid=194941] Successfully activated service 'org.a11y.Bus'
dbus-daemon[194941]: [session uid=1000 pid=194941] Activating service name='org.gtk.vfs.Daemon' requested by ':1.2' (uid=1000 pid=195007 comm="nm-applet --indicator ")
dbus-daemon[194941]: [session uid=1000 pid=194941] Successfully activated service 'org.gtk.vfs.Daemon'
[2022-01-04 12:41:31.485] [info] Resources files: /home/simone/.config/waybar/config, /etc/xdg/waybar/style.css
dbus-daemon[194941]: [session uid=1000 pid=194941] Activating service name='org.freedesktop.portal.Desktop' requested by ':1.3' (uid=1000 pid=194997 comm="waybar -b bar-0 ")
dbus-daemon[194941]: [session uid=1000 pid=194941] Activating service name='org.freedesktop.portal.Documents' requested by ':1.10' (uid=1000 pid=195120 comm="/usr/lib/xdg-desktop-portal ")
dbus-daemon[194941]: [session uid=1000 pid=194941] Activating service name='org.freedesktop.impl.portal.PermissionStore' requested by ':1.11' (uid=1000 pid=195138 comm="/usr/lib/xdg-document-portal ")
dbus-daemon[194941]: [session uid=1000 pid=194941] Successfully activated service 'org.freedesktop.impl.portal.PermissionStore'
dbus-daemon[194941]: [session uid=1000 pid=194941] Successfully activated service 'org.freedesktop.portal.Documents'
dbus-daemon[194941]: [session uid=1000 pid=194941] Activating service name='org.freedesktop.secrets' requested by ':1.13' (uid=1000 pid=195110 comm="/opt/protonmail-bridge/proton-bridge --no-window ")
SSH_AUTH_SOCK=/run/user/1000/keyring/ssh

** (/usr/lib/xdg-desktop-portal:195120): WARNING **: 12:41:31.585: No skeleton to export
dbus-daemon[194941]: [session uid=1000 pid=194941] Activating service name='org.freedesktop.impl.portal.desktop.wlr' requested by ':1.10' (uid=1000 pid=195120 comm="/usr/lib/xdg-desktop-portal ")
2022/01/04 12:41:31 [ERROR] - config: no config file found
dbus-daemon[194941]: [session uid=1000 pid=194941] Successfully activated service 'org.freedesktop.impl.portal.desktop.wlr'
dbus-daemon[195079]: Activating service name='org.a11y.atspi.Registry' requested by ':1.0' (uid=1000 pid=195007 comm="nm-applet --indicator ")
dbus-daemon[195079]: Successfully activated service 'org.a11y.atspi.Registry'
SpiRegistry daemon is running with well-known name - org.a11y.atspi.Registry
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Unsupported maximum keycode 708, clipping.
>                   X11 cannot support keycodes above 255.
Errors from xkbcomp are not fatal to the X server
dbus-daemon[194941]: [session uid=1000 pid=194941] Activating service name='org.bluez.obex' requested by ':1.17' (uid=1000 pid=195097 comm="/usr/bin/python /usr/bin/blueman-applet ")
dbus-daemon[194941]: [session uid=1000 pid=194941] Activated service 'org.bluez.obex' failed: Process org.bluez.obex exited with status 1
[2022-01-04 12:41:56.570] [info] SIZE: 2
[2022-01-04 12:41:56.571] [info] SIZE: 1
[2022-01-04 12:41:56.571] [info] SIZE: 2
[2022-01-04 12:41:56.580] [warning] As using a timezone, some format args may be missing as the date library havn't got a release since 2018.
[2022-01-04 12:41:56.594] [warning] For a functional tray you must have libappindicator-* installed and export XDG_CURRENT_DESKTOP=Unity

** (waybar:194997): WARNING **: 12:41:56.620: gtk-layer-shell v0.6.0 may not work on GTK v3.24.31. If you experience crashes, check https://github.com/wmww/gtk-layer-shell/blob/master/compatibility.md

** (/usr/lib/xdg-desktop-portal:195120): WARNING **: 12:41:56.625: Failed to create secret proxy: Error calling StartServiceByName for org.freedesktop.secrets: Timeout was reached

** (/usr/lib/xdg-desktop-portal:195120): WARNING **: 12:41:56.625: No skeleton to export
dbus-daemon[194941]: [session uid=1000 pid=194941] Successfully activated service 'org.freedesktop.portal.Desktop'
[2022-01-04 12:41:56.756] [info] Bar configured (width: 1920, height: 30) for output: eDP-1

from where you can see that org.freedesktop.systemd1 and org.freedesktop.secrets have failure status.

In my sway config file, I have this configuration related to executable files

set $locker 'swaylock -f -e -c 1d2021 --inside-color 000000b3 -s fill -i ~/.cache/lockscreen'
exec swayidle \
    timeout 300 'swaymsg "output * dpms off"' \
    timeout 600 $locker \
    timeout 15 'if pgrep -x swaylock; then swaymsg "output * dpms off"; fi' \
    resume 'swaymsg "output * dpms on"' \
    before-sleep $locker
# exec ~/bin/x/mylock safe-mode

# notification daemon
exec mako >/mnt/internal/LinuxData/logs/sway/mako.log 2>&1 
# wifi tray
exec nm-applet --indicator >/mnt/internal/LinuxData/logs/sway/nm_applet.log 2>&1
# clipboard manager
# exec wl-paste -t text --watch clipman store
# https://github.com/yory8/clipman/issues/52#issuecomment-778693461
# exec wl-paste -t text --watch myclipman

# battery-monitor
exec batsignal -b >/mnt/internal/LinuxData/logs/sway/batsignal.log 2>&1 

#Execute all the startup scripts
exec dex -a >/mnt/internal/LinuxData/logs/sway/dex.log 2>&1 
# locker
exec xss-lock -- swaylock -k -l -c 000000 >/mnt/internal/LinuxData/logs/sway/xss_lock.log 2>&1 
# exec dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway XDG_SESSION_TYPE=wayland

Any help to debug the problem is appreciated.

Last edited by tigerjack (2022-01-04 16:08:18)

Offline

#2 2022-01-04 13:10:34

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [SOLVED] DBus failures/errors on sway launch

tigerjack wrote:
exec dbus-run-session /usr/bin/sway

Why do you think that using dbus-run-session is a good idea?
It isn't mentioned anywhere on the sway wiki page.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2022-01-04 14:20:26

tigerjack
Member
Registered: 2017-08-20
Posts: 62

Re: [SOLVED] DBus failures/errors on sway launch

Slithery wrote:
tigerjack wrote:
exec dbus-run-session /usr/bin/sway

Why do you think that using dbus-run-session is a good idea?
It isn't mentioned anywhere on the sway wiki page.

I have a comment right above that line saying

# D-Bus session bus is started automatically, but if you want to have multiple simultaneous sessions for the same user on the same machine, you may want to create a unique bus for each session, and therefore you should explicitly invoke dbus-run-session. See https://www.reddit.com/r/swaywm/comment … s_session/ and https://www.reddit.com/r/swaywm/comment … _etc_need/

I'm not sure why I needed this solution, I think I was experimenting with multiple logins. Do you think it may be the culprit here?

Last edited by tigerjack (2022-01-04 14:27:57)

Offline

#4 2022-01-04 14:54:09

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: [SOLVED] DBus failures/errors on sway launch

tigerjack wrote:

Do you think it may be the culprit here?

Remove it and find out.

That's from a Void user and they don't use systemd.

FWIW dbus seems to work fine for me with just 'exec sway'. Or at least it did until I masked it big_smile

EDIT: removed superfluous question.

Last edited by Head_on_a_Stick (2022-01-04 14:58:28)

Offline

#5 2022-01-04 16:07:56

tigerjack
Member
Registered: 2017-08-20
Posts: 62

Re: [SOLVED] DBus failures/errors on sway launch

Head_on_a_Stick wrote:
tigerjack wrote:

Do you think it may be the culprit here?

Remove it and find out.

Ok, removing it seems to solve the issue.
Thank you for the support smile

Offline

Board footer

Powered by FluxBB