Running Ubuntu on Chuwi Hi10 Pro tablet

Chuwi Hi10 Pro (CW1529) tablet is sold for about $200 with an attachable keyboard, which makes it a potential candidate to replace my old Acer Aspire One and run Linux on it. It’s also equipped with a high-quality 10″, 1920×1200 IPS screen.

The tablet is based on Intel Atom x5-Z8350 Cherry Trail CPU, which requires a fresh Linux kernel. So I started with pre-release of Lubuntu 17.04 (Zesty Zapus).

So far, out of the box:

  • screen is oriented vertically, which makes it difficult to operate with the keyboard.
  • Touchscreen, sound, Bluetooth, and Wifi are not visible to the kernel.

Solving the screen orientation:

In /etc/default/grub, edit the following setting:

GRUB_CMDLINE_LINUX="fbcon=rotate:1"

Then, add the following to make lightdm rotate the screen automatically:

cat >/etc/lightdm/chuwi_hi10_screen_orientation.sh <<'EOT'  #!/bin/sh xrandr --orientation right  EOT  cat >/etc/lightdm/lightdm.conf.d/50_chuwi_hi10.conf <<'EOT'
[SeatDefaults]
display-setup-script=/etc/lightdm/chuwi_hi10_screen_orientation.sh
EOT
# this will apply the setting immediately:
systemctl restart lightdm

There is one bug though: for some reason, the display manager still thinks it’s the old resolution, e.g. 1920 on vertical resolution,  so all fonts look much smaller than they are, and window closing buttons are hardly visible. If I start lightdm without my customization and login, and then run “xrandr –orientation right”, all fonts and window controls are of normal size.

With Hopkins Kong’s kernel patches, Wifi adapter is now working. Touchscreen is responding, but acts randomly.

In order to compile your own Linux kernel, take your fastest available Ubuntu host. The build process is parallelized, so the more CPU cores you have, the better.

# As of this writing, the current Ubuntu kernel is 4.10.0-11.13

# On the build host:
apt-get install -y git fakeroot
apt-get build-dep linux-image-4.10.0-11-generic

mkdir /opt/chuwi
cd /opt/chuwi
git clone https://github.com/hopkinskong/linux_cherrytrail.git
cd linux_cherrytrail/
# shows the latest commit, currently 3dd7325
git branch -v
git diff --patch d27e48d 3dd7325 >../ct.patch

cd /opt/chuwi
git clone git://kernel.ubuntu.com/ubuntu/ubuntu-zesty.git
cd ubuntu-zesty
rm .gitattributes .gitignore .mailmap
git apply ../ct.patch 


chmod a+x debian/rules
chmod a+x debian/scripts/*
chmod a+x debian/scripts/misc/*
cat >>debian.master/config/amd64/config.common.amd64 <<'EOT'
CONFIG_STAGING=y
CONFIG_TOUCHSCREEN_SILEAD=n
CONFIG_TOUCHSCREEN_SILEAD_ACPI=m
CONFIG_RTL8723BS=m
CONFIG_WLAN_SDIO=y
EOT

# The patches are incompatible with "silead_ts" module, so we have to 
# disable it and trick the build scripts, as they don't lile when a module disappears.

sed -i -e 's/silead/gslx680_ts_acpi/' debian.master/abi/4.10.0-10.12/amd64/generic.modules

# this shows current version, currently 4.10.0-11.13
head -1 debian.master/changelog

sed -i -e 's/4\.10\.0-11\.13/4.10.0-11.13+chuwihi10pro01/' debian.master/changelog

fakeroot debian/rules clean
fakeroot debian/rules binary-headers binary-generic binary-perarch

# On the target machine:
dpkg -i linux-headers* linux-image-*

###############
# Touchscreen firmware, still not working properly
cd /root/build
git clone https://github.com/onitake/gsl-firmware.git
cd gsl-firmware/

# horizontal
perl -I tools/ ./tools/fwtool -c firmware/chuwi/hi10_pro/firmware.fw -m 1680 -w 1925 -h 1260 -t 5 -f track,yflip /lib/firmware/silead_ts.fw

#vertical
perl -I tools/ ./tools/fwtool -c firmware/chuwi/hi10_pro/firmware.fw -m 1680 -w 1260 -h 1925 -t 5 -f track,swap /lib/firmware/silead_ts.fw

rmmod gslx680_ts_acpi; sleep 1; modprobe gslx680_ts_acpi

Found Bluetooth driver for Realtek RTL8723BS, need to try it.

Advertisements

, ,

  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: