<head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body><div id="newMessage" style="font-size:14px;color:#000000;">Hi Charles,</div><div id="newMessage" style="font-size:14px;color:#000000;">No worries about the delay. I hadn't had a chance to look into it until today. I pointed the upsdrvctl output to a log file and restarted, but the issue didn't occur this time. Maybe it fixed itself with a recent security update or it doesn't happen each time. </div><div id="newMessage" style="font-size:14px;color:#000000;">Since I don't need modem-manager, I just removed it and I'm also keeping the log enabled in case the driver fails to load again on boot. </div><div id="newMessage" style="font-size:14px;color:#000000;"><br></div><div id="newMessage" style="font-size:14px;color:#000000;">Thanks again for your help. </div><div id="newMessage" style="font-size:14px;color:#000000;"></div><div id="newMessage" style="font-size:14px;color:#000000;"><br></div><div id="newMessage" style="font-size:14px;color:#000000;">Sebastian </div><br><blockquote type="cite"><p>On Jan 22, 2015, at 9:53 AM, Sebastian Hosche <<a href="mailto:sebastian.hosche@web.de"></a><a href="mailto:sebastian.hosche@web.de"><a href="mailto:sebastian.hosche@web.de">sebastian.hosche@web.de</a></a>> wrote:
<br>
<br>> Hi Charles,
<br>> 
<br>> Thanks so much for your quick and detailed reply! I've added my answers and details inline.
<br>
<br>Sorry this reply wasn't as quick.
<br>
<br>> On 22.1.2015 04:46, Charles Lepple wrote:
<br>>> On Jan 21, 2015, at 9:15 AM, Sebastian Hosche <<a href="mailto:sebastian.hosche@web.de"></a><a href="mailto:sebastian.hosche@web.de"><a href="mailto:sebastian.hosche@web.de">sebastian.hosche@web.de</a></a>> wrote:
<br>>>> First issue: whatever I set as the offdelay, seems to be ignored and the UPS just cuts the power about 2sec after receiving the shutdown command.
<br>>> What values have you tried? I wonder if it is rounding down to 0 seconds.
<br>> Great idea! I did some testing and it appears anything lower than 60 for offdelay simply gets ignored. In fact, setting offdelay to 60sec also fixes the second issue. Even with no device plugged into the UPS, it stays off while still on battery power!
<br>
<br>Ah, glad that worked. I will add some notes to the documentation about the offdelay setting.
<br>
<br>> Yes, USV is the German acronym for UPS, which I accidentally slipped in.
<br>
<br>That's good to know.
<br>
<br>> Even though this doesn't appear to be the issue, I still included the debug_DDD.txt for you in case there's an useful info in it.
<br>
<br>Thanks. Nothing looks strange, but it is good to have that for reference.
<br>
<br>> there's one additional issues I came across - on boot, the driver fails to load. Here's a syslog snippet:
<br>> Jan  1 02:00:13 beagle kernel: [    5.932402] usb 1-3.2: New USB device found, idVendor=0764, idProduct=0501
<br>> Jan  1 02:00:13 beagle kernel: [    5.935372] usb 1-3.2: New USB device strings: Mfr=3, Product=1, SerialNumber=0
<br>> Jan  1 02:00:13 beagle kernel: [    5.942662] usb 1-3.2: Product: BR850ELCD
<br>> Jan  1 02:00:13 beagle kernel: [    5.946589] usb 1-3.2: Manufacturer: CPS
<br>> 
<br>> between the USB device detected and upsd failing to start, there are about 50 more lines in the syslog, including the following services - acpid, ntpd, networkmanager, dbus
<br>> Then follows:
<br>> 
<br>> Jan  1 02:00:13 beagle kernel: [   10.406794] hid-generic 0003:0764:0501.0003: hiddev0,hidraw2: USB HID v1.10 Device [CPS BR850ELCD] on usb-s5p-ehci-3.2/input0
<br>
<br>This is normal, although NUT detaches the hiddev/hidraw drivers, and goes directly through libusb to the generic USB kernel driver.
<br>
<br>> following this, are multiple lines from the modemananger service and another USB device getting recognized.
<br>
<br>If you don't need modemmanager, I would recommend disabling it. Here's a potentially related modemmanager bug in Ubuntu: <a href="https://bugs.launchpad.net/ubuntu/+source/nut/+bug/1176548">https://bugs.launchpad.net/ubuntu/+source/nut/+bug/1176548</a>
<br>
<br>> Only then, upsd is loaded and fails:
<br>> Jan  1 02:00:14 beagle upsd[2744]: listening on 127.0.0.1 port 3493
<br>> Jan  1 02:00:14 beagle upsd[2744]: listening on ::1 port 3493
<br>> Jan  1 02:00:14 beagle upsd[2744]: Can't connect to UPS [cyberdyne] (usbhid-ups-cyberdyne): No such file or directory
<br>> Jan  1 02:00:14 beagle upsd[2754]: Startup successful
<br>> Jan  1 02:00:14 beagle upsmon[2803]: Startup successful
<br>> Jan  1 02:00:14 beagle upsd[2754]: User <a href="mailto:upsmaster@127.0.0.1"></a><a href="mailto:upsmaster@127.0.0.1"><a href="mailto:upsmaster@127.0.0.1">upsmaster@127.0.0.1</a></a> logged into UPS [cyberdyne]
<br>> Jan  1 02:00:14 beagle upsmon[2805]: Poll UPS [<a href="mailto:cyberdyne@localhost"></a><a href="mailto:cyberdyne@localhost"><a href="mailto:cyberdyne@localhost">cyberdyne@localhost</a></a>] failed - Driver not connected
<br>> Jan  1 02:00:14 beagle upsmon[2805]: Communications with UPS <a href="mailto:cyberdyne@localhost"></a><a href="mailto:cyberdyne@localhost"><a href="mailto:cyberdyne@localhost">cyberdyne@localhost</a></a> lost
<br>> Jan  1 02:02:04 beagle upsmon[3125]: Poll UPS [<a href="mailto:cyberdyne@localhost"></a><a href="mailto:cyberdyne@localhost"><a href="mailto:cyberdyne@localhost">cyberdyne@localhost</a></a>] failed - Driver not connected
<br>
<br>Hmm, no errors logged by usbhid-ups? Although they log errors later, upsd and upsmon have started successfully. (The driver can be started separately after that.)
<br>
<br>> I've worked around the issue by preventing nut-server and nut-client from starting directly and adding a script to rc.local that waits for 15 sec before starting up nut-server and then 15sec later starting nut-client. That does seem to do the trick, but it is kind of hacky.
<br>> 
<br>> Is there a way to start up nut-server on boot in some debug mode to have it add more details to the log?
<br>
<br>Not sure where the logs will go at boot, but when I am testing init scripts from the command line, I usually change "#!/bin/sh" to "#!/bin/sh -x".
<br>
<br>Also, it looks like the output of upsdrvctl is being redirected to /dev/null (line 78). You could point that to a file.
<br>
<br>-- 
<br>Charles Lepple
<br><a href="mailto:clepple@gmail"></a><a href="mailto:clepple@gmail"><a href="mailto:clepple@gmail">clepple@gmail</a></a>
<br>
<br>
<br>
<br>
<br></p></blockquote></body>