nut-server seems to connect to the device and tie up its port.
It appears upower only accesses the device every so often and queries it.
So then once nut-server is started upower cannot open the device again.
It comes down to you cannot really have 2 separate software stacks managing any single device as it is rare that anyone writes their specific stack to play nice with others. nut-server is quite old and I know it opens and keeps open the port to the ups, mainly because it manages some old upses with very primitive control cables (not strictly serial connections).
There might be a way to configure upower and/or the applet to query nut-server rather than the ups. Though doing a quick look at upowerd the documentation seems sparse.
On Wed, Mar 30, 2022 at 8:43 AM Dave Ulrick <d-ulrick@xxxxxxxxxxx> wrote:
I'm running Fedora 34 on three Linux systems that are connected to USB
UPSes. I have installed NUT (Network UPS Tools) on all three.
If I connect with nut-server stopped, upower detects the UPS:
# upower -d
Device:
/org/freedesktop/UPower/devices/line_power_tps6598x_source_psy_i2c_INT3515o02_tps6598xx0
native-path: tps6598x-source-psy-i2c-INT3515:02-tps6598x.0
power supply: yes
updated: Wed 30 Mar 2022 08:14:08 AM CDT (87 seconds ago)
has history: no
has statistics: no
line-power
warning-level: none
online: no
icon-name: 'ac-adapter-symbolic'
Device: /org/freedesktop/UPower/devices/ups_hiddev0
native-path:
/sys/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2.2/1-2.2:1.0/usbmisc/hiddev0
vendor: American Power Conversion
model: Back-UPS RS 1500G
serial: 4Q1805P11448
power supply: yes
updated: Wed 30 Mar 2022 08:15:31 AM CDT (4 seconds ago)
has history: yes
has statistics: yes
ups
present: yes
state: fully-charged
warning-level: none
time to empty: 1.6 hours
percentage: 100%
icon-name: 'battery-full-charged-symbolic'
History (charge):
1648646131 100.000 fully-charged
1648646101 0.000 unknown
History (rate):
1648646101 0.000 unknown
Device: /org/freedesktop/UPower/devices/DisplayDevice
power supply: yes
updated: Wed 30 Mar 2022 08:15:31 AM CDT (4 seconds ago)
has history: no
has statistics: no
ups
present: yes
state: fully-charged
warning-level: none
time to empty: 1.6 hours
percentage: 100%
icon-name: 'battery-full-charged-symbolic'
Daemon:
daemon-version: 0.99.13
on-battery: no
lid-is-closed: no
lid-is-present: no
critical-action: PowerOff
Then, if I start 'nut-server' (systemctl start nut-server), the UPS
disappears from upower.
# upower -d
Device:
/org/freedesktop/UPower/devices/line_power_tps6598x_source_psy_i2c_INT3515o02_tps6598xx0
native-path: tps6598x-source-psy-i2c-INT3515:02-tps6598x.0
power supply: yes
updated: Wed 30 Mar 2022 08:14:08 AM CDT (109 seconds ago)
has history: no
has statistics: no
line-power
warning-level: none
online: no
icon-name: 'ac-adapter-symbolic'
Device: /org/freedesktop/UPower/devices/DisplayDevice
power supply: yes
updated: Wed 30 Mar 2022 08:15:45 AM CDT (12 seconds ago)
has history: no
has statistics: no
unknown
warning-level: none
percentage: 0%
icon-name: 'battery-missing-symbolic'
Daemon:
daemon-version: 0.99.13
on-battery: no
lid-is-closed: no
lid-is-present: no
critical-action: PowerOff
The visible effect of this issue is that the XFCE4 Power Manager applet
doesn't show the status of the UPS.
Once upower has forgotten the UPS, I can make it remember it by running:
# systemctl stop nut-server
# systemctl restart upower
but it will forget it again if I run:
# systemctl start nut-server
Is this a feature or a bug?
Thanks,
Dave
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
_______________________________________________ users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure