How-Tos‎ > ‎

Running Ubuntu on Intel Bay Trail and Cherry Trail Devices

posted 13 Jun 2016, 07:05 by Ian MORRISON   [ updated 7 Mar 2017, 01:59 ]
Intel Atom based mini PCs currently use Bay Trail and Cherry Trail SOCs. Whilst they perform satisfactorily under Windows attempts to use Linux based operating systems have resulted in the loss of HDMI audio, wifi and bluetooth. I've attempted to address this with a series of Ubuntu ISOs and kernel patches.
Official Ubuntu releases are provided as ISO images which are single files that represent an entire CD/DVD of software. An ISO image can be written to a USB to create a 'live' USB drive that containing a full operating system that can be booted or used as installation media. Ubuntu has recognized flavours with the difference being the set of packages included within the release:
  • Ubuntu uses Unity (a graphical shell for the GNOME desktop environment)
  • Lubuntu uses LXDE (the Lightweight X11 Desktop Environment)
  • Xubuntu uses the Xfce desktop environment
  • Kubuntu uses KDE's Plasma desktop environment
  • Ubuntu GNOME uses the GNOME desktop environment
  • Ubuntu MATE uses the MATE desktop environment
  • Ubuntu Budgie uses the Budgie desktop environment
Ubuntu is well suited to mini PCs as the flavours provide the option of running a fast but lightweight operating system that can take advantage of the lesser hardware specifications.

By combining recent patches and source code and porting them with Ubuntu kernel source I've created ISO images that fully support HDMI audio, wifi and bluetooth on Intel Compute Sticks. They will work on other Atom Bay Trail and Cherry Trail with varying success in part due to the functionality provided by the device's BIOS which typically affects the success of bluetooth and assuming the device has either Realtek 8723BS or other officially support wifi including Intel. I've also included the latest patches that try to reduce the random freezes that have been known to occur.

Because the ISOs include a patched kernel to provide the missing functionality it means no automatic Ubuntu kernel updates although other application packages will update as normal. Consequently I've also developed a manual patching process where a script can be downloaded and then executed to update the kernel to match the latest releases.

I've also configured the ISOs to both run and install using either a 32-bit or 64-bit bootloader to provide the ability to easily dual-boot without needing to modify the BIOS.

Each ISO can be written to a USB using either 'Rufus' in Windows or 'dd' in Linux. The USB can then be used to boot from after powering-on the device. For installation to the device's internal storage simply run the installer and follow the on-screen instructions.

Issues should be reported as comments on the associated development blog posting on www.linuxiumcomau.blogspot.com. The best way to help when reporting an issue is to include the name of your device and a copy of the output from 'dmesg' (which is basically a log of kernel messages). The easiest way to share the log is by using the 'pastebinit' command (see https://help.ubuntu.com/community/Pastebinit). After installing the command by entering 'sudo apt install pastebinit' you can share the kernel messages log by entering 'dmesg | pastebinit'. This will paste a copy of the output from 'dmesg' to Ubuntu's Pastebin and provide an URL to access it. So when reporting an issue please include:
As Canonical have released Ubuntu 16.04.2 with the rolling Hardware Enablement (HWE) kernels which aim to provide support for the latest hardware I've decided to provide a single kernel which is effectively a HWE 'edge' kernel specifically patched for Intel Atom SoCs in my ISOs to simplify kernel management and create a forward path for future migration to mainline kernels.


My kernel is based on Canonical's next 'zesty' kernel which is rebased to v4.10 and also available in 'xenial' as hwe-edge. Whilst v4.10 is the latest mainline kernel to be released the merge window for v4.11 now includes the revised HDMI LPE Audio Support patch set together with the AXP288 power supply patch set for Intel Atom SoCs. Because v4.11 will be released in a couple of months with the patches being included in Ubuntu hopefully by 17.10 I've added these latest patches from the merge window to my kernel. Besides the HDMI LPE patches from Pierre-Louis Bossart, Jerome Anand & Takashi Iwai and Hans de Goede's AXP288 patches I've also added Hans de Goede's PWM, I2C, CX2702X audio support, Silead touchscreen support and ASUS tablet function key support patches. Also included is Mika Kuoppalad's new anti-freeze patch, Pierre-Louis Bossart's PMC Platform Clock and Codecs patches, Ville Syrjälä atomic update fix, Bastien Nocera's wifi patch, Laszlo-Fiat's bluetooth patch, Jonas Aaberg bluetooth patch for the ASUS 100HA together with my bluetooth support which is based on a script from Larry Finger. The kernel source is available on my github.

At this stage I'm providing ten ISOs: 16.04.2 releases of Ubuntu, Lubuntu, Xubuntu, Ubuntu MATE, Ubuntu GNOME and Kubuntu all with kernel Ubuntu-lts-4.10.0-10.12~16.04.2 together with Ubuntu 17.04 pseudo Beta 1 and 17.04 Beta 1 releases of Lubuntu, Xubuntu and Ubuntu Budgie all with kernel Ubuntu-4.10.0-10.12. Technically the two kernels are the same with the 'xenial' LTS kernel being a backport of the 'zesty' kernel. Note that the Ubuntu 17.04 Beta 1 is a pseudo release because there is no official Beta 1 release so I have used the daily release provided the same day the official Beta 1 flavours were released. I've also included Ubuntu Budgie as it is now an official Ubuntu flavour and I thought there may be some interest. Further flavours will be added later although I am no longer going to provided updated 16.10 releases due to resource constraints. I am also providing the corresponding kernel update scripts and I will maintain the kernels with security patches and/or Intel Atom SoC added functionality/improvements.

To try an ISO download it from the link below (in red) and write it to a USB using either 'Rufus' in Windows or 'dd' in Linux.


16.04.2 LTS


Ubuntu 16.04.2
(sha256sum 72832bfc886b2e0beede4f33e7703b4c2c47ef0baae1a3064fb6ab70892ee689)
Ubuntu comes with everything. All the essential applications, like an office suite, browsers, email and media apps come pre-installed and thousands more games and applications are available in the Ubuntu Software Centre.
.
(sha256sum e1102f37c35d1e77f515cc0574388eec700831288ecc7e8fe73ca8755eb5a5ef)
Lubuntu is a fast, energy saving and lightweight variant of Ubuntu using LXDE. It is popular with PC and laptop users running on low-spec hardware.

(sha256sum c33862d036885b41e1cc0c438b0008a14fc3495b352f8f2240fbe3843ac1fc31)
Xubuntu is an elegant and easy to use operating system. Xubuntu comes with Xfce, which is a stable, light and configurable desktop environment.

Ubuntu MATE 16.04.2
(sha256sum d2d4e07cc2121a90617b94904800e60498792bf7f5736157cc7a833efe211947)
Ubuntu MATE expresses the simplicity of a classic desktop environment. MATE is the continuation of the GNOME 2 desktop which was Ubuntu's default desktop.


Ubuntu GNOME 16.04.2
(sha256sum 0b4e7d175b79e89b35e0449af07f4b96bed28e5912d5f43a11bbc54e122460ed)
Ubuntu GNOME uses GNOME Shell along with a plethora of applications from the GNOME Desktop Environment.


Kubuntu 16.04.2
(sha256sum 3d6f1ee5db819bb0e44167efae818b9ae86a9335eca1e187291b3b31a1797ff0)
Kubuntu offers the KDE Plasma Workspace experience, a good-looking system for home and office use.




17.04 Beta 1


(sha256sum f38dcc8fc64f524422028b24e8e95ebe7635241aa24edbdafeeb55dd44c5d36c)
Ubuntu comes with everything. All the essential applications, like an office suite, browsers, email and media apps come pre-installed and thousands more games and applications are available in the Ubuntu Software Centre.

Lubuntu 17.04 Beta 1
(sha256sum f8a8af2d453a58a8538f9f76ceac29a1e2477793c59d373f0bddda5c3338d35f)
Lubuntu is a fast, energy saving and lightweight variant of Ubuntu using LXDE. It is popular with PC and laptop users running on low-spec hardware.
(sha256sum 2a1770e0e51921328224d5c477027420fee3f9bfc715ddb741adf75409f20afb)
Xubuntu is an elegant and easy to use operating system. Xubuntu comes with Xfce, which is a stable, light and configurable desktop environment.
(sha256sum bc92e6df5b4c298fc877743ab0303d7272ec87bc7a40e79ddf80f0883dc6c8ea)
Ubuntu Budgie is stable and easy to use that integrates the Budgie Desktop environment into Ubuntu. Whether you are using it on the old computer, or powerful workstation, Ubuntu Budgie is adaptable to any device, keeping them fast and usable.



If freezing persists follow Len Brown suggestion of adding "intel_idle.max_cstate=2" as a kernel boot parameter which enables Core-C6 but disables module/package-C6. Open a terminal session and enter the following command (on a single line) 'sudo sed -i 's/\(GRUB_CMDLINE_LINUX=\)""/\1"intel_idle.max_cstate=2"/' /etc/default/grub'. To implement the change enter 'sudo update-gruband then reboot the system by entering 'sudo reboot'. The above change only needs to be made once, typically following installation to eMMC storage. Prior to embarking on an encrypted LVM installation you should first open a terminal session and turn off swapping using the command 'sudo swapoff -a'. If there is no wifi after booting devices with a Broadcom chip then reload the driver: in a terminal window enter 'sudo modprobe -r brcmfmac' followed by 'sudo modprobe brcmfmac'. Occasionally on some devices bluetooth doesn't initially load so it is necessary to restart the service: for Broadcom chip devices enter 'sudo systemctl stop brcmbt.service' followed by 'sudo systemctl start brcmbt.service' and for Realtek chip devices enter 'sudo systemctl stop rtl8723bsbt.service' followed by 'sudo systemctl start rtl8723bsbt.service'. Some devices still do not reboot (or warm restart) correctly which can result in a purple screen or lack of wifi and/or bluetooth on reboot. In these circumstances cycle the power and boot the device from cold. Unfortunately as I don't have a tablet I cannot advise on the screen rotation issues however others have commented in previous posts with their solutions which I'd recommend reading. WIP includes improving backlight support for some devices and the ES8316 driver which is currently under development.

Kernel update scripts are provided for updating the kernel and require my ISOs to be installed as a pre-requisite otherwise you will be missing the 'userland' files required for audio, wifi and bluetooth. To upgrade the existing installed kernel to the later version provided by the script first download the script and after making it executable (enter 'chmod 755 ~/Downloads/<script>') install it as 'root' (by entering 'sudo ~/Downloads/<script>'). Once the script has finished executing the device will need to be rebooted to use the updated (patched) kernel. 

4.10.0-10.12 (latest zesty kernel)
4.10.0-10.12~16.04.2 (latest backported xenial kernel)


Acknowledgements:  Canonical Ltd. (Ubuntu), Pierre-Louis Bossart/Jerome Anand/Takashi Iwai (HDMI LPE Audio), Pierre-Louis Bossart (PMC Platform Clock and Audio Codecs), Hans de Goede (I2C/WiFi/PMC/AXP288/CX2702X/Silead/ASUS), Ville Syrjälä (Atomic Updates), Len Brown (C6 Auto-Demotion), Daniel Bilik (C-State), Mika Kuoppala (Anti-freeze), Bastien Nocera (WiFi), Larry Finger (Bluetooth), Jonas Aaberg (Bluetooth) and Laszlo Fiat (WiFi/Bluetooth).

Source code: GitHub (Linuxium).
Comments