Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 375697 - app-laptop/tp_smapi doesn't work on Sandy Bridge-based ThinkPads
Summary: app-laptop/tp_smapi doesn't work on Sandy Bridge-based ThinkPads
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Mobile Herd (OBSOLETE)
URL: http://bugs.debian.org/cgi-bin/bugrep...
Whiteboard:
Keywords: InVCS
Depends on: 384735
Blocks:
  Show dependency tree
 
Reported: 2011-07-19 22:47 UTC by Randall Wald
Modified: 2011-12-20 02:59 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to add current Sandy Bridge-based ThinkPads to the existing whitelist (sandy_bridge_thinkpad_ec.patch,671 bytes, patch)
2011-07-19 22:47 UTC, Randall Wald
Details | Diff
Modified version of latest ebuild which incorporates the above patch (tp_smapi-0.40-r4.ebuild,1.67 KB, text/plain)
2011-07-19 22:48 UTC, Randall Wald
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Randall Wald 2011-07-19 22:47:53 UTC
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.
Comment 1 Randall Wald 2011-07-19 22:48:40 UTC
Created attachment 280417 [details]
Modified version of latest ebuild which incorporates the above patch
Comment 2 Jiří Dokoupil 2011-10-22 09:36:27 UTC
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
Comment 3 Randall Wald 2011-10-22 09:44:42 UTC
(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.
Comment 4 Jiří Dokoupil 2011-10-22 11:07:31 UTC
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.
Comment 5 Jiří Dokoupil 2011-10-22 11:15:28 UTC
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.
Comment 6 Christoph Junghans (RETIRED) gentoo-dev 2011-12-20 02:59:18 UTC
Should be fixed in tp_smapi-0.41, reopen if needed.