Hi all, can somebody please help me with getting tp_smapi installed on my Lenovo W500?
I’m running openSuse 11.1 64bit with the latest kernel (22.214.171.124-0.1-default).
kernel packages installed are:
I downloaded the following tp_smapi ‘1-click install’ files from the ‘Get Software from the openSUSE Build Service’ page:
and all but ‘tp_smapi-kmp-pae.ymp’ and ‘tp_smapi-kmp-vmi.ymp’ install without a hitch.
the error i get attempting to install ‘tp_smapi-kmp-pae.ymp’ is:
tp_smapi-kmp-pae-0.40_126.96.36.199_0.1-3.3.i586 requires kernel(pae:vmlinux) = c09f3231809d6359, but this requirement cannot be provided.
uninstallable providers: kernel-pae-base-188.8.131.52-3.2.1.i586[repo-update]
the error i get attempting to install ‘tp_smapi-kmp-vmi.ymp’ is:
nothing provides kernel(vmi:fs_sysfs) = 18761150f411070e needed by tp_smapi-kmp-vmi-0.40_184.108.40.206_0.1-3.3.i586
I’m fairly new to linux but i managed to get ati’s fglrx running after a few attempts so i don’t think i’m completely stupid :sarcastic:
is the issue with ‘tp_smapi-kmp-pae.ymp’ and ‘tp_smapi-kmp-vmi.ymp’ the fact that they’re for i586 and not x86_64?
(i notice there’s no x86_64 rpm files available for tp_smapi-kmp-pae or tp_smapi-kmp-vmi) or am I missing other dependencies?
According to its name, “tp_smapi-kmp-pae.ymp” seems to be for the “pae” kernel, that only exists in the 32 bit distribution. You say that you are using “default”, so you would not need that package.
Not sure about the “vmi” package, probably the same thing.
“xen” and “trace” also refer to other kernels, but in this case they are available in 64 bit, so you probably have just installed them (you will see the option to start them in grub at boot time).
so it may be that i don’t need to install tp_smapi-kmp-pae.ymp & tp_smapi-kmp-vmi.ymp since i’m using 64 bit?
the reason i thought they must need to be installed is because
none of the tp_smapi-* files installed so far have created the smapi directory in /sys/devices/platform/ (referred to in the tp_smapi ThinkWiki)
If you download the .rpm packages, you can look at their contents with the following command:
rpm -qp package.rpm -l
I have found these:
oscar@seafire:~> rpm -qp tp_smapi-kmp-pae-0.40_220.127.116.11_0.1-3.3.i586.rpm -l
oscar@seafire:~> rpm -qp tp_smapi-kmp-vmi-0.40_18.104.22.168_0.1-3.3.i586.rpm -l
Therefore, they are modules for various kernels.
I think that the “/sys” filesystem is like “/proc”, a virtual fs to access system data. Therefore your /sys/devices/platform/smapi should appear when the kernel loads the module.
If it is correcly intalled, it will probably do it in the next boot. To load it manually, execute: "modprobe " (without the “.ko”). There are three of them: hdaps, thinkpad_ec and tp_smapi…
To see whether they have been loaded, execute:
Many thanks for your time and explanations.
I didn’t know there were so many different varieties of the kernel so I guess I have no doubt installed packages that were not necessary. And I didn’t know about being able to display the contents of rpm files.
The Wiki did mention the modprobe command but I thought something was wrong due to the missing smapi directory. Maybe it is created after the modprobe command is executed. I’ll give it a go and post the results.
Many thanks again,
Hi again Oscar,
Everything you said was 100% spot on! Thank you.
I had not noticed the Grub options for booting into the other (mistakenly installed) kernel versions because I have a multiboot system. But when I checked /boot/grub/menu.lst in OpenSuse, sure enough, the debug, xen and trace kernels were listed too.
So I used Yast Software Manager to remove the unwanted tp_smapi kernel versions and then removed the unwanted kernel versions.
resulted in showing that none of the modules were loaded.
resulted in error
“thinkpad_ec: cannot claim io ports 0x1600-0x161f”
(as detailed in the tp_smapi wiki due to T400 & T500 machines needing FORCE_IO=1).
after a bit more reading of the wiki and other pages (and some lucky guesswork) I added line “options thinkpad_ec force_io=1” (without the quotes) to file modprobe.conf.local in directory /etc
now resulted in no errors
displayed the following:
tp_smapi 26832 0
thinkpad_ec 7664 1 tp_smapi
and sure enough …the smapi directory appeared in sys/devices/platform
so thanks to you I’ve managed to make substantial progress.
my next step is to figure out how to have the tp_smapi loaded automatically at bootup, and then edit the start/stop battery charge %ages.
Many thanks for your help. I would not have gotten this far without your help.
Hi Oscar, I got it sorted <:)
to autoload the tp_smapi module on boot I changed the following line in file /etc/sysconfig
and to set the start and stop battery charge %age thresholds to 40% and 90% respectively, i used the following commands (which are remembered after reboot):
echo 40 > /sys/devices/platform/smapi/BAT0/start_charge_thresh
echo 95 > /sys/devices/platform/smapi/BAT0/stop_charge_thresh
I’m going to use Acronis to restore OpenSuse back to it’s config before my meddling and perform a step-by-step install of tp_smapi from scratch so that i may post step-by-step instructions for other ThinkPad users.
For anyone who stumbles upon this thread, I’ve posted a new thread detailing a step-by-step guide on how I got tp_smapi installed on a Thinkpad W500 running openSuse 11.1.
tp_smapi on Lenovo Thinkpad T400/T500/W500 (step-by-step) - openSUSE Forums
Hi, Mark. I’m glad to read that you worked it out.