Hello, I have a Lenovo Thinkpad Edge laptop with no support for tp_smapi whatsoever.
In Windows I can use an acceleration sensor to suspend HDD, also the battery management allows for thresholds and other nice stuff.
It got me thinking, can I reverse this driver and create an open source one for Linux?
The problem is I am not sure where do I begin, I read that thinkpads have an integrated controller responsible for those features, but I don't know how to access it.
It sure isn't on PCI or USB bus. When I do lm-sensors, it tells my there's a risk in probing my SMBUS or I2C ports, so I haven't tried that yet.
Perhaps someone with a Thinkpad Edge can give me some pointers? I am currently thinking of trying to disassemble the windows drivers for the HDD suspension first(there are two of them, all together 150 kb in size). If anyone can give some links to documentation or share his experiments I'd be grateful.
Thanks in advance.
I am not an expert regarding those subjects, however I can maybe give you some hint (I am trying to make the accelerometer work on my thinkpad yoga).
Concerning the batteries, take a look at the Arch Linux wiki, there is a workaround using tpacpi-bat.
Concerning the accelerometer, can you run
and look for an STMicroelectronics entry? If you have it I can give you extra information.
A thousand thanks for the tpacpi-bat. I am gonna try it soon and post results here. Not sure if it works for Thinkpad Edge or just normal Thinkpads.
As for the lsusb, I don't have such device. I am sure the accelerometer is on some strange bus, and the CPU probably talks to it by something like the out x86 instruction.
From what I have heard, the tp_smapi module doesn't play nice with most (if not all) of the new Thinkpads.
I have a Thinkpad Edge E430, but my solution was simply to stop using rotational drives...
Regarding the accelerometer, different thinkpads (at least yoga and helix) and ideapads(yoga 2 pro) have a sensor-hub from STMicroelectronics. The driver are in the linux kernel but unfortunately not shipped with the default archlinux kernel.
So I think the first thing you need to do is to retrieve the accelerometer name(It can be pretty tricky) then look if a kernel module exist and is loaded.
What is the result of lsusb and the exact name of your laptop?
Thinkpad Edge E430 it is, and I am sure my accel meter is not on USB.
lsusb Bus 004 Device 003: ID 05ca:1823 Ricoh Co., Ltd Bus 004 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 005: ID 147e:1002 Upek Biometric Touchchip/Touchstrip Fingerprint Sensor Bus 001 Device 004: ID 0a5c:21f4 Broadcom Corp. Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub lspci: 00:00.0 Host bridge: Intel Corporation 3rd Gen Core processor DRAM Controller (rev 09) 00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor PCI Express Root Port (rev 09) 00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09) 00:14.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller (rev 04) 00:16.0 Communication controller: Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 (rev 04) 00:1a.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 (rev 04) 00:1b.0 Audio device: Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller (rev 04) 00:1c.0 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 1 (rev c4) 00:1c.1 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 2 (rev c4) 00:1c.2 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 3 (rev c4) 00:1c.3 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 4 (rev c4) 00:1d.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1 (rev 04) 00:1f.0 ISA bridge: Intel Corporation HM77 Express Chipset LPC Controller (rev 04) 00:1f.2 SATA controller: Intel Corporation 7 Series Chipset Family 6-port SATA Controller [AHCI mode] (rev 04) 00:1f.3 SMBus: Intel Corporation 7 Series/C210 Series Chipset Family SMBus Controller (rev 04) 01:00.0 VGA compatible controller: NVIDIA Corporation GF108M [GeForce GT 635M] (rev ff) 02:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5229 PCI Express Card Reader (rev 01) 03:00.0 Network controller: Broadcom Corporation BCM4313 802.11bgn Wireless Network Adapter (rev 01) 0c:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 07)
As for not using rotational drives - well SSD are pricey for storage, I am thinking of getting a 128GB Sandisk one instead of my optical drive, but I still want to keep the 500 GB HDD, so I can use it for storage. Still I can just mount the HDD only when I need the storage on it, and otherwise hdparm it.