You are not logged in.

#1 2019-02-25 16:44:04

Roald
Member
Registered: 2019-02-25
Posts: 21

systemd 90 sec delay on shutdow

Hello, when i turn of my chromebook acer edgar with Arch xfce i have to wait 90 seconds before the system fully shuts down.
I have searched for about 8 hours, to find explanation and solution to this particular problem, without success.

A week ago i had the same problem, and it was solved by upgrading to "testing" systemd.
Today i reinstalled the Arch system, with again "testing" systemd, and now the "stop job is running for user uid 1000" is back.

In /etc/systemd/system.conf i changed:

DefaultTimeoutStartSec=90s
DefaultTimeoutStopSec=10s

Output of: # systemd-cgls: https://paste.debian.net/1070073/

Wish i could give more details and logs at this point, i have no clue on how to cleanly shutdown this laptop.

*edit* the shutdown delay only happens, after startxfce4 in tty1, it does not happen when not starting xfce4 in tty1.

Last edited by Roald (2019-02-25 17:50:39)

Offline

#2 2019-02-25 16:46:04

Skunky
Member
Registered: 2018-01-25
Posts: 230

Re: systemd 90 sec delay on shutdow

Can you post journalctl -b -1 after it happens?

Offline

#3 2019-02-25 16:58:58

Roald
Member
Registered: 2019-02-25
Posts: 21

Re: systemd 90 sec delay on shutdow

The output of journalctl -b -1 is rather large, but maybe it is this part you are interested in?
https://paste.debian.net/1070077/

Offline

#4 2019-02-25 17:11:21

Skunky
Member
Registered: 2018-01-25
Posts: 230

Re: systemd 90 sec delay on shutdow

The issue seems to be here

Feb 25 17:49:32 blauwezaan2 audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-logind comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? termin>
Feb 25 17:49:32 blauwezaan2 kernel: audit: type=1131 audit(1551113372.523:62): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-logind comm="systemd" exe="/usr/lib/systemd/syste>
Feb 25 17:49:32 blauwezaan2 systemd[1]: Stopped Login Service.
Feb 25 17:51:02 blauwezaan2 systemd[475]: at-spi-dbus-bus.service: State 'stop-sigterm' timed out. Killing.
Feb 25 17:51:02 blauwezaan2 systemd[475]: at-spi-dbus-bus.service: Killing process 567 (at-spi-bus-laun) with signal SIGKILL.
Feb 25 17:51:02 blauwezaan2 systemd[475]: at-spi-dbus-bus.service: Main process exited, code=killed, status=9/KILL
Feb 25 17:51:02 blauwezaan2 systemd[475]: at-spi-dbus-bus.service: Failed with result 'timeout'.

for some reasons at-spi-dbus-bus.service is not stopping properly

Offline

#5 2019-02-25 17:13:26

loqs
Member
Registered: 2014-03-06
Posts: 17,192

Re: systemd 90 sec delay on shutdow

Feb 25 17:51:02 blauwezaan2 systemd[475]: at-spi-dbus-bus.service: State 'stop-sigterm' timed out. Killing.

The at-spi-dbus-bus.service is a user service not a system service so changing the DefaultTimeoutStopSecs in system.conf had no effect.

Last edited by loqs (2019-02-25 17:14:04)

Offline

#6 2019-02-25 17:20:54

Roald
Member
Registered: 2019-02-25
Posts: 21

Re: systemd 90 sec delay on shutdow

here is some information about at-spi-dbus-bus.service: https://paste.debian.net/1070084/
i'm still clueless at this point.

Offline

#7 2019-02-25 17:27:56

loqs
Member
Registered: 2014-03-06
Posts: 17,192

Re: systemd 90 sec delay on shutdow

You login on on tty1 as a none root user and use startx without any options and ~/xinitrc contains startxfce4?
If you are using startx what is the full contents of ~/xinitrc?

Offline

#8 2019-02-25 17:39:50

Roald
Member
Registered: 2019-02-25
Posts: 21

Re: systemd 90 sec delay on shutdow

Yes loqs you are pointing towards the right direction, Thanks!
I was starting xfce with # startxfce4 in the tty directly without the use of ~/.xinitrc file.

~/.xinitrc
exec dbus-launch startxfce4

now i did a reboot 3x without the stop job big_smile

Offline

#9 2019-02-25 17:43:08

loqs
Member
Registered: 2014-03-06
Posts: 17,192

Re: systemd 90 sec delay on shutdow

Please see the second note from Xinit#xinitrc.
Please do not use dbus-launch you are creating a separate user dbus instance that is not connected to the one systemd started for your session and this causes issues.
If it does not work without dbus-launch then there is an issue with your user session that needs further investigation.

Offline

#10 2019-02-25 17:51:14

Roald
Member
Registered: 2019-02-25
Posts: 21

Re: systemd 90 sec delay on shutdow

The stop job returned after removing dbus-launch from the xinitrc sad

Offline

#11 2019-02-25 17:54:46

loqs
Member
Registered: 2014-03-06
Posts: 17,192

Re: systemd 90 sec delay on shutdow

General_troubleshooting#Session_permissions
Also you are not logging in as one user then using su / sudo or some other mechanism to switch to another user?
The output of `echo $DBUS_SESSION_BUS_ADDRESS`

Offline

#12 2019-02-25 18:00:06

Roald
Member
Registered: 2019-02-25
Posts: 21

Re: systemd 90 sec delay on shutdow

I only use sudo to preform root privileged tasks, but not to switch to another user? I did use "sudo su -" at some point.
$ echo $DBUS_SESSION_BUS_ADDRESS
unix:path=/run/user/1000/bus

*edit* maybe polkit-gnome-authentication-agent-1 is not doing the right job?

Last edited by Roald (2019-02-25 18:29:55)

Offline

#13 2019-02-25 18:57:40

Roald
Member
Registered: 2019-02-25
Posts: 21

Re: systemd 90 sec delay on shutdow

If i am correct the problem is related to: at-spi-dbus-bus.desktop - xfce-polkit-gnome-authentication-agent-1.desktop - xfce4-power-manager.desktop ?
i have those 3 files in ~/.config/autostart

Offline

#14 2019-02-25 20:45:24

Roald
Member
Registered: 2019-02-25
Posts: 21

Re: systemd 90 sec delay on shutdow

Did pacman -Sy plasma-desktop
then also sddm
Now the stop job is gone why?

Maybe polkit-gnome related? dbus is active loaded.
Guessing the polkit and xfce4-power-manager
I'm in the power group.
Also when # root startxfce4, then the lame stop job pops up, so i guess that is not a permission problem?

I have no idea why this stop job pops up on a clean install of arch xfce, but now with plasma i can at least shutdown the chromebook easily.

Offline

#15 2019-02-25 20:59:13

Roald
Member
Registered: 2019-02-25
Posts: 21

Re: systemd 90 sec delay on shutdow

loqs wrote:
Feb 25 17:51:02 blauwezaan2 systemd[475]: at-spi-dbus-bus.service: State 'stop-sigterm' timed out. Killing.

The at-spi-dbus-bus.service is a user service not a system service so changing the DefaultTimeoutStopSecs in system.conf had no effect.

Hey what do you mean?
$ sudo systemctl status --user spi-dbus-bus.service
Failed to connect to bus: No such file or directory
and yes DefaultTimeoutStopSecs won't work.
The stop job is gone  with ~/.xinitrc
exec startxfce4 dbus-launch

So yea dbus related too much time to fix that. btw, i seen this bug around for a while, dbus not handling time-out on poweroff. You get 20 sec faster boot, but 2 min poweroff, so it can close down the service.
Not a Bug a Guess? idk how to fix it, can anyone fix that?

Last edited by Roald (2019-02-25 21:07:13)

Offline

#16 2019-02-25 21:05:20

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,420

Re: systemd 90 sec delay on shutdow

Drop the sudo, as the name implies system user instances are intended to be controlled from your user, not root - https://wiki.archlinux.org/index.php/Systemd/User

Offline

#17 2019-02-25 21:08:26

Roald
Member
Registered: 2019-02-25
Posts: 21

Re: systemd 90 sec delay on shutdow

V1del wrote:

Drop the sudo, as the name implies system user instances are intended to be controlled from your user, not root - https://wiki.archlinux.org/index.php/Systemd/User

Get rid of sudo and use User, not Root?
ok i will do that, later i need the system so no time to reinstall tongue

Offline

#18 2019-02-25 21:11:39

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,420

Re: systemd 90 sec delay on shutdow

For the systemd --user command yes,  not in general.

Your xinitrc experiments still point to you not properly using the template pointed out to by loqs, before trying anything else, make sure that the proper includes are happening in your .xinitrc as detailed in the link that was posted.

Also please edit your posts if you are the only poster in between instead of posting a new post every time a new thought occurs to you. Judging from a few of tose, with regards  to SDDM. If it works properly starting SDDM (though that might not implicitly start the same services) that is also a give away that you don't properly initialize your session. Make sure the necessary includes are happening in your .xinitrc and start X with startx

Last edited by V1del (2019-02-25 21:16:04)

Offline

#19 2019-02-25 21:40:46

Roald
Member
Registered: 2019-02-25
Posts: 21

Re: systemd 90 sec delay on shutdow

I am fine with the system right now with sddm and plasma, not using wayland because i need to run opengl game that runs better on xorg.
If i need to rebuild the pc then i probly go sddm again, also the autologin option, and apparently it handles dbus and polkit as it should.
xfce seems to need more tweaking.

Offline

#20 2019-02-25 21:45:12

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

Re: systemd 90 sec delay on shutdow

Roald wrote:

Did pacman -Sy plasma-desktop

Don't do that.

https://wiki.archlinux.org/index.php/Sy … nsupported

Online

#21 2019-02-25 21:57:30

Roald
Member
Registered: 2019-02-25
Posts: 21

Re: systemd 90 sec delay on shutdow

Head_on_a_Stick wrote:
Roald wrote:

Did pacman -Sy plasma-desktop

Don't do that.

https://wiki.archlinux.org/index.php/Sy … nsupported

Hey Head_on_a_Stick, (i think i see you on Debian Forum too smile
why not?

There was a bug when i plug in my led tv into the chromebook arch the mouse would jitter alot and spam the screen with mouses.
That is now gone, so i'm happy with the system, i does not take long to install Arch, but right now i can not be asked.
Funny btw making the switch from Gentoo to Arch, it is amazing how fast Arch is in use. I'm going off topic now.

Offline

#22 2019-02-25 22:09:50

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

Re: systemd 90 sec delay on shutdow

Roald wrote:

why not?

Because that command can break an Arch system, read my link please.

Online

#23 2019-02-25 22:27:58

Roald
Member
Registered: 2019-02-25
Posts: 21

Re: systemd 90 sec delay on shutdow

you are right, that is definitely something i would not do. That pulls in kde-plasma.
edit* should i write down a password? and keep it with the other papers?
or should i remember it? idk sometimes when running a system, oh btw i'm going to buy a new chromebook within few weeks. Just need to see which one.
It needs better cpu and gpu then i got now. I am planning on flashing coreboot onto it. This current chromebook runs coreboot too, it is awesome.
You know what is so nice about coreboot? you can boot from file with it. So you can store all kind of items onto the installation media.
Is this thread solved?

Last edited by Roald (2019-02-25 22:48:59)

Offline

#24 2019-02-26 08:29:21

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,420

Re: systemd 90 sec delay on shutdow

You have to decide that, if you feel that it is, please edit your initial posts title to include [solved] or similar - https://wiki.archlinux.org/index.php/Co … ow_to_post

Offline

#25 2019-02-26 19:57:13

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

Re: systemd 90 sec delay on shutdow

Roald wrote:

you are right, that is definitely something i would not do. That pulls in kde-plasma.

*facepalm*

No, you misunderstand me, it is the `pacman -Sy` bit that I was warning you about...

Please, for the second time: read my link, it will help you not break your system in future.

Roald wrote:

Is this thread solved?

I would say not: SDDM is a workaround, we still don't know why ati-spi-dbus-bus.service was causing the shutdown delay.

If you are in the habit of running `pacman -Sy` then perhaps that broke things somehow.

Online

Board footer

Powered by FluxBB