Fedora on BayTrail tablets (2017 edition)

Almost two years after writing my post about running Fedora on a BayTrail tablet, I decided to provide a small update.

Even though a lot of support landed in kernels 4.8 and 4.9 there are still a few things needed fixing. The good news is that out-of-the-box experience is much, much better now, with almost everything working.

So let’s get to it!

Fedora version, and deskop environment #

I recommend starting with a i686 Fedora Workstation image. If GNOME is slow on your tablet you can later install another DE (I installed XFCE).

Remember that you will most certainly need GDM because it is the only Login Manager which supports touch screens.

Getting it to boot #

When you download the i686 ISO, you will need to extract it to a blank FAT32 formatted USB drive. You will still need the bootia32 trick to get GRUB loaded.

Fixing black screen on boot #

One of the biggest issues with BayTrail, is that UEFI handoff is buggy. So to get reliable boots with 3D acceleration, you have to use a little bit of GRUB trickery. For reference here is my grub.cfg:

if loadfont /boot/grub/font.pf2 ; then
  set gfxmode=800x600
  terminal_output gfxterm
fi

set timeout=5

menuentry "Fedora 25 Workstation i686" {
    set gfxpayload=keep
    set root=(hd0,gpt3)
    linux /boot/vmlinuz-4.9.5-200.fc25.i686 root=/dev/mmcblk1p3 rhgb quiet
    initrd /boot/initramfs-4.9.5-200.fc25.i686.img
}

The important bits are set gfxmode=800x600 and set gfxpayload=keep which will make grub be on 800x600 resolution and for some reason handoff the VT just fine. As you can see no special kernel parameters are needed, yay!

When installing Fedora, you will maybe have to install the bootloader manually. It’s really simple just make a small EFI partition and put the bootia32.efi and your grub.cfg files on it, just like it is on the flash drive you are installing Fedora from.

Fixing suspend #

Suspend now works! Sadly, to make it work you have to disable all snd modules. This is a regression reported here. So to have suspend working, modify /etc/modprobe.d/blacklist.conf:


blacklist snd_soc_sst_bytcr_rt5640
blacklist snd_soc_rt5645
blacklist snd_intel_sst_acpi
blacklist snd_intel_sst_core
blacklist snd_soc_rt5640
blacklist snd_soc_sst_mfld_platform
blacklist snd_soc_rl6231
blacklist snd_soc_sst_match
blacklist snd_soc_core
blacklist snd_compress
blacklist snd_seq
blacklist snd_pcm_dmaengine
blacklist snd_seq_device
blacklist ac97_bus
blacklist snd_pcm
blacklist snd_timer
blacklist snd
blacklist soundcore

and reboot. Afterwards, check if snd module is getting loaded with lsmod | grep snd. It should not, so it should return empty string.

Touchscreen doesn’t work after waking from suspend #

Really annoying, but very easy to fix. You just need to remove and then add the module upon wakeup. Make a script (/opt/touchscreen-fix/resume.sh):

#!/bin/sh
/sbin/rmmod hid_multitouch && /sbin/modprobe hid_multitouch

and make it executable with chmod +x /opt/touchscreen-fix/resume.sh. Then you need a service to run it when the tablet wakes up (/etc/systemd/system/touchscreen-fix.service):

[Unit]
Description=Fix touchscreen after resume
After=suspend.target

[Service]
Type=simple
ExecStart=/opt/touchscreen-fix/resume.sh

[Install]
WantedBy=suspend.target

Don’t forget to enable it: systemctl enable touchscreen-fix.service.

Rotation #

If using GNOME, sensors should detect a rotation change, and automatically rotate your screen. On XFCE, you can rotate the screen through settings, but the axis don’t get swapped, meaning the picture rotates, but the touchscreen orientation stays as it is. Use this script to fix it, if it happens to you.

Onscreen keyboard #

If using GNOME, you can use the included caribou keyboard, it works just fine. However, if you need a more complete package (function keys, arrows, etc.) I recommend using Onboard. It’s not packaged for Fedora, but you can find installation instructions on my blog here. Just make sure you download the latest version.

Wayland? #

Wayland works when using GNOME sessions. I really didn’t have any issues with it apart from Onboard not working with it. So I had to switch back to Xorg. I hope this gets fixed soon, as it worked really well with Wayland.

Other useful resources #

The main page for all BayTrail tablet development is here. Big props to the maintainer of this page. If you have a problem chances are that a fix is somewhere on that page.

Conclusion #

It is now much easier to run Fedora on BayTrail hardware. Patches are still happening in 4.10 and 4.11 kernels, and I hope these fixes won’t be necessary anymore. As far as usability goes, it’s almost perfect for me, with the sound being the only real issue.

So we had to wait for support, but it’s now finally here! Huge thanks to everyone involved in fixing all the BayTrail bugs!

 
250
Kudos
 
250
Kudos

Now read this

Running Fedora 23 Workstation Linux on an Intel BayTrail tablet

In my recent projects I’ve managed to run Fedora (for fun) on pretty much everything including: My phone (see my other post about GNURoot) NVIDIA Optimus laptop Raspberry Pi 2 (armhfp 23 with LXDE works great for me) Azure Virtual... Continue →