Skip to content

Instantly share code, notes, and snippets.

@jfstenuit
Last active March 6, 2024 13:13
Show Gist options
  • Star 45 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save jfstenuit/09feac5ab0bff500db81ac9a56a48773 to your computer and use it in GitHub Desktop.
Save jfstenuit/09feac5ab0bff500db81ac9a56a48773 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

@Viking8
Copy link

Viking8 commented Oct 1, 2023

Just stumbled on your github site and I've been having a heck of a time trying to get screen brightness to work on my Dell Venue 10 Pro. Appears to be the same CPU as the one you listed for your tablet. When I installed Linux Mint, brightness works perfectly, but I can't boot from the internal storage and nothing I have tried has changed that. I switched to Debian 12 and that boots without issue. In fact everything except screen brightness worked right away. Any ideas on how to get it working? Thx for any help in advance.

@manotroll
Copy link

in fedora 39 KDE detects battery level wfi/bt screen orientation
only the touch screen doesn't work
I'll test the cameras later

@tsisaris
Copy link

I have a similar machine. Acer Aspire SW5-012. I have a bootable USB. I would prefer to boot from the SD card. I also need to make the camera and wifi work in porteus. The wifi works in lubuntu. How do I get porteus to run entirely in RAM? I have a lot of questions like this.

@manotroll
Copy link

Does this version work at all?

@tsisaris
Copy link

I really know almost nothing about this stuff. I would like to find out how to:

  1. Make my SD card bootable with this device and run Porteus directly from RAM. It doesn't necessarily matter because eventually, I'd like to remove Windows entirely and just have this device boot directly to the best version of Linux. I assumed it would be Porteus because it is so light and you can run it entirely from ram. Whether it boots from an SD card or the hard drive I would like it to run in RAM. I may keep a simple copy of Windows on the device to be compatible with Windows programs. It's such a weak device that I'm thinking it's best to just ditch Windows.

  2. Configure all hardware devices to run properly in Porteus. This includes the camera, microphone, speakers, SD card slot, USB slots, HDMI port, audio jack, touchscreen, and if I install a tiny USB Bluetooth it will work. There may be other devices too.

  3. Obtain a comprehensive list of software that I can install on Porteus. I need an office program, a media viewer, a very light CAD program if possible, a browser, a notetaking program, a drawing program, etc. I would like to see the comprehensive list of software beforehand so that I know what I'm limited to.

  4. At some point get involved in the process of making programs compatible with other forms of Linux compatible with Proteus

  5. Likely more to follow...

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