You are not logged in.

#1 2023-03-09 21:31:51

MaximMaximS
Member
Registered: 2022-07-02
Posts: 8

Issue with dbus/loginctl/polkit

Hello, so I after i updated my system...

[2023-03-09T18:38:24+0100] [ALPM] upgraded hwdata (0.367-1 -> 0.368-1)
[2023-03-09T18:38:24+0100] [ALPM] upgraded systemd-libs (253.1-2 -> 253.1-3)
[2023-03-09T18:38:24+0100] [ALPM] upgraded systemd (253.1-2 -> 253.1-3)
[2023-03-09T18:38:25+0100] [ALPM] upgraded systemd-sysvcompat (253.1-2 -> 253.1-3)
[2023-03-09T18:38:25+0100] [ALPM] upgraded alsa-plugins (1:1.2.7.1-1 -> 1:1.2.7.1-2)
[2023-03-09T18:38:25+0100] [ALPM] upgraded tinycompress (1.2.8-1 -> 1.2.8-2)
[2023-03-09T18:38:25+0100] [ALPM] installed libopenmpt (0.6.9-1)
[2023-03-09T18:38:25+0100] [ALPM] upgraded ffmpeg (2:5.1.2-2 -> 2:6.0-3)
[2023-03-09T18:38:26+0100] [ALPM] upgraded firefox (110.0.1-1 -> 110.0.1-2)
[2023-03-09T18:38:26+0100] [ALPM] upgraded gegl (0.4.42-2 -> 0.4.42-3)
[2023-03-09T18:38:26+0100] [ALPM] upgraded gstreamer (1.22.0-4 -> 1.22.1-1)
[2023-03-09T18:38:26+0100] [ALPM] upgraded gst-plugins-base-libs (1.22.0-4 -> 1.22.1-1)
[2023-03-09T18:38:26+0100] [ALPM] upgraded gst-libav (1.22.0-4 -> 1.22.1-1)
[2023-03-09T18:38:26+0100] [ALPM] upgraded gst-plugins-bad-libs (1.22.0-4 -> 1.22.1-1)
[2023-03-09T18:38:26+0100] [ALPM] upgraded gst-plugins-base (1.22.0-4 -> 1.22.1-1)
[2023-03-09T18:38:26+0100] [ALPM] upgraded gst-plugins-good (1.22.0-4 -> 1.22.1-1)
[2023-03-09T18:38:26+0100] [ALPM] upgraded gstreamer-vaapi (1.22.0-4 -> 1.22.1-1)
[2023-03-09T18:38:26+0100] [ALPM] upgraded libde265 (1.0.11-1 -> 1.0.11-2)
[2023-03-09T18:38:26+0100] [ALPM] upgraded openal (1.23.0-1 -> 1.23.0-2)
[2023-03-09T18:38:26+0100] [ALPM] upgraded openvpn (2.6.0-1 -> 2.6.1-1)
[2023-03-09T18:38:27+0100] [ALPM] upgraded qt5-webengine (5.15.12-3 -> 5.15.13-1)
[2023-03-09T18:38:27+0100] [ALPM] upgraded qt6-multimedia-ffmpeg (6.4.2-1 -> 6.4.2-2)
[2023-03-09T18:38:27+0100] [ALPM] upgraded qt6-multimedia (6.4.2-1 -> 6.4.2-2)
[2023-03-09T18:38:27+0100] [ALPM] upgraded qt6-webengine (6.4.2-3 -> 6.4.2-4)
[2023-03-09T18:38:27+0100] [ALPM] upgraded aubio (0.4.9-14 -> 0.4.9-15)
[2023-03-09T18:38:27+0100] [ALPM] upgraded pcsclite (1.9.9-2 -> 1.9.9-3)
[2023-03-09T18:38:27+0100] [ALPM] upgraded freerdp (2:2.10.0-1 -> 2:2.10.0-2)
[2023-03-09T18:38:27+0100] [ALPM] upgraded guvcview-common (2.0.8-1 -> 2.0.8-2)
[2023-03-09T18:38:27+0100] [ALPM] upgraded guvcview (2.0.8-1 -> 2.0.8-2)
[2023-03-09T18:38:27+0100] [ALPM] upgraded mpv (1:0.35.1-2 -> 1:0.35.1-3)
[2023-03-09T18:38:27+0100] [ALPM] upgraded notcurses (3.0.9-1 -> 3.0.9-2)
[2023-03-09T18:38:28+0100] [ALPM] upgraded obs-studio (29.0.2-1 -> 29.0.2-2)
[2023-03-09T18:38:28+0100] [ALPM] upgraded python-pydantic (1.10.5-1 -> 1.10.6-1)
[2023-03-09T18:38:29+0100] [ALPM] upgraded tensorflow (2.11.0-2 -> 2.12.0rc1-1)
[2023-03-09T18:38:31+0100] [ALPM] upgraded python-tensorflow (2.11.0-2 -> 2.12.0rc1-1)
[2023-03-09T18:38:32+0100] [ALPM] upgraded signal-desktop (6.8.0-1 -> 6.9.0-1)
[2023-03-09T18:38:32+0100] [ALPM] upgraded telegram-desktop (4.6.5-2 -> 4.6.5-3)

my screen lock stopped working.

I am running sway.

When i run

loginctl lock-session

in terminal, it works, but running

swaymsg exec "loginctl lock-session"

produces this error in the log:

Error creating textual authentication agent: Error opening current controlling terminal for the process (`/dev/tty'): No such device or address (polkit-error-quark, 0)
Failed to issue method call: Unknown object '/org/freedesktop/login1/session/auto'.

It's also probably worth mentioning that authentication agent fails with

(polkit-gnome-authentication-agent-1:2105): polkit-gnome-1-WARNING **: 22:09:13.479: Unable to determine the session we are in: No session for pid 2105

Any help would be appreciated.

Offline

#2 2023-03-10 08:04:43

seth
Member
Registered: 2012-09-03
Posts: 36,841

Re: Issue with dbus/loginctl/polkit

I don't think the udpate caused this.

loginctl session-status | head -32
echo $DBUS_SESSION_BUS_ADDRESS

The error message tries to invoke a polkit-agent, the built-in thing is fubar, https://bbs.archlinux.org/viewtopic.php … 5#p2028455
=> https://wiki.archlinux.org/title/Polkit … ion_agents

Offline

#3 2023-03-10 11:31:12

MaximMaximS
Member
Registered: 2022-07-02
Posts: 8

Re: Issue with dbus/loginctl/polkit

1 - maxim (1000)
           Since: Fri 2023-03-10 12:25:14 CET; 1min 21s ago
          Leader: 1222 (login)
            Seat: seat0; vc1
             TTY: tty1
         Service: login; type wayland; class user
           State: active
            Unit: session-1.scope
                  ├─1222 "login -- maxim"
                  └─1752 swaybg -o "*" -i /home/maxim/Pictures/static/bg.png -m fill

bře 10 12:25:14 thonkped login[1222]: LOGIN ON tty1 BY maxim
bře 10 12:25:14 thonkped systemd[1]: Started Session 1 of User maxim.
unix:path=/run/user/1000/bus

Yes, I got the root shell.

Offline

#4 2023-03-10 13:31:48

seth
Member
Registered: 2012-09-03
Posts: 36,841

Re: Issue with dbus/loginctl/polkit

Yes, I got the root shell.

No smile
The suggestion was to install a polkit agent, the link just to reference the hoops you've to jump through to use the console agent.

The session status lists your login and swaybg, but not sway itself??

ps aux | grep sway

Offline

#5 2023-03-10 13:40:15

MaximMaximS
Member
Registered: 2022-07-02
Posts: 8

Re: Issue with dbus/loginctl/polkit

Oh, well i have gnome polkit agent autostarted with sway, but it fails too.

It is weird, I start sway in .bash_profile.

maxim       1628  2.1  1.5 5072116 230328 tty1   Ssl+ 12:25   2:52 sway
maxim       1752  0.0  0.0  17772  8408 tty1     S+   12:25   0:00 swaybg -o * -i /home/maxim/Pictures/static/bg.png -m fill
maxim       1885  0.0  0.0   6440  3468 ?        S    12:25   0:00 swayidle -w timeout 120 loginctl lock-session timeout 180 swaymsg "output * power off" resume swaymsg "output * power on" before-sleep loginctl lock-session lock swaylock
maxim       1887  0.0  0.2  49280 31812 ?        S    12:25   0:00 /usr/bin/python3 /usr/lib/sway-systemd/assign-cgroups.py
maxim       1889  0.0  0.0  10012  3876 ?        S    12:25   0:00 /bin/sh /usr/lib/sway-systemd/session.sh --with-cleanup
maxim       1952  0.0  0.0   2576  1428 ?        S    12:25   0:00 swaymsg -t subscribe ["shutdown"]
maxim       2357  0.0  0.0  10012  3696 ?        S    12:25   0:00 sh -c wofi | xargs swaymsg exec --
maxim       2359  0.0  0.0   8312  1968 ?        S    12:25   0:00 xargs swaymsg exec --
maxim       7853  0.0  0.0  10012  3652 ?        S    12:42   0:00 sh -c wofi | xargs swaymsg exec --
maxim       7855  0.0  0.0   8312  1968 ?        S    12:42   0:00 xargs swaymsg exec --
maxim      39365  0.0  0.0  10012  3656 ?        S    13:11   0:00 sh -c wofi | xargs swaymsg exec --
maxim      39367  0.0  0.0   8312  2108 ?        S    13:11   0:00 xargs swaymsg exec --
maxim      39982  0.0  0.0  10012  3720 ?        S    13:13   0:00 sh -c wofi | xargs swaymsg exec --
maxim      39984  0.0  0.0   8312  2116 ?        S    13:13   0:00 xargs swaymsg exec --
maxim      43098  0.0  0.0  10012  3712 ?        S    13:48   0:00 sh -c wofi | xargs swaymsg exec --
maxim      43100  0.0  0.0   8312  1880 ?        S    13:48   0:00 xargs swaymsg exec --
maxim      52109  0.0  0.0   9104  2540 pts/5    S+   14:36   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 sway

Offline

#6 2023-03-10 15:22:40

seth
Member
Registered: 2012-09-03
Posts: 36,841

Re: Issue with dbus/loginctl/polkit

dbus-monitor --system 2>&1 | grep -i lock

Try to lock the session directly and from swaymsg and see whether they want to lock the same session.

You can try to downgrade systemd, but the rebuild should™ only address https://bbs.archlinux.org/viewtopic.php?id=284034

Offline

#7 2023-03-10 15:39:02

MaximMaximS
Member
Registered: 2022-07-02
Posts: 8

Re: Issue with dbus/loginctl/polkit

When from sway (doesn't work):

signal time=1678462531.566449 sender=org.freedesktop.DBus -> destination=(null destination) serial=1196 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameOwnerChanged
   string ":1.118"
   string ""
   string ":1.118"
signal time=1678462531.569055 sender=org.freedesktop.DBus -> destination=(null destination) serial=1197 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameOwnerChanged
   string ":1.118"
   string ":1.118"
   string ""
signal time=1678462531.569441 sender=org.freedesktop.DBus -> destination=(null destination) serial=1198 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameOwnerChanged
   string ":1.119"
   string ""
   string ":1.119"
signal time=1678462531.571084 sender=org.freedesktop.DBus -> destination=(null destination) serial=1199 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameOwnerChanged
   string ":1.119"
   string ":1.119"
   string ""

loginctl lock-session in terminal:

signal time=1678462575.744567 sender=org.freedesktop.DBus -> destination=(null destination) serial=1200 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameOwnerChanged
   string ":1.120"
   string ""
   string ":1.120"
signal time=1678462575.748077 sender=:1.16 -> destination=(null destination) serial=1271 path=/org/freedesktop/PolicyKit1/Authority; interface=org.freedesktop.PolicyKit1.Authority; member=Changed
signal time=1678462575.748472 sender=org.freedesktop.DBus -> destination=(null destination) serial=1206 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameOwnerChanged
   string ":1.121"
   string ""
   string ":1.121"
signal time=1678462575.749045 sender=:1.5 -> destination=(null destination) serial=213 path=/org/freedesktop/login1/session/_31; interface=org.freedesktop.login1.Session; member=Lock
signal time=1678462575.749190 sender=org.freedesktop.DBus -> destination=(null destination) serial=1207 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameOwnerChanged
   string ":1.121"
   string ":1.121"
   string ""
signal time=1678462575.749603 sender=org.freedesktop.DBus -> destination=(null destination) serial=1208 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameOwnerChanged
   string ":1.120"
   string ":1.120"
   string ""
signal time=1678462575.750008 sender=:1.16 -> destination=(null destination) serial=1274 path=/org/freedesktop/PolicyKit1/Authority; interface=org.freedesktop.PolicyKit1.Authority; member=Changed
signal time=1678462579.943069 sender=org.freedesktop.DBus -> destination=(null destination) serial=1210 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameOwnerChanged
   string ":1.122"
   string ""
   string ":1.122"
signal time=1678462579.943419 sender=:1.3 -> destination=(null destination) serial=1940 path=/org/freedesktop/systemd1; interface=org.freedesktop.systemd1.Manager; member=UnitNew
   string "dbus-org.freedesktop.home1.service"
   object path "/org/freedesktop/systemd1/unit/dbus_2dorg_2efreedesktop_2ehome1_2eservice"
signal time=1678462579.943456 sender=:1.3 -> destination=(null destination) serial=1941 path=/org/freedesktop/systemd1; interface=org.freedesktop.systemd1.Manager; member=UnitRemoved
   string "dbus-org.freedesktop.home1.service"
   object path "/org/freedesktop/systemd1/unit/dbus_2dorg_2efreedesktop_2ehome1_2eservice"
signal time=1678462579.964240 sender=org.freedesktop.DBus -> destination=(null destination) serial=1211 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameOwnerChanged
   string ":1.122"
   string ":1.122"
   string ""

with grep the first one gives nothing and the second one says

signal time=1678462615.921835 sender=:1.5 -> destination=(null destination) serial=217 path=/org/freedesktop/login1/session/_31; interface=org.freedesktop.login1.Session; member=Lock

Also I have checked my cmd history and realized, that it broke down before the update.

Offline

#8 2023-03-10 15:47:50

seth
Member
Registered: 2012-09-03
Posts: 36,841

Re: Issue with dbus/loginctl/polkit

loginctl doesn't seem to connect to the system bus at all, there's not even an authority issue…

How exactly do you invoke sway from the bashrc and what if you

dbus-run-session sway

it?

Offline

#9 2023-03-10 16:04:12

MaximMaximS
Member
Registered: 2022-07-02
Posts: 8

Re: Issue with dbus/loginctl/polkit

Hmm, I found the problem. After I disabled Docker everything works, weird thing is why, because i have default everything, except storage driver, which is set to btrfs.

Offline

#10 2023-03-10 16:32:19

seth
Member
Registered: 2012-09-03
Posts: 36,841

Re: Issue with dbus/loginctl/polkit

When docker is running, does "swaymsg exec foot" work?

Offline

#11 2023-03-10 16:33:54

MaximMaximS
Member
Registered: 2022-07-02
Posts: 8

Re: Issue with dbus/loginctl/polkit

yes

Offline

#12 2023-03-10 20:23:30

seth
Member
Registered: 2012-09-03
Posts: 36,841

Re: Issue with dbus/loginctl/polkit

When and how do you start docker?
Do you have a static hostname?
Can you

dbus-send --session --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.ListNames
dbus-send --system --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.ListNames

while docker is running?

Offline

#13 2023-03-11 20:40:24

MaximMaximS
Member
Registered: 2022-07-02
Posts: 8

Re: Issue with dbus/loginctl/polkit

enabled default systemd service file
i got hostname in /etc/hostname and nothing in /etc/hosts

method return time=1678567253.464689 sender=org.freedesktop.DBus -> destination=:1.164 serial=3 reply_serial=2
   array [
      string "org.freedesktop.DBus"
      string "org.freedesktop.Notifications"
      string ":1.128"
      string ":1.7"
      string ":1.8"
      string "org.freedesktop.network-manager-applet"
      string "org.keepassxc.KeePassXC.MainWindow"
      string ":1.9"
      string "org.freedesktop.portal.Desktop"
      string "org.mpris.MediaPlayer2.chromium.instance8188"
      string "org.freedesktop.systemd1"
      string "org.gtk.vfs.Daemon"
      string "org.pulseaudio.Server"
      string "org.kde.StatusNotifierHost-1943-0"
      string "org.kde.StatusNotifierHost-1943-1"
      string "fr.arouillard.waybar"
      string "org.freedesktop.impl.portal.desktop.gtk"
      string "org.a11y.Bus"
      string ":1.152"
      string ":1.22"
      string "org.gnome.keyring"
      string ":1.153"
      string ":1.23"
      string ":1.24"
      string ":1.25"
      string ":1.26"
      string ":1.135"
      string ":1.27"
      string ":1.28"
      string "ca.desrt.dconf"
      string "org.freedesktop.portal.Documents"
      string ":1.29"
      string "org.freedesktop.ReserveDevice1.Audio0"
      string "org.freedesktop.ReserveDevice1.Audio1"
      string "org.mozilla.firefox.bWF4aW0_"
      string "org.freedesktop.impl.portal.desktop.wlr"
      string ":1.30"
      string ":1.31"
      string ":1.10"
      string "org.freedesktop.impl.portal.PermissionStore"
      string ":1.32"
      string ":1.11"
      string ":1.33"
      string ":1.164"
      string ":1.12"
      string "org.kde.StatusNotifierWatcher"
      string ":1.34"
      string ":1.143"
      string ":1.13"
      string ":1.144"
      string ":1.14"
      string ":1.2"
      string ":1.15"
      string "org.freedesktop.secrets"
      string ":1.124"
      string ":1.16"
      string ":1.125"
      string ":1.4"
      string ":1.17"
      string ":1.18"
      string ":1.149"
      string ":1.6"
      string ":1.19"
   ]
method return time=1678567253.469196 sender=org.freedesktop.DBus -> destination=:1.90 serial=3 reply_serial=2
   array [
      string "org.freedesktop.DBus"
      string ":1.7"
      string "org.freedesktop.timesync1"
      string ":1.8"
      string "org.freedesktop.systemd1"
      string "org.fedoraproject.FirewallD1"
      string "org.freedesktop.NetworkManager"
      string "org.freedesktop.resolve1"
      string "org.freedesktop.RealtimeKit1"
      string "org.freedesktop.machine1"
      string ":1.40"
      string "org.freedesktop.PolicyKit1"
      string "org.bluez"
      string ":1.43"
      string ":1.44"
      string ":1.45"
      string ":1.24"
      string ":1.46"
      string ":1.47"
      string ":1.48"
      string ":1.49"
      string ":1.28"
      string "org.freedesktop.Avahi"
      string "org.freedesktop.UDisks2"
      string ":1.90"
      string "fi.w1.wpa_supplicant1"
      string "org.freedesktop.login1"
      string "org.freedesktop.ColorManager"
      string ":1.74"
      string ":1.52"
      string ":1.53"
      string ":1.32"
      string ":1.54"
      string ":1.11"
      string ":1.33"
      string ":1.12"
      string ":1.34"
      string "org.freedesktop.UPower"
      string ":1.0"
      string ":1.35"
      string ":1.58"
      string ":1.1"
      string ":1.2"
      string ":1.37"
      string ":1.3"
      string ":1.16"
      string ":1.38"
      string ":1.4"
      string ":1.39"
      string ":1.5"
      string ":1.6"
   ]

Last edited by MaximMaximS (2023-03-11 20:41:11)

Offline

#14 2023-03-11 20:58:06

seth
Member
Registered: 2012-09-03
Posts: 36,841

Re: Issue with dbus/loginctl/polkit

enabled default systemd service file

What if you disable it and start it explcitly after entering the sway session?

dbus is there - your static hostname isn't sth. stupid like "localhost"?

Offline

#15 2023-03-11 23:04:44

MaximMaximS
Member
Registered: 2022-07-02
Posts: 8

Re: Issue with dbus/loginctl/polkit

if i start it in sway its everything works, yes my hostname is fine

Offline

#16 2023-03-12 08:05:11

seth
Member
Registered: 2012-09-03
Posts: 36,841

Re: Issue with dbus/loginctl/polkit

Simply delaying the service could be a viable workaround, https://wiki.archlinux.org/title/Iwd#Re … after_boot (you might need more than 2s and obviously not on iwd wink

Other than that, compare "printenv" and (less likely) "ip a; ip r" between early and late docker starts.

Offline

Board footer

Powered by FluxBB