23 April 2007

HOWTO: Texas Instruments SD/MMC card reader

This is only for Feisty. It is not for Gutsy. It is not even for a fully up-to-date Gutsy. It was needed for about 2 weeks after Feisty's release, and then Ubuntu sent out a kernel update that changed exactly what this changes.

Do you have a Texas Instruments SD card reader on your laptop? Having trouble getting it working? Here's how (should be distro-agnostic):

  • Dapper: sorry, no support. Upgrade to Edgy or Feisty, or try using the Feisty method (let me know if it works).If the Feisty way doesn't work, maybe I'll download the 2.6.15 sources and see if I can find out what's missing to make it work on Dapper, but I don't have a Dapper box to test with.
  • Edgy: The modules for the card reader aren't loading. gksudo gedit /etc/modules Add to that file:
    Save it, and on next reboot it will work fine. To get it working right now:
    sudo modprobe tifm_7xx1
    sudo modprobe tifm_core
    sudo modprobe tifm_sd
  • Feisty: The 2.6.20 kernel is lacking proper TI modules (version 0.7). I was going to say:
    Compile the good tifm modules (version 0.8)yourself. Packages are not yet available (and I'm sorry, but I do not know how to package them myself).
    but I figured I could make it easier. There's still compiling involved, but it'll be painless.

    John Dong said I should mention that I don't know yet how this will effect (if it does at all) kernel updates. I don't believe full kernel updates will be affected at all since the files are only in the current kernel, however if tifm is updated through the update manager (without a kernel update), I don't know what will happen. If you see a tifm update on the update manager, you should probably run the uninstall script before updating.

    If you haven't compiled anything before: sudo aptitude install build-essential linux-headers-`uname -r` You will need to download my TIFM installer. Save that installer file somewhere (Desktop works) and extract it or use the "Archive Manager" to extract it immediately. There's a readme, but I'll tell you what to do anyway (note, I'm sure the terminal way works, I didn't test the GUI way, so if it doesn't ask for your password or it doesn't do anything after asking for your password, try the terminal way).

    • GUI way: Right click on install.sh. Go to properties > permissions and check off "execute". Double click on install.sh. Choose "run in terminal."
    • Terminal way: If you saved and extracted to your Desktop (if not, cd to wherever you saved it),
      cd ~/Desktop<
      sudo chmod +x install.sh
    It should now run, copy files, compile, etc. At the end of that, you should have a working card reader. Please let me know if this doesn't work for you so I can modify it. Ubuntu did not include some of the necessary files by default in the kernel (part of what the script does is fix that), and I doubt that kernel updates will include those files either. As such, you will probably need to run this script after each kernel update.

If you have an XD, MS, or SM card, it won't work because those drivers have yet to be written. Sorry.


Anonymous said...

Thanks for the tip. I upgraded to feisty a few days ago and after an update tonight I was getting continuous error messages on the console. I now have an sd icon on the desktop!

Anonymous said...

I ran the TIFM script and still couldn't mount the SD card. Then I tried a reboot, and behold, all is well! Thank you to MACOGW for the script.

Jorge Carlos said...

Thank you for the script, it works right away in my Toshiba.


Anonymous said...

This does not work for me. The card worked flawlessly in edgy, in feisty, after running the script, and rebooting (and even removing and inserting modules again) I find the following in the logs, any clues:

Apr 28 22:40:43 localhost kernel: [ 274.164000] ACPI: PCI interrupt for device 0000:03:0b.2 disabled
Apr 28 22:40:53 localhost kernel: [ 284.212000] ACPI: PCI interrupt for device 0000:03:0b.3 disabled

Mackenzie said...

Can you do an lspci and see if that's referring to the card reader? My card reader is 04:09.2, not 03.0b.3. Check and see if it's that device that's showing that in the logs. Also, if it's a card other than SD or MMC (such as a Sony Memory Stick), this won't work for you.

Anonymous said...

Yes, the busid is referring to the card reader, and the card is an SD. It worked fine in edgy, I see that everybody is finding a solution but me and I am worried that this will not get fixed in feisty, even if it worked in edgy. Do you know any other way to get debug information? Thank you in any case.

Anonymous said...

Ok I finally made my sd card work. I did the following: manually erased any tifm_* module in /lib/modules/MYKERNEL, and rmmod'ed all those, then ran your script (installed newer modules) then had to run

setpci -s 03:0b.2 4c=0x22

and finally

modprobe sdhci

This way it works. I am not sure: are newer modules supposed to work with sdhci or "natively"?

Mackenzie said...

The setpci hack isn't supposed to be necessary and I've heard doesn't work at all with the newest models of TI card readers. They should work with the native tifm ones. I suppose it's possible that, since the tifm modules haven't reached 1.0 yet, there are some models which aren't fully supported though.

Anonymous said...

Script worked first time on an HP Compaq NX8220 running Feisty + Kubuntu. Many thanks indeed!

Ben said...

Thanks for the script. Works (after reboot) very well with Kubuntu 7.04 on my Acer TM C312. I mounted a 2GiB-miniSD with an adapter without problems (actually I just plugged it in... the system did the rest :)
Thumbs up! :-)

Anonymous said...

card-reader is working after using the script on my hp pavilion notebook. thank you very much for the good work.

Meltir said...

thanks, your script got the card reader on my hpnc6320 working perfectly.
one thing thou - there is a small typo in the article, on the list of modules to load:
sudo modprobe tirm_sd
should be
sudo modprobe tifm_sd

Antonio Miguel said...

Mil gracias, pues ejecute tu scrip en mi laptop gateway MX6941m ahora puedo ver un icono e mi escritorio diciendome que ha reconocido mis queridas tarjetas SD.

Mauro said...

Thanks for the script. It worked with SD Cards... but...
I have nx6125 runing Feisty and your solution worked with SD but when my nokia's (3300) MMC card is insterted, it is detected and mounted.
After trying any I/O operations, computer hangs. :'(
I can't find any way to save the Oops screen. Even SysRq doesn't work.

Any sugestions?
thanks in advance

Mauro said...

After some tries I find a work around for my Nokia's MMC.
Feisty with 2.6.20-15 and your proposed script only worked after setpci thing.
I used someone's else solution running setpci from an init.d script.
After upgrading to 2.6.20-16 I disable this script and tried on.
Same behavour, after inserting MMC everything looked good... but few seconds later, when trying I/O the machine hanged.
After enabling again the setpci stuff all worked fine again.

This is the script I'm running

tango@melita:~$ cat /etc/rcS.d/S37mmc_fix
# Only do this on an HP/Compaq nx6125 laptop
# with TI 5-in-1 card reader otherwise you may destroy
# your equipment! You have been warned!

echo Enabling tifm_7xx1 SD Card reader

setpci -s 02:04.3 4c=22

Anonymous said...

Hi mackenzie!

Just for record, i own an ACER ASPIRE 5050 Notebook, and right after following all your instructions, my Card Reader isn't working at all... I've followed your guide step-by-step, but unfortunately it's not working at all, even with a reboot.

I run Ubuntu Fesity Fawn (7.04) with the latest kernel.

But thanks anyway for your kind support, see that many people have managed their Card Reader thanks to your guide.


dekrit said...

Thank's a lot. It works directly after compile on my Axioo Laptop. Very nice.

CreditUser said...

thank you a lot! your script works clearly for me. By the way, typo Meltir told about is there, really.

Mackenzie said...

Er, those are all f's right now. I fixed it after he said that.

The Traveling Pfooles said...

Any tips on getting this to work with Gutsy? I'd applied the patches to Fiesty and all was working well. Upgraded to Gutsy, repeated the patching process and I can't get it to work. It'll see the SD card, but trying to pull any significant amount of data from it results in the card 'self-unmounting'. I'm running a Dell Inspiron 700m, fwiw.


Mackenzie said...

Should have been automagic in Gutsy.

The Traveling Pfooles said...

Strange. When I drop in an SD card, I can browse the images, but any attempt to download any large amount of info results in the card reader becoming unmounted on it's own - very similar behavior to what I experienced in Feisty prior to doing the patches described here...

Mackenzie said...

The patch here installed a newer version of the driver in Feisty. Feisty's original version didn't work at all for most people. Gutsy should, I think, have the same version of the driver as what was installed by my script.

Anonymous said...

Thanks for the tip!
After adding the lines in etc/modules
all went flawlessly in 7.10


gshegosh said...

This worked flawless in Gutsy, thanks :)

Anonymous said...

Still not working on Gutsy (7.10)

lspci says:
06:0b.0 CardBus bridge: Texas Instruments PCIxx12 Cardbus Controller
06:0b.1 FireWire (IEEE 1394): Texas Instruments PCIxx12 OHCI Compliant IEEE 1394 Host Controller
06:0b.2 Mass storage controller: Texas Instruments 5-in-1 Multimedia Card Reader (SD/MMC/MS/MS PRO/xD)
06:0b.3 Generic system peripheral [0805]: Texas Instruments PCIxx12 SDA Standard Compliant SD Host Controller

Ran your script; made entries in /etc/modules; rebooted but still no joy. Tried two different SD cards to eliminate a bad card. Any thoughts??

Mackenzie said...

It's not for Gutsy. It's an old post. It's for Feisty, and at that, it's for Feisty during the 2 weeks between release and the kernel update that did exactly what this script did.