LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook
User Name
Password
Linux - Laptop and Netbook Having a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).

Notices


Reply
  Search this Thread
Old 09-25-2020, 01:33 PM   #1
slackerz
Member
 
Registered: Aug 2020
Posts: 73

Rep: Reputation: 23
Reporting ACPI Battery Info Linux/BSD


Various devices report acpi battery info through /sys/class/power_supply and through /proc/acpi.

One of my devices *doesn't* report acpi battery info through the /proc fs. Is there a quirk I should be using that will allow the reporting through /proc? There are some acpi properties reported through /proc but not all. Battery and AC are not reported.

I understand /proc is deprecated in Linux but I want to preserve compatibility with BSD as far as possible using the /proc fs.
 
Old 09-26-2020, 07:34 AM   #2
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,623

Rep: Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695
One must keep in mind that any hardware monitoring must be #1 supported by the hardware, and #2 supported to the same standard in the kernel.
If either one of those is missing, then monitoring will not present. (Or, not in any particularly useful way.)

You could try with a different kernel, or research your hardware to see if the provision is even present.

Since it appears you have some reporting under /sys, it is likely that the capability to monitor under /proc is simply not present in that kernel.

Last edited by wpeckham; 09-26-2020 at 07:36 AM.
 
Old 09-26-2020, 09:48 AM   #3
slackerz
Member
 
Registered: Aug 2020
Posts: 73

Original Poster
Rep: Reputation: 23
We're looking at some the latest Linux kernels. The reporting under /proc is present but it's hardware dependent, ie. some hardware is reporting info under both /proc and of-course /sys. Then again some hardware flouts acpi specs. But seeing I am able to get some info under /sys is there a way to manually get it under /proc too?
 
Old 09-27-2020, 08:26 AM   #4
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,623

Rep: Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695
BSD supports /proc, but support for /proc was dropped in OpenBSD version 5.7.
Which BSD are you running? What version? Why do you care where detail is reported when you can always use the ACPI tools for parsing the tables, logs, and result data?
 
Old 10-06-2020, 11:46 AM   #5
slackerz
Member
 
Registered: Aug 2020
Posts: 73

Original Poster
Rep: Reputation: 23
I've been working on a system reporting tool and I'm always hesitant to couple the tool with any particular system. I prefer to keep things as generic as possible.
In response to my original question the Linux kernel needs to be built with CONFIG_ACPI_PROCFS_POWER. This is enabled by default in Slackware but not in Void Linux. It's no biggie but it was knot I had to untie. This answers my original question.
 
  


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
Laptop battery incorrectly reporting remaining power skilo47 Linux - Laptop and Netbook 5 07-15-2016 07:59 AM
[SOLVED] df reporting 100% but du reporting 20% guna_pmk Linux - Server 1 04-15-2011 11:34 AM
No ACPI Thermal or Fan Info in /proc/acpi staus Slackware 2 08-30-2010 02:15 PM
PC BSD, Open BSD, or Free BSD ? Alexvader *BSD 5 02-08-2010 12:40 AM
powertop reporting a huge number of acpi interrupts gawhelan Linux - Laptop and Netbook 5 01-15-2009 02:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook

All times are GMT -5. The time now is 10:03 AM.

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