我注意到从 18.04 更新后,Ubuntu 20.04 上没有电池指示器。“acpi”在命令行上有效,但“upower”无效
$ upower
(upower:67208): UPower-WARNING **: 18:28:34.153: Cannot connect to upowerd: Error calling StartServiceByName for org.freedesktop.UPower: Failed to activate service 'org.freedesktop.UPower': timed out (service_start_timeout=25000ms)
$ sudo service upower start
Job for upower.service failed because the control process exited with error code.
See "systemctl status upower.service" and "journalctl -xe" for details.
$ systemctl status upower.service
● upower.service - Daemon for power management
Loaded: loaded (/lib/systemd/system/upower.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2021-02-10 18:22:40 PST; 2min 46s ago
Docs: man:upowerd(8)
Main PID: 47470 (code=exited, status=127)
Feb 10 18:22:40 linuxlaptop systemd[1]: upower.service: Changed dead -> failed
Feb 10 18:22:40 linuxlaptop systemd[1]: upower.service: Job 8560 upower.service/start finished, result=failed
Feb 10 18:22:40 linuxlaptop systemd[1]: Failed to start Daemon for power management.
Feb 10 18:22:40 linuxlaptop systemd[1]: upower.service: Unit entered failed state.
Feb 10 18:24:47 linuxlaptop systemd[1]: upower.service: Watching D-Bus name 'org.freedesktop.UPower'.
Feb 10 18:24:47 linuxlaptop systemd[1]: upower.service: Changed dead -> failed
Feb 10 18:24:47 linuxlaptop systemd[1]: upower.service: D-Bus name org.freedesktop.UPower now not owned by anyone.
Feb 10 18:24:49 linuxlaptop systemd[1]: upower.service: Watching D-Bus name 'org.freedesktop.UPower'.
Feb 10 18:24:49 linuxlaptop systemd[1]: upower.service: Changed dead -> failed
Feb 10 18:24:49 linuxlaptop systemd[1]: upower.service: D-Bus name org.freedesktop.UPower now not owned by anyone.
关于错误有各种问题,但我找不到解决方案?例如这里没有给出解决方案,但建议更改PrivateUsers=yes
一些未命名的配置文件?
显然,这可能需要更新软件包?我已通过 Synaptic 重新安装了 upower 和其他各种软件包,但重启后没有任何效果。
https://bugzilla.redhat.com/show_bug.cgi?id=1748997
我发现一个奇怪的缺失库:
$ ldd /usr/lib/upower/upowerd
linux-vdso.so.1 (0x00007ffde53ab000)
libupower-glib.so.3 => /usr/lib/x86_64-linux-gnu/libupower-glib.so.3 (0x00007f4dad3ac000)
libgio-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0 (0x00007f4dad1cb000)
libusb-1.0.so.0 => /lib/x86_64-linux-gnu/libusb-1.0.so.0 (0x00007f4dad1af000)
libgudev-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libgudev-1.0.so.0 (0x00007f4dad1a2000)
libgobject-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 (0x00007f4dad142000)
libglib-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f4dad019000)
libimobiledevice.so.6 => /usr/local/lib/libimobiledevice.so.6 (0x00007f4dacdf5000)
libplist.so.3 => /usr/local/lib/libplist.so.3 (0x00007f4dacbea000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f4dacbc7000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f4dac9d5000)
libgmodule-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0 (0x00007f4dac9cf000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f4dac9b3000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f4dac9ab000)
libmount.so.1 => /lib/x86_64-linux-gnu/libmount.so.1 (0x00007f4dac94b000)
libselinux.so.1 => /lib/x86_64-linux-gnu/libselinux.so.1 (0x00007f4dac920000)
libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007f4dac904000)
libudev.so.1 => /lib/x86_64-linux-gnu/libudev.so.1 (0x00007f4dac8d7000)
libffi.so.7 => /usr/lib/x86_64-linux-gnu/libffi.so.7 (0x00007f4dac8cb000)
libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f4dac658000)
libssl.so.1.0.0 => /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0 (0x00007f4dac3f0000)
libcrypto.so.1.0.0 => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0 (0x00007f4dabfac000)
libusbmuxd.so.4 => not found
但是有一个 libusmbuxd:
$ sudo ldconfig -v | grep mux
/sbin/ldconfig.real: Can't stat /usr/local/lib/i386-linux-gnu: No such file or directory
/sbin/ldconfig.real: Can't stat /usr/local/lib/i686-linux-gnu: No such file or directory
/sbin/ldconfig.real: Can't stat /lib/i686-linux-gnu: No such file or directory
/sbin/ldconfig.real: Can't stat /usr/lib/i686-linux-gnu: No such file or directory
/sbin/ldconfig.real: Path `/usr/local/lib' given more than once
/sbin/ldconfig.real: Can't stat /usr/local/lib/x86_64-linux-gnu: No such file or directory
/sbin/ldconfig.real: Path `/lib/x86_64-linux-gnu' given more than once
/sbin/ldconfig.real: Path `/usr/lib/x86_64-linux-gnu' given more than once
/sbin/ldconfig.real: /lib/i386-linux-gnu/ld-2.31.so is the dynamic linker, ignoring
/sbin/ldconfig.real: /lib/x86_64-linux-gnu/ld-2.31.so is the dynamic linker, ignoring
libgstadaptivedemux-1.0.so.0 -> libgstadaptivedemux-1.0.so.0.1602.0
libwebpdemux.so.2 -> libwebpdemux.so.2.0.3
libwebpmux.so.3 -> libwebpmux.so.3.0.1
libusbmuxd.so.6 -> libusbmuxd.so.6.0.0
/sbin/ldconfig.real: /lib32/ld-2.31.so is the dynamic linker, ignoring
答案1
重新安装了以下软件包:gir1.2-upowerglib-1.0(0.99.11-1build2)upower(0.99.11-1build2)
安装了以下软件包:libusbmuxd-dev(2.0.1-2)libusbmuxd-tools(2.0.1-2)
重新安装了以下软件包:libimobiledevice-utils(1.2.1~git20191129.9f79242-1build1)libimobiledevice6(1.2.1~git20191129.9f79242-1build1)libusbmuxd6(2.0.1-2)usbmuxd(1.1.1~git20191130.9af2b12-1)
sudo ldconfig
重启后似乎已经完成了:)