Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save GermanAizek/d41118e46261cb38154e3c1f5fa74e14 to your computer and use it in GitHub Desktop.
Save GermanAizek/d41118e46261cb38154e3c1f5fa74e14 to your computer and use it in GitHub Desktop.
Installing Linux on a Baytrail tablet

Hardware specs

Chinese Brand "ITworks" , Model TW891, distributed in France and Belgium by Darty

  • CPU: Intel(R) Atom(TM) CPU Z3735F @ 1.33GHz
  • Video: Intel® HD Graphics for Intel Atom® Processor Z3700 Series
  • Screen: 1280x800
  • WiFi + BT: Realtek RTL8723BS_BT
  • Disks: mmcblk1: mmc1:0001 DF4032 29.1 GiB
  • RAM: 2GB DDR3 @ 1333 MHz
  • BT:

UEFI32 / 64-bit OS

This common issue is solved out of the box by the most recent (testing/unstable) Debian installer.

Other OS (f.i. Ubuntu) are harder to install. To solve the issue with those OS, just check your USB install media before using it for installation. You should have a file named /EFI/BOOT/bootia32.efi. If not, download one from the net and put it in this directory. I was successful with the one from there : https://github.com/hirotakaster/baytail-bootia32.efi/

Generic guidelines

When faced with a new hardware that is not recognised by linux, your first task is to identify every component in the hardware. Install the following tools and check their output :

apt-get install i2c-tools hwinfo lshw pciutils usbutils
lspci
lshw
lsusb
hwinfo --short
cat /proc/cpuinfo
dmesg

I found out that this magic command can be helpfull :

find /sys/devices/platform -name name -printf "%p\t" -exec cat {} \;

It will show you the recognized platforms and all devices that it failed to recognize.

Newer kernel

By using the most recent kernel, most of the issues (MMC, Graphics, Wi-Fi) are resolved.

Device is running fine with Debian Buster with the most recent kernel back-ported.

Add this line to /etc/apt/sources.list :

deb http://deb.debian.org/debian buster-backports main contrib non-free

Then install the newest kernel and non-free realtek and intel drivers :

apt-get -t buster-backports install linux-image-5.2.0-0.bpo.1-amd64-unsigned firmware-realtek firmware-intel-sound

You need the non-free realtek drivers to support the built-in Wi-Fi card.

You get a mostly running device, but some drivers are still missing. You need to re-compile the kernel to support touchscreen and battery indicators.

Remaining issues

find /sys/devices/platform -name name -printf "%p\t" -exec cat {} \;

Gives you a list of ACPI devices which are not handled by the kernel : their name is not overriden by a human-friendly name.

/sys/devices/platform/80860F41:00/i2c-0/i2c-INT0310:00/name     INT0310:00
  Intel Camera Sensor Intel GC310
/sys/devices/platform/80860F41:03/i2c-3/i2c-MSSL1680:00/name    MSSL1680:00
  SiLead MSSL 1680 touch screen
/sys/devices/platform/80860F41:01/i2c-1/i2c-OVTI2680:01/name    OVTI2680:01
  OmniVision Technologies Camera Sensor OV2680 
/sys/devices/platform/80860F41:01/i2c-1/i2c-10EC5640:00/name    10EC5640:00
  Realtek I2S Audio Codec
/sys/devices/platform/80860F41:04/i2c-4/i2c-INT33F4:00/name     INT33F4:00
  Intel(R) Power Management IC
/sys/devices/platform/80860F41:02/i2c-2/i2c-KIOX000A:00/name    KIOX000A:00
  Kionix KXCJ9 Accelerometer 

Touchscreen

You need both the kernel driver (option in kernel config) and the firmware. Firmware can be found there : https://github.com/onitake/gsl-firmware

CONFIG_TOUCHSCREEN_SILEAD=y

Install the firmware file :

mkdir -p /lib/firmware/silead
cd /lib/firmware/silead
wget 'https://github.com/onitake/gsl-firmware/raw/master/firmware/linux/silead/gsl3670-itworks-tw891.fw'

Sound

You need to install sound profile from https://github.com/plbossart/UCM/tree/master/bytcr-rt5640

You also need to blacklist kernel's auto-detected HDMI sound driver to support built-in sound (speaker and headphones) :

echo 'blacklist snd_hdmi_lpe_audio' >> /etc/modprobe.d/50-block-hdmi-audio.conf

Bluetooth

Bluetooth is not detected (not sure if the tablet supports bluetooth, tough)

Cameras

Neither the front, nor the back cameras are detected

Battery levels

Battery levels are not detected

All devices without a corresponding driver

Using the ACPI identifier, you can get the vendor of the component ( https://uefi.org/acpi_id_list ) and possibly the component type/function (just google it)

/sys/devices/platform/80860F41:00/i2c-0/i2c-INT33FE:00

The INT33FE ACPI device has a CRS table with I2cSerialBusV2 resources for 3 devices: Maxim MAX17047 Fuel Gauge Controller, FUSB302 USB Type-C Controller and PI3USB30532 USB switch.

Driver is found in Kernels >=4.19 (option INTEL_CHT_INT33FE)

/sys/devices/platform/80860F41:00/i2c-0/i2c-INT0310:00

Intel Camera Sensor CG310

/sys/devices/platform/80860F41:01/i2c-1/i2c-OVTI2680:01

The OV2680 (RAW) is a cost-effective, low-power 2-megapixel CameraChip™ sensor for feature phones and front-facing camera applications in smartphones and tablets. See https://www.ovt.com/sensors/OV2680

Driver is found in Kernels >=4.20 (drivers/media/i2c/ov2680.c)

/sys/devices/platform/80860F41:01/i2c-1/i2c-10EC5640:00

Realtek ALC5640 audio

/sys/devices/platform/80860F41:04/i2c-4/i2c-INT33F4:00

Intel(R) Power Management IC Device

Driver is found in Kernels >=4.20 (drivers/mfd/axp20x-i2c.c)

Kernel needs option CONFIG_MFD_AXP20X_I2C

Old pre-Buster (Debian 10) issues

Orientation sensors

The orientation sensors are not correctly interpreted. Display remains in landscape mode when it should be in portrait, and vice-versa.

Troubleshooting : when you use monitor-sensorin a root console (remotely), it shows orientation changes properly. I.e. when the keyboard is attached and the tablet in landscape mode with buttons up, it displays "normal". However, gnome does not understand this "normal" properly and uses a "portrait" orientation.

There is a solution to keep a script running, listening to orientation sensor events (see https://wiki.debian.org/InstallingDebianOn/Acer/Spin1 ) but it doesn't seem to be the "proper" way to do it.

This is fixed with Debian 10 (Buster) and a new version of xrandr.

Old pre-4.9 kernel issues

MMC controller issues

My tablet has quite a recent MMC controller. As such, the controller was not recognized by most kernels used in standard stable distributions.

This was solved by using the Debian "Unstable" netinst ISO - which uses linux kernel 4.8 : http://cdimage.debian.org/cdimage/stretch_di_rc1/amd64/iso-cd/debian-stretch-DI-rc1-amd64-netinst.iso

Download the ISO and use Rufus (under windows) to write it to a USB thumb drive.

Still, after the install the kernel has issues with the MMC controller one time out of two.

Graphic controller issues

Apparently, this tablet is a little tricky when it comes to graphical modes.

As such, any distribution depending on a graphical mode interface for installation is failing.

By using Debian, you can force a text mode install by selecting the corresponding option in grub menu.

After the initial install, the system reboots and tries to set the console to graphical mode. Also, the screen orientation is set to portrait.

Both issues are solved by editing /etc/default/grub and replacing "quiet" by "video=efifb fbcon=rotate:1 nomodeset"

With more recent kernels (4.19.0), this is no longer necessary. Just keep "fbcon=rotate:1" in the list.

WiFi controller

Downloaded and installed from https://github.com/hadess/rtl8723bs

Still unstable under load.

References

https://github.com/burzumishi/linux-baytrail-flexx10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment