Linux Mint 10 has problem with UPS system

Questions about hardware,drivers and peripherals
Forum rules
Before you post please read how to get help
Post Reply
rmbox
Level 1
Level 1
Posts: 13
Joined: Tue May 10, 2011 10:54 pm

Linux Mint 10 has problem with UPS system

Post by rmbox » Wed Jun 01, 2011 11:22 pm

Hi, I live in an area that has frequent power fluctuations.
I just connected a new UPS system but now when I boot up, my system claims my battery is critically low and quickly shuts down.
The battery is fine.
I installed the software that came with the UPS, but this initially, didn't change anything.
However, I've found that if I enter an su terminal and use commands to test the UPS and check it's status, the correct UPS battery condition becomes recognized and the shutdown problem goes away.
I have two questions . . .

1. Does anyone have any ideas how I can fix this problem ?

2. If not, does anybody know of a way I can create a start-up application or launcher shortcut that will eliminate this 5 step, time consuming, command line work-around, I'm currently using ?

(Level 1 newbie)
Thanks

Ps,

lsusb
Bus 002 Device 003: ID 0764:0501 Cyber Power System, Inc. CP1500 AVR UPS
Bus 002 Device 002: ID 093a:2510 Pixart Imaging, Inc. Optical Mouse
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Pps,

lspci -vvnn
00:0b.1 USB Controller [0c03]: nVidia Corporation MCP55 USB Controller [10de:036d] (rev a2) (prog-if 20 [EHCI])
Subsystem: nVidia Corporation Device [10de:c55e]
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0 (750ns min, 250ns max)
Interrupt: pin B routed to IRQ 20
Region 0: Memory at cfffe000 (32-bit, non-prefetchable)
Capabilities: <access denied>
Kernel driver in use: ehci_hcd
Last edited by rmbox on Thu Jun 02, 2011 7:31 pm, edited 1 time in total.

rmbox
Level 1
Level 1
Posts: 13
Joined: Tue May 10, 2011 10:54 pm

Re: Linux Mint 10 has problem with UPS system

Post by rmbox » Thu Jun 02, 2011 5:18 pm

Ok . . . I'm pretty sure I've solved this one on my own !

I'll re-open this thread later if I need any more help with this.
I thank all of you, who took the time to read and think about it.

donv
Level 1
Level 1
Posts: 14
Joined: Mon Oct 04, 2010 5:38 pm

Re: Linux Mint 10 has problem with UPS system

Post by donv » Wed Jun 15, 2011 5:17 pm

I've run into the same shutdown issue. I had not installed the Cyber Power software before, but I have now. I'm not sure whether this will be the only action required. Can you please share what you did to fix this?

rmbox
Level 1
Level 1
Posts: 13
Joined: Tue May 10, 2011 10:54 pm

Re: Linux Mint 10 has problem with UPS system

Post by rmbox » Thu Jun 30, 2011 4:00 am

Ahh . . . I see some other person with this problem has posted a reply two weeks after I came up with a workable solution.

Recap:
After booting into Linux Mint, the UPS unit would often not be recognized causing a "battery is critically low" message followed by a quick system shut-down.

After some extensive searching, I found this to be a fairly common problem that affects many UPS systems on Linux.

Here's what I did before posting here:

I installed the manufacturers UPS software (called PowerPanel) and rebooted.
This initially had no effect whatsoever.
I then installed the nut-hal package (available through the software manager) for it's ability to monitor UPS units and show a status icon in the panel's notification area.
This worked great !!
It displayed a large orange warning icon whenever the UPS unit failed to establish communication after boot!
I soon discovered that typing two to three separate "su" command-line options provided by the UPS software would establish (re-establish?) the UPS device/Linux communication.
The hal-nut icon would turn from the orange warning into a rather satisfying ups image.
So, I had found some work-arounds that would identify the problem and correct it whenever it happened.
The trouble with this, was the amount of time it took to type the necessary "su" command-lines in the terminal.
I often only had a 120 second window before the system shut down which made things a bit rushed and nerve-wracking.
So, I came here and asked the kind Linux Mint forum "helpers" for some assistance.
I didn't get a response for a day or two and managed to come up with a solution on my own.

Here's what I did after posting here:

I created two desktop launchers and entered the necessary UPS software "sudo" command lines into them.
This created a very easy and fast way to correct this problem within the short amount of usable time.
After working this out, I created a script that automates the whole process with a single click.

Hope this helps . . . :)
.

AlbertP
Level 16
Level 16
Posts: 6725
Joined: Sun Jan 30, 2011 12:38 pm
Location: Utrecht, The Netherlands

Re: Linux Mint 10 has problem with UPS system

Post by AlbertP » Thu Jun 30, 2011 4:14 am

If you want to run a command on every boot, you can put it in the file /etc/rc.local.
You have to open it as root: right-click the file > Open as Root, or type this in terminal:

Code: Select all

gksu gedit /etc/rc.local
Sudo is not needed in the /etc/rc.local file. Everything inside it is executed with root permission.
Registered Linux User #528502
Image
Feel free to correct me if I'm trying to write in Spanish, French or German.

rmbox
Level 1
Level 1
Posts: 13
Joined: Tue May 10, 2011 10:54 pm

Re: Linux Mint 10 has problem with UPS system

Post by rmbox » Thu Jun 30, 2011 4:35 am

I didn't know that . . . what a great tip !!! :D
I'm in the middle of three rather fun linux projects at the moment, but Ive made a note of it and will try it out a little later.
Thanks for sharing this AlbertP !

donv
Level 1
Level 1
Posts: 14
Joined: Mon Oct 04, 2010 5:38 pm

Re: Linux Mint 10 has problem with UPS system

Post by donv » Thu Jun 30, 2011 2:14 pm

Installing (and configuring) PowerPanel alone seemed to do the trick for me. LM11 seemed to know the UPS was there before (as it provided power settings options not otherwise seen for when to shutdown on UPS, etc.) but was confused about what to do if there was a power glitch, which my laser printer seemed to routinely generate in the office circuit of my old house. I was not running into the problem upon power up but rather whenever I sent a new print job. The shutdowns have stopped since installing PowerPanel.

rmbox
Level 1
Level 1
Posts: 13
Joined: Tue May 10, 2011 10:54 pm

Re: Linux Mint 10 has problem with UPS system

Post by rmbox » Fri Jul 01, 2011 12:36 am

donv:
Nice to see you were able to resolve your UPS problem.
According to the manufacturer's readme file, their PowerPanel software was updated last year to address a problem where their "OR series UPS always lost communication when using a usb port" on Linux systems.
I'm currently using a newer GreenPower "PFCLCD series UPS on a usb port" with my system here.
I'll likely have to continue using my "work-around" until a CyberPower update comes out that corrects this problem.

AlbertP:
I tried using your tip, and it "almost" got me there . . .
Using the ups software commands inside my current "fix" script works in the "rc.local" on boot every time.
My problem is, I don't want it to run on every boot, I only want it to run when the problem exists.

I'm currently running a zenity script in the startup applications group that after booting asks me if I need to establish ups communication.
When it pops up, I look at the panel's nut-hal notification icon and click yes or no depending on what's displayed.
When clicking yes, a script runs that corrects the ups communication problem which among other things causes the ups software to run a self test.
The self test makes the ups unit beep and display testing data, but it also causes a mildly alarming "burning circuitry" smell to be emitted.
This smell makes me feel that running this test on every boot could possibly shorten the life of the ups unit or it's battery.
The lost ups communication issue only occurs about 50 % of the time, so I'd rather run the script only when it's actually needed.
It seems that the rc.local file won't or can't use zenity scripts at it's run level.
I currently don't have a clue which commands I could possibly use at that level to determine if the ups communication has been established or not.

Even though I won't be using your "rc.local" tip at this time, I very much appreciate knowing about it.
Thanks again Albert.
.

Post Reply

Return to “Hardware Support”