You are not logged in.

#1 2015-11-16 07:33:18

SilverSurfer972
Member
Registered: 2011-04-12
Posts: 12

[Solved] Can't get systemd User to work

Hi all,

I have Arch installed on one laptop and desktop PC and facing the same problem on both machines.
I simply can't get systemctl --user commands to work and run user services.

When running systemctl --user commands I get the following error:

$ systemctl --user enable ~/.config/systemd/user/uim.service 
Failed to connect to bus: No such file or directory

System-wide systemctl commands and services are running just fine.

I confirmed that the systemd --user  process is launched

$ ps aux | grep system
[...]
root       412  0.0  0.0  33756  4184 ?        Ss   Nov13   0:00 /usr/lib/systemd/systemd --user

Dbus is also running fine it seems.

I might be missing something but when looking at the systemd and systemd/user pages i can't find any steps that are missins to have systemd users running fine.

Thans in advance

Last edited by SilverSurfer972 (2015-11-17 23:56:25)

Offline

#2 2015-11-16 07:36:13

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [Solved] Can't get systemd User to work

How do you login?

Not an Installation issue, moving to NC...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2015-11-16 07:52:14

SilverSurfer972
Member
Registered: 2011-04-12
Posts: 12

Re: [Solved] Can't get systemd User to work

From root user on tty1 I launch sddm then login to i3 as normal user
I have other systems services enabled that launch with no problem (docker, network,etc...)
My version of systemd is 227

Offline

#4 2015-11-16 07:54:58

kvonlinee
Member
Registered: 2015-02-04
Posts: 27

Re: [Solved] Can't get systemd User to work

When you create user, you include the home folder also? Before I did not know, it took me awhile to firgure out.
Good luck

Offline

#5 2015-11-16 08:18:27

SilverSurfer972
Member
Registered: 2011-04-12
Posts: 12

Re: [Solved] Can't get systemd User to work

kvonlinee wrote:

When you create user, you include the home folder also? Before I did not know, it took me awhile to firgure out.
Good luck

Yes, the user was created with the -m option of useradd
and i just comfirmed in /etc/passwd that the home folder is correct.
$HOME is also properly set

Offline

#6 2015-11-16 12:36:02

snakeroot
Member
Registered: 2012-10-06
Posts: 164

Re: [Solved] Can't get systemd User to work

Try not using the full path.

$ systemctl --user enable uim.service

I tried starting a user service with full path and it threw an error, whereas without the full path it ran fine.

Offline

#7 2015-11-16 15:31:09

SilverSurfer972
Member
Registered: 2011-04-12
Posts: 12

Re: [Solved] Can't get systemd User to work

snakeroot wrote:

Try not using the full path.

$ systemctl --user enable uim.service

I tried starting a user service with full path and it threw an error, whereas without the full path it ran fine.

Still the same error:

$ systemctl --user enable uim.service 
Failed to connect to bus: No such file or directory

Is there any way to have a verbose output to identify the origin of the problem?

Last edited by SilverSurfer972 (2015-11-16 16:31:27)

Offline

#8 2015-11-16 15:35:25

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,592

Re: [Solved] Can't get systemd User to work

is dbus running for your user session?

Online

#9 2015-11-16 15:46:35

SilverSurfer972
Member
Registered: 2011-04-12
Posts: 12

Re: [Solved] Can't get systemd User to work

Scimmia wrote:

is dbus running for your user session?

$ ps aux | grep dbus
dbus       224  0.0  0.0  36920  3776 ?        Ss   Nov13   0:00 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
sddm      1452  0.0  0.0  43956  2148 tty1     S+   Nov13   0:00 dbus-launch --autolaunch 857400a2e6f04f0f891f3a7bae13f56d --binary-syntax --close-stderr
sddm      1453  0.0  0.0  36676   320 ?        Ss   Nov13   0:00 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
jd        1468  0.0  0.0  43956  2160 tty1     S+   Nov13   0:00 dbus-launch --autolaunch 857400a2e6f04f0f891f3a7bae13f56d --binary-syntax --close-stderr
jd        1469  0.0  0.0  36676  2460 ?        Ss   Nov13   0:00 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
jd       10763  0.0  0.0  36676  3200 ?        S    Nov16   0:00 /usr/bin/dbus-daemon --config-file=/etc/at-spi2/accessibility.conf --nofork --print-address 3

Looks like it is .
I fired dbus-launch too but no success

Last edited by SilverSurfer972 (2015-11-16 16:30:20)

Offline

#10 2015-11-16 15:50:02

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [Solved] Can't get systemd User to work

Please use code tags when pasting to the boards:
https://wiki.archlinux.org/index.php/Fo … s_and_code


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#11 2015-11-16 15:52:17

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,592

Re: [Solved] Can't get systemd User to work

Actually, it doesn't look like it. How are you launching sddm?

Check systemctl status, it should show dbus.service running once under system.slice and once under user@<uid>.service

Edit: Assuming, as always, that this is an up-to-date Arch Linux installation. Nothing held back and not a derivative.

Last edited by Scimmia (2015-11-16 16:06:22)

Online

#12 2015-11-16 16:30:57

SilverSurfer972
Member
Registered: 2011-04-12
Posts: 12

Re: [Solved] Can't get systemd User to work

jasonwryan wrote:

Please use code tags when pasting to the boards:
https://wiki.archlinux.org/index.php/Fo … s_and_code

Thanks for the info. Previous posts fixed

Offline

#13 2015-11-17 00:41:53

SilverSurfer972
Member
Registered: 2011-04-12
Posts: 12

Re: [Solved] Can't get systemd User to work

Scimmia wrote:

Actually, it doesn't look like it. How are you launching sddm?

Check systemctl status, it should show dbus.service running once under system.slice and once under user@<uid>.service

Edit: Assuming, as always, that this is an up-to-date Arch Linux installation. Nothing held back and not a derivative.

I launch sddm as root from the tty1 straight after boot

# sddm

I confirm that everything is up to date

Here is my output of systemctl status after a boot in i3

systemctl status
● machine
    State: running
     Jobs: 0 queued
   Failed: 0 units
    Since: Tue 2015-11-17 01:37:26 JST; 7h ago
   CGroup: /
           ├─init.scope
           │ └─1 /sbin/init splash
           ├─system.slice
           │ ├─dbus.service
           │ │ └─231 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
           │ ├─system-dhcpcd.slice
           │ │ └─dhcpcd@wlp4s0.service
           │ │   ├─267 wpa_supplicant -B -c/etc/wpa_supplicant/wpa_supplicant-wlp4s0.conf -iwlp4s0 
           │ │   └─420 /usr/bin/dhcpcd -q -w wlp4s0
           │ ├─systemd-journald.service
           │ │ └─136 /usr/lib/systemd/systemd-journald
           │ ├─systemd-resolved.service
           │ │ └─421 /usr/lib/systemd/systemd-resolved
           │ ├─systemd-logind.service
           │ │ └─230 /usr/lib/systemd/systemd-logind
           │ ├─systemd-udevd.service
           │ │ └─161 /usr/lib/systemd/systemd-udevd
           │ ├─polkit.service
           │ │ └─578 /usr/lib/polkit-1/polkitd --no-debug
           │ └─rtkit-daemon.service
           │   └─575 /usr/lib/rtkit/rtkit-daemon
           └─user.slice
             └─user-0.slice
               ├─user@0.service
               │ └─init.scope
               │   ├─422 /usr/lib/systemd/systemd --user
               │   └─424 (sd-pam)         
               └─session-c1.scope
                 ├─235 login -- root     
                 ├─429 -bash
                 ├─434 sddm
                 ├─435 /usr/lib/xorg-server/Xorg -nolisten tcp -auth /var/run/sddm/{ab0617d8-8b69-4b14-8ee4-654c2591b106} -background none -n
                 ├─447 dbus-launch --autolaunch 857400a2e6f04f0f891f3a7bae13f56d --binary-syntax --close-stderr
                 ├─448 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
                 ├─449 /usr/lib/sddm/sddm-helper --socket /tmp/sddm-auth38bfae04-922a-4b3b-89be-bc8e02f551bb --id 1 --start i3-with-shmlog --
                 ├─450 i3-with-shmlog
                 ├─454 uim-xim
                 ├─460 /usr/lib/uim/uim-helper-server
                 ├─463 dbus-launch --autolaunch 857400a2e6f04f0f891f3a7bae13f56d --binary-syntax --close-stderr
                 ├─464 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
                 ├─468 i3bar --bar_id=bar-0 --socket=/tmp/i3-jd.92Y8P5/ipc-socket.450
                 ├─469 i3status
                 ├─474 /bin/bash
                 ├─480 firefox
                 ├─564 urxvt
                 ├─566 /usr/lib/uim/uim-candwin-gtk
                 ├─567 bash
                 ├─574 /usr/bin/pulseaudio --start --log-target=syslog
                 ├─846 systemctl status
                 └─847 less

any reason why I don't have a dbus service in the user-0.slice?

Other info:
In /usr/lib/systemd/user

]$ tree /usr/lib/systemd/user/
/usr/lib/systemd/user/
├── basic.target
├── bluetooth.target -> ../system/bluetooth.target
├── busnames.target -> ../system/busnames.target
├── dbus.service
├── dbus.socket
├── default.target
├── exit.target
├── mpd.service
├── paths.target -> ../system/paths.target
├── printer.target -> ../system/printer.target
├── pulseaudio.service
├── pulseaudio.socket
├── shutdown.target -> ../system/shutdown.target
├── smartcard.target -> ../system/smartcard.target
├── sockets.target -> ../system/sockets.target
├── sockets.target.wants
│   ├── dbus.socket -> ../dbus.socket
│   └── pulseaudio.socket -> ../pulseaudio.socket
├── sound.target -> ../system/sound.target
├── systemd-bus-proxyd.service
├── systemd-bus-proxyd.socket
├── systemd-exit.service
└── timers.target -> ../system/timers.target

1 directory, 22 files

/etc/systemd/user/ is empty

~/.config/systemd/user/

$ tree ~/.config/systemd/user/
/home/jd/.config/systemd/user/
├── uim-env.service
└── uim.service

0 directories, 2 files

Offline

#14 2015-11-17 00:59:43

SilverSurfer972
Member
Registered: 2011-04-12
Posts: 12

Re: [Solved] Can't get systemd User to work

The pastebin of my dmesg:
https://ptpb.pw/UhPt

Offline

#15 2015-11-17 03:57:35

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,592

Re: [Solved] Can't get systemd User to work

SilverSurfer972 wrote:

I launch sddm as root from the tty1 straight after boot

Ok, that's ... strange. Why would you do that? Your systemctl status output proves that this does strange things.

Online

#16 2015-11-17 09:53:00

SilverSurfer972
Member
Registered: 2011-04-12
Posts: 12

Re: [Solved] Can't get systemd User to work

Indeed that was the reason. Enabling the sddm service solved it the problem

Thanks for the help

Offline

#17 2015-11-17 17:01:47

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [Solved] Can't get systemd User to work

Please remember to mark your thread as [Solved] by editing your first post and prepending it to the title.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB