Created attachment 280415 [details, diff] Patch to add current Sandy Bridge-based ThinkPads to the existing whitelist With the versions of app-laptop/tp_smapi available in Portage, the thinkpad_ec module refuses to load on newer Sandy Bridge-based ThinkPads. The Debian bug I've included in the URL field has more information, including some proposed patches; I've attached the whitelist-based patch (and an ebuild which uses it) to this bug, although it's unclear if this is the correct solution.
Created attachment 280417 [details] Modified version of latest ebuild which incorporates the above patch
I believe I have the answer to this. When I bought a ThinkPad T420, I was frustrated with this, so I googled and found a solution. I modified the sources of tp_smapi-0.40 by hand and now it works perfectly. Please consider adding it as an USE flag to tp_smapi. http://www.stud.fit.vutbr.cz/~xdokou10/tp_smapi-0.40_t420.tar.gz (In reply to comment #1) > Created attachment 280417 [details] > Modified version of latest ebuild which incorporates the above patch
(In reply to comment #2) > I believe I have the answer to this. > > When I bought a ThinkPad T420, I was frustrated with this, so I googled and > found a solution. I modified the sources of tp_smapi-0.40 by hand and now it > works perfectly. Please consider adding it as an USE flag to tp_smapi. > > http://www.stud.fit.vutbr.cz/~xdokou10/tp_smapi-0.40_t420.tar.gz Did you just add the 'TP_DMI_MATCH("IBM", "ThinkPad T420"),' line to the dmi_system_id tp_whitelist[] struct? The above patch does the same (well, it adds 'TP_DMI_MATCH("LENOVO", "ThinkPad T420"),', but this should be the right one anyway since Lenovo makes ThinkPads now), and does so at the ebuild level rather than modifying the source itself. Anyway, check out Bug #384735; a group of Debian folk have already created a forked source for tp_smapi with this (and all other) patches applied to it. I think Gentoo should move to that source, rather than apply patches that Debian is perfectly willing to share with us directly.
That's valid thought. I just want portage to be compatible with thinkpad sandy bridges. I've found this solution somewhere, don't know where. I remember modifying shared memory to semaphores, or something alike. Anyway I wanted to share tp_smapi, that works on my T420 (i5 sandy) (In reply to comment #3) > (In reply to comment #2) > > I believe I have the answer to this. > > > > When I bought a ThinkPad T420, I was frustrated with this, so I googled and > > found a solution. I modified the sources of tp_smapi-0.40 by hand and now it > > works perfectly. Please consider adding it as an USE flag to tp_smapi. > > > > http://www.stud.fit.vutbr.cz/~xdokou10/tp_smapi-0.40_t420.tar.gz > > Did you just add the 'TP_DMI_MATCH("IBM", "ThinkPad T420"),' line to the > dmi_system_id tp_whitelist[] struct? The above patch does the same (well, it > adds 'TP_DMI_MATCH("LENOVO", "ThinkPad T420"),', but this should be the right > one anyway since Lenovo makes ThinkPads now), and does so at the ebuild level > rather than modifying the source itself. Anyway, check out Bug #384735; a group > of Debian folk have already created a forked source for tp_smapi with this (and > all other) patches applied to it. I think Gentoo should move to that source, > rather than apply patches that Debian is perfectly willing to share with us > directly.
Now that I'm diffing those two folders in my /usr/src/tp_smapi I am not sure about the semaphore thing ... (In reply to comment #4) > That's valid thought. I just want portage to be compatible with thinkpad sandy > bridges. I've found this solution somewhere, don't know where. I remember > modifying shared memory to semaphores, or something alike. > > Anyway I wanted to share tp_smapi, that works on my T420 (i5 sandy) > > (In reply to comment #3) > > (In reply to comment #2) > > > I believe I have the answer to this. > > > > > > When I bought a ThinkPad T420, I was frustrated with this, so I googled and > > > found a solution. I modified the sources of tp_smapi-0.40 by hand and now it > > > works perfectly. Please consider adding it as an USE flag to tp_smapi. > > > > > > http://www.stud.fit.vutbr.cz/~xdokou10/tp_smapi-0.40_t420.tar.gz > > > > Did you just add the 'TP_DMI_MATCH("IBM", "ThinkPad T420"),' line to the > > dmi_system_id tp_whitelist[] struct? The above patch does the same (well, it > > adds 'TP_DMI_MATCH("LENOVO", "ThinkPad T420"),', but this should be the right > > one anyway since Lenovo makes ThinkPads now), and does so at the ebuild level > > rather than modifying the source itself. Anyway, check out Bug #384735; a group > > of Debian folk have already created a forked source for tp_smapi with this (and > > all other) patches applied to it. I think Gentoo should move to that source, > > rather than apply patches that Debian is perfectly willing to share with us > > directly.
Should be fixed in tp_smapi-0.41, reopen if needed.