reboot via dbus-send without interaction?

trying to investigate why handbrake and kodi cannot shutdown or reboot my system, I narrowed the problem down to these "Interactive authentication required" messages:

% dbus-send --system --print-reply --dest=org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager.Reboot boolean:false
Error org.freedesktop.DBus.Error.InteractiveAuthorizationRequired: Interactive authentication required.
% dbus-send --system --print-reply --dest=org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager.Reboot boolean:true 
Error org.freedesktop.DBus.Error.InteractiveAuthorizationRequired: Interactive authentication required.

According to and the logind documentation at least the line with "false" should be able to reboot the system without user interaction. How comes?

I tried to get some useful information using dbus-monitor running in parallel on another xterm, but theses commands don’t trigger any logging, as it seems. I have also verified package dependencies, went back to old dbus-daemon, tried several ways to run the dbus-launcher, all in vain πŸ™

System is Debian Sid on amd64, dbus-broker 35-2, systemd 255.4-1+b1, libpam-systemd 255.4-1+b1, upstream kernel 6.8.1. systemctl status can be found below.

Every insightful comment is highly appreciated



{harri@cecil:~ (master) 1002} zcat systemctl_status.txt.gz 
    State: running
    Units: 513 loaded (incl. loaded aliases)
     Jobs: 0 queued
   Failed: 0 units
    Since: Sun 2024-03-24 10:53:36 CET; 33min ago
  systemd: 255.4-1+b1
   CGroup: /
           β”‚ └─1 /sbin/init
           β”‚ β”œβ”€acpid.service
           β”‚ β”‚ └─839 /usr/sbin/acpid
           β”‚ β”œβ”€atd.service
           β”‚ β”‚ └─1211 /usr/sbin/atd -f
           β”‚ β”œβ”€autofs.service
           β”‚ β”‚ └─1192 /usr/sbin/automount --pid-file /var/run/
           β”‚ β”œβ”€avahi-daemon.service
           β”‚ β”‚ β”œβ”€841 "avahi-daemon: running [cecil.local]"
           β”‚ β”‚ └─873 "avahi-daemon: chroot helper"
           β”‚ β”œβ”€bluetooth.service
           β”‚ β”‚ └─842 /usr/libexec/bluetooth/bluetoothd
           β”‚ β”œβ”€clamav-freshclam.service
           β”‚ β”‚ └─1147 /usr/bin/freshclam -d --foreground=true
           β”‚ β”œβ”€cron.service
           β”‚ β”‚ └─1175 /usr/sbin/cron -f
           β”‚ β”œβ”€dbus-broker.service
           β”‚ β”‚ β”œβ”€878 /usr/bin/dbus-broker-launch --scope system --audit
           β”‚ β”‚ └─895 dbus-broker --log 4 --controller 9 --machine-id 4d4981ed2a8267030aa4ffd948e6259c --max-bytes 536870912 --max-fds 4096 --max-matches 16384 --audit
           β”‚ β”œβ”€dnsmasq.service
           β”‚ β”‚ └─1210 /usr/sbin/dnsmasq -x /run/dnsmasq/ -u dnsmasq -r /run/dnsmasq/resolv.conf -7 /etc/dnsmasq.d,.dpkg-dist,.dpkg-old,.dpkg-new --local-service
           β”‚ β”œβ”€fsidd.service
           β”‚ β”‚ └─845 /usr/sbin/fsidd
           β”‚ β”œβ”€irqbalance.service
           β”‚ β”‚ └─847 /usr/sbin/irqbalance
           β”‚ β”œβ”€lighttpd.service
           β”‚ β”‚ └─1314 /usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf
           β”‚ β”œβ”€mdmonitor.service
           β”‚ β”‚ └─588 /sbin/mdadm --monitor --scan
           β”‚ β”œβ”€minidlna.service
           β”‚ β”‚ └─1252 /usr/sbin/minidlnad -f /etc/minidlna.conf -P /run/minidlna/ -S -r
           β”‚ β”œβ”€networking.service
           β”‚ β”‚ └─1057 dhclient -4 -v -i -pf /run/ -lf /var/lib/dhcp/dhclient.br0.leases -I -df /var/lib/dhcp/dhclient6.br0.leases br0
           β”‚ β”œβ”€nfs-blkmap.service
           β”‚ β”‚ └─784 /usr/sbin/blkmapd
           β”‚ β”œβ”€nfs-idmapd.service
           β”‚ β”‚ └─1157 /usr/sbin/rpc.idmapd
           β”‚ β”œβ”€nfs-mountd.service
           β”‚ β”‚ └─1172 /usr/sbin/rpc.mountd
           β”‚ β”œβ”€nfsdcld.service
           β”‚ β”‚ └─791 /usr/sbin/nfsdcld
           β”‚ β”œβ”€nvidia-persistenced.service
           β”‚ β”‚ └─857 /usr/bin/nvidia-persistenced --user nvpd
           β”‚ β”œβ”€opensmtpd.service
           β”‚ β”‚ β”œβ”€1182 /usr/sbin/smtpd
           β”‚ β”‚ β”œβ”€1183 "smtpd: crypto"
           β”‚ β”‚ β”œβ”€1184 "smtpd: control"
           β”‚ β”‚ β”œβ”€1185 "smtpd: lookup"
           β”‚ β”‚ β”œβ”€1187 "smtpd: dispatcher"
           β”‚ β”‚ β”œβ”€1188 "smtpd: queue"
           β”‚ β”‚ └─1190 "smtpd: scheduler"
           β”‚ β”œβ”€polkit.service
           β”‚ β”‚ └─1996 /usr/lib/polkit-1/polkitd --no-debug
           β”‚ β”œβ”€rpc-statd.service
           β”‚ β”‚ └─1993 /usr/sbin/rpc.statd
           β”‚ β”œβ”€rpcbind.service
           β”‚ β”‚ └─759 /sbin/rpcbind -f -w
           β”‚ β”œβ”€rsyslog.service
           β”‚ β”‚ └─855 /usr/sbin/rsyslogd -n -iNONE
           β”‚ β”œβ”€rtkit-daemon.service
           β”‚ β”‚ └─2175 /usr/libexec/rtkit-daemon
           β”‚ β”œβ”€smartmontools.service
           β”‚ β”‚ └─858 /usr/sbin/smartd -n
           β”‚ β”œβ”€ssh.service
           β”‚ β”‚ └─1392 "sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups"
           β”‚ β”œβ”€system-getty.slice
           β”‚ β”‚ β”œβ”€getty@tty2.service
           β”‚ β”‚ β”‚ └─5318 /sbin/agetty -o "-p -- \u" --noclear - linux
           β”‚ β”‚ β”œβ”€getty@tty3.service
           β”‚ β”‚ β”‚ └─5326 ssh-agent
           β”‚ β”‚ β”œβ”€getty@tty5.service
           β”‚ β”‚ β”‚ └─6017 /sbin/agetty -o "-p -- \u" --noclear - linux
           β”‚ β”‚ └─getty@tty6.service
           β”‚ β”‚   └─5200 /sbin/agetty -o "-p -- \u" --noclear - linux
           β”‚ β”œβ”€systemd-journald.service
           β”‚ β”‚ └─442 /usr/lib/systemd/systemd-journald
           β”‚ β”œβ”€systemd-logind.service
           β”‚ β”‚ └─860 /usr/lib/systemd/systemd-logind
           β”‚ β”œβ”€systemd-timesyncd.service
           β”‚ β”‚ └─760 /usr/lib/systemd/systemd-timesyncd
           β”‚ β”œβ”€systemd-udevd.service
           β”‚ β”‚ └─udev
           β”‚ β”‚   └─490 /usr/lib/systemd/systemd-udevd
           β”‚ └─unattended-upgrades.service
           β”‚   └─1160 /usr/bin/python3 /usr/share/unattended-upgrades/unattended-upgrade-shutdown --wait-for-signal
               β”‚ β”œβ”€5319 /bin/login -p --
               β”‚ └─5356 -bash
               β”‚ β”œβ”€5322 /bin/login -p --
               β”‚ β”œβ”€5413 -bash
               β”‚ β”œβ”€5444 xinit -- :4 -br -quiet
               β”‚ β”œβ”€5445 -bash
               β”‚ β”œβ”€5446 /usr/bin/perl /usr/bin/ts
               β”‚ β”œβ”€5447 /usr/lib/xorg/Xorg :4 -br -quiet
               β”‚ β”œβ”€5456 /bin/bash /local/home/harri/.xinitrc
               β”‚ β”œβ”€5463 /bin/bash /local/home/harri/.xinitrc
               β”‚ β”œβ”€5465 /usr/bin/fvwm2
               β”‚ β”œβ”€5481 /usr/libexec/fvwm2/2.7.0/FvwmPager 7 4 none 0 8 "*"
               β”‚ β”œβ”€5482 xterm -C -n CONSOLE -fn 6x12 -g 120x9+0+0 -j +ut -T /var/log/messages -e tail -F --max-unchanged-stats=5 /var/log/kern.log
               β”‚ β”œβ”€5483 xterm -g 80x40+0+148 -n -j
               β”‚ β”œβ”€5484 /usr/libexec/fvwm2/2.7.0/FvwmAuto 9 4 none 0 8 500
               β”‚ β”œβ”€5485 xterm -g 120x40+519+148 -n -j
               β”‚ β”œβ”€5486 xterm -C -n CONSOLE -fn 6x12 -g 80x9+759+0 -j +ut -T /var/log/messages -e watch /sbin/route -n
               β”‚ β”œβ”€5487 xpenguin
               β”‚ β”œβ”€5488 /usr/libexec/fvwm2/2.7.0/FvwmEvent 11 4 none 0 8
               β”‚ β”œβ”€5489 dclock
               β”‚ β”œβ”€5491 /bin/bash /local/home/harri/.xinitrc
               β”‚ β”œβ”€5494 xscreensaver -no-splash
               β”‚ β”œβ”€5496 watch /sbin/route -n
               β”‚ β”œβ”€5498 xscreensaver-systemd
               β”‚ β”œβ”€5499 bash
               β”‚ β”œβ”€5504 bash
               β”‚ β”œβ”€5509 tail -F --max-unchanged-stats=5 /var/log/kern.log
               β”‚ β”œβ”€5627 emacs
               β”‚ └─6608 systemctl status
                 β”‚ β”œβ”€emacs.service
                 β”‚ β”‚ └─5352 /usr/bin/emacs --fg-daemon
                 β”‚ └─gpg-agent.service
                 β”‚   └─5376 /usr/bin/gpg-agent --supervised
                 β”‚ β”œβ”€5329 /usr/lib/systemd/systemd --user
                 β”‚ └─5330 "(sd-pam)"
                   β”‚ β”œβ”€5370 /usr/bin/dbus-broker-launch --scope user
                   β”‚ └─5377 dbus-broker --log 4 --controller 9 --machine-id 4d4981ed2a8267030aa4ffd948e6259c --max-bytes 100000000000000 --max-fds 25000000000000 --max-matches 5000000000
                   β”‚ └─5354 /usr/bin/pipewire -c filter-chain.conf
                   β”‚ └─5353 /usr/bin/pipewire
                     └─5355 /usr/bin/pulseaudio --daemonize=no --log-target=journal
Asked By: Harri


I found a solution: Apparently I have to start xinit on the current tty using something like "vt${ttynum} -keeptty" on the Xorg command line.

Using the startx wrapper around xinit the problem went away.

Answered By: Harri
Categories: Answers Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.