[Nut-upsdev] a nasty kernel oops

Alfred Ganz alfred-ganz+nut at agci.com
Fri Jan 14 00:54:28 UTC 2011


Charles,
	From: Charles Lepple <clepple at gmail.com>
	Subject: Re: [Nut-upsdev] a nasty kernel oops
	Date: Wed, 12 Jan 2011 22:24:42 -0500
	
	I suspect that the problem goes away once you have booted because the  
	kernel HID driver has been detached from the UPS once already.
	
	Perhaps I am misreading your description, but have you tried booting  
	without any USB devices, plugging the UPS in later (maybe once the  
	system has quiesced), then restarting the NUT init scripts?
I have not booted the system with all USB devices unplugged. What I
have done is booting with the UPS startscript disabled, and then run
the startscript without trouble. Unfortunately I don't have a spare 
system, and so these tests always involve significant disruptions. 
I will attempt to play around along these lines as well as with your
second suggestion at the next opportunity.
	
	It also might work better to disconnect the kernel HID driver before  
	starting usbhid-ups. If you have libhid, it comes with an example  
	program (libhid-detach-device) that detaches the kernel driver from  
	the first interface of a USB device. If not, it's just a handful of  
	libusb calls, and we can put together a test program to do that before  
	usbhid-ups gets to it.
I didn't see an installable rpm package in any of the archives for my 
current system, but I have been able to hack the one from Fedora 12, 
and libhid-detach-device works as expected. After disconnecting and then 
reconnecting the USB cable of the UPS, the kernel reports:
	hiddev96: USB HID v1.10 Device [APC Back-UPS ES 650 FW:818.w1.D \
					USB FW:w1] on usb-0000:00:1d.0-1
and "lsusb -v" shows the expected short output with: 
	Report Descriptors: ** UNAVAILABLE **, 
after running "libhid-detach-device" it shows the rather lengthy Report 
Descriptors.

First observation, on the running system the startup script works fine
with the HID driver attached or detached. I will make some boot tests
as soon as possible!

Thanks for your suggestions, AG

-- 
 ----------------------------------------------------------------------
   Alfred Ganz					alfred-ganz:at:agci.com
   AG Consulting, Inc.				(203) 624-9667
   440 Prospect Street # 11
   New Haven, CT 06511
 ----------------------------------------------------------------------



More information about the Nut-upsdev mailing list