BAMF Daemon failing to start, filling journal with hundreds of lines

This problem started a few weeks ago and googling it results in no help. I noticed CPU activity was high immediately after logging in to my IceWm desktop. Looking thru the journal is found these lines:

Oct 29 14:00:12 desktop-tumbleweed systemd[1]: Stopped User Runtime Directory /run/user/0.
Oct 29 14:00:12 desktop-tumbleweed systemd[1]: Removed slice User Slice of UID 0.
Oct 29 14:01:00 desktop-tumbleweed systemd[1]: snapperd.service: Deactivated successfully.
Oct 29 14:01:57 desktop-tumbleweed udisksd[6033]: Error performing housekeeping for drive /org/freedesktop/UDisks2/drives/ST3500418AS>
Oct 29 14:06:37 desktop-tumbleweed smartd[830]: Device: /dev/sda [SAT], SMART Usage Attribute: 194 Temperature_Celsius changed from 5>
Oct 29 14:11:57 desktop-tumbleweed udisksd[6033]: Error performing housekeeping for drive /org/freedesktop/UDisks2/drives/ST3500418AS>
Oct 29 14:18:01 desktop-tumbleweed bamfdaemon[1592]: Source ID 2863311530 was not found when attempting to remove it
Oct 29 14:19:24 desktop-tumbleweed bamfdaemon[1592]: Source ID 2863311530 was not found when attempting to remove it
Oct 29 14:19:34 desktop-tumbleweed lightdm[1374]: pam_unix(lightdm:session): session closed for user frank
Oct 29 14:19:34 desktop-tumbleweed systemd-logind[928]: Session 3 logged out. Waiting for processes to exit.
Oct 29 14:19:34 desktop-tumbleweed systemd[1404]: bamfdaemon.service: Main process exited, code=exited, status=1/FAILURE
Oct 29 14:19:34 desktop-tumbleweed systemd[1404]: bamfdaemon.service: Failed with result ‘exit-code’.
Oct 29 14:19:34 desktop-tumbleweed systemd[1404]: bamfdaemon.service: Consumed 3.090s CPU time.
Oct 29 14:19:34 desktop-tumbleweed at-spi-bus-launcher[1597]: X connection to :0 broken (explicit kill or server shutdown).
Oct 29 14:19:35 desktop-tumbleweed systemd[1404]: bamfdaemon.service: Scheduled restart job, restart counter is at 1.
Oct 29 14:19:35 desktop-tumbleweed systemd[1404]: Starting BAMF Application Matcher Framework…
Oct 29 14:19:35 desktop-tumbleweed bamfdaemon[22819]: Authorization required, but no authorization protocol specified
Oct 29 14:19:35 desktop-tumbleweed bamfdaemon[22819]: Authorization required, but no authorization protocol specified
Oct 29 14:19:35 desktop-tumbleweed bamfdaemon[22819]: Authorization required, but no authorization protocol specified
Oct 29 14:19:35 desktop-tumbleweed bamfdaemon[22819]: Authorization required, but no authorization protocol specified
Oct 29 14:19:35 desktop-tumbleweed bamfdaemon[22819]: Authorization required, but no authorization protocol specified
Oct 29 14:19:35 desktop-tumbleweed bamfdaemon[22819]: Authorization required, but no authorization protocol specified
Oct 29 14:19:35 desktop-tumbleweed bamfdaemon[22819]: Authorization required, but no authorization protocol specified
Oct 29 14:19:35 desktop-tumbleweed bamfdaemon[22819]: Authorization required, but no authorization protocol specified
Oct 29 14:19:35 desktop-tumbleweed bamfdaemon[22819]: Authorization required, but no authorization protocol specified
Oct 29 14:19:35 desktop-tumbleweed bamfdaemon[22819]: Authorization required, but no authorization protocol specified

These lines are repeated hundreds of times and finally after after six retries the daemon starts.

I have no clue what’s going on. Six retries to start the daemon ?? Authorization required…blah blah…hundreds of times ??

Can anyone help? As i said Google searches turn up nothing useful.

I may be walking on thin ice here but it sounds to me like it’s a bit early in the process and when the time is right it will start as it should. I can see some talking about “xhost local” that solves the Authorization required, but no authorization protocol specified. Maybe test to add After=graphical-session.target in bamfdaemon.service

systemctl edit bamfdaemon.service

and add

After=graphical-session.target

Strangely this is the result:

frank@desktop-tumbleweed:~> systemctl edit bamfdaemon.service
No files found for bamfdaemon.service.
Run ‘systemctl edit --force --full bamfdaemon.service’ to create a new unit.

frank@desktop-tumbleweed:~> sudo systemctl edit bamfdaemon.service
No files found for bamfdaemon.service.
Run ‘systemctl edit --force --full bamfdaemon.service’ to create a new unit.
frank@desktop-tumbleweed:~>

Is the bamfdaemon supposed to have a service file? I dunno.

@mccfrank use tab completion :wink: systemctl edit bamf<press tab>

Even more strange: There is a service file.

frank@desktop-tumbleweed:~> locate bamfdaemon.service
/usr/lib/systemd/user/bamfdaemon.service

Why systemctl edit can’t find it is strange.

@mccfrank Ahh it’s a dbus service… https://build.opensuse.org/package/view_file/openSUSE:Factory/bamf/bamf.spec?expand=1

Tab doesn’t work.

@mccfrank it’s a user service /usr/lib/systemd/user/bamfdaemon.service

I have since discovered the problem is linked to plank, a desktop dock somehow. And the problem never occurs after a reboot, only when logging in and out of the desktop. The “solution” for me was to create a shutdown file which IceWm runs when you logout or shutdown. The content is simple…killall -u . I don’t pretend to understand how this solves the problem - I found it on another forum (Linux Mint). I also realized I was starting plank in the IceWm startup file by putting a “&” behind the name to ensure it returns and does not holdup the login process. It’s apparently not necessary as just running Plank works. Thought I would add this info in case someone else has the same problem. Strangely enough the problem does not occur on my Debian Trixie installation, not on my Fedora 38 installation.