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

fwupd 1.2.3 Debian : Failed to connect to daemon: Error calling StartServiceByName for org.freedesktop.fwupd: GDBus.Error:org.freedesktop.DBus.Error.TimedOut: Failed to activate service 'org.freedesktop.fwupd': timed out #915

Closed
swidz opened this issue Jan 5, 2019 · 14 comments
Labels

Comments

@swidz
Copy link

swidz commented Jan 5, 2019

$ fwupdmgr --version
client version:	1.2.3
compile-time dependency versions
	gusb:	0.2.9
	efivar:	34
Failed to connect to daemon: Error calling StartServiceByName for org.freedesktop.fwupd: GDBus.Error:org.freedesktop.DBus.Error.TimedOut: Failed to activate service 'org.freedesktop.fwupd': timed out
fwupdmgr get-devices
Error calling StartServiceByName for org.freedesktop.fwupd: GDBus.Error:org.freedesktop.DBus.Error.TimedOut: Failed to activate service 'org.freedesktop.fwupd': timed out

after deleting the pending.db file which in my case was not located in /var/lib/fwupd but in /var/local/lib/fwupd

$ fwupdmgr --version
client version:	1.2.3
compile-time dependency versions
	gusb:	0.2.9
	efivar:	34
Failed to connect to daemon: Error calling StartServiceByName for org.freedesktop.fwupd: Timeout was reached

But the file pending.db is getting recreated in /var/local/lib/fwupd

Please answer the following questions:

Operating system and version: Debian 9.6 
How did you install fwupd: build with meson and ninja
Have you tried rebooting? Yes
Are you using an NVMe disk? Yes

pending.db.zip

@hughsie
Copy link
Member

hughsie commented Jan 5, 2019

Can you get the fwupd --verbose output please.

@superm1
Copy link
Member

superm1 commented Jan 5, 2019

My guess is the systemd unit isn't getting installed somewhere proper, or that the information needed for dbus activation isn't.

For example maybe something in /usr/local isn't in default search path on Debian 9.

@swidz
Copy link
Author

swidz commented Jan 5, 2019

~$ fwupd --verbose
bash: fwupd: command not found
$ systemctl list-unit-files --type=service
...
fwupd-offline-update.service               static   
fwupd.service                              static
...
$sudo systemctl status fwupd.service
● fwupd.service - Firmware update daemon
   Loaded: loaded (/lib/systemd/system/fwupd.service; static; vendor preset: enabled)
   Active: inactive (dead)
     Docs: https://fwupd.org/

Jan 06 00:09:04 DELL-T3600 systemd[1]: Starting Firmware update daemon...
Jan 06 00:09:05 DELL-T3600 systemd[1]: Started Firmware update daemon.
Jan 06 00:14:05 DELL-T3600 systemd[1]: Starting Firmware update daemon...
Jan 06 00:14:05 DELL-T3600 systemd[1]: Started Firmware update daemon.

please also see the issues I had during build and how I solve them, maybe it is related:
https://github.com/hughsie/fwupd/issues/914

@superm1
Copy link
Member

superm1 commented Jan 6, 2019

And do you have any fwupd related packages installed from Debian repos?

@superm1
Copy link
Member

superm1 commented Jan 6, 2019

Regarding this:

~$ fwupd --verbose
bash: fwupd: command not found

That's to be expected, /usr/local/libexec/fwupd/ is not in PATH by default.
You would have to run /usr/local/libexec/fwupd/fwupd -v to manually execute it.

I guess it would be good to see if that works.

@swidz
Copy link
Author

swidz commented Jan 6, 2019

And do you have any fwupd related packages installed from Debian repos?

I had fwupd installed from debian stretch repo version (version 0.7.4-2), but I had removed this. It was before a successful build, but after first attepts with the described issues.

I am attaching fwupd verbose ran with and without sudo

fwupd-verbose.txt
sudo-fwupd-verbose.txt

@superm1
Copy link
Member

superm1 commented Jan 6, 2019

Something seems wrong with the dbus setup.

15:01:16:0475 FuMain               FuMain: lost name: org.freedesktop.fwupd

I think it might be the stuff ending up in /usr/local/etc/dbus-1 isn't being sourced by default.

@swidz
Copy link
Author

swidz commented Jan 6, 2019

in /usr/local/etc/dbus-1 there is a subdirectory system.d with a single file org.freedesktop.fwupd.conf

The content of the file org.freedesktop.fwupd.conf:

<?xml version="1.0" encoding="UTF-8"?> <!-- -*- XML -*- -->

<!DOCTYPE busconfig PUBLIC
 "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
 "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>

  <!-- This configuration file specifies the required security policies
       for the fwupd to work. -->

  <!-- Only user root can own the fwupd service -->
  <policy user="root">
    <allow own="org.freedesktop.fwupd"/>
  </policy>

 <!-- Allow anyone to call into the service - we'll reject callers using PolicyKit -->
  <policy context="default">
    <allow send_destination="org.freedesktop.fwupd"
           send_interface="org.freedesktop.fwupd"/>
    <allow send_destination="org.freedesktop.fwupd"
           send_interface="org.freedesktop.DBus.Properties"/>
    <allow send_destination="org.freedesktop.fwupd"
           send_interface="org.freedesktop.DBus.Introspectable"/>
    <allow send_destination="org.freedesktop.fwupd"
           send_interface="org.freedesktop.DBus.Peer"/>
  </policy>

</busconfig>   

@superm1 superm1 added the bug label Jan 8, 2019
@swidz
Copy link
Author

swidz commented Jan 9, 2019

I have uninstalled the 1.2.3 version with ninja -C build uninstall and installed this version via snap.
It works. I was able to update the Unifying Receiver.

I am attaching the output of fwupd --verbose from snap

snap-sudo-fwupd-verbose.txt

@superm1
Copy link
Member

superm1 commented Jan 9, 2019

Thanks for confirming. I think we should keep this issue open to track solving this behavior for users though.

@superm1
Copy link
Member

superm1 commented Jan 9, 2019

I can reproduce this error on Ubuntu from source. If the file /usr/local/etc/dbus-1/system.d/org.freedesktop.fwupd.conf is copied into /etc/dbus-1/system.d the error goes away.

Additionally the following steps make it go away:

  1. Create /etc/dbus-1/system-local.conf with following contents
<busconfig>
    <includedir>/usr/local/etc/dbus-1/system.d</includedir>
</busconfig
  1. Reload dbus daemon
systemctl reload dbus.service

@superm1
Copy link
Member

superm1 commented Jan 10, 2019

This behavior exists with upstream dbus as well. I've filed this bug for upstream tracking.
https://gitlab.freedesktop.org/dbus/dbus/issues/253

I've also adjusted https://github.com/hughsie/fwupd/wiki/Compilation to reflect the information discovered in this bug.

@superm1 superm1 closed this as completed Jan 10, 2019
@superm1 superm1 added question and removed bug labels Jan 10, 2019
@dnoliver
Copy link

Scratched my head for a while with this error on Ubuntu 20.04:

The wiki say /usr/local/etc/ but the path in 20.04 seems to be /usr/local/share

root@test-NUC8v5PNK:~/fwupd# cat /etc/dbus-1/system-local.conf
<busconfig>
    <includedir>/usr/local/share/dbus-1/system.d</includedir>
</busconfig>

:)

@superm1
Copy link
Member

superm1 commented May 29, 2021

That is odd to me, but go ahead and add it to the wiki page with a footnote! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

4 participants