Monday, 29 August 2016

Micro SD card support on Intel Compute Cherry Trail Sticks

Update: This page refers to earlier work and my latest ISOs can be downloaded from
http://linuxiumcomau.blogspot.com.au/2016/10/running-ubuntu-on-intel-bay-trail-and.html

The latest stable 4.7.2 Ubuntu kernel for Intel Compute Cherry Trail Sticks (STK1AW32SC/STK1A32SC) now supports micro SD cards albeit with limitations.


It seems most Class 10 and below cards from any manufacturer (update: except Sandisk - see comment below) work without problem.  However not all UHS cards work. I've found Samsung UHS Speed Class 3 and UHS Speed Class 1 work:


Whereas similar Sandisk cards fail, crashing the device sometimes on inserting or removing or erroring with:

        mmc1: error -110 whilst initialising SD card
        mmc1: card never left busy state

Still getting any micro SD cards working on these devices is a great forward step. I've patched the 4.7.2 Ubuntu kernel to make it work on Intel Compute Sticks and you can download the upgrade script from http://goo.gl/5gEyrf and install this latest kernel after making it executable (enter 'chmod 755 <script>') and then running it as 'root' ('./<script>'). Once the script has finished executing GRUB should update automatically but if it doesn't then simply run 'update-grub' as 'root'. Your device will then need to be rebooted to use the new (patched) kernel.

Update: This page refers to earlier work and my latest ISOs can be downloaded from
http://linuxiumcomau.blogspot.com.au/2016/10/running-ubuntu-on-intel-bay-trail-and.html

19 comments:

  1. I've tried Sandisk 8GB SDHC with no success. No Sandisk cards work for me although it detected a no-name 8GB micro-SD. I'll get a 64Gb Samsung USH3 tomorrow and confirm if it works.

    Thanks for the great work !

    ReplyDelete
    Replies
    1. Thanks for the information. I've updated accordingly.

      Delete
    2. Update on the situation: i applied your 4.7.2 patched kernel on a 16.04 Ubuntu install, on the Z8300 computestick.

      I got 2x 64Gb UHS3 cards today and they work, sort-of:
      - i get error -110 when it has the SD card inside on boot
      - the card is properly detected and loaded if inserted after boot
      - the entire computer freezes when i remove the card.

      Rebooted a couple of times and had the same behaviour. I will now try to install a fresh copy of Lubuntu 16.10 and will update if this behaviour continues.

      Delete
    3. Tested with Lubuntu and had the same behaviour. The system locks up even on SD card insert sometimes. I think what I'm seeing is coherent with dgunnell's comment but for me it happens on SD card remove ...

      Delete
    4. Yes more work is required but at least there is a starting point now.

      Delete
  2. I have found ANY Sandisk card regardless of size does not work and the system locks up and has to be rebooted. I tried a couple of non name class 10 cards I had laying around one 32GB another 64GB and both of them worked.

    ReplyDelete
  3. Here is my latest WIP v4.8-rc3 mainline build for ICS (download the update script from http://goo.gl/A0s4vK) for anyone who wants to do additional testing. Ignore the missing firmware issue (see https://bugzilla.kernel.org/show_bug.cgi?id=151911).

    ReplyDelete
  4. Thanks for packaging these kernels, here are my testing results.

    With a Samsung PRO U3 I get the same "mmc1: error -110 whilst initialising SD card" or outright freezes if it's there on boot. If I insert it post-boot it mounts and I can use it, although I get "error -110 sending status command" in the logs (see below). This seems to be the same with both of the above kernels:


    [ 280.806765] sdhci: Timeout waiting for Buffer Read Ready interrupt during tuning procedure, falling back to fixed sampling clock
    [ 280.806808] mmc1: new ultra high speed SDR104 SDXC card at address 0001
    [ 280.810985] mmcblk1: mmc1:0001 00000 59.6 GiB
    [ 289.146192] mmcblk1: error -110 sending status command, retrying
    [ 289.148833] mmcblk1: error -110 sending status command, retrying
    [ 289.151145] mmcblk1: error -110 sending status command, aborting
    [ 289.240370] mmcblk1: p1

    A possibly related issue is that the uncached read speed is pretty low. I never tested the reader in Windows to know whether this is a hardware limitation. mmcblk1 below is the Samsung U3 card in the internal slot, sdb1 is the same card in a USB3 card reader also on the ICS:

    chris@stick:~$ sudo hdparm -t /dev/mmcblk1
    /dev/mmcblk1:
    Timing buffered disk reads: 60 MB in 3.07 seconds = 19.54 MB/sec

    chris@stick:~$ sudo hdparm -t /dev/sdb1
    /dev/sdb1:
    Timing buffered disk reads: 238 MB in 3.01 seconds = 79.13 MB/sec

    and the eMMC for reference:
    chris@stick:~$ sudo hdparm -t /dev/mmcblk0
    /dev/mmcblk0:
    Timing buffered disk reads: 376 MB in 3.00 seconds = 125.15 MB/sec

    ReplyDelete
    Replies
    1. Tried Samsung 128GB EVO Plus UHS-i Class 10 Micro SDXC Card and upon insert received the following error:

      mmc1: error -85 whilst intialising SD card

      but the system didnt freeze. This was with the 4.7 kernel will try 4.8 next.

      Delete
    2. with 4.8 and card installed during boot received
      [ 4.076619] mmc1: error -110 whilst initialising SD card

      so no difference but not hanging either

      Delete
    3. Just tried a Lexar Professional 1000x microSDXC 64GB UHS-II/U3 and it is working without any issues.

      Delete
    4. Agree. I have been using the Lexar Professional 1000x microSDXC 64GB UHS-II/U3 and it works 9/10 times. It has frozen the system once and sometimes it won't mount on insertion but otherwise its ok.

      Delete
    5. I have seen where it does not mount during boot sometimes and is not seen by OS either and when you re-insert works 95% of the time but freezes system once in awhile.

      Delete
  5. Replies
    1. See https://linuxiumcomau.blogspot.com.au/2016/08/running-latest-ubuntu-on-intel-compute.html

      Delete
  6. Would you considering making the kernel source and patches available for each of the ISOs you distribute? It would be very helpful for the rest of us to be able to review the kernel source and patches you have applied to create these ISOs. Many of us would like to adapt the source and patches to resolve problems with devices similar to the compute stick. Apologies in advance if you have already made these available. Please direct me to the location for the kernel source and patches for all of the ISOs you distribute.

    ReplyDelete
    Replies
    1. See https://linuxiumcomau.blogspot.com.au/2016/08/running-latest-ubuntu-on-intel-compute.html

      Delete
  7. Excellent article. Very interesting to read. I really love to read such a nice article. Thanks! keep rocking.
    best micro sd card for cell phone

    ReplyDelete