After I decided the laptop, I search for some success story installing linux on the machine, so I found:
- https://esc.sh/blog/linux-on-lenovo-miix-320/ by Mansoor
- https://telegra.ph/Installing-Lubuntu-1710-on-the-Lenovo-Miix-320-ICR-01-19 by xowl
None promise a smooth installation and both confirm at least Camera and SD Card slot would not work. For the records, I choose LXDE for my all Linux desktop, as based on my experience, it is lighter than XFCE,Gnome/Mate but still give simplicity experience than other lightweight Windows Manager.
To be note, this article is made based on the both link above with additional some change that I made. Some information are copied here as for archive in case the links above become inaccessible.
Preparation
Download the Lubuntu Desktop 64-bit from:
And write the image to USB either using dd on mac/linux, and for me it's my first using Etcher on the preinstalled Windows 10.
On Windows 10, we need to shrink the partition of the Windows, just decided how many partition that you need for your linux. On my case, as I have 128 GB eMMC version, I decided to give linux 32GB. So the Windows partition is reduced using Disk Management less 32GB.
Still on Disk Management, turn off the BitLocker. This step is needed when you want to dual boot, as we will turn off the secure boot on the Lenovo bios. Turning BitLocker off, you will loose the encryption feature on the Windows partition.
Once the partition conversion done, you can restart the windows to make it boot from bios. Press the Volume-Up button while it restart. There are some other way like from Windows 10 Setting, Recovery boot...etc... (I'm already forgotten when I make this article)
On the BIOS, make sure to turn of the Secure Boot. You would not able to boot to the USB if Secure Boot still on. Save and boot again, hold the Volume-Up Button to come the BIOS again, select boot device then your USB drive.
Boot to Installation Image
On first boot, You will greeted by Installation grub. DO NOT press enter directly. You need to edit the boot parameter by press e to come to edit entry.
Before the line that starts with linux, add:
set gfxpayload=keep
At the end of the line that starts with linux, add:
nomodeset i915.modeset=1 fbcon=rotate:1
So they will lookalike:
Continue to boot. You may ended do the installation in portrait mode. This because the Ubuntu recognize the default screen as in portrait mode. Once done, you will boot it, and when in grub, you need do the exactly as above on the first boot, edit the boot parameter by press e.
Note: After the boot, You will have a black/blank screen. Just close the lid for some seconds and open it again (some time need 2nd attempt). You should see the login screen in portrait mode. Just login in any way you feel possible, then open terminal (Ctrl-Alt-t)and use xrandr to rotate the screen:
xrandr -o right
The command above will only rotate the screen, but it would not rotate the digitizer of the touch screen, so you will loose it for a while.
Fixing things
Now times to make some fix to the linux to adapt with the hardware. As most (if not all) of the commands below need root permission, we would become root by:sudo su
It's much easier to manage things as root user rather than we type sudo multiple time on multiple commands. So commands below are run as root!!
grub
nano /etc/default/grubChange or add the following lines:
# This to remove the splash screen
GRUB_CMDLINE_LINUX_DEFAULT=""
# 2 Lines below are as adviced by Mansoor, there are explanation on his web.
GRUB_CMDLINE_LINUX="nomodeset i915.modeset=1 fbcon=rotate:1"
GRUB_GFXPAYLOAD_LINUX=keep
Press Ctrl+x and then y and press Enter to save it.
To make the boot show the right text, we still need to hack the grub update script. FYI, this hack should be not recommended, but it's not covered with the /etc/default/grub. Because somehow the grub can show in landscape mode, but after, the kernel recognize the screen in portrait mode.
nano /etc/grub.d/10_linux
## commented line 154 about setting gfxmode, so become:
#echo " gfxmode \$linux_gfx_mode" | sed "s/^/$submenu_indentation/"
# Then add (note: space after first double quote is tab, to keep the file look nice):
echo " set gfxpayload=keep"
echo " gfxmode 800x1280"
Press Ctrl+x and then y and press Enter to save it.
Then update the grub with command:
update-grub
initramfs
I do not really know if this part would took effect, but as xowl advice about the backlight and blanking during boot, I was applied this part. In the end, related or no, I can do backlight controls in the X.
cd /etc/initramfs-tools
nano initramfs.conf
Change the line:
to
Press Ctrl+x and then y and press Enter to save it.
lsmod | cut -d ' ' -f 1| sudo tee -a modules
nano modules
Change the line (actually remove the header):
Modules
pwm-lpss
then find a like that says i915 and remove it.
nano modules
Change the line (actually remove the header):
to (and add this line, on my case, I have same module below so I doubled it):
then find a like that says i915 and remove it.
Press Ctrl+x and then y and press Enter to save it.
And update the initramfs with command:
update-initramfs -u
X configuration
As advised by Xowl, create file /usr/share/X11/xorg.conf.d/11-miix320.confnano /usr/share/X11/xorg.conf.d/11-miix320.conf
Press Ctrl+x and then y and press Enter to save it.
Notice the: Option "Rotate" "Right", this is to rotate the screen from portrait to landscape.
I prefer to use xorg-input-libinput rather than xorg-input-synaptic as the libinput have built-in 'disable touchpad while typing' rather we need to invoke another process syndaemon for synaptic, beside libinput is loaded too for the touchscreen. So move all the synaptic config file out, or you can delete them, or even remove the package.
mv /share/X11/xorg.conf.d/*synaptics* /usr/share/X11/
Then we need to 'rotate' the digitizer of the touchscreen and also modify on the touchpad options.
Add this to the touchscreen section:
Option "TransformationMatrix" "0 1 0 -1 0 1 0 0 1"
So it will look like:
And add these to the touchpad secion:
Option "Tapping" "on"
Option "NaturalScrolling" "on"
The natural scrolling is to invert the scroll, you may prefer to turn it off.
So the section will look like:
So the section will look like:
Press Ctrl+x and then y and press Enter to save it.
When I write this article, the hard-click on the touchpad/clickpad still not work, either incompatible with the kernel or the libinput driver.
Blank/Black Screen on reboot
As on the first boot after the installation, the lid need to close then open again, it somewhat like triggering the DPMS off with close then on with the lid open. So we need to firing the event by scripts. This part may differ with different distro even Ubuntu variants may use different script name, but basically, we need to call command:
xset dpms force off && sleep 1 && xset dpms force on
Just after the X started and need be called by the Display Manager.
LUbuntu is use lightdm as Display Manager. As in documentation, lightdm have config display-stopped-script and greeter-setup-script, but none is work for me. And I found it call command 'upstart'. So I just create script /bin/upstart
nano /bin/upstart
Press Ctrl+x and then y and press Enter to save it.
This script is not perfect, as it will be called when boot and every time screen being locked and user log-off, while actually it just need to be called once at very first boot.
Volume Controls
Volume controls is not run out of the box and the default LUbuntu is not work, we need to use XFCE daemon:
apt install xfce4-volumed
And with GUI:
- Open the 'Start Menu' -> Preferences -> Setup Hot Keys
- Open the 'Programs' tab
- Remove the lines with Open the 'Programs' tab
- XF86AudioRaiseVolume
- XF86AudioLowerVolume
- XF86AudioMute
- SAVE, then close the window
- Open the 'Start Menu' -> Preferences -> Default applications for LXSession
- Go to the 'Autostart' tab
- In the 'Known Applicaions' part, put a tick near the 'XFCE Volume Daemon'
- Close the window
Battery Gauge
Battery Gauge was work out of the box at the first days I use the Miix 320, but after it stop to work. So I took xowl's advice. This is more a hack rather a solution, as this make a script keep running all over the time although most being slept. I change the original script from sleep 10 seconds to 30 seconds.
Please note, the script have more lines than the visible, scroll or select all in the text area.
Please note, the script have more lines than the visible, scroll or select all in the text area.
apt install i2c-tools
nano /opt/axpd.sh
Press Ctrl+x and then y and press Enter to save it.
chmod +x /opt/axpd.sh
nano /etc/cron.d/axpd
Press Ctrl+x and then y and press Enter to save it.
Conclusion
Having linux on Lenovo Miix 320 is not perfect, but for day-to-day usage (like browsing, office work, youtube), it's better than use the preinstalled Windows 10. After all we are moving things to the cloud.
Here are the list for things to be fix:
- Hard-click on the touchpad/clickpad
- Headphone jack insertion event (I still failed to probe it)
- Camera
- SD Card Slot
No comments:
Post a Comment