Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrongly configured org.freedesktop.systemd1 service on user's dbus session with i3 #87502

Closed
DamienCassou opened this issue May 10, 2020 · 3 comments · Fixed by #88101
Closed

Comments

@DamienCassou
Copy link
Contributor

Describe the bug

The dbus service org.freedesktop.systemd1 doesn't seem properly started when lightdm+i3 is used.

To Reproduce

$ busctl --user status org.freedesktop.systemd1
Failed to get credentials: No such device or address

Expected behavior
Doing the same within an lightdm+i3 session results in:

$ busctl --user status org.freedesktop.systemd1
PID=1899
PPID=1
[...]

Notify maintainers

/cc @ocharles @worldofpeace @modulistic @fpletz @globin

Metadata
Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

  • system: "x86_64-linux"
  • host os: Linux 5.4.35, NixOS, 20.09.git.855483fe5af (Nightingale)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.3.4
  • channels(root): ""
  • nixpkgs: /home/cassou/Documents/projects/nixos/system

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute:
# a list of nixos modules affected by the problem
module:
@DamienCassou
Copy link
Contributor Author

DamienCassou commented May 10, 2020

In the session running lightdm+i3, I can see:

$ ps aux | grep dbus-daemon
message+  1135  0.0  0.0   7744  4880 ?        Ss   May08   0:03 /nix/store/h3nn2hinxz83zf6yi2fgq9k4dindlvbn-dbus-1.12.16/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
cassou    1913  0.0  0.0   6440  2708 ?        Ss   May08   0:00 /run/current-system/sw/bin/dbus-daemon --syslog --fork --print-pid 5 --print-address 7 --session

$ ps aux | grep dbus-launch
cassou    1912  0.0  0.0   7396  2120 ?        S    May08   0:00 /nix/store/b7d9i2nh42089g5cybac8czv69v7q2gg-dbus-1.12.16-lib/bin/dbus-launch --exit-with-session /nix/store/jvqw2ymbf72yf18q2ly7gxzmykf4s52x-xsession-wrapper /nix/store/s5viq02wwq9bx5692fhpsdxb88v4nfcz-xsession

$ echo $DBUS_SESSION_BUS_ADDRESS
unix:abstract=/tmp/dbus-ENyOScjEok,guid=d0cd18da918d510a34b989a45eb5abb7

In the session running Gnome, I can see:

$ ps aux | grep dbus-daemon
message+  1179  0.0  0.0  10800  6360 ?        Ss   15:52   0:01 /nix/store/h3nn2hinxz83zf6yi2fgq9k4dindlvbn-dbus-1.12.16/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
cassou    1905  0.0  0.0   7264  4640 ?        Ss   15:52   0:00 /nix/store/h3nn2hinxz83zf6yi2fgq9k4dindlvbn-dbus-1.12.16/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
cassou    2290  0.0  0.0   6224  3532 ?        S    15:52   0:00 /run/current-system/sw/bin/dbus-daemon --config-file=/nix/store/5dnkdk2dr4m52qxpskg84v5xi9in6108-at-spi2-core-2.36.0/share/defaults/at-spi2/accessibility.conf --nofork --print-address 3

$ ps aux | grep dbus-launch

$ echo $DBUS_SESSION_BUS_ADDRESS
unix:path=/run/user/1000/bus

@DamienCassou
Copy link
Contributor Author

Here is some info about the user's dbus.socket unit:

$ systemctl cat --user dbus.socket
# /nix/store/h3nn2hinxz83zf6yi2fgq9k4dindlvbn-dbus-1.12.16/etc/systemd/user/dbus.socket
[Unit]
Description=D-Bus User Message Bus Socket

[Socket]
ListenStream=%t/bus
ExecStartPost=-/nix/store/zbxfs37qjj6ddrfnzrdnxnkrvvm1ddsf-systemd-245.3/bin/systemctl --user set-environment DBUS_SESSION_BUS_ADDRESS=unix:path=%t/bus

# /nix/store/732vj9z11pby21qc5hnrrwhdcvnixkg7-user-units/dbus.socket.d/overrides.conf
[Unit]

[Socket]

@matthewbauer
Copy link
Member

I don't know if it's helpful, but I also get this on SDDM+Plasma5. This on the other hand works:

busctl status org.freedesktop.systemd1

adisbladis added a commit to adisbladis/nixpkgs that referenced this issue May 18, 2020
This ensures a correct DBUS_SESSION_BUS_ADDRESS environment variable
is set and imported into the systemd user environment.

Previously this would refer to a non-existing path preventing commands
interacting with the systemd manager from working.

Closes NixOS#87502
NickHu pushed a commit to NickHu/nixpkgs that referenced this issue May 20, 2020
This ensures a correct DBUS_SESSION_BUS_ADDRESS environment variable
is set and imported into the systemd user environment.

Previously this would refer to a non-existing path preventing commands
interacting with the systemd manager from working.

Closes NixOS#87502
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants