Author Topic: Checking battery status?  (Read 8868 times)

0 Members and 1 Guest are viewing this topic.

Offline Newby

  • Moderator
  • Hero Member
  • *****
  • Posts: 10877
  • Thrash!
    • View Profile
Re: Checking battery status?
« Reply #15 on: January 11, 2007, 10:10:09 am »
Uhm, you realize you're reading the battery's signal directly from the kernel, right?  There's front-end programs that "just tells you what percent of your battery is left", but they use the same raw data.  The difference is, on Windows you aren't allowed to see it :P

Totally off-topic and I don't wanna drag this away from the original point, but yes, we know; the average user doesn't know how to read that and just wants "%" left. I wager Joe is/was one of those people.
- Newby
http://www.x86labs.org

Quote
[17:32:45] * xar sets mode: -oooooooooo algorithm ban chris cipher newby stdio TehUser tnarongi|away vursed warz
[17:32:54] * xar sets mode: +o newby
[17:32:58] <xar> new rule
[17:33:02] <xar> me and newby rule all

I'd bet that you're currently bloated like a water ballon on a hot summer's day.

That analogy doesn't even make sense.  Why would a water balloon be especially bloated on a hot summer's day? For your sake, I hope there wasn't too much logic testing on your LSAT. 

Offline Sidoh

  • x86
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: Checking battery status?
« Reply #16 on: January 11, 2007, 01:48:56 pm »
Uhm, you realize you're reading the battery's signal directly from the kernel, right?  There's front-end programs that "just tells you what percent of your battery is left", but they use the same raw data.  The difference is, on Windows you aren't allowed to see it :P

I'm well aware that there are front ends.

No, the difference is I had to go through this trouble to be able to see it in Linux.

Offline nslay

  • Hero Member
  • *****
  • Posts: 786
  • Giraffe meat, mmm
    • View Profile
Re: Checking battery status?
« Reply #17 on: January 11, 2007, 03:27:02 pm »
The idea behind a kernel is you customize it to meet the needs of your box. Otherwise your kernel has bloat and un-necessary crap.

And lol, aren't you glad Windows just tells you what percent of your battery is left? FreeBSD's apm does that too.

Yeah, it's things like this that discourage me from using Linux.  As much as I like it, I can never last long using it on my workstation.

It felt that way with FreeBSD until I discovered freshports.org ... this is a very easy-to-use website that searches the ports system for you (There is a make search but not nearly as nice).  While it shows the port's description and so forth, it also shows you vulnerabilities or breakages (if any) and the maintenance history.  A site like this beats google since it is tailored specifically for applications that are ported and known to work on FreeBSD, their problems, and maintenance history.  Maybe there is site like this for Slackware or Linux in a broader sense?  I know Gentoo has such a directory for its portage.

Misc sites:
http://www.freshports.org/ (nice web interface to ports)
http://www.freebsd.org/ports/ (web interface to ports)
http://pointyhat.freebsd.org/ (ports compilation/testing cluster)

An adorable giant isopod!

Offline Sidoh

  • x86
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: Checking battery status?
« Reply #18 on: January 11, 2007, 03:55:19 pm »
That's great (really, it is).  However, it's the fact that I have to go through this sort of trouble just to check the battery status.  It's not just this.  There are tons of trivial little things like this that add up frustration.  I like Linux (I know you don't, but I can't say anything about FreeBSD because I've never used it).  I've had it on my server for a number of years and have absolutely no plan to change that.

I can usually work myself through a given problem with linuxquestions, google and a few other references (like iago and Newby, but I usually consult them as a last resort.  being bothered constantly would be annoying, right, guys? :P).  I know that I'd get used to it and that I'd eventually come to ignore things like this, but until I see a significant advantage to using something other than windows on my workstation, I'm going to continue to do so.  I'm not trying to turn this into a debate and I'm not trying to be defensive; I'm just trying to convey my point.

I'm just saying I'd rather use Windows on my workstation (this includes my laptops) and have things "just work" without going through this sort of trouble.

Offline nslay

  • Hero Member
  • *****
  • Posts: 786
  • Giraffe meat, mmm
    • View Profile
Re: Checking battery status?
« Reply #19 on: January 11, 2007, 05:11:01 pm »
That's great (really, it is).  However, it's the fact that I have to go through this sort of trouble just to check the battery status.  It's not just this.  There are tons of trivial little things like this that add up frustration.  I like Linux (I know you don't, but I can't say anything about FreeBSD because I've never used it).  I've had it on my server for a number of years and have absolutely no plan to change that.

I can usually work myself through a given problem with linuxquestions, google and a few other references (like iago and Newby, but I usually consult them as a last resort.  being bothered constantly would be annoying, right, guys? :P).  I know that I'd get used to it and that I'd eventually come to ignore things like this, but until I see a significant advantage to using something other than windows on my workstation, I'm going to continue to do so.  I'm not trying to turn this into a debate and I'm not trying to be defensive; I'm just trying to convey my point.

I'm just saying I'd rather use Windows on my workstation (this includes my laptops) and have things "just work" without going through this sort of trouble.

Yeah, I dislike certain aspects of Linux, but it has its advantages.  I'm not sure what kind of trouble it is to check the battery or enable battery checking in Linux, but I tend to use wmbatteries to monitor my battery.  KDE offers a KLaptop Daemon, and I am sure Gnome has one too.
As to FreeBSD, if you have ACPI, the battery life can be queried through sysctl and the battery information can be queried through acpiconf.  APM has an apmconf command ... but I rarely have to do this checking from the command line.  ACPI is enabled on FreeBSD out of the box on systems that support it ... I imagine this is true on Linux too.

To those interested/curious:

Here's an example of checking battery life in FreeBSD with ACPI. 

Quote
%sysctl hw.acpi
hw.acpi.supported_sleep_state: S3 S4 S5
hw.acpi.power_button_state: S5
hw.acpi.sleep_button_state: S3
hw.acpi.lid_switch_state: NONE
hw.acpi.standby_state: S1
hw.acpi.suspend_state: S3
hw.acpi.sleep_delay: 3
hw.acpi.s4bios: 0
hw.acpi.verbose: 0
hw.acpi.reset_video: 1
hw.acpi.cpu.cx_supported: C1/1 C2/1 C3/85
hw.acpi.cpu.cx_lowest: C1
hw.acpi.cpu.cx_usage: 100.00% 0.00% 0.00%
hw.acpi.thermal.min_runtime: 0
hw.acpi.thermal.polling_rate: 10
hw.acpi.thermal.tz0.temperature: 50.0C
hw.acpi.thermal.tz0.active: -1
hw.acpi.thermal.tz0.passive_cooling: 1
hw.acpi.thermal.tz0.thermal_flags: 0
hw.acpi.thermal.tz0._PSV: 94.5C
hw.acpi.thermal.tz0._HOT: -1
hw.acpi.thermal.tz0._CRT: 99.0C
hw.acpi.thermal.tz0._ACx: -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
hw.acpi.battery.life: 100
hw.acpi.battery.time: -1
hw.acpi.battery.state: 0
hw.acpi.battery.units: 1
hw.acpi.battery.info_expire: 5
hw.acpi.acline: 1

Some of these values can be set while others are read-only for obvious reasons.

Here's an example to acquire battery information in FreeBSD.

Quote

%acpiconf -i 0
Design capacity:        77760 mWh
Last full capacity:     54560 mWh
Technology:             secondary (rechargeable)
Design voltage:         10800 mV
Capacity (warn):        2728 mWh
Capacity (low):         200 mWh
Low/warn granularity:   1 mWh
Warn/full granularity:  1 mWh
Model number:           IBM-92P1077
Serial number:            685
Type:                   LION
OEM info:               SANYO
State:                  high
Remaining capacity:     100%
Remaining time:         unknown
Present rate:           0 mW
Voltage:                12452 mV


Misc links:
An adorable giant isopod!

Offline Newby

  • Moderator
  • Hero Member
  • *****
  • Posts: 10877
  • Thrash!
    • View Profile
Re: Checking battery status?
« Reply #20 on: January 11, 2007, 06:15:40 pm »
I type "apm."
- Newby
http://www.x86labs.org

Quote
[17:32:45] * xar sets mode: -oooooooooo algorithm ban chris cipher newby stdio TehUser tnarongi|away vursed warz
[17:32:54] * xar sets mode: +o newby
[17:32:58] <xar> new rule
[17:33:02] <xar> me and newby rule all

I'd bet that you're currently bloated like a water ballon on a hot summer's day.

That analogy doesn't even make sense.  Why would a water balloon be especially bloated on a hot summer's day? For your sake, I hope there wasn't too much logic testing on your LSAT. 

Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: Checking battery status?
« Reply #21 on: January 11, 2007, 08:23:48 pm »
Incidentally, if you install one of those commercial distros (Red Hat, Suse, Fedora, etc) on a laptop, you'll generally get a battery status automatically in KDE or Gnome. 

If you want your hand held (or at least, if you don't want to have to learn how things work), then don't use a distro like Slackware or Gentoo, and don't use FreeBSD -- they expect you to look after yourself a lot more.

Offline Sidoh

  • x86
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: Checking battery status?
« Reply #22 on: January 11, 2007, 08:45:55 pm »
Incidentally, if you install one of those commercial distros (Red Hat, Suse, Fedora, etc) on a laptop, you'll generally get a battery status automatically in KDE or Gnome. 

If you want your hand held (or at least, if you don't want to have to learn how things work), then don't use a distro like Slackware or Gentoo, and don't use FreeBSD -- they expect you to look after yourself a lot more.

I'm aware of that.  Like I said, this was a simple (probably bad) example. :P