LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Laptop and Netbook (https://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/)
-   -   acpi nearly working IBM thinkpad R40e 2684HVG no Fn key working, throttling OK (https://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/acpi-nearly-working-ibm-thinkpad-r40e-2684hvg-no-fn-key-working-throttling-ok-449647/)

Emmanuel_uk 05-29-2006 01:17 PM

acpi nearly working IBM thinkpad R40e 2684HVG no Fn key working, throttling OK
 
Nearly there, with ACPI partly working, but
1) cannot get any of the Fn key combination to work
2) SOLVED cannot wake from Hibernate (reddish screen+freeze) SOLVED
3) I can suspend (moon will light) but cannot wake up laptop.
4) sound up/down and mute, and contrast not working
5) kmilo-thinkpad does not recognise any special key (acpi=on, works partly when acpi=ht)

Any pointers appreciated. Spent hours and hours to reach this stage.
I know about http://www.thinkwiki.org/ but still strugling
gentoo 2.6.3 + disabling power management http://pc.freeshell.org/tp/
Also http://unixhead.org/docs/thinkpad/2....management.txt
The link below advocates patching ati-agp
http://unixhead.org/docs/thinkpad/suspend.html

Hereafter configuration details and how I got some of it to work,
(seeing that most people have serious problems with ACPI, it might help some.) It also documents everything in one place, instead of 3 or 4 incomplete threads in LQ

IBM Thinkpad R40e model 2684 HVG, Radeon IGP 330M/340M/350M
one pcmcia wirelesscard working with ndiswrapper 1.10
Bios version: 1SET56WW (1.24 ) (12/09/2003)
This an ACPI enabled laptop. There is no APM.
Mobile Intel(R) Celeron(R) CPU 2.00GHz

Linux-2.6.12-22mdk (Mandy 2006 may 2006 kernel home compiled / taylored)
ibm_acpi: IBM ThinkPad ACPI Extras v0.11 (instead of 0.8 that was with kernel)

acpi=ht contrast and sound buttons working, nothing else (by definition)
with acpi=on, here is what "works"
- laptop will boot (no distro I tried could do that)
- Klaptop will display battery icone, 5 performance profiles available,
throttling of cpu possible, menus for Lock and suspend, suspend, lock and hibernate,
hibernate
-temperatures can be accessed
-suspend to disk works in single mode (echo disk>/sys/power/state)
-suspend to disk now works with X (problem 2 solved)
but I have the 4 acpi issues listed at the top of the post

To get there, I patched drivers/acpi/processor_idle.c with
http://bugzilla.kernel.org/attachmen...87&action=view
chmod 666 /dev/nvram
I taylored the kernel (see toward the end) and compiled it.
I used ibm-acpi-0.11 http://prdownloads.sourceforge.net/i...ar.gz?download
that is make && make install once the kernel was compiled
Kmilo and Klaptop are installed.
To get hibernate to work, I patched ati-agp http://unixhead.org/docs/thinkpad/suspend.html
from within /usr/src/linux
rm drivers/char/agp/*.o
rm drivers/char/agp/*.ko
make SUBDIRS=drivers/char/agp
make modules_install
(with this method no need to recompile the whole kernel :)
and I modified very slightly the bash script (above link) (to be posted soon) that
remove some of the modules from the kernel.
(alsa, eth0, wlan0, ndiswrapper etc before suspending to disk)


Also "on Radeon graphics there is a known issue with the X driver:
it configures the video card in a way which prevents Fn-F7 from working."
"There's now a patch for the X.org Radeon driver which
addresses this issue. Some people are reporting success with the patch
while others are still having problems. For more information:"
https://bugs.freedesktop.org/show_bug.cgi?id=2000

So far I did not try the patch, but I read the thread, and I inserted
BIOSHotkeysBIOSHotkeys in xorg.conf
# cat /etc/X11/xorg.conf | grep Hot
Option "BIOSHotkeys" "on"
# cat /var/log/Xorg.0.log | grep Hot
(**) RADEON(0): Option "BIOSHotkeys" "on"
(II) RADEON(0): BIOS HotKeys Enabled

# lsmod | grep -iE 'proces|fan|clock|but|cpu|ibm'
Code:

cpufreq_ondemand        5148  0
cpufreq_conservative    6180  0
cpufreq_powersave      1536  0
cpufreq_performance    1664  1
p4_clockmod            3848  0
speedstep_lib          3200  1 p4_clockmod
freq_table              3588  1 p4_clockmod
processor              18620  1 thermal
fan                    3460  0
button                  5136  0

Cannot see ibm_acpi there, cannot load it either
# modprobe ibm_acpi
FATAL: Error inserting ibm_acpi (/lib/modules/2.6.12-22mdkcustom/acpi/ibm_acpi.ko): No such device (syslog says:
ibm_acpi: IBM ThinkPad ACPI Extras v0.11
ibm_acpi: http://ibm-acpi.sf.net/
ibm_acpi: acpi_install_notify_handler(hotkey) failed: 7

# ls -l /lib/modules/2.6.12-22mdkcustom/acpi/ibm*
-rw-r--r-- 1 root root 37637 May 29 12:18 /lib/modules/2.6.12-22mdkcustom/acpi/ibm_acpi.ko
But strangely it must be there because
# cat /proc/acpi/ibm/thermal
temperatures: 60 53 0 0 0 0 0 0

# service -s | grep -iE 'laptop|cpufr|acpi'
Code:

acpid (pid 3613) is running...
cpufreqd (pid 4513) is running...
Laptop mode status:
(NOTE: drive settings affected by Laptop Mode cannot be retrieved.)
Laptop Mode is allowed to run: /var/lock/subsys/laptop-mode exists.
/proc/sys/vm/laptop_mode:
/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq:
/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq:
/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq:
/proc/acpi/button/lid/LID/state:
/proc/acpi/ac_adapter/AC/state:
/proc/acpi/battery/BAT0/state:


kmilo is enabled but does not list any of the function key, and
the thinkpad button aka "access ibm" blue button does not work.
I have just learned that Kmilo is a port of "ThinkPad Buttons" utility, see http://www.nongnu.org/tpb/
I compiled this ok, but do not see any OSD display or anything.
I tried anyway, but the R40e is not listed for this software.

However, when using acpi=ht Kmilo must be working because I get at least these OSD messages
- volume up/down
- volume mute
- brightness up/down
- thinkpad light on/off (although I cannot see any difference)


TO DO list
I will keep trying with Kmilo (and xev) and see if the sound keys can be mapped to kde. xev returns 0x0 for Fn (acpi=on) and does not capture any of the Fn+Fkey.
Cannot find yet if I need some xorg or radeon patches

maybe TO DO list
update bios
I cannot understand the syntax for the new HOTKEY_CONFIG in newer kernels.

$ dmesg | grep ACPI
Code:

BIOS-e820: 000000000ef70000 - 000000000ef7b000 (ACPI data)
 BIOS-e820: 000000000ef7b000 - 000000000ef7d000 (ACPI NVS)
ACPI: RSDP (v002 IBM                                  ) @ 0x000f6d90
ACPI: XSDT (v001 IBM    TP-1S    0x00001240  LTP 0x00000000) @ 0x0ef74a3b
ACPI: FADT (v003 IBM    TP-1S    0x00001240 IBM  0x00000001) @ 0x0ef74b00
ACPI: SSDT (v001 IBM    TP-1S    0x00001240 MSFT 0x0100000e) @ 0x0ef74cb4
ACPI: ECDT (v001 IBM    TP-1S    0x00001240 IBM  0x00000001) @ 0x0ef7ae89
ACPI: BOOT (v001 IBM    TP-1S    0x00001240  LTP 0x00000001) @ 0x0ef7afd8
ACPI: DSDT (v001 IBM    TP-1S    0x00001240 MSFT 0x0100000e) @ 0x00000000
ACPI: PM-Timer IO Port: 0x8008
ACPI: setting ELCR to 0200 (from 0c20)
ACPI: Subsystem revision 20050309
ACPI: Found ECDT
ACPI: Interpreter enabled
ACPI: Using PIC for interrupt routing
ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 7 10 *11)
ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 6 7 10 *11)
ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 5 6 7 10 *11)
ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 5 6 7 10 11) *0, disabled.
ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 5 6 7 10 11) *0, disabled.
ACPI: PCI Interrupt Link [LNKG] (IRQs 3 4 5 6 7 10 *11)
ACPI: PCI Interrupt Link [LNKH] (IRQs 3 4 *5 6 7 10 11)
ACPI: PCI Interrupt Link [LNKI] (IRQs 3 4 5 6 7 *10 11)
ACPI: PCI Root Bridge [PCI0] (0000:00)
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
ACPI: Embedded Controller [EC] (gpe 2)
ACPI: Power Resource [PUBS] (on)
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.AGP_._PRT]
pnp: PnP ACPI init
pnp: PnP ACPI: found 10 devices
PCI: Using ACPI for IRQ routing
ibm_acpi: IBM ThinkPad ACPI Extras v0.11
ACPI: PCI Interrupt 0000:00:0f.0[A]: no GSI
ACPI wakeup devices:
ACPI: (supports S0 S3 S4 S5)
ACPI: PCI Interrupt Link [LNKI] enabled at IRQ 10
ACPI: PCI Interrupt 0000:00:02.0[A] -> Link [LNKI] -> GSI 10 (level, low) -> IRQ 10
ACPI: AC Adapter [AC] (on-line)
ACPI: Power Button (FF) [PWRF]
ACPI: Lid Switch [LID]
ACPI: Sleep Button (CM) [SLPB]
ACPI: IBM ThinkPad R40e detected - C2,C3 disabled. Override with "processor.max_cstate=9"
ACPI: processor limited to max C-state 1
ACPI: CPU0 (power states: C1[C1] C2[C2] C3[C3])
ACPI: Processor [CPU] (supports 8 throttling states)
ACPI: Thermal Zone [THM0] (27 C)
ACPI: Video Device [VID] (multi-head: yes  rom: no  post: no)
ACPI: PCI Interrupt Link [LNKB] enabled at IRQ 11
ACPI: PCI Interrupt 0000:00:0c.0[A] -> Link [LNKB] -> GSI 11 (level, low) -> IRQ 11
ACPI: PCI Interrupt Link [LNKC] enabled at IRQ 11
ACPI: PCI Interrupt 0000:00:0b.0[A] -> Link [LNKC] -> GSI 11 (level, low) -> IRQ 11
ACPI: PCI Interrupt 0000:02:00.0[A] -> Link [LNKB] -> GSI 11 (level, low) -> IRQ 11
ACPI: PCI Interrupt Link [LNKH] enabled at IRQ 5
ACPI: PCI Interrupt 0000:00:04.0[A] -> Link [LNKH] -> GSI 5 (level, low) -> IRQ 5
ACPI: PCI Interrupt Link [LNKA] enabled at IRQ 11
ACPI: PCI Interrupt 0000:01:05.0[A] -> Link [LNKA] -> GSI 11 (level, low) -> IRQ 11

PCI: If a device doesn't work, try "pci=routeirq".  If it helps, post a report
--
ALI15X3: IDE controller at PCI slot 0000:00:0f.0
ACPI: PCI Interrupt 0000:00:0f.0[A]: no GSI
ALI15X3: chipset revision 196
--
ohci_hcd: 2004 Nov 08 USB 1.1 'Open' Host Controller (OHCI) Driver (PCI)
ACPI: PCI Interrupt Link [LNKI] enabled at IRQ 10
PCI: setting IRQ 10 as level-triggered
ACPI: PCI Interrupt 0000:00:02.0[A] -> Link [LNKI] -> GSI 10 (level, low) -> IRQ 10
ohci_hcd 0000:00:02.0: OHCI Host Controller
--
ACPI: PCI Interrupt Link [LNKB] enabled at IRQ 11
PCI: setting IRQ 11 as level-triggered
ACPI: PCI Interrupt 0000:00:0c.0[A] -> Link [LNKB] -> GSI 11 (level, low) -> IRQ 11
Yenta: CardBus bridge found at 0000:00:0c.0 [1014:0528]
--
tg3.c:v3.31 (June 8, 2005)
ACPI: PCI Interrupt Link [LNKC] enabled at IRQ 11
ACPI: PCI Interrupt 0000:00:0b.0[A] -> Link [LNKC] -> GSI 11 (level, low) -> IRQ 11
eth0: Tigon3 [partno(BCM95901A50) rev 3001 PHY(5705)] (PCI:33MHz:32-bit) 10/100BaseT Ethernet 00:06:1b:df:9b:38
--
PCI: Enabling device 0000:02:00.0 (0000 -> 0002)
ACPI: PCI Interrupt 0000:02:00.0[A] -> Link [LNKB] -> GSI 11 (level, low) -> IRQ 11
PCI: Setting latency timer of device 0000:02:00.0 to 64
--
IFWLOG: register target
ACPI: PCI Interrupt Link [LNKH] enabled at IRQ 5
PCI: setting IRQ 5 as level-triggered
ACPI: PCI Interrupt 0000:00:04.0[A] -> Link [LNKH] -> GSI 5 (level, low) -> IRQ 5
AC'97 1 does not respond - RESET
--
[drm] Initialized drm 1.0.0 20040925
ACPI: PCI Interrupt Link [LNKA] enabled at IRQ 11
ACPI: PCI Interrupt 0000:01:05.0[A] -> Link [LNKA] -> GSI 11 (level, low) -> IRQ 11
[drm] Initialized radeon 1.17.0 20050311 on minor 0:

Code:

# Power management options (ACPI, APM)
#
CONFIG_PM=y
CONFIG_PM_DEBUG=y
CONFIG_SOFTWARE_SUSPEND=y
CONFIG_PM_STD_PARTITION=""

#
# ACPI (Advanced Configuration and Power Interface) Support
#
CONFIG_ACPI=y
CONFIG_ACPI_BOOT=y
CONFIG_ACPI_INTERPRETER=y
CONFIG_ACPI_SLEEP=y
CONFIG_ACPI_SLEEP_PROC_FS=y
CONFIG_ACPI_AC=m
CONFIG_ACPI_BATTERY=y
CONFIG_ACPI_BUTTON=m
CONFIG_ACPI_VIDEO=m
CONFIG_ACPI_FAN=m
CONFIG_ACPI_PROCESSOR=m
CONFIG_ACPI_THERMAL=m
# CONFIG_ACPI_ASUS is not set
CONFIG_ACPI_IBM=y
# CONFIG_ACPI_TOSHIBA is not set
# CONFIG_ACPI_CUSTOM_DSDT is not set
# CONFIG_ACPI_CUSTOM_DSDT_INITRD is not set
CONFIG_ACPI_BLACKLIST_YEAR=0
# CONFIG_ACPI_DEBUG is not set
CONFIG_ACPI_BUS=y
CONFIG_ACPI_EC=y
CONFIG_ACPI_POWER=y
CONFIG_ACPI_PCI=y
CONFIG_ACPI_SYSTEM=y
CONFIG_X86_PM_TIMER=y
# CONFIG_ACPI_CONTAINER is not set
# CONFIG_ACPI_TC1100 is not set

#
# APM (Advanced Power Management) BIOS Support
#
CONFIG_APM=y
# CONFIG_APM_IGNORE_USER_SUSPEND is not set
# CONFIG_APM_DO_ENABLE is not set
# CONFIG_APM_CPU_IDLE is not set
# CONFIG_APM_DISPLAY_BLANK is not set
CONFIG_APM_RTC_IS_GMT=y
# CONFIG_APM_ALLOW_INTS is not set
# CONFIG_APM_REAL_MODE_POWER_OFF is not set

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

#
# CPUFreq processor drivers
#
CONFIG_X86_ACPI_CPUFREQ=m
# CONFIG_X86_POWERNOW_K6 is not set
# CONFIG_X86_POWERNOW_K7 is not set
# CONFIG_X86_POWERNOW_K8 is not set
# CONFIG_X86_GX_SUSPMOD is not set
CONFIG_X86_SPEEDSTEP_CENTRINO=m
CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI=y
CONFIG_X86_SPEEDSTEP_CENTRINO_TABLE=y
# CONFIG_X86_SPEEDSTEP_ICH is not set
# CONFIG_X86_SPEEDSTEP_SMI is not set
CONFIG_X86_P4_CLOCKMOD=m
# CONFIG_X86_CPUFREQ_NFORCE2 is not set
# CONFIG_X86_LONGRUN is not set
# CONFIG_X86_LONGHAUL is not set

#
# shared options
#
# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set
CONFIG_X86_SPEEDSTEP_LIB=m


rshaw 05-30-2006 10:23 PM

the r40e has no clue about apm, disable that the next time you compile. your bios version is seriously old, 1set70ww (11\15\2005) is the latest. if you flash the bios remember to edit processor_idle.c to reflect the new version (change 1set56ww to 1set70ww and save. this will stop acpi from trying to go to levels c2 and c3, which the r40e can't do.

Emmanuel_uk 05-31-2006 01:41 AM

The hibernate in graphics mode now works (have edited my previous post to explain how)

rshaw thanks for your clues. I know the bios is old, but as I "wipped the Zindows partition", and have no floppy drive, I can only upgrade the bios by using the boot CD method from thinwiki. I have made a CD iso,
but I am not ready to make a door-stop yet. In the past, when I looked at the bios update log, I could
not find any clues about whether my acpi problems were related to the oldish bios.

I have not seen a thinkpad bios update method using a small fat32 bootable partition with freedos...
Most of the utilities for this thinkpad bios update are XP, so I did not pursue. Can they be unzipped/unshielded, and ran from some sort of dos partition? (I have kept a small fat32 partition - I could grub chain load/boot it)

Will remove apm from the kernel, as per your advice (was not sure whether some of it was needed to get good
working of acpi).

When most of this works, it might be worth submitting to the acpi howto (I read quite a bit of it, and
there is a small R40e section/heading)


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