LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   2.6.37 Kernel and ACPI (https://www.linuxquestions.org/questions/slackware-14/2-6-37-kernel-and-acpi-862245/)

rmjohnso 02-12-2011 10:04 AM

2.6.37 Kernel and ACPI
 
I have a custom built 2.6.37 kernel where I have most of my devices compiled into the kernel. The only modules are related to nouveau (in case I want to go back to proprietary nvidia) and sound drivers. Everything seems to be running fine. However, in /proc/acpi, I'm missing a number of entries, such as thermal_zone/, dsdt, etc. I do have ac_adapter/, battery/, button/, event, processor/, and wakeup.

I've gone through what I think is a VERY detailed review of my kernel config, and I can't find where I've missed something ACPI related. Here is my kernel config with the ACPI section.

Code:


#
# Power management and ACPI options
#
CONFIG_ARCH_HIBERNATION_HEADER=y
CONFIG_PM=y
# CONFIG_PM_DEBUG is not set
CONFIG_PM_SLEEP_SMP=y
CONFIG_PM_SLEEP=y
CONFIG_SUSPEND_NVS=y
CONFIG_SUSPEND=y
CONFIG_SUSPEND_FREEZER=y
CONFIG_HIBERNATION=y
CONFIG_PM_STD_PARTITION="\"\""
CONFIG_PM_RUNTIME=y
CONFIG_PM_OPS=y
CONFIG_ACPI=y
CONFIG_ACPI_SLEEP=y
CONFIG_ACPI_PROCFS=y
CONFIG_ACPI_PROCFS_POWER=y
CONFIG_ACPI_POWER_METER=y
# CONFIG_ACPI_EC_DEBUGFS is not set
CONFIG_ACPI_PROC_EVENT=y
CONFIG_ACPI_AC=y
CONFIG_ACPI_BATTERY=y
CONFIG_ACPI_BUTTON=y
CONFIG_ACPI_VIDEO=y
CONFIG_ACPI_FAN=y
CONFIG_ACPI_DOCK=y
CONFIG_ACPI_PROCESSOR=y
CONFIG_ACPI_HOTPLUG_CPU=y
CONFIG_ACPI_PROCESSOR_AGGREGATOR=y
CONFIG_ACPI_THERMAL=y
# CONFIG_ACPI_CUSTOM_DSDT is not set
CONFIG_ACPI_BLACKLIST_YEAR=0
# CONFIG_ACPI_DEBUG is not set
# CONFIG_ACPI_PCI_SLOT is not set
CONFIG_X86_PM_TIMER=y
CONFIG_ACPI_CONTAINER=y
# CONFIG_ACPI_HOTPLUG_MEMORY is not set
CONFIG_ACPI_SBS=y
CONFIG_ACPI_HED=y
CONFIG_ACPI_APEI=y
CONFIG_ACPI_APEI_GHES=y
CONFIG_ACPI_APEI_EINJ=y
# CONFIG_ACPI_APEI_ERST_DEBUG is not set
CONFIG_SFI=y

#
# CPU Frequency scaling
#
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_TABLE=y
# CONFIG_CPU_FREQ_DEBUG is not set
CONFIG_CPU_FREQ_STAT=y
CONFIG_CPU_FREQ_STAT_DETAILS=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=y
CONFIG_CPU_FREQ_GOV_USERSPACE=y
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set

#
# CPUFreq processor drivers
#
# CONFIG_X86_PCC_CPUFREQ is not set
CONFIG_X86_ACPI_CPUFREQ=y
# CONFIG_X86_POWERNOW_K8 is not set
# CONFIG_X86_SPEEDSTEP_CENTRINO is not set
# CONFIG_X86_P4_CLOCKMOD is not set

#
# shared options
#
# CONFIG_X86_SPEEDSTEP_LIB is not set
CONFIG_CPU_IDLE=y
CONFIG_CPU_IDLE_GOV_LADDER=y
CONFIG_CPU_IDLE_GOV_MENU=y
CONFIG_INTEL_IDLE=y

#
# Memory power savings
#
CONFIG_I7300_IDLE_IOAT_CHANNEL=y
CONFIG_I7300_IDLE=y


Didier Spaier 02-12-2011 12:03 PM

The layout of /proc/acpi varies depending upon your hardware.

For instance here (Lenovo Thinkpad T61 6457-4XG):

Code:

bash-4.1$ ls -1 /proc/acpi/
ac_adapter/
battery/
button/
event
ibm/
processor/
wakeup
bash-4.1$

But (this is with linux-2.6.37 as well):
Code:

bash-4.1$ find /proc/acpi -name "thermal*"
/proc/acpi/ibm/thermal
bash-4.1

When compiling a new kernel I generally first "make oldconfig" using a config-generic shipped with Slackware as a basis then make a few tuning.

rmjohnso 02-12-2011 12:07 PM

I should have mentioned that I get all of the standard ACPI items in /proc/acpi when running the stock Slackware generic or huge kernels.

Didier Spaier 02-12-2011 12:12 PM

It's very possible that /proc/acpi layout varies depending upon the kernel version.

Anyhow what gives 'find /proc/acpi/ -name "thermal*"'?

Also, knowing which hardware you have could help.

rmjohnso 02-12-2011 12:25 PM

Under 2.6.37, nothing comes back from the find command. Under 2.6.35.11 (Slackware generic), it's /proc/acpi/thermal_zone.

Here is the results of the output of lspci:

Code:


00:00.0 Host bridge: Intel Corporation Mobile PM965/GM965/GL960 Memory Controller Hub (rev 0c)
00:01.0 PCI bridge: Intel Corporation Mobile PM965/GM965/GL960 PCI Express Root Port (rev 0c)
00:1a.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #4 (rev 02)
00:1a.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #5 (rev 02)
00:1a.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #2 (rev 02)
00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 02)
00:1c.0 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 1 (rev 02)
00:1c.1 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 2 (rev 02)
00:1c.3 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 4 (rev 02)
00:1c.5 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 6 (rev 02)
00:1d.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #1 (rev 02)
00:1d.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #2 (rev 02)
00:1d.2 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #3 (rev 02)
00:1d.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #1 (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev f2)
00:1f.0 ISA bridge: Intel Corporation 82801HEM (ICH8M) LPC Interface Controller (rev 02)
00:1f.1 IDE interface: Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) IDE Controller (rev 02)
00:1f.2 SATA controller: Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) SATA AHCI Controller (rev 02)
00:1f.3 SMBus: Intel Corporation 82801H (ICH8 Family) SMBus Controller (rev 02)
01:00.0 VGA compatible controller: nVidia Corporation G86 [GeForce 8400M GS] (rev a1)
03:01.0 FireWire (IEEE 1394): Ricoh Co Ltd R5C832 IEEE 1394 Controller (rev 05)
03:01.1 SD Host controller: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 22)
03:01.2 System peripheral: Ricoh Co Ltd R5C592 Memory Stick Bus Host Adapter (rev 12)
03:01.3 System peripheral: Ricoh Co Ltd xD-Picture Card Controller (rev 12)
09:00.0 Ethernet controller: Broadcom Corporation NetLink BCM5906M Fast Ethernet PCI Express (rev 02)
0c:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG [Golan] Network Connection (rev 02)


Didier Spaier 02-12-2011 12:39 PM

My hardware is very similar to yours, maybe but the processor type:

Code:

bash-4.1# uname -mpi
i686 Intel(R) Core(TM)2 Duo CPU    T7500  @ 2.20GHz GenuineIntel
bash-4.1#

FYI, here is my .config for 2.6.37-smp: http://pastebin.com/asbepJGZ. Please note that I changed the processor type (CONFIG_MCORE2=y) and have ext4 FS built in. Other than that it's based on kernel-generic-smp shipped with Slackware-13.1

Also you could have a look in /sys/ For instance:
Code:

bash-4.1# find /sys/ -name "thermal*"
/sys/devices/system/cpu/cpu0/thermal_throttle
/sys/devices/system/cpu/cpu1/thermal_throttle
/sys/devices/virtual/thermal
/sys/devices/virtual/thermal/thermal_zone0
/sys/devices/virtual/thermal/thermal_zone1
/sys/devices/LNXSYSTM:00/LNXCPU:00/thermal_cooling
/sys/devices/LNXSYSTM:00/LNXCPU:01/thermal_cooling
/sys/devices/LNXSYSTM:00/device:00/PNP0A08:00/device:05/LNXVIDEO:01/device:06/thermal_cooling
/sys/devices/LNXSYSTM:00/device:28/LNXTHERM:00/thermal_zone
/sys/devices/LNXSYSTM:00/device:28/LNXTHERM:01/thermal_zone
/sys/bus/acpi/drivers/thermal
/sys/class/thermal
/sys/class/thermal/thermal_zone0
/sys/class/thermal/thermal_zone1
/sys/module/hwmon/holders/thermal_sys
/sys/module/thermal_sys
/sys/module/thermal_sys/holders/thermal
/sys/module/thermal
bash-4.1#

[EDIT]Generally speaking, as kernel evolve, more and more interfaces are found in /sys/ instead of /proc/.

rmjohnso 02-12-2011 01:08 PM

I can get most of the ACPI info from the sysfs, so I don't know why it's not showing up in /proc. Thanks for posting your config file, but I'm not able to really pinpoint what the main difference is.

Didier Spaier 02-12-2011 01:19 PM

If the info is available in /sys and userland programs are set up to get it from there, there is no need to put it in /proc in addition.

If I understand well, /sys could fully replace /proc some day.

Does you CPU get over heated, or is the fan triggered when temperature becomes too high? That is the question, practically speaking ;)

rmjohnso 02-12-2011 01:26 PM

I don't think anything is getting overheated, and I think the fans are working correctly. You are correct, that is my real question and concern. I know that /proc is pretty much deprecated, but there are a number of programs that look there first, like conky. Right now, I've got conky looking in /sys for things like the temperature, but I still have this nagging feeling that if /proc is not being populated correctly, something is misconfigured somewhere.

Didier Spaier 02-12-2011 01:36 PM

I use conky as well and had to change my .conkyrc after some kernel upgrades to keep up with moving layouts in /proc and/or /sys.

This is a recurrent integration problem: when you change a component of the system, more often than never there is a change in some interface which you have to keep up with in changing some other components as well. My guess is that the Slackware team is kept busy with that ;)

grissiom 02-12-2011 06:16 PM

The same here with 2.6.38-rc4 kernel:

Code:


% tree /proc/acpi
/proc/acpi
├── ac_adapter
│** └── AC
│**    └── state
├── battery
│** └── BAT0
│**    ├── alarm
│**    ├── info
│**    └── state
├── button
│** ├── lid
│** │** └── LID0
│** │**    ├── info
│** │**    └── state
│** ├── power
│** │** ├── PWRB
│** │** │** └── info
│** │** └── PWRF
│** │**    └── info
│** └── sleep
│**    └── SBTN
│**        └── info
├── event
└── wakeup

Anyway, it JustWorks(tm) ;)


All times are GMT -5. The time now is 01:40 AM.