[Nut-upsuser] Using MGE UPS's with NUT and openSUSE

Roger Price rprice at cs.uml.edu
Wed Jun 27 09:24:30 UTC 2007


Dear List, I thought it might be useful if I wrote up my notes on getting 
an MGE UPS to work with NUT and openSUSE.

The MGE UPS (an Ellipse 1500 USB) will work well with NUT and openSUSE 
10.2, but not "out-of-the-box": there are some things you need to do:

Intro. MGE have built rpms of NUT which greatly simplify installation. 
   Merci MGE. I used the rpm's for nut-2.0.5 and the MGE supplied GUI 
   front-end mgeups-psp-3.0.2. The MGE documentation advises the user to 
   install using YOU (YaST online update).  These notes assume that the 
   UPS is owned by root.  I havn't tried changing this.

1. During the installation of mgeups-psp I received an error message 
   "/opt/gnome/share/applications/mgeups-psp.desktop: error: Categories 
   values must be one of...".  This is only a warning, but gets handled as 
   an error and blocks the installation.  The workaround is to download 
   the mgeups-psp rpm and install it with the command

   rpm --nopost -Uvh mgeups-psp-3.0.2-1.i586.rpm

2. The installation of nut and mgeups-psp sets up a default configuration 
   which needs further tuning to run correctly.  As root, in file 
   /etc/ups/upssched.conf replace

   PIPEFN /var/state/ups/upssched.pipe
   LOCKFN /var/state/ups/upssched.lock

   with 

   PIPEFN /var/run/ups/upssched.pipe
   LOCKFN /var/run/ups/upssched.lock

   and create directory /var/run/ups

3. The MGE front-end to NUT will place yet another power plug in the 
   system tray, which when clicked provides a status display.  If the user 
   is root, the MGE front end also offers a "Setting" facility to set up 
   the shutdown policy.  If you use this front-end to set up the policy, 
   mgeups-psp will clobber the file /etc/ups/upssched.conf, and you will 
   have to go back and repeat step 2 above.

4. In YaST -> System -> System Services (Runlevel) set upsd "Enabled" so 
   that NUT runs automatically.  At any time, as root, you can stop and 
   restart NUT with the command

   rcupsd {start|stop|restart|status}

5. When attempting to start NUT, I got the error message "invalid 
   /proc/bus/usb/003/002 in /etc/ups/ups.conf".  A crude workaround is to 
   look for and comment out some code in /etc/init.d/upsd as follows:

   #  if test -n "$PORT" && test -e "$PORT" ; then
   #    chown $UPS_OWNER $PORT || { rc_failed ; rc_status -v ; rc_exit ; }
   #  else
   #    echo -n "$0: invalid $PORT in $UPS_CONFIG"
   #    rc_failed 2 ; rc_status -v ; rc_exit
   #  fi

   I'm sure that a more elegant and permanent solution is possible.

6. When NUT is running, the command "ps aux | grep ups" should report that 
   the following processes are running:

   /usr/lib/ups/driver/newhidups -a mgeups
   /usr/sbin/upsd -u root
   /usr/sbin/upsmon
   /usr/sbin/upsmon

7. The "UPS alarms" window will show two or three "communication failures" 
   each day lasting either 2 or 4 seconds. Ignore them.  You will see 25 
   to 50 messages each day in /var/log/messages of the form:

Jun 21 16:11:40 pastis kernel: usb 3-1: usbfs: USBDEVFS_CONTROL failed cmd
                               newhidups rqt 128 rq 6 len 255 ret -110
Jun 21 16:46:29 pastis kernel: usb 3-1: usbfs: USBDEVFS_CONTROL failed cmd
                               newhidups rqt 161 rq 1 len 2 ret -110

   Ignore them.  See
http://www.mail-archive.com/nut-upsuser@lists.alioth.debian.org/msg00654.html

Best Regards,
Roger




More information about the Nut-upsuser mailing list