[arch-general] Network UPS Tools (AUR) using usbhid
Archdevs, Have there been any changes to startup that would impact the Network UPS Tools startup using the usbhid device? I ask because the nut-server.service that has worked for years, is now failing to come up in the normal boot process. $ upsc phoinix_ups Error: Driver not connected However restarting the service after the system is up and running everything works fine. So it's like there is a new depends for the usbhid driver startup that means it has to wait until something else is now started before it can initialize properly. Any idea what could be causing that or what nut-server.service needs to wait on before it tries to start? After kernel update, the failed log messages are: -- Reboot -- Jan 13 11:06:31 phoinix systemd[1]: Starting Network UPS Tools - power devices information server... Jan 13 11:06:32 phoinix upsd[541]: fopen /var/state/ups/upsd.pid: No such file or directory Jan 13 11:06:32 phoinix upsd[541]: /etc/ups/upsd.conf is world readable Jan 13 11:06:32 phoinix upsd[541]: /etc/ups/upsd.conf is world readable Jan 13 11:06:32 phoinix upsd[541]: listening on 127.0.0.1 port 3493 Jan 13 11:06:32 phoinix upsd[541]: listening on ::1 port 3493 Jan 13 11:06:32 phoinix upsd[541]: listening on 127.0.0.1 port 3493 Jan 13 11:06:32 phoinix upsd[541]: listening on ::1 port 3493 Jan 13 11:06:32 phoinix upsd[541]: Can't connect to UPS [phoinix_ups] (usbhid-ups-phoinix_ups): No such file or directory Jan 13 11:06:32 phoinix upsd[541]: Can't connect to UPS [phoinix_ups] (usbhid-ups-phoinix_ups): No such file or directory Jan 13 11:06:32 phoinix upsd[561]: Startup successful Jan 13 11:06:32 phoinix systemd[1]: Started Network UPS Tools - power devices information server. Jan 13 11:11:32 phoinix upsd[561]: Can't connect to UPS [phoinix_ups] (usbhid-ups-phoinix_ups): No such file or directory Then the restart works fine: Jan 13 11:19:20 phoinix systemd[1]: Stopped Network UPS Tools - power devices information server. Jan 13 11:19:20 phoinix systemd[1]: Starting Network UPS Tools - power devices information server... Jan 13 11:19:20 phoinix upsd[823]: fopen /var/state/ups/upsd.pid: No such file or directory Jan 13 11:19:20 phoinix upsd[823]: /etc/ups/upsd.conf is world readable Jan 13 11:19:20 phoinix upsd[823]: /etc/ups/upsd.conf is world readable Jan 13 11:19:20 phoinix upsd[823]: listening on 127.0.0.1 port 3493 Jan 13 11:19:20 phoinix upsd[823]: listening on 127.0.0.1 port 3493 Jan 13 11:19:20 phoinix upsd[823]: listening on ::1 port 3493 Jan 13 11:19:20 phoinix upsd[823]: listening on ::1 port 3493 Jan 13 11:19:20 phoinix upsd[823]: Connected to UPS [phoinix_ups]: usbhid-ups-phoinix_ups Jan 13 11:19:20 phoinix upsd[823]: Connected to UPS [phoinix_ups]: usbhid-ups-phoinix_ups Jan 13 11:19:20 phoinix upsd[824]: Startup successful Jan 13 11:19:20 phoinix systemd[1]: Started Network UPS Tools - power devices information server. Any ideas what to check? This just started within the last month or two. -- David C. Rankin, J.D.,P.E.
Re: [arch-general] systemd-zram generator
> From: Chris Murphy > Sent: Mon Jan 13 05:51:15 CET 2020 > To: > Subject: [arch-general] systemd-zram generator > > > Hi, > > swap-create@.service generator for zram devices > https://github.com/systemd/zram-generator > > zram: Compressed RAM based block devices > https://www.kernel.org/doc/Documentation/blockdev/zram.txt > > The gist is, if a configuration file exists, a /dev/zram0 device is > created during early boot and marks it for use by swap.target; so all > the existing systemd stuff to mkswap and swapon gets used. > > The nice thing is, very low overhead. RAM is not reserved for the > device, it's only consumed as needed. > > The generator could be installed by default, but without a > configuration file. In that case, it doesn't create a swap on zram > device, unless the user creates a configuration file. And at some > point, the distribution can decide to include a configuration file by > default. > > I'm thinking a useful yet conservative default would be to create a > device up to 1:1 with RAM, capping out around 2G-4G. That way small > RAM devices, like Pi's, get a pretty big zram device. And large RAM > devices just have a smallish swap for incidental usage. > > One issue (reported upstream in github) is getting priority supported. > I don't know whether it needs to be configurable, from the config > file. But it seems sane to have the generator set a high priority, so > that the zram device is used first, spilling over to a conventional > swap if the user creates ones. > > This is a project in rust. And I think once some of the issues get > worked out, it would be great if distributions can converge on this > implementation. > > Thanks, > > -- > Chris Murphy There are many tools to configure zram available, one is even in Arch Linux repos: https://www.archlinux.org/packages/community/any/systemd-swap/ I guess when/if systemd-zram generator will be part of systemd then distros will converge onto it. Yours sincerely G. K.