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 03-19-2012, 03:00 PM   #1
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,291

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
/proc/acpi/* equivalents in /sys?


I'm on Slackware-13.37 and need to update my ancient (Fedora or debian) acpi scripts which reference /proc/acpi, because as we would say here:There it is - gone!

This line that does a battery low check
Quote:
Next hopefully check the Battery is dead low
if grep -q critical /proc/acpi/battery/state
I tried leaving stuff out ( -->Instant hibernate) or replaced with
Quote:
# Next hopefully check the Battery is dead low
if grep -q critical /sys/devices/LNXSYSTM:00/device:00/PNP0C0A:00/power_supply/C1ED/status
And the thing stays on 'Discharging' until it dies. Yet the system knew what was going on, because I had this flashing orange light.
Where to pick it up?
 
Old 03-19-2012, 06:29 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
/sys/class/power_supply/*
 
Old 03-20-2012, 03:35 AM   #3
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,291

Original Poster
Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
Thanks for the reply.
/sys/class/power_supply has 2 symlinks, C1EC, & C1ED. C1EC is auxiliary battery, and not fitted. C1ED is a symlink to

/sys/devices/LNXSYSTM:00/device:00/PNP0C0A:00/power_supply/C1ED

and I have hunted here for some time before posting. Here's a listing:
Quote:
bash-4.1$ ls
alarm charge_now device/ power status type voltage_now
charge_full current_now manufacturer present subsystem uevent
charge_full_design cycle_count model_name serial_number technology voltage_min_design
The 'alarm' apparently occasionally flicks to 1 (It's normally 0) and I got nearly instant hibernate function when I tried watching that.
if grep -q 1 /sys/blah/alarm;

uevent has a line which is also in status which simply says discharging, until it's dead. The charge files have one six digit number (ľAh?). /proc/acpi is gone. Do I have to measure the value in charge now (currently 1267000) or something? How the <expletive deleted> would you do that in a bash script? (charge_now now 1200000).
 
Old 03-20-2012, 05:07 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Hmmm - I get a BAT0 that links back to that sysfs directory. As BAT0. Has all the content you'd expect (on Fedora 16 BTW, not Slack).
I thought I saw something similar reported. Fix was something about turning WMI off; needs a kernel recompile I think. Check the ACPI bugzilla.
 
Old 03-20-2012, 01:56 PM   #5
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,291

Original Poster
Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
I'm glad this question attracted the attention of a guru :-).

I went to rebuild the kernel, disabled WMI in vim and it threw me into 'silentoldconfig' asking
about WMI. I answered '?' and was told that

"The implementation of this in Linux currently only exposes (acpi wmi data) to other user-space drivers.

This driver is a required dependency to build the firmware specific drivers on many machines, including Acer & HP laptops." I hit Ctrl_C

This is a HP Compaq 6715S

???
 
Old 03-20-2012, 05:02 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
I also see HP_WMI.
Time for you to make some decisions I guess - what do you want to be without the least ?. It's only a kernel build - try it and see.
 
1 members found this post helpful.
Old 03-21-2012, 03:14 AM   #7
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,291

Original Poster
Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
I'm on 3.0.4 here. It's up at 3.2.x now
If there's something in a later ChangeLog, maybe somebody will mention it.
I'll do a kernel and report back
 
Old 03-21-2012, 12:40 PM   #8
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,291

Original Poster
Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
Quote:
bash-4.1$ grep -n WMI .config
2001:CONFIG_SND_RAWMIDI=m
2019:CONFIG_SND_RAWMIDI_SEQ=m
2456:# CONFIG_ACPI_WMI is not set
That kernel produced no change, and no BAT0
Code:
bash-4.1$ cat /sys/class/power_supply/C1ED/uevent
POWER_SUPPLY_NAME=C1ED
POWER_SUPPLY_STATUS=Discharging
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_TECHNOLOGY=Li-ion
POWER_SUPPLY_CYCLE_COUNT=0
POWER_SUPPLY_VOLTAGE_MIN_DESIGN=10800000
POWER_SUPPLY_VOLTAGE_NOW=12001000
POWER_SUPPLY_CURRENT_NOW=1612000
POWER_SUPPLY_CHARGE_FULL_DESIGN=4979000
POWER_SUPPLY_CHARGE_FULL=4979000
POWER_SUPPLY_CHARGE_NOW=4799000
POWER_SUPPLY_MODEL_NAME=Primary
POWER_SUPPLY_MANUFACTURER=Hewlett-Packard
POWER_SUPPLY_SERIAL_NUMBER=23898 2011/03/10
Now I don't know what functions on the box that required WMI are incorrigibly knackered under this kernel, and I don't intend to find out.
Code:
bash-4.1$ ls /sys/class/power_supply/C1ED
alarm	charge_now	 device        power	      status	  type	      voltage_now
charge_full	    current_now  manufacturer  present	      subsystem   uevent
charge_full_design  cycle_count  model_name    serial_number  technology  voltage_min_design
I'm having to hack with vim because I only get this in menuconfig
Quote:
*** on-CPU RTC drivers ***
Make then comes in with a "What'as he been at? approach and asks questions.

Any ideas welcome.
 
Old 03-21-2012, 04:19 PM   #9
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,291

Original Poster
Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
This has been sorted as follows. I followed the Standard Procedure outlined to me from my days in R & D:

"If at first you don't succeed - give up!"

I preferred acpi over XFCE's Power Manager as I am capable of running sessions without X running at all, but I will settle for XFCE's Power Manager. I have configured it to act on battery critical instead of configuring it to play in the traffic. It talks to Hal - the aptly named hardware interface (For anyone who saw the film 2001)
http://en.wikipedia.org/wiki/HAL_9000

Thanks, Guru, but what can the ordinary mortal who has a life to lead do?
 
  


Reply

Tags
/sys, acpi



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
No ACPI Thermal or Fan Info in /proc/acpi staus Slackware 2 08-30-2010 02:15 PM
[SOLVED] Sending command to /sys/... or /proc/acpi/... Geriao Linux - Laptop and Netbook 2 03-16-2010 06:37 AM
ACPI: 2.6.17.7; nothing in /proc/acpi/fan; fans not running; problem not seen before. zetabill Linux - Kernel 1 07-30-2006 04:27 PM
/proc vs /sys alaios Linux - Newbie 1 06-11-2005 11:56 PM
kernel 2.4.20 & acpi-20021212-2.4.20.diff => no /proc/acpi Tinkster Linux - Software 5 03-24-2003 01:56 PM

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

All times are GMT -5. The time now is 09:53 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