Sunday, January 27, 2019

Ubuntu and Candy Crush games

I was able to install Ubuntu 18.10 on my small Lenovo MIIX 300 tablet.  It work well beside that Ubuntu seems to freeze from time to time.

Compared to Android, iOS or Windows, the "Ubuntu Tablet" is missing major features like games.

Games currently available from the Ubuntu Store are old and often broken.  They are not suited to the touch interface and thus require a physical keyboard or a game pad.

While browsing on the internet for a solution, I've found out that King.com does make their mobile games available in your browser using the Flash plugin.  Since Chrome does support Flash internally,  I've loaded their games and tried them out. 


I does work really well with the touch interface so I can start wasting time on my "Ubuntu tablet" as I can on Android and iOS.

Here's the link for the games: https://king.com/games.

Sunday, January 20, 2019

Install Ubuntu on Lenovo Tablet MIIX 300

If you have the Lenovo MIIX 300 tablet, you may be in luck if you want to install Ubuntu on this device.



I got mine a few years ago at Best Buy for really cheap as it was an opened box.  It came pre-installed with Windows 10 32 bits edition.  The table come with a detachable keyboard so you can use it as a small laptop or a regular tablet.

My main issue with the Lenovo MIIX 300 was the 32 bits installation of Windows.  More and more apps are only supporting the 64 bits version so there is less and less apps/games that I can install on this neat device.

Last year, I did try to install Ubuntu on it without much success.  But with the latest version,  Ubuntu 18.10, it's almost perfect.  Yep, there is a few hurdles but nothing impossible.

The main issues:
  • Sound does not work out-of-the-box but it's easy to fix
  • Display orientation is wrong, but there is a workaround
  • From time to time, the device will freeze completely
    • Press POWER button 10 seconds to shutdown See Note...
  • Bluetooth does not work  Bluetooth work is updating to 19.04
  • Webcam does not work
NOTE:  Seems that adding this line to /etc/default/grub is preventing freezing: 


```/etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi="
```
and then you have to run:
```
$ sudo update-grub

Read the complete post: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1784152

Note 2:  The grub setting did not work.  I took a longer time but it eventually froze again.  But I discovered that the tablet is not frozen just the touch interface.  Doing a reload of the hid_multitouch module fixes the issue.

> sudo rmmod hid_multitouch
> sudo modprobe hid_multitouch


The issue now is figuring a way to reload the module just without the physical keyboard.

Note 3: Updating to the latest developpement version of Ubuntu (19.04) has enabled the Bluetooth device.  I was able to use my Bluetooth earbuds with it.

Step 1

Download the desktop version of Ubuntu.  The default flavor does work but I found that Ubuntu Budgie works better as is it a bit lighter.  The KDE flavor didn't work.

You'll also need a special file to boot from the USB drive, on with we will create the boot disk.

Download the bootia32.efi file.  This is required on this machine.  Here's a link on GitHub!

Also, download the driver files for the sound card as by default, it does not work.  Here's the link on GitHub!

Get a USB key drive having at least 2+ Gigs available.  Create your bootable USB drive using Rufus in Windows.  Make sure to select the GPT scheme for the boot partition.

If you are already on Ubuntu, here's how to do it:
  1. Insert your USB key on your computer.  
  2. GParted is required on this machine.  Install it...
  3. In GParted, select your device and "Create a partition table" from the menu
    1. Select the format as GPT, and not MSDOS
    2. Set the size as 2 MB
    3. This will wipe your USB drive
  4. Once done, create a FAT 32 partition having at least 2 Gigs 
  5. Mount the ISO image so you'll be able to copy the files from the ISO archive.
    1. From the console: sudo mount -o loop ubuntu-18.10.x-desktop-amd64.iso /mnt/somefolder
  6. Open Nautilus, and press CTRL-H to show all hidden file from the mounted archive and copy everything into the FAT 32 partition on your USB drive.
  7. Once done, copy the bootia32.efi file into [USB Drive]/BOOT/EFI
    1. This is mandatory!
  8. Also, copy the audio drivers at the root of your USB drive as they will be needed later.
You should be all set now to boot into Ubunbtu.

Step 2

By default, your tablet disc is encrypted using "Safe Boot".  You'll need to go into the settings of Windows to deactivate it.  You'll also need to deactivate the encryption in the "Boot" manager.  This is required to be able to boot from another device and interact with the hard disc.

If I remember well, this process has to be done in Windows first.  It takes a few hours to complete.  Once done, you need to boot into the "Boot" section.  When rebooting, while seeing the Lenovo logo, press "Fn"+2 (F2).  You get the configuration screen for the machine and you can disable the Safe Boot from there.

Careful with this step.  Be patient and do the whole process before doing anything else.

In the end, you should be able to boot into Windows with an unencryted hard drive.

Step 3

This is the moment of truth.  Plug your tablet to the keyboard as we need the USB ports.  Insert your USB boot drive and reboot your device.
  1. You can do it be going into the recover section of Windows 10
  2. You can also for the boot device pressing "Fn"+"+" (F12) on the keyboard.
You all steps have been followed correctly you should see your USB boot disk in the selection.  Boot with it and wait around 30 seconds.

Eventually, you'll get the Ubuntu Desktop, in Portrait mode.  Rotation does work, but it's not in sync with the physical state of the device.  The fun begins...

Step 4

For some reason, the rotation does not work correctly.  In Landscape, the desktop will be rotated clockwise in Portrait mode.  I've tried a few things to fix it but I eventually removed the support of the gyroscope:  sudo apt-get remove iio-sensor-proxy

Most of the time, I use my table in Landscape anyway.  You<ll have to do this when installed also.

Once removed, find the Desktop settings and select the proper orientation.  It can be done also using the command line: xrandr -o right (or left if it's in the wrong orientation).

On the final setup, I have created keyboard shortcuts to change the orientation as needed using the xrandr command.

Once your display shows in the proper orientation, you can enabled your WIFI connection as it is supported out-of-the-box.

Play and explore it.  When ready, you can install on your hard disk.

Step 5

You can install Ubuntu along side of Windows without any problems.  The main issue is that you need to reboot and press F12  to boot from the Ubuntu partition.  Also, space on the hard disk is limited at 64 Gigs.  Windows 10 does take around 30 Gigs of it with apps...

When creating your administrator user, set auto-login, it is really useful.

My initial tests were along Windows 10.  In the end, I did chose to wipe Windows 10 completely and only have Ubuntu Budgie installed.   I now have 58 Gigs of free space ;)

So install as you you wish.  I really liked Windows 10, but being stuck with the 32 bits version was a pain.

Step 6 (Once installed)

At this step, you should be able to boot into Ubuntu.  Again, you'll have to struggle with the display orientation (see Step 4).

Connect to your WIFI and update with the latest packages.  I've also enabled the developers packages.  It seems to be a bit more stable with those.

Remember the UCM file for the sound driver?  You need to copy all the sub-folders into /usr/share/alsa/ucm folder as root.

Once done, in a console, execute pulseaudio -k

You should have audio now.

For some reason, the Pulseaudio does not detect when plugging headphones so you need to do it manually to switch from Speakers to Headphones.  Keep a shortcut on the audio settings on your desktop.

Forget about the Bluetooth headphones as the Bluetooth device does not work. (At least at the moment of writing this post)

Step 7 (Ubuntu Budgie)

The default flavor of Ubuntu does support a virtual keyboard out-of-the-box but it does not work well.  With Budgie, there is not even an on-screen keyboard popping up.  But do not fear, there is a neat fix.

Install the "OnBoard" package from the Software setup.  You can use it to popup when needed from the settings and customise it as needed.  

Conclusion

You should now have a fully working Ubuntu Tablet now.  There is a few quirks here and there.  Some 3D games does not work.  You'll need the physical keyboard to play some games and you'll be missing apps and games available on iOS/Android/Windows but it will be fun.

I use Chrome from Google as it does support the touch interface, it works with Netflix and can create Web Apps using the menu "More Tools" - "Create Shortcut"

If the freezing bug could be fixed, it would be almost perfect for a real Linux tablet.