You are not logged in.

#1 2017-09-19 07:43:07

rishimaha
Member
Registered: 2017-09-19
Posts: 3

[SOLVED] rtkit-daemon.service enters failed state - Failed to

Hi,

While logging into vty after fresh boot, it takes a while for the shell prompt to appear after entering password.

systemd-analyze indicates user@1000.service is taking long to startup.

systemd-analyze blame
         29.008s user@1000.service
          4.129s dev-sda1.device
          2.355s systemd-fsck@dev-sda3.service
          2.026s systemd-rfkill.service
          1.326s netctl@HK\x2dBlah.service
           841ms lm_sensors.service
           816ms systemd-tmpfiles-setup-dev.service
           774ms systemd-logind.service
           703ms cpupower.service
           700ms systemd-user-sessions.service
           572ms systemd-journal-flush.service
           399ms polkit.service
           394ms systemd-udevd.service
           363ms systemd-journald.service
           351ms systemd-sysctl.service
           242ms dev-mqueue.mount
           241ms kmod-static-nodes.service
           236ms dev-sda2.swap
           223ms home.mount
           223ms systemd-udev-trigger.service
           211ms sys-kernel-debug.mount
           211ms systemd-remount-fs.service
           208ms sys-kernel-config.mount
           189ms systemd-backlight@backlight:acpi_video0.service
           185ms systemd-random-seed.service
           158ms systemd-tmpfiles-setup.service
           151ms systemd-timesyncd.service
            50ms systemd-update-utmp.service
            33ms rtkit-daemon.service
            23ms alsa-restore.service
            22ms dev-hugepages.mount
            11ms tmp.mount

journalctl -xe indicates that rtkit-daemon is started quite a number of times and fails each time.

[johndoe@abox ~]$ journalctl -xe
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit rtkit-daemon.service has finished starting up.
-- 
-- The start-up result is done.
Sep 19 12:41:04 abox rtkit-daemon[543]: Failed to find user 'rtkit'.
Sep 19 12:41:04 abox systemd[1]: rtkit-daemon.service: Main process exited, code=exited, status=1/FAILURE
Sep 19 12:41:04 abox rtkit-daemon[543]: Demoting known real-time threads.
Sep 19 12:41:04 abox systemd[1]: rtkit-daemon.service: Unit entered failed state.
Sep 19 12:41:04 abox rtkit-daemon[543]: Demoted 0 threads.
Sep 19 12:41:04 abox systemd[1]: rtkit-daemon.service: Failed with result 'exit-code'.
Sep 19 12:41:04 abox dbus[256]: [system] Activating via systemd: service name='org.freedesktop.RealtimeKit1' unit='rtkit-daemon.service'
Sep 19 12:41:04 abox systemd[1]: Starting RealtimeKit Scheduling Policy Service...
-- Subject: Unit rtkit-daemon.service has begun start-up
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit rtkit-daemon.service has begun starting up.
Sep 19 12:41:04 abox dbus[256]: [system] Successfully activated service 'org.freedesktop.RealtimeKit1'
Sep 19 12:41:04 abox systemd[1]: Started RealtimeKit Scheduling Policy Service.
-- Subject: Unit rtkit-daemon.service has finished start-up
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit rtkit-daemon.service has finished starting up.
-- 
-- The start-up result is done.
Sep 19 12:41:04 abox rtkit-daemon[544]: Failed to find user 'rtkit'.
Sep 19 12:41:04 abox rtkit-daemon[544]: Demoting known real-time threads.
Sep 19 12:41:04 abox rtkit-daemon[544]: Demoted 0 threads.
Sep 19 12:41:04 abox systemd[1]: rtkit-daemon.service: Main process exited, code=exited, status=1/FAILURE
Sep 19 12:41:04 abox systemd[1]: rtkit-daemon.service: Unit entered failed state.
Sep 19 12:41:04 abox systemd[1]: rtkit-daemon.service: Failed with result 'exit-code'.
Sep 19 12:41:04 abox systemd[289]: Started Sound Service.
-- Subject: Unit UNIT has finished start-up

I tried to look for solutions on the web and on arch forums and didnt find anything relevant.

As per https://github.com/msekletar/rtkit , rtkit-daemon doesnt read any configuration files and can be controlled by cli options.

/usr/lib/rtkit/rtkit-daemon --help
rtkit-daemon [options]

COMMANDS:
  -h, --help                          Show this help
      --version                       Show version

OPTIONS:
      --stderr                        Log to STDERR in addition to syslog
      --user-name=USER                Run daemon as user (rtkit)

So, I edited the service file /usr/share/dbus-1/system-services/org.freedesktop.RealtimeKit1.service to start rtkit-daemon with cli options:

[D-BUS Service]
Name=org.freedesktop.RealtimeKit1
Exec=/usr/lib/rtkit/rtkit-daemon --user-name=root
SystemdService=rtkit-daemon.service
User=root

I tried both my username and root (shown above) but neither seems to work as the journal still has same error message at bootup.

Is there some way to fix this issue or work around it?

Many thanks,
PS: my first post ever!

Last edited by rishimaha (2017-09-27 03:14:56)

Offline

#2 2017-09-22 23:46:46

GenkiSky
Member
From: This account is henceforth dis
Registered: 2017-04-04
Posts: 82

Re: [SOLVED] rtkit-daemon.service enters failed state - Failed to

Looks like the post_install of the rtkit package adds the 'rtkit' user: https://git.archlinux.org/svntogit/pack … ages/rtkit. So, can you run 'getent passwd rtkit' and confirm you see it show up? If not, the simplest solution is probably to just reinstall rtkit. But, if you do really want to specify the user-name to be on of your own, a glance at the rtkit package tells me /usr/lib/systemd/system/rtkit-daemon.service is the file you really want to be tweaking.

Offline

#3 2017-09-27 02:37:09

rishimaha
Member
Registered: 2017-09-19
Posts: 3

Re: [SOLVED] rtkit-daemon.service enters failed state - Failed to

Thanks a bunch for the pointers.

As suggested:

'getent passwd rtkit' shows nothing.

$ getent passwd rtkit
$ 

So, I edited /usr/lib/systemd/system/rtkit-daemon.service and  /usr/share/dbus-1/system-services/org.freedesktop.RealtimeKit1.service to start with my username and rebooted.

Exec=/usr/lib/rtkit/rtkit-daemon --user-name=johndoe

And have the following errors in journal now. Note it doesnt complain about user 'rtkit' anymore! But still doesnt work sad

-- Unit rtkit-daemon.service has finished starting up.
-- 
-- The start-up result is done.
Sep 27 07:47:36 abox rtkit-daemon[312]: Successfully dropped privileges.
Sep 27 07:47:36 abox systemd[1]: rtkit-daemon.service: Main process exited, code=exited, status=1/FAILURE
Sep 27 07:47:36 abox rtkit-daemon[312]: Successfully limited resources.
Sep 27 07:47:36 abox systemd[1]: rtkit-daemon.service: Unit entered failed state.
Sep 27 07:47:36 abox rtkit-daemon[312]: pthread_create failed: Resource temporarily unavailable
Sep 27 07:47:36 abox systemd[1]: rtkit-daemon.service: Failed with result 'exit-code'.
Sep 27 07:47:36 abox rtkit-daemon[312]: Demoting known real-time threads.
Sep 27 07:47:36 abox rtkit-daemon[312]: Demoted 0 threads.
Sep 27 07:47:36 abox dbus[251]: [system] Activating via systemd: service name='org.freedesktop.RealtimeKit1' unit='rtkit-daemon.service'
Sep 27 07:47:36 abox systemd[1]: Starting RealtimeKit Scheduling Policy Service...
-- Subject: Unit rtkit-daemon.service has begun start-up
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit rtkit-daemon.service has begun starting up.
Sep 27 07:47:36 abox dbus[251]: [system] Successfully activated service 'org.freedesktop.RealtimeKit1'
Sep 27 07:47:36 abox systemd[1]: Started RealtimeKit Scheduling Policy Service.
-- Subject: Unit rtkit-daemon.service has finished start-up
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit rtkit-daemon.service has finished starting up.
-- 
-- The start-up result is done.
Sep 27 07:47:36 abox rtkit-daemon[313]: Successfully called chroot.
Sep 27 07:47:36 abox rtkit-daemon[313]: Successfully dropped privileges.
Sep 27 07:47:36 abox systemd[1]: rtkit-daemon.service: Main process exited, code=exited, status=1/FAILURE
Sep 27 07:47:36 abox rtkit-daemon[313]: Successfully limited resources.
Sep 27 07:47:36 abox systemd[1]: rtkit-daemon.service: Unit entered failed state.
Sep 27 07:47:36 abox rtkit-daemon[313]: pthread_create failed: Resource temporarily unavailable
Sep 27 07:47:36 abox systemd[1]: rtkit-daemon.service: Failed with result 'exit-code'.
Sep 27 07:47:36 abox rtkit-daemon[313]: Demoting known real-time threads.
Sep 27 07:47:36 abox rtkit-daemon[313]: Demoted 0 threads.
Sep 27 07:47:36 abox systemd[270]: Started Sound Service.
[johndoe@abox ~]$ systemctl status rtkit-daemon
● rtkit-daemon.service - RealtimeKit Scheduling Policy Service
   Loaded: loaded (/usr/lib/systemd/system/rtkit-daemon.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Wed 2017-09-27 07:47:36 IST; 15min ago
  Process: 313 ExecStart=/usr/lib/rtkit/rtkit-daemon --user-name=johndoe (code=exited, status=1/FAILURE)
 Main PID: 313 (code=exited, status=1/FAILURE)

Sep 27 07:47:36 abox systemd[1]: Starting RealtimeKit Scheduling Policy Service...
Sep 27 07:47:36 abox systemd[1]: Started RealtimeKit Scheduling Policy Service.
Sep 27 07:47:36 abox rtkit-daemon[313]: Successfully called chroot.
Sep 27 07:47:36 abox systemd[1]: rtkit-daemon.service: Main process exited, code=exited, status=1/FAILURE
Sep 27 07:47:36 abox systemd[1]: rtkit-daemon.service: Unit entered failed state.
Sep 27 07:47:36 abox systemd[1]: rtkit-daemon.service: Failed with result 'exit-code'.
[johndoe@abox ~]$ 

Since rtkit-daemon is being installed as a dependency of pulseaudio I will try to uninstall and reinstall pulseaudio as suggested and post my results in a bit.

Sorry for the delay, have been travelling.

Thanks again.

Offline

#4 2017-09-27 03:08:02

rishimaha
Member
Registered: 2017-09-19
Posts: 3

Re: [SOLVED] rtkit-daemon.service enters failed state - Failed to

Update:

As u suggested I uninstalled and reinstalled pulseaudio and dependent packages.

sudo pacman -Rsn pulseaudio pulseaudio-alsa pulseaudio-equalizer
sudo pacman -Syu pulseaudio pulseaudio-alsa pulseaudio-equalizer

Now getent reports rtkit user:

$ getent passwd rtkit
rtkit:x:133:133:RealtimeKit:/proc:/bin/false

Now, enabled and started pulseaudio as below:

systemctl --user enable pulseaudio
systemctl --user start pulseaudio

No errors in journal and systemctl status rtkit-daemon reports all ok.

 $systemctl  status rtkit-daemon
● rtkit-daemon.service - RealtimeKit Scheduling Policy Service
   Loaded: loaded (/usr/lib/systemd/system/rtkit-daemon.service; disabled; vendo
   Active: active (running) since Wed 2017-09-27 08:23:34 IST; 11min ago
 Main PID: 293 (rtkit-daemon)
    Tasks: 3 (limit: 4915)
   CGroup: /system.slice/rtkit-daemon.service
           └─293 /usr/lib/rtkit/rtkit-daemon

Sep 27 08:23:34 abox rtkit-daemon[293]: Watchdog thread running.
Sep 27 08:23:34 abox rtkit-daemon[293]: Canary thread running.
Sep 27 08:23:35 abox rtkit-daemon[293]: Successfully made thread 292 of process 
Sep 27 08:23:35 abox rtkit-daemon[293]: Supervising 1 threads of 1 processes of 
Sep 27 08:23:36 abox rtkit-daemon[293]: Supervising 1 threads of 1 processes of 
Sep 27 08:23:36 abox rtkit-daemon[293]: Successfully made thread 305 of process 
Sep 27 08:23:36 abox rtkit-daemon[293]: Supervising 2 threads of 1 processes of 
Sep 27 08:23:36 abox rtkit-daemon[293]: Supervising 2 threads of 1 processes of 
Sep 27 08:23:36 abox rtkit-daemon[293]: Successfully made thread 306 of process 
Sep 27 08:23:36 abox rtkit-daemon[293]: Supervising 3 threads of 1 processes of 

$journalctl -xe --unit=rtkit-daemon
Sep 27 08:23:34 abox systemd[1]: Starting RealtimeKit Scheduling Policy Service.
-- Subject: Unit rtkit-daemon.service has begun start-up
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit rtkit-daemon.service has begun starting up.
Sep 27 08:23:34 abox systemd[1]: Started RealtimeKit Scheduling Policy Service.
-- Subject: Unit rtkit-daemon.service has finished start-up
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit rtkit-daemon.service has finished starting up.
-- 
-- The start-up result is done.
Sep 27 08:23:34 abox rtkit-daemon[293]: Successfully called chroot.
Sep 27 08:23:34 abox rtkit-daemon[293]: Successfully dropped privileges.
Sep 27 08:23:34 abox rtkit-daemon[293]: Successfully limited resources.
Sep 27 08:23:34 abox rtkit-daemon[293]: Running.
Sep 27 08:23:34 abox rtkit-daemon[293]: Watchdog thread running.
Sep 27 08:23:34 abox rtkit-daemon[293]: Canary thread running.
Sep 27 08:23:35 abox rtkit-daemon[293]: Successfully made thread 292 of process 
Sep 27 08:23:35 abox rtkit-daemon[293]: Supervising 1 threads of 1 processes of 
Sep 27 08:23:36 abox rtkit-daemon[293]: Supervising 1 threads of 1 processes of 
Sep 27 08:23:36 abox rtkit-daemon[293]: Successfully made thread 305 of process 
Sep 27 08:23:36 abox rtkit-daemon[293]: Supervising 2 threads of 1 processes of 
Sep 27 08:23:36 abox rtkit-daemon[293]: Supervising 2 threads of 1 processes of 
Sep 27 08:23:36 abox rtkit-daemon[293]: Successfully made thread 306 of process 
Sep 27 08:23:36 abox rtkit-daemon[293]: Supervising 3 threads of 1 processes of 
[johndoe@abox ~]$ 

Ditto post reboot!!

Thanks again for your help. Am marking topic as solved.

Offline

Board footer

Powered by FluxBB