You are not logged in.

#1 2018-12-17 18:37:30

ohm
Member
From: Germany
Registered: 2016-08-29
Posts: 16

Thinkpad X220: linux-ck-sandybridge, tp_smapi

Hello there,

I have just installed the pre-compiled kernel for the sandybridge generation of CPUs.
As I wanted to keep using charge thresholds for the battery, I needed tp_smapi.
The Wiki suggests installing tp_smapi-ck https://wiki.archlinux.org/index.php/tp_smapi which appears to
be flagged out-of-date for more than 2 years.
Any directions you can point me to or is there no further way to get charge thresholds working?

Thanks for reading

Last edited by ohm (2018-12-17 18:40:17)

Offline

#2 2018-12-17 19:29:41

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 9,741
Website

Re: Thinkpad X220: linux-ck-sandybridge, tp_smapi

You'll need the -ck-sandybridge-headers and a functional PKGBUILD for tp_smapi... I brought the AUR version in sync with the one in [community] ... does it work for you?


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#3 2018-12-19 14:16:21

ohm
Member
From: Germany
Registered: 2016-08-29
Posts: 16

Re: Thinkpad X220: linux-ck-sandybridge, tp_smapi

Thanks for the immediate actions you took!
I booted into the CK-Kernel again, but it seems I am missing some folders/files/packages or there is a typo/other error in the build file:
https://aur.archlinux.org/packages/tp_smapi-ck/#news

pacman -Qs linux-ck
ocal/linux-ck-sandybridge 4.19.10-1 (ck-sandybridge)
    The Linux-ck-sandybridge kernel and modules with the ck1 patchset featuring MuQSS CPU scheduler v0.180 Second Gen Intel Core i3/i5/i7 optimized.
local/linux-ck-sandybridge-headers 4.19.10-1 (ck-sandybridge)
    Header files and scripts for building modules for Linux-ck-sandybridge kernel Second Gen Intel Core i3/i5/i7 optimized.

Last edited by ohm (2018-12-19 14:28:16)

Offline

#4 2018-12-19 14:22:11

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 9,741
Website

Re: Thinkpad X220: linux-ck-sandybridge, tp_smapi

Not sure what you mean... the error you posted in the AUR shows that you're building with an AUR helper... AUR helpers rarely help.  Builds fine with makepkg.

Last edited by graysky (2018-12-19 14:22:29)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#5 2018-12-19 14:34:05

ohm
Member
From: Germany
Registered: 2016-08-29
Posts: 16

Re: Thinkpad X220: linux-ck-sandybridge, tp_smapi

this is what I have tried now:

cloning into my build dir, then

makepkg
==> Making package: tp_smapi-ck 0.43-1 (Wed 19 Dec 2018 03:30:40 PM CET)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Cloning tp_smapi git repo...
Cloning into bare repository '/home/jni/Build/tp_smapi-ck/tp_smapi-ck/tp_smapi'...
remote: Enumerating objects: 368, done.
remote: Total 368 (delta 0), reused 0 (delta 0), pack-reused 368
Receiving objects: 100% (368/368), 159.83 KiB | 406.00 KiB/s, done.
Resolving deltas: 100% (238/238), done.
==> Validating source files with sha256sums...
    tp_smapi ... Skipped
==> Extracting sources...
  -> Creating working copy of tp_smapi git repo...
Cloning into 'tp_smapi'...
done.
Switched to a new branch 'makepkg'
==> Starting pkgver()...
==> Starting build()...
/home/jni/Build/tp_smapi-ck/tp_smapi-ck/PKGBUILD: line 37: /usr/lib/modules/extramodules-ck/version: No such file or directory
make: *** No rule to make target '/lib/modules//build', needed by 'modules'.  Stop.
==> ERROR: A failure occurred in build().
    Aborting...

maybe I'm doing something seriously wrong,,,

EDIT: I made changes to the PKGBUILD:

 _extradir=/usr/lib/modules/extramodules-ck

to

 _extradir=/usr/lib/modules/extramodules-ck-sandybridge

and it builds without errors

Last edited by ohm (2018-12-19 14:45:20)

Offline

#6 2018-12-19 14:56:42

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 9,741
Website

Re: Thinkpad X220: linux-ck-sandybridge, tp_smapi

Yes... you'll need to adjust the variable for your specific kernel.  I don't know of an automatic way to do that without making assumptions.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#7 2018-12-19 15:40:11

ohm
Member
From: Germany
Registered: 2016-08-29
Posts: 16

Re: Thinkpad X220: linux-ck-sandybridge, tp_smapi

So now it builds and installs, but I expected from the Wiki:
https://wiki.archlinux.org/index.php/tp_smapi
Quote: "After a reboot, tp_smapi and its dependencies will get autoloaded and the sysfs-interface under /sys/devices/platform/smapi should be fully functional."

/sys/devices/platform/ sees no smapi folder ...

Offline

#8 2018-12-19 16:42:45

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 9,741
Website

Re: Thinkpad X220: linux-ck-sandybridge, tp_smapi

I have no experience with it or with the info on that wiki page... the PKGBUILD provides a file to have the modprobe at least load the module (echo tp_smapi | install -Dm644 /dev/stdin "$pkgdir/usr/lib/modules-load.d/$pkgname.conf") ... do you see it in the output of lsmod?  Beyond that, I do not know.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#9 2018-12-27 16:08:15

ohm
Member
From: Germany
Registered: 2016-08-29
Posts: 16

Re: Thinkpad X220: linux-ck-sandybridge, tp_smapi

I decided to set charge thresholds using the default kernel which still works fine. Maybe I will try the suggested way but as I dont know much about
these things either I fear to get trapped eventually in a situation I can no longer handle. So for now I live with this "workaround".

Last edited by ohm (2018-12-27 18:16:15)

Offline

Board footer

Powered by FluxBB