Liquorix and tp_smapi
Hi,
I am trying the Liquorix kernel on Ubuntu 16.04 running on a Thinkpad X1 Carbon. I have tp-smapi dkms installed with the Ubuntu kernel, but I get some kind of message regarding that when installing Liquorix and the module is not present. Can someone clarify this for me? Back to top |
|||||
Do you have the liquorix kernel headers installed?
Sorry, but "some kind of message" isn't really enough to diagnose the problem. The exact message would be much more helpful. Back to top |
|||||
Hi,
Sorry for late response. Yes, I have the headers installed. Here's the content of the tp-smapi make log: DKMS make.log for tp-smapi-0.41 for kernel 4.6-4.dmz.2-liquorix-amd64 (x86_64) Fri Jul 22 16:19:42 EDT 2016 make: Entering directory '/usr/src/linux-headers-4.6-4.dmz.2-liquorix-amd64' LD /var/lib/dkms/tp-smapi/0.41/build/built-in.o CC [M] /var/lib/dkms/tp-smapi/0.41/build/thinkpad_ec.o In file included from include/linux/module.h:18:0, from /var/lib/dkms/tp-smapi/0.41/build/thinkpad_ec.c:33: /var/lib/dkms/tp-smapi/0.41/build/thinkpad_ec.c: In function ‘__check_force_io’: include/linux/moduleparam.h:344:67: error: return from incompatible pointer type [-Werror=incompatible-pointer-types] static inline type __always_unused *__check_##name(void) { return(p); } ^ include/linux/moduleparam.h:396:35: note: in expansion of macro ‘__param_check’ #define param_check_bool(name, p) __param_check(name, p, bool) ^ include/linux/moduleparam.h:146:2: note: in expansion of macro ‘param_check_bool’ param_check_##type(name, &(value)); \ ^ /var/lib/dkms/tp-smapi/0.41/build/thinkpad_ec.c:100:1: note: in expansion of macro ‘module_param_named’ module_param_named(force_io, force_io, bool, 0600); ^ cc1: some warnings being treated as errors scripts/Makefile.build:297: recipe for target '/var/lib/dkms/tp-smapi/0.41/build/thinkpad_ec.o' failed make[1]: *** [/var/lib/dkms/tp-smapi/0.41/build/thinkpad_ec.o] Error 1 Makefile:1446: recipe for target '_module_/var/lib/dkms/tp-smapi/0.41/build' failed make: *** [_module_/var/lib/dkms/tp-smapi/0.41/build] Error 2 make: Leaving directory '/usr/src/linux-headers-4.6-4.dmz.2-liquorix-amd64' Back to top |
|||||
dkms is designed to deliver matching drivers and kernels, you can't expect a kernel that is significantly different from the default stable ubuntu kernel to then work with the ubuntu driver package, the real solution to this is to install the drivers manually when you are faced with this situation, that's how you handle for example liquorix on ubuntu with nvidia drivers, you install the real nvidia drivers from nvidia, not the ubuntu packaged ones, which are only designed to work with the kernel they ship and support. That works as long as the latest driver supports the latest kernel, which can't be assumed, and doesn't always happen, sometimes there are month or more gaps before support happens. There's a reason frozen pool releases are shipped with things working against each other, and why they don't support officially adding newer kernels in particular.
dkms isn't a magic box, it simply tries to build modules against new kernels, but it only works when the kernel and driver/module are in synch, which they won't be with more advanced kernels than the old ones ubuntu included on release of the release/distro. basically if you want to use non distro kernels, you have to learn enough to support any extra kernel modules you may need yourself, or using 3rd party sources if anyone is packaging newer versions. I don't know anything about your modules, but I know a whole lot about nvidia/fglrx drivers, and I can tell you that only by pure chance will an old driver actually build on a new kernel in general, dkms can work if you are using the actual current live nvidia drivers, for example, which I think now support dkms, but only if it doesn't require patching of any sort, you can also inject patches into dkms but that's a headache, I skip it and use latest liquorix and direct downloaded nvidia, for example, and if you want to use dkms and dkms module package, then use the ubuntu packaged kernel and everything will 'just work'. Back to top |
|||||
Thank you so much for your clarification. I learned something. As a Linux user without any development skills things like DKMS is a bit up in the air as to how it is supposed to work since it appears in the distro as just another deb package to install. The reason I looked into this in the first place is that the 4.4 kernel in Ubuntu 16.04 has some issues on my particular laptop making it tempting to look for alternatives. I guess in my case I will have to choose between running without it, or learn how to get it to work with Liquorix.
Back to top |
|||||
learning how to solve a specific issue that is important to you is a great way to start increasing your understanding of the systems involved. That's how damentz started the liquorix project too, just scratching an itch, then following it up over years.
While I don't know anything about your specific module, basically what happens is that the source of the module will release at some schedule, hopefully, so you want to learn how well they track the mainline kernel, and their own release schedule, then you want to discover where you can either find a current module as a package, or how to build it yourself if sources for newer kernels are available. Usually with stuff like this someone else has had the same itch, so it's worth checking to make sure the stuff isn't already out there. sometimes if it's a built in driver, you can talk to damentz about including latest patches for that module, but that only applies to built in kernel modules, native to the linux kernel. Arch linux is a good place to find information on things like this because they are rolling release, so their kernels are always current, so there's probably someone in their project that will have information about your specific module issues. Back to top |
|||||
Checking on debian:
however, while debian testing/sid are somewhat rolling, they aren't necessarily at the same current kernel versions as liquorix is. So that's firmware, as you can see from apt-cache show. Usually firmware isn't that tightly linked to the kernel version from what I've seen, maybe I'm wrong. :: Code ::
apt-cache search smapi gkrellm-thinkbat - ThinkPad laptops battery status indicator for GKrellM hdapsd - HDAPS daemon for various laptops with motion sensors python-osmapi - Python interface to OpenStreetMap API python3-osmapi - Python 3 interface to OpenStreetMap API tlp - Save battery power on laptops tp-smapi-dkms - ThinkPad hardware/firmware access modules source - dkms version apt-cache policy tp-smapi-dkms tp-smapi-dkms: Installed: (none) Candidate: 0.42-1 Version table: 0.42-1 500 500 http://mirrors.kernel.org/debian unstable/main i386 Packages 200 http://mirrors.kernel.org/debian testing/main i386 Packages apt-cache show tp-smapi-dkms Package: tp-smapi-dkms Source: tp-smapi Version: 0.42-1 Installed-Size: 131 Maintainer: Evgeni Golov <evgeni@debian.org> Architecture: all Depends: dkms (>= 2.1.0.0) Description-en: ThinkPad hardware/firmware access modules source - dkms version The tp_smapi kernel module exposes some features of the ThinkPad hardware/firmware via a sysfs interface. Currently, the main implemented functionality is control of battery charging and extended battery status. The underlying hardware interfaces are SMAPI and direct access to the embedded controller. . This package also brings the source for an improved version of HDAPS which should work on newer ThinkPads too (the stock kernel version does not). . This package contains the source to be built with dkms. Description-md5: 133901af24ac2f7f85a04a1d2ebd202c Homepage: https://github.com/evgeni/tp_smapi/ Tag: admin::kernel, admin::power-management, hardware::laptop, hardware::power, implemented-in::c, role::source Section: kernel Priority: optional Filename: pool/main/t/tp-smapi/tp-smapi-dkms_0.42-1_all.deb Back to top |
|||||
Again, thank you for taking time looking into this. I would love to use Arch but I am stuck on Ubuntu because of some in-house software I have to run which is designed to run on Ubuntu. Anyhow, the tp-smapi module is designed to help with battery management on most Thinkpads which is what we use exclusively. I am just glad I am able to run Linux for work at all. I will study this a bit further and see if I can build the module from source, not something I do often but have had to do at times. On Ubuntu the deb installs on all Ubuntu kernels, also the mainline once which now are at 4.7. But not on Liquorix. I will make it work and thank you again for spending time on explaining it to someone who needs it bu the teaspoon! :)
Back to top |
|||||
So, I decided to take a look because I thought this post was odd. The tp_smapi module is already included and built:
:: Code :: $ grep 'TP_SMAPI' /boot/config-4.6-4.dmz.2-liquorix-amd64
CONFIG_TP_SMAPI=m And the commit: github.com/zen-kernel/zen-kernel/commit/36e48e88738759b9d99c95e6e41b14780e587815 Just purge the package from your system, TP_SMAPI should already be enabled. Back to top |
|||||
Thank you again. I purged tp_smapi and the battery management is as it was before. I am getting a couple of other error messages from the kernel when I boot:
Error parsing PCC from PCCT zswap: default zpool zbud not available zswap: post creation failed thinkpad_acpi: unknown version of the key interface: 0x200 thinkpad_acpi: please report this to ibm-acpi-devel@lists.sourceforge.net kvm: disabled by bios. Should I worry about any of these? Back to top |
|||||
All times are GMT - 8 Hours
|