I've tried several recipes found with google, but hal likes to grab the USB ups before nut can get it. There are a number of klugey workarounds, like turn off port power until ready to start nut (so that hal doesn't see the UPS). Or killall hal-addon-hid-ups before starting nut. Here is one of recipes I googled: https://github.com/sdgathman/trippfix/blob/master/halpolicy.fdi It doesn't work - hal still loads the addon - preventing nut upsdrvctl from succeeding. I'm thinking the killall is the least dirty workaround, but what is the right way to tell hal not to mess with the UPS (or any UPS for that matter).
On Nov 11, 2016, at 1:01 PM, Stuart Gathman wrote:> > I've tried several recipes found with google, but hal likes to grab the > USB ups before nut can get it. > There are a number of klugey workarounds, like turn off port power until > ready to start nut (so that hal doesn't see the UPS). Or > killall hal-addon-hid-ups before starting nut.Minor nit, but for anyone else using an exact match search interface (like packages.ubuntu.com), note that there is a "d" after "hal": hald-addon-hid-ups> Here is one of recipes I googled: > https://github.com/sdgathman/trippfix/blob/master/halpolicy.fdiWhat if you convert the USB ID numbers to decimal? <match key="@info.parent:usb.vendor_id" int="2748"> <match key="@info.parent:usb.product_id" int="12310"> Ref: https://ubuntuforums.org/showthread.php?t=1253856> It doesn't work - hal still loads the addon - preventing nut upsdrvctl > from succeeding. I'm thinking the killall is the least dirty > workaround, but what is the right way to tell hal not to mess with the > UPS (or any UPS for that matter).This sounds a lot like what this file was designed to do: https://github.com/networkupstools/nut/blob/master/scripts/upower/95-upower-hid.rules (It is auto-generated from all of the NUT drivers at release time.) Is this CentOS? Which version?
On Nov 13, 2016, at 10:08 AM, Charles Lepple wrote:> > This sounds a lot like what this file was designed to do: > > https://github.com/networkupstools/nut/blob/master/scripts/upower/95-upower-hid.rulesI thought this sounded familiar. In removing the code that talked to HAL, I think we also removed the file that prevented hald-addon-hid-ups from claiming the UPS: https://github.com/networkupstools/nut/issues/99
On 11/13/2016 10:08 AM, Charles Lepple wrote:>> Here is one of recipes I googled: >> https://github.com/sdgathman/trippfix/blob/master/halpolicy.fdi > What if you convert the USB ID numbers to decimal? > > <match key="@info.parent:usb.vendor_id" int="2748"> > <match key="@info.parent:usb.product_id" int="12310"> > > Ref: https://ubuntuforums.org/showthread.php?t=1253856Oooh. I'll try that.> This sounds a lot like what this file was designed to do: > > https://github.com/networkupstools/nut/blob/master/scripts/upower/95-upower-hid.rules > > (It is auto-generated from all of the NUT drivers at release time.) > > Is this CentOS? Which version?Centos-6.8 Supported for 4 more years Centos-7 has removed HAL (or rather, HAL has been assimilated by the Borg - aka systemd).