A year and a half on, it’s much easier to get a fully-working Linux install on the Asus Transformer T100TA. Remember when nothing really worked, and we had to jump through hoops just to get battery monitoring, or power off working? And wifi was just a pain? How things have changed…
Much of the work testing and patching new kernels has been done by Brainwreck and the guys over at the Asus T100 Ubuntu Google+ group. I’ve been away moving house (and job, and country), so sorry for not being around.
I recently did a full reinstall, and here are the latest steps I took to get an almost fully-working machine.
This post refers heavily to the original installation post from 2014. for more detail on any of the steps, you might want to take a look there or in the many helpful comments from other users.
As before, prepare a bootable USB stick, but you can use the Ubuntu 15.10 amd64 release — no need for a latest daily build.
Prepare the stick any way you like, but when done, browse to the EFI/Boot directory, and place this bootloader (named bootia32.efi) there. This bootloader was compiled from source using the latest Grub2. If you don’t trust random downloaded files from the Internet (and you shouldn’t), you can find the instructions for building it yourself here.
As before, ensure SecureBoot is disabled and boot to the USB stick (see the old post for detailed instructions if you don’t know how). You can jump straight to “Install Ubuntu” once the Grub menu pops up — no need to edit anything any more.
In the installer, the partitioning scheme you choose is up to you — but you will need to preserve the EFI partition, so don’t just partition the entire disk for Ubuntu.
In addition to the EFI partition, I prefer separate /, /home and /boot mount points; but that is up to you. You could squish down the Windows partition and create the additional partition(s), or just delete the Windows partition altogether if you don’t need it. It’s up to you if you want to blow away Windows or not.
The installer might fail when installing the bootloader. That doesn’t matter — even if it didn’t fail, it wouldn’t work.
When the installer completes, reboot, leaving the USB stick in.
Ubuntu won’t boot yet. We’ll need to install the bootloader properly. So we’ll have to manually bootstrap Ubuntu the first time.
Boot back to the Grub welcome screen on the USB stick. Hit ‘c’ to drop to a Grub command line.
You’ll need to provide Grub with the path to your kernel and initrd to boot. These are both in your /boot directory. First, the path to the kernel:
linux (hd2,gpt5)/boot/vmlinuz-3.13-xxxx root=/dev/mmcblk0p5
Here, (hd2, gpt5) refers to the fifth partition on the third disk (Partition numbering begins at 1 and disk numbering begins at 0). This will vary depending on how you installed and your T100 model. On my 32GB model, Grub assigns the USB stick as hd0, the read-only recovery flash chip as hd1, and the main internal flash as hd2. gpt5 is the fifth partition, but it will depend on how you installed (specifically, where /boot is).
Fortunately, grub has good auto-completion features, so you can hit
The root=/dev/mmcblk0p5 will also depend on the partition you installed to. It will be your root partition. Unfortunately this can’t be auto-completed, so if you can’t remember your partition setup, you’ll need to try by trial and error. Only the number after the ‘p’ will change — and it will probably be p5, p6 or p7.
To complete the line, press Enter.
Then you need to specify the location of your initrd. This is easy, it’s in the same place as the kernel:
initrd (hd2,gpt5)/boot/initrd-3.13-xxxx
Then Enter.
Then boot with:
boot
With luck after hitting Enter, you’ll boot through to Ubuntu. If it boots but you get dropped to a Busybox prompt, you got everything correct apart from the root location. Don’t be disheartened — keep trying.
To get further, we’ll need wifi. This is much, much easier than before — the driver is included with stock Ubuntu. We just need to copy across an nvram file from our firmware to the driver firmware, so open a terminal and type (replace XXXXXX with the real name — just press tab to autocomplete):
sudo cp /sys/firmware/efi/efivars/nvram-XXXXXX /lib/firmware/brcm/brcmfmac43241b4-sdio.txt
(Just a year ago we were custom compiling whole kernels just to get those efivars mounted, how times have changed…)
Then reload the brcmfmac driver:
sudo modprobe -r brcmfmac
sudo modprobe brcmfmac
And your wifi should come up.
Time to fix the bootloader. To do this, we can just install grub-efi-ia32:
sudo apt-get update
sudo apt-get install grub-efi-ia32
We need to add a line to the kernel boot options to prevent disk corruption.
Edit the grub configuration file:
sudo nano /etc/default/grub
Find the line starting GRUB_CMDLINE_LINUX_DEFAULT
and add intel_idle.max_cstate=0
before quiet splash"
.
Then ctrl-o, ctrl-x to save & exit, and type:
sudo update-grub
to update Grub.
Remove the USB stick and reboot, and you should now have a self-sufficient booting system.
I killed my speakers playing with early sound drivers (fortunately I replaced them with speakers that came along when I had to replace a broken touch screen). Things are much better now though.
The driver is already loaded and working in stock ubuntu, we just need to load an Alsa state file:
Grab the file here, and copy it to /var/lib/alsa/asound.state .
Load the state file into alsa with:
sudo alsactl restore
.
Sound should start working.
To get backlight, hotkeys, tablet keys, etc working, we’ll need a newer, patched kernel. I haven’t played too much with the latest kernels yet, but there seem to be a few regressions. I found the this, compiled kernel to be the best available.
(The usual warnings apply about trusting stuff other people have compiled).
Download the amd64 linux-image, linux-firmware and linux-headers files, and install them one by one using:
sudo dpkg-i linux-xxxxx
… and reboot when done.
I have made (and/or borrowed) some additional support scripts to improve usability.
Download and save all the raw files somewhere (I put mine in ~/scripts). they all need to be in the same place.
Set them all to be executable:
chmod ugo+x ~/scripts/*.sh
base-station.sh enables/disables the Onboard on-screen keyboard when you undock/dock the tablet. Set up the onscreen keyboard first in System Settings → Accessibility (or type “onboard” in the terminal, and set it to automatically run on system start), then the scripts will enable/disable they keyboard for text fields. A nice notification is also displayed when the dock status is changed. Add it to your user’s startup scripts (type ‘Startup Applications’ in the dash) so it runs on login. Don’t add it to /etc/rc.local — it needs to run as the current user).
rotate.sh (via Kirill Belyaev) auto-rotates the screen/touchscreen. Again, add it to Startup Applications (NOT /etc/rc.local).
auto-brightness.sh automatically adjusts the backlight using the ambient light sensor. Ensure the light sensor driver is loaded (sudo modprobe cm3218x
) and add the following line to your /etc/rc.local file, before the ‘exit’ line:
/path/to/script/auto-brightness.sh &
Test it by shining a torch on the light sensor.
And that’s it… by this point, you should have a fairly workable installation, provided you avoid using suspend and hibernation, and don’t need to use the webcam.
As part of my recent media centre build, I wanted to have a Raspberry Pi running RasPlex power down gracefully when power was removed. The UPiS Advanced UPS to the rescue! Despite the terrible name, this UPiS comes complete with a battery and UART so that the power status can be monitored from the Raspberry Pi.
The script is straightforward enough — it queries the UPiS every few seconds. If it detects that power is removed, it shuts itself down and triggers the “file sfe shutdown” on the UPiS. After 30 seconds or so, with everything safely shut down, the UPiS cuts power.
The script is in Python and requires PySerial. However, RasPlex is very bare-bones, python libraries can’t be compiled and nothing can be installed (there is no package manager). It turns out, however, that this doesn’t matter — PySerial can be installed to a local folder and run from source.
The (small) code and instructions for running are on my GitHub repository. PySerial is included.
Based in Shanghai, China, I’m an experienced knowledge and digital marketing leader with a particular interest in social media and web application design.
I’m passionate about sharing knowledge, and am a strong advocate for open source and software freedom.
Some of my recent personal work includes:
How to build an on-wall media centre from scratch…
This is a small project I did for my better half — I noticed she always had the iPad on full volume when having a shower. As she is busy studying for her masters, that’s about the only time she has to “watch” TV.
I thought I’d make it easier for her by putting a waterproof screen on the wall. My first thought was a waterproof tablet, like the Sony Xperia. However, that would be (a) no fun; (b) expensive; and (c) touchscreens don’t work at all when wet. So I decided to build my own.
For software, I used RasPlex. It fits in well as we have a number of Plex devices in the house already, and it also provides an Airplay sink. So my wife can just send whatever she’s watching on her iPad to the screen on the wall. And the entire thing can be controlled from any mobile device with Plex.
This isn’t a set of instructions or even a build log — like most things, the build was more trial and error than meticulous planning. It’s not difficult if you decide to build your own. That said, I was asked by a couple of people to post details, so here goes…
I ordered nearly all my parts from Taobao (China’s eBay).
All of these were from Taobao, with the exception of the UPiS, which I ordered from modmypi.com.
The entire thing is powered from the 12V 5A PSU. This is housed in the waterproof project box and hidden in the ceiling. It can be turned on and off using a spare light switch.
The 12V output from the PSU then feeds through (via waterproof grommets) to the screen — specifically, the LCD module (which requires 12V) and the UPis (which converts 12V to 5V for the rest of the hardware).
I use the UPiS to coordinate graceful shutdown when the light switch is flicked off. It detects the loss of power, but can provide backup power to the Raspberry Pi. Once the power loss is detected, it signals to the Raspbery Pi to shut down. Without this, file corruption could potentially be a problem after thousands of cycles of powering off without shutting down gracefully.
I wrote a small Python script so that the RasPi could query the UPis every few seconds to determine if the power had been cut.
One detail worth noting is that I had to remove the composite and USB ports on the RPi in order to get it to fit. I then directly soldered in wires for my USB devices. This saved a lot of space.
Obviously this is pretty light on details, but I figure that no two builds are likely to be the same here. I tried to make use of what I already had lying around. In the picture above, the RaspPi is in the top left with the UPis on top of it. To the right you can see the UPiS battery. Below this is the LVDS converter board. On the bottom left is the HDMI audio extractor, and on the bottom right is the Wi-Fi dongle.
After plugging in everything and testing, most of the work involved carving up the project box and waterproofing it. To fit everything in, I made standoffs out of “Oogoo” (A silicone / cornflower mix, in my case coloured with blue acrylic paint), but you could also 3D-print them. The inner portion of the project box was already waterproof. Obviously once I had cut out the hole for the screen, this was no longer the case, but I managed to seal it around the front (behind the glass and screen) with a large Oogoo gasket and some 3M mastik tape. This presses the front of the glass to the inside of the ABS box, with a bead of silicone to fill the gaps and make it waterproof.
I chopped the box down thinner, filled gaps, and finished it with some acrylic spray paint and clear coat. And some cutesy stick-on lettering. And, tadaaa…
This post is now out of date — see the latest update, here
The T100 is a nice little convertible tablet/netbook.
My aim is to get a “perfect” Ubuntu installation on the T100, such that it can be used successfully as a daily machine in both netbook and tablet modes.
Unfortunately Linux support right now is quite rudimentary, and installing it requires us to jump through a few hoops. The situation is improving rapidly however. So I will keep updating this How-to as new drivers become available and things improve. See the latest update.
Eventually I expect hardware support for the T100 will be excellent, but we are not there yet. In order to get the best support possible, we will be using bleeding-edge builds and the latest Linux kernels. If you’d just prefer an easy life, come back in October and just install Ubuntu 14.10.
That said, this little convertible is a lovely machine, and Ubuntu/unity works very nicely on it — finally Unity has a purpose! The more people get on for the ride now, the quicker we can test and iron out bugs.
*** This post will constantly be updated as in-kernel support improves ***
I’ll update this whenever I manage to get new things working. I will only add items to the How-to below that are confirmed to work well.
First things first, update using Asus LiveUpdate to the latest “BIOS” available. At the time of writing, that is v304. Do any backing up of Windows / recovery partitions. I’ll leave the details of that up to you.
Before we attempt to boot Linux on the T100, we need to do some preparation, so start in Windows. Download the latest daily AMD64 build of Ubuntu 14.04 from here.
Download the Rufus USB bootable image creator, and “burn” your downloaded ISO to a spare USB stick. In Rufus, for “Partition scheme and target system type”, choose “GPT partition scheme for UEFI computer”. For “File System”, choose “FAT32″, and leave the rest at default. At the bottom, check “Create a bootable disk using: ISO Image” and select your downloaded Ubuntu image, then hit “Start”.
When your USB stick is ready, close Rufus. It should now be browseable in Windows. Browse to the EFI\Boot directory, and place this bootloader (named bootia32.efi) there. This bootloader was compiled from source using the latest Grub2. If you don’t trust random downloaded files from the Internet (and you shouldn’t), you can find the instructions for building it yourself here.
Now, insert the USB stick and reboot to the firmware (BIOS). You can do this in Windows by holding shift when pressing “restart”, then touching Troubleshoot → Advanced Options → UEFI Firmware Settings → Restart.
Once there, disable SecureBoot, then visit the boot options, and ensure the USB stick is the first in the list.
Press F10 to save settings, and after a few seconds you will be in the GRUB bootloader. Before the timeout, immediately hit CTRL-ALT-DEL. This will reboot the computer again, but this time you will have the laptop’s native resolution (rather than being stuck at 800×600 from the “bios”).
In the GRUB menu, highlight “Try Ubuntu”, and press “e” to edit it. In the editing screen, scroll down to the command line options, where it says “quiet splash”. Delete “splash” and replace it with:
video=VGA-1:1368x768e reboot=pci,force
Then press F10 to boot. You should get all the way to the Desktop.
Click the “Install Ubuntu” desktop icon to install Ubuntu permanently.
The partitioning scheme you choose is up to you — but you will need to preserve the EFI partition, so don’t just partition the entire disk for Ubuntu.
In addition to the EFI partition, I prefer separate /, /home and /boot mount points; but that is up to you. You could squish down the Windows partition and created the additional partition(s), or just delete the Windows partition altogether if you don’t need it.
When done, reboot, leaving the USB stick in.
Ubuntu won’t boot yet. We’ll need to compile our own bootia32.efi to use with Grub. To do that we really need a wireless connection. So we’ll boot manually, fix up wireless, and fix Grub.
Boot back to the Grub welcome screen on the USB stick. Hit ‘c’ to drop to a Grub command line.
You’ll need to provide Grub with the path to your kernel and initrd to boot. First, the path to the kernel:
linux (hd2,gpt5)/boot/vmlinuz-3.13-xxxx root=/dev/mmcblk0p5 video=VGA-1:1368x768e reboot=pci,force
Here, (hd2, gpt5) refers to the fifth partition on the third disk (Partition numbering begins at 1 and disk numbering begins at 0). This will vary depending on how yo uinstalled and your T100 model. On my 32GB model, Grub assigns the USB stick as hd0, the read-only recovery flash chip as hd1, and the main internal flash as hd2. gpt5 is the fifth partition, but it will depend on how you installed.
Fortunately, grub has good auto-completion features, so you can hit
The root=/dev/mmcblk0p5 will also depend on the partition you installed to. It will be your root partition. Unfortunately this can’t be auto-completed, so if you can’t remember your partition setup, you’ll need to try by trial and error.
To complete the line, press Enter.
Then you need to specify the location of your initrd. This is easy, it’s in the same place as the kernel:
initrd (hd2,gpt5)/boot/initrd-3.13-xxxx
Then Enter.
Then boot with:
boot
With luck after hitting Enter, you’ll boot through to Ubuntu. If not, don’t be disheartened — keep trying.
To get further, we’ll need wifi. However internal wifi on the T100 isn’t terribly reliable under Linux yet. If you have access to another wifi dongle, you might want to try that until you’re fully set up.
The driver is already included, but it needs some firmware and a copy of your system’s wifi nvram:
You’ll now need to reboot using the same procedure again, and wifi should be working.
However, I found wifi performance to be very poor — there are some bugs in the driver. This is improved somewhat with the latest kernel, which we will upgrade to in a later step. I managed to improve performance somewhat by using the NVRAMs from other platforms, and splicing in some of the missing variables. You can see my tries here. In all cases, copy them to /lib/firmware/brcm/brcmfmac43241b4-sdio.txt , and reboot or unload/reload the wifi driver:
sudo modprobe -r brcmfmac
sudo modprobe brcmfmac
If you find a firmware/nvram combination that works really well, please share.
We can’t keep rebooting like this… so let’s fix Grub. This assumes you now have a working Internet connection.
We’ll need some build tools — install them:
sudo apt-get update && sudo apt-get install git bison libopts25 libselinux1-dev autogen m4 autoconf help2man libopts25-dev flex libfont-freetype-perl automake autotools-dev libfreetype6-dev texinfo ia32_libs build_essential
Then get the Grub source:
git clone git://git.savannah.gnu.org/grub.git
Now build it:
cd grub
./autogen.sh
./configure --with-platform=efi --target=i386 --program-prefix=""
make
And install to efi:
cd grub-core
sudo ../grub-install -d . --efi-directory /boot/efi/ --target=i386
This will create a directory, ‘grub’, in your EFI partition.
We want to copy the grubia32.efi from there to the location Ubuntu created during installation:
cd /boot/efi/EFI
sudo cp grub/grubia32.efi ubuntu/grubx64.efi
This should be enough to allow you to boot from the “ubuntu” option in your EFI firmware.
Before you boot, let’s add the default command line options to Grub.
Open /etc/default grub in a text editor:
sudo nano /etc/default/grub
And edit the GRUB_CMDLINE_LINUX_DEFAULT exactly as we did before. When done, hit ctrl-o to save then ctrl-x to exit. Then, to update Grub:
sudo update-grub
Congratulations! you should now be able to boot/reboot directly to the Ubuntu desktop!
There are still a lot of things to get working. The best way to improve hardware support further is to use the latest development branches of the kernel.
Unfortunately (as at the time of writing), even the latest development Linux kernel (3.14-rc5) lacks some key hardware support for Baytrail tablets. But we can improve that by pulling in latest patches for sound. We’ll also compile in a new experimental feature for accessing 32-bit EFI services from a 64-bit system, as we need that for tools like efibootmgr to work. Finally, we’ll pull in the latest wireless fixes and the latest power management changes. We need to power management changes for our battery patch.
I recommend you compile this on a fast desktop computer with a decent network connection. You could do this on your tablet, but it would be extremely slow. For the following instructions, I assume you’re using a recent 64-bit Ubuntu on a desktop. If you’re using 32-bit, you’ll have to change the instructions to cross-compile — I’ll leave that up to you (and Google).
On your compiling machine, install the packages you’ll need to build a kernel:
sudo apt-get install git build-essential fakeroot crash kexec-tools makedumpfile kernel-wedge libncurses5 libncurses5-dev
sudo apt-get build-dep linux-image-$(uname -r)
Then create a working directory, step into it, and download the sources you’ll need:
mkdir kernel
cd kernel
git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
cd source
git remote add sound git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
git remote add efi git://git.kernel.org/pub/scm/linux/kernel/git/mfleming/efi.git
git remote add pmfixes git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git
git remote add wifinext git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next.git
git fetch sound
git fetch efi
git fetch pmfixes
git fetch wifinext
Then merge the updates from sound, efi mixed-mode, power management and wireless onto the mainline kernel:
git merge sound/topic/intel
git merge efi/efi-for-mingo
git merge pmfixes/linux-next
git merge wifinext/master
There are still some patches we need to apply. Step back and create a patch directory, and download some patches into it:
cd ..
mkdir patches
^mkdir^cd
git clone https://github.com/jfwells/linux-asus-t100ta.git
Now apply the patches:
cd ../source
git apply ../patches/linux-asus-t100ta/patches/*
They should all apply without error.
Now we’re almost ready to compile. Before we do, we need a .config file to tell the kernel build system what parts we want to compile. Start by copying over the current one from your T100. You’ll find it at /boot/config-xxxxxx , where xxxxxx is the version of the currently running kernel. Grab it and copy it to the kernel/source directory you’ve just been working in. Rename it to .config .
Now we need to update the config:
make oldconfig
This will prompt you to set configuration for the things that will be newer in this kernel. Select ‘m’ to compile relevant drivers as a module where offered (in particular all the ‘soc’ sound options). Select ‘Y’ to enable EFI mixed mode where offered. Leave the kernel debugging options off.
When done, we’re ready to compile. We can just do it the quick and dirty way:
make clean
make -j8 deb-pkg
The above assumes this is on a quad-core processor with hyperthreading (hence the ‘-j8′, or 8 simultaneous processes). Reduce this number appropriately if you have less cores.
This will take some time (anywhere from 20 minutes to over an hour. If you’re doing it directly on the T100, all bets are off – it could take all day.
When complete, you’ll have a set of .deb packages in the directory above (i.e. in the “kernel” directory). We need “linux-headers-xxxxx.deb” and “linux-image-xxxxx.deb”. Choose the smaller of the linux-image packages, the one without debug symbols. Copy them over to your T100.
On the T100, install the new kernel with:
cd <folder where you saved the .debs>
dpkg -i ./*.deb
Then reboot!
Sound won’t yet be working. First, you’ll need some more firmware. For now, you can grab it from ChromiumOS, here. Unpack the archive and copy the files to /lib/firmware/intel .
The drivers are in a bit of a raw state — they expose about a hundred oddly-named mixer and DSP devices to ALSA. We can set some defaults. Grab the defaults file here, and copy it to /var/lib/alsa/asound.state .
Reboot, and force-load the state file into alsa with :
sudo alsactl -f /var/lib/alsa/asound.state restore
For me, my sound still sounds pretty awful. I need to mute the distorted right channel in alsamixer, then at least it is bearable. I also find the CPU runs a bit hot with sound enabled. Let me know if you have more luck.
* please be careful — my sound is permanently distorted, even in Windows now; keep the volume low when testing the various options *
The SD card reader works with newer kernels, but the sdhci module needs some configuration. Create a new file:
sudo nano /etc/modprobe.d/sdhci.conf
Then add the following:
options sdhci debug_quirks=0x8000
ctrl-o then ctrl-x to save and exit, then:
update-initramfs -u -k all
Then reboot and the card reader should be working.
So far, the only additional driver I have working is the light sensor. Please download and test my driver here.
I have made some additional small scripts to improve usability.
Dock scripts: These enable/disable the Onboard on-screen keyboard when you undock/dock the tablet. Set up the onscreen keyboard first in System Settings → Accessibility, then the scripts will enable/disable they keyboard for text fields.
Rotate script: This will rotate the screen and touchscreen when run. You can place the desktop entry on your desktop. We can connect the orientation sensor to this later, once that is working.
If you keep getting this spamming your PHP error log, it is likely because PHP xcache was installed previously and then uninstalled, but its configuration files were not cleared out. This could have happened at an upgrade or when you chose a different cache system.
You can check if you have xcache installed by doing sudo dpkg -s php5-xcache | grep Status
. If the status shows as "deinstalled" but with config files left, you can simply purge it with sudo apt-get remove --purge php5-xcache
.
Then restart Apache: sudo service apache2 restart
. Your error log should now be spam free.