LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-15-2012, 10:20 PM   #1
SeRi@lDiE
Member
 
Registered: Jun 2006
Location: /dev/null
Distribution: Slackware 13.1, Slackware 13.37, aptosid, rhel
Posts: 547
Blog Entries: 7

Rep: Reputation: 55
apcupsd problems


Hello all...
I been going to hell and back getting apcupsd working on Slackware 13.37 x86_64

Here is what I get as an error:

2012-08-15 22:07:22 -0500 apcupsd FATAL ERROR in linux-usb.c at line 605
Cannot open UPS device: "/dev/usb/hiddev0" --
For a link to detailed USB trouble shooting information,
please see <http://www.apcupsd.com/support.html>.
2012-08-15 22:07:22 -0500 apcupsd error shutdown completed

My APC device ID:

Bus 006 Device 002: ID 051d:0002 American Power Conversion Uninterruptible Power Supply


from messages log:


Aug 11 00:12:25 oscuridad kernel: [ 9.492015] usb 6-2: new full speed USB device using uhci_hcd and address 2
Aug 11 00:12:25 oscuridad kernel: [ 9.657080] usb 6-2: New USB device found, idVendor=051d, idProduct=0002
Aug 11 00:12:25 oscuridad kernel: [ 9.660989] usb 6-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Aug 11 00:12:25 oscuridad kernel: [ 9.664938] usb 6-2: Product: Back-UPS XS 1500G FW:866.L6 .D USB FW:L6
Aug 11 00:12:25 oscuridad kernel: [ 9.668874] usb 6-2: Manufacturer: American Power Conversion
Aug 11 00:12:25 oscuridad kernel: [ 9.672769] usb 6-2: SerialNumber: 4B1224P33122
Aug 11 00:12:25 oscuridad kernel: [ 9.761209] generic-usb 0003:051D:0002.0003: hiddev0,hidraw2: USB HID v1.00 Device [American Power Conversion Back-UPS XS 1500G FW:866.L6 .D USB FW:L6 ] on usb-0000:00:1a.2-2/input0


Any help would be appreciated!

TIA!
 
Old 08-16-2012, 06:57 AM   #2
asdrubale
LQ Newbie
 
Registered: Aug 2012
Posts: 13

Rep: Reputation: Disabled
Quote:
Originally Posted by SeRi@lDiE View Post
Hello all...
I been going to hell and back getting apcupsd working on Slackware 13.37 x86_64


Here is what I get as an error:

2012-08-15 22:07:22 -0500 apcupsd FATAL ERROR in linux-usb.c at line 605
Cannot open UPS device: "/dev/usb/hiddev0" --
For a link to detailed USB trouble shooting information,
please see [...].
2012-08-15 22:07:22 -0500 apcupsd error shutdown completed
I had the same problem with the i386 version.

I solved it adding a new udev rule:

Code:
root@kaf:~# cat /etc/udev/rules.d/75-ups.rules 
SUBSYSTEMS=="usb", ATTRS{product}=="Back-UPS ES 550G ...", ATTRS{serial}=="3B09...", SYMLINK+="ups" MODE="0600"
root@kaf:~#
and using /dev/ups in acpupsd config file /etc/apcupsd/apcupsd.conf:

Code:
UPSTYPE usb
DEVICE /dev/ups

Last edited by asdrubale; 08-16-2012 at 05:04 PM.
 
Old 08-16-2012, 05:01 PM   #3
SeRi@lDiE
Member
 
Registered: Jun 2006
Location: /dev/null
Distribution: Slackware 13.1, Slackware 13.37, aptosid, rhel
Posts: 547

Original Poster
Blog Entries: 7

Rep: Reputation: 55
Thanks for the advice but that does not work.
 
Old 08-17-2012, 06:15 AM   #4
Celyr
Member
 
Registered: Mar 2012
Location: Italy
Distribution: Slackware+Debian
Posts: 321

Rep: Reputation: 81
Are you running apcupsd as root?
Have you used slackbuild?
 
Old 08-17-2012, 07:12 AM   #5
SeRi@lDiE
Member
 
Registered: Jun 2006
Location: /dev/null
Distribution: Slackware 13.1, Slackware 13.37, aptosid, rhel
Posts: 547

Original Poster
Blog Entries: 7

Rep: Reputation: 55
Quote:
Originally Posted by Celyr View Post
Are you running apcupsd as root?
Have you used slackbuild?
Yes and Yes.
 
Old 08-17-2012, 07:17 AM   #6
Celyr
Member
 
Registered: Mar 2012
Location: Italy
Distribution: Slackware+Debian
Posts: 321

Rep: Reputation: 81
What about
Code:
ls -la /dev/usb/hiddev0
Are you sure apcupsd is not already running?
 
Old 08-17-2012, 07:27 AM   #7
SeRi@lDiE
Member
 
Registered: Jun 2006
Location: /dev/null
Distribution: Slackware 13.1, Slackware 13.37, aptosid, rhel
Posts: 547

Original Poster
Blog Entries: 7

Rep: Reputation: 55
Quote:
Originally Posted by Celyr View Post
What about
Code:
ls -la /dev/usb/hiddev0
Are you sure apcupsd is not already running?
I appreciate your help but I am not a n00b.
I come here as my last resource.
Than again the simplest things are the one that get us the most :P
But to answer your question... apcupsd is not running.

crw------- 1 root root 180, 96 Aug 16 11:54 /dev/usb/hiddev0

Last edited by SeRi@lDiE; 08-17-2012 at 07:30 AM.
 
Old 08-17-2012, 07:34 AM   #8
Celyr
Member
 
Registered: Mar 2012
Location: Italy
Distribution: Slackware+Debian
Posts: 321

Rep: Reputation: 81
I'm sorry you are feeling like I think you are a noob, it's not like that. Sometimes happen to me that I don't think of the easiest solution. However I have apcupsd running on my machine so you can trust me at least a bit. I just wanted to check if the device exists, permission and type. Can you post your apcupsd.conf ? And also apcupsd version
 
Old 08-17-2012, 08:41 AM   #9
Celyr
Member
 
Registered: Mar 2012
Location: Italy
Distribution: Slackware+Debian
Posts: 321

Rep: Reputation: 81
Also you may want to try
Code:
lsof | grep hid
 
Old 08-17-2012, 03:56 PM   #10
SeRi@lDiE
Member
 
Registered: Jun 2006
Location: /dev/null
Distribution: Slackware 13.1, Slackware 13.37, aptosid, rhel
Posts: 547

Original Poster
Blog Entries: 7

Rep: Reputation: 55
Quote:
Originally Posted by Celyr View Post
Also you may want to try
Code:
lsof | grep hid
root@oscuridad:~# lsof | grep hid
usbhid_re 993 root cwd DIR 8,2 4096 2 /
usbhid_re 993 root rtd DIR 8,2 4096 2 /
usbhid_re 993 root txt unknown /proc/993/exe
hald-addo 2564 root txt REG 8,2 19360 9983116 /usr/libexec/hald-addon-hid-ups
hald-addo 2564 root 4r CHR 180,97 0t0 1390 /dev/usb/hiddev1
upowerd 3215 root 15r CHR 180,97 0t0 1390 /dev/usb/hiddev1
root@oscuridad:~#
 
Old 08-17-2012, 04:10 PM   #11
Celyr
Member
 
Registered: Mar 2012
Location: Italy
Distribution: Slackware+Debian
Posts: 321

Rep: Reputation: 81
And what about the version?
Code:
ls /var/log/packages/apcups*
I'm running out of options, try to
Code:
cat /dev/usb/hiddev0
 
Old 08-17-2012, 06:27 PM   #12
wildwizard
Member
 
Registered: Apr 2009
Location: Oz
Distribution: slackware64-14.0
Posts: 875

Rep: Reputation: 282Reputation: 282Reputation: 282
Quote:
Originally Posted by SeRi@lDiE View Post
root@oscuridad:~# lsof | grep hid
usbhid_re 993 root cwd DIR 8,2 4096 2 /
usbhid_re 993 root rtd DIR 8,2 4096 2 /
usbhid_re 993 root txt unknown /proc/993/exe
hald-addo 2564 root txt REG 8,2 19360 9983116 /usr/libexec/hald-addon-hid-ups
hald-addo 2564 root 4r CHR 180,97 0t0 1390 /dev/usb/hiddev1
upowerd 3215 root 15r CHR 180,97 0t0 1390 /dev/usb/hiddev1
root@oscuridad:~#
oh ho

Earlier you showed dmesg giving the UPS on hiddev0 now it looks like it's on hiddev1

You will need to look more closely at what is happening to work out why it is changing.
 
Old 08-18-2012, 12:06 AM   #13
glorsplitz
Senior Member
 
Registered: Dec 2002
Distribution: slackware!
Posts: 1,308

Rep: Reputation: 368Reputation: 368Reputation: 368Reputation: 368
SeRi@lDiE

I ran into your error 2012-08-15 22:07:22 -0500 apcupsd FATAL ERROR in linux-usb.c at line 605.....

a few years ago but don't have any documentation as to what I did.

So I'm guessing it was just a apcupsd.conf thing.

I have apcupsd on 13.37 32 bit fresh install, my current .conf has just one line for ups type
UPSTYPE usb

Would be helpful if you attach your apcupsd.conf I attached mine, maybe a diff will help you see something?
Attached Files
File Type: txt apcupsd.conf.txt (11.5 KB, 50 views)
 
Old 08-18-2012, 03:04 AM   #14
asdrubale
LQ Newbie
 
Registered: Aug 2012
Posts: 13

Rep: Reputation: Disabled
Quote:
Originally Posted by wildwizard View Post
oh ho

Earlier you showed dmesg giving the UPS on hiddev0 now it looks like it's on hiddev1

You will need to look more closely at what is happening to work out why it is changing.
that is the real problem! Using an udev rule (as I tried to explain in my first post) you can delegate the task of discovering the effective device assigned to your UPS to the udev subsystem, and you can always use /dev/ups in acpupsd config file.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
apcupsd help ahh_username_taken Slackware 2 08-29-2008 01:38 PM
Help with apcupsd Rustylinux Red Hat 1 07-31-2008 10:13 PM
How to config apcupsd riverplate Linux - Hardware 1 06-07-2007 09:24 AM
APCUPSD - apcaccess problems. Riddick Linux - Software 1 01-05-2005 04:30 PM
apcupsd gui? PowerMatt Linux - Software 1 09-06-2004 06:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration