I need some help from someone with a FreeBSD laptop

I'm currently working on an update of the FreeBSD port of x11/fbpanel, which I maintain. The latest 6.x version includes new plugins for cpu, memory and battery status (among other things). I've completed patches to get all of these working on FreeBSD, but since I don't have a laptop I'm not sure I've got the battery status right.

Will someone with a laptop please run the following command and post the results?

Code:
sysctl hw.acpi.battery

I need to see the values reported both when running on batteries and on AC. It would also be good to see the values when the battery is less than fully charged.

Thanks in advance!
 
This is on AC, with the battery pack removed. I always use the laptop that way, so that's all I got ;)

Code:
$ sysctl hw.acpi.battery                                                                                                 
hw.acpi.battery.life: -1
hw.acpi.battery.time: -1
hw.acpi.battery.state: 7
hw.acpi.battery.units: 2
hw.acpi.battery.info_expire: 5
 
ckester said:
I need to see the values reported both when running on batteries and on AC. It would also be good to see the values when the battery is less than fully charged.

Acer netbook on battery (nearly fully charged):
Code:
aa1% sysctl hw.acpi.battery
hw.acpi.battery.life: 93
hw.acpi.battery.time: 107
hw.acpi.battery.state: 1
hw.acpi.battery.units: 1
hw.acpi.battery.info_expire: 5

On AC:
Code:
aa1% sysctl hw.acpi.battery
hw.acpi.battery.life: 93
hw.acpi.battery.time: -1
hw.acpi.battery.state: 2
hw.acpi.battery.units: 1
hw.acpi.battery.info_expire: 5
 
Thanks Warren! That answers one question I had after studying the sourcecode for various apps that do battery monitoring: some of them seemed to suggest that the "life" value (% charged) would go to -1 when state=charging. That didn't make sense to me. How's a user to know when the charging is complete and it's OK to unplug the AC?

So I should be able to submit the update sometime this week, after some final cleanup and a tinderbox run. You can mark this thread "solved".
 
ckester said:
Thanks Warren! That answers one question I had after studying the sourcecode for various apps that do battery monitoring: some of them seemed to suggest that the "life" value (% charged) would go to -1 when state=charging. That didn't make sense to me. How's a user to know when the charging is complete and it's OK to unplug the AC?

sysutils/xfce4-battery-plugin works on a different Acer netbook. Might be a source for reference.
 
ckester said:
No problem, vermaden. I think I have what I need for now.

Ok, feel free to sent me PM for next needed testing.

BTW, from some version, I have the following problem with FBPANEL, how to make these 1px spaces to be 0px spaces as in older versions?

vNjYzNw


In older version it looked like that with the same config:
Mac_OS_X_fbpanel_config_by_vermaden.jpg
 
Looks like OS X, Vermaden. That's Finder's icon on the left end. What theme are you using?

We might need to patch the sourcecode for the taskbar plugin to get rid of that 1px border. If you're interested, I'll look into it after I get the update to 6.1 submitted.
 
... or is that a launchbar? With fbpanel 6.1, I'm not seeing any borders between the launchbar items.

Taskbar items, otoh, are drawn more like buttons on a dialog box.
 
Yep. I leaned heavily on the lxpanel patches, and even "borrowed" some of the code because it's so similar to what fbpanel needs. But the battery plugin is different enough that I rolled my own.

It's been a fun project, but I'm glad it's almost done. I'm seeing sysctlnametomib( ) calls scrolling on the back of my eyelids when I go to bed at night. :P
 
What did you need sysctltomib() for? sysctlbyname() is much easier to handle. :)
 
ckester said:
Looks like OS X, Vermaden. That's Finder's icon on the left end. What theme are you using?

We might need to patch the sourcecode for the taskbar plugin to get rid of that 1px border. If you're interested, I'll look into it after I get the update to 6.1 submitted.

This is the whole profile/config, I am using this as: fbpanel --profile osx: http://pastebin.com/jbiCDcFM

I would be interested in what needs to be changed/patched to bring back the old behaviour (0px spaces).
 
Ah, I was right. It's a launchbar, not a taskbar. You might not need to do anything at all.

I'd like to see what you get with 6.1. I'll PM you as soon as I submit the PR with my patches, so you can try them yourself.
 
I'm using sysctlnametomib( ) because these monitors run every two seconds or so, and I don't want the overhead of looking up the integer name vectors every time. The manpage recommends it for this kind of use.
 
ckester said:
I'm using sysctlnametomib( ) because these monitors run every two seconds or so, and I don't want the overhead of looking up the integer name vectors every time. The manpage recommends it for this kind of use.

Good point! :)
 
Back
Top