Some disorganized notes about installing Debian on UMAX VisionBook 9Wi Pro 2-in-1. This document is very much work in progress, I (do not) apologize for a disorganized and chaotic appearance.

Changes:

  1. 2018-03-12 disable touchpad while typing
  2. 2018-02-19 sound after resume
  3. 2018-02-18 headphones
  4. 2018-02-17 suspend and hibernate via systemd
  5. 2018-01-28 Bluetooth & kernel version info
  6. 2017-12-22 Tablet mode mentioned
  7. 2017-12-19 Network Manager timeout
  8. 2017-12-13 external speakers, sound via HDMI, 32-bit kernel do not work
  9. 2017-12-11 hibernate to disk
  10. 2017-12-08 micro HDMI output
  11. 2017-12-06 wifi module. micro SD

Impressions

The notebook is too heavy - about 950g. I've expected less, none of the e-shop sellers mentions this fact. Most of the weight is in the display, neverthless, the stability is good when the notebook is on a flat surface - less when holding in your hands in the air (that is a bit difficult).

One problem is that you can open it only until certain angle, which is too small - you cannot conveniently keep in on your knees and see the display comfortably

It has only one full USB port, and one OTG. To add insult to the injury, the full USB is on the detachable keyboard, when using it in a tablet mode, leaving you with only micro USB OTG.

Preliminaries

I decided to use 32-bit system, it should be easier on RAM.

Booting

I have used debian-live-9.1.0-i386-xfce+nonfree.iso from here (in hope that the built-in wifi would work, these expectations have not been met). There are newer images available since then. I copied the image to an usb stick (dd if=debian-live-9.1.0-i386-xfce+nonfree.iso of=/dev/sdX).

To boot from that, press ESC to get into the graphical BIOS environment, select SPU and you are in a classical BIOS environment, where you can select BOOT and enable USB Boot. The BIOS also offers "Legacy android boot", whatever that means and there is a lot of android options, which I did not touch (some of the options look dangerous).

After exiting from the BIOS, in Boot Manager you should see the bootable USB stick.

Alternative booting, if Windows is still installed: from either the Sign on screen or the Start menu, select Power () → hold Shift while selecting Restart. Use a device, EFI USB Device, Troubleshoot → Advanced options → UEFI Firmware settings.

Installation

Only graphical install works, and the graphical display won't work after the installation - it will boot and you can type commands, but you won't see anything. Thus you have to boot into recovery mode.

To boot after installation, you have to start with init replaced by the shell (it will try to boot into graphical mode). So you have to do the following in grub, to boot into text mode:

  1. Select Advanced
  2. Recovery mode
  3. press e
  4. after single, add init=/bin/bash
  5. press Ctrl x
Now, the display is constructed in portrait mode - it means you have to turn your head by 90°, or rotate the display in software. Fortunately, it is easy to do in Linux framebuffer console - type:
echo 1 > /sys/class/graphics/fbcon/rotate_all
To make it permanent:

You have to remount the root filesystem in read/write mode:

mount / -o remount,rw
then edit /etc/default/grub:
vi /etc/default/grub
delete "quiet" (it helps debugging) and modify the line:
GRUB_CMDLINE_LINUX="fbcon=rotate:1 nomodeset"
If you mess up something and the screen switches off, you could try to turn off the machine more gracefully by typing (blindly)
sync
mount / -o remount,ro
and then press:
Crtl (hold it down) Alt (hold it down) Fn (hold it down) 0 (hold it down)   S U B
Some relevant links:

Screen brightness

After booting the system, some things (most notably brightness control) do not work. Note that /proc/acpi/video is missing.

You will see following in dmesg:

[drm:pwm_setup_backlight [i915]] ERROR Failed to own the pwm chip
maybe relevant: https://bugs.freedesktop.org/show_bug.cgi?id=96571
You have to compile CONFIG_PWM and backlight will work then.

Until you compile it, the notebook will hang while booting randomly - be patient, keep trying and it will boot eventually.

Battery indicator

Battery indicator will not work unless you compile the kernel with the following:
I2C_DESIGNWARE_PLATFORM and I2C_DESIGNWARE_BAYTRAIL
IIO
CONFIG_MFD_AXP20X_I2C - kernel documentation warns it must be built-in
CONFIG_AXP288_FUEL_GAUGE CONFIG_AXP20X_POWER
CONFIG_GENERIC_ADC_BATTERY (maybe this one is not needed)
CONFIG_EXTCON_AXP288? CONFIG_AXP288_CHARGER?
For wifi to work, you have to compile in CONFIG_RTL8723BS (found in Staging).

Kernel

32 bit kernel before 4.15.3 hangs the system when X11 starts. With 4.15.3 32 bit kernel works, but X11 start very slowly and there are messages in dmesg about GPU hang. This could be relevant. 64 bit kernel (with identical .config, as far as it can be) works well.

This is my current kernel configuration config-4.15.3.xz for 4.15.3.

If you trust me not to compile a backdoor, this is my kernel (as a *.deb package). Note that since it is a 64-bit kernel, even though the system is 32-bit, so you have to use dpkg --force-architecture -i linux-image-4.15.3_*_amd64.deb to install it.

Misc

/proc/acpi/button/lid/LID0/state works (shows status open/closed), but the notebook does not sleep when you close the lid -- I need to investigate it further.

Script to rotate the desktop: rotate_desktop.sh.gz. Call it as rotate_desktop.sh left|right|normal|inverted (remember that normal is portrait).

Hibernation does not work by default (screens turns off, the notebook keeps draining the battery and cannot resume), but it works if you switch off the wifi before. If you hibernate in graphical mode, sometimes the system will remain in graphical mode while writing the image to the swap, leaving you without visual feedback and control. And sometimes there will be graphical glitches after resume (not redrawing parts of screen). It is therefore better to switch to console first.

Use the hib script to hibernate and hibm to suspend. Both pm and s2disk work, and with wifi off and text mode, suspend and hibernate are rock solid. Unfortunately, only s2idle is available in /sys/power/mem_sleep, and the notebook seems to drain too much power when suspended to RAM - the battery lasts only about 20 hours.

If you want to let systemd handle hibernation, put umaxhacks to /lib/systemd/system-sleep/ and make sure there is HandlePowerKey=suspend in /etc/systemd/logind.conf. With this, you can also suspend/hibernate from xfce4 panel menu.

If starting Network Manager takes a long time to timeout during startup, edit /etc/systemd/system/network-online.targets.wants/networking.service and reduce TimeoutStartSec=5min to something less, like TimeoutStartSec=5s

You cannot disable touchpad while typing: touchpad is not compatible with synaptics, it uses libinput driver. While xinput --set-prop 'pointer:HS-M962-CS-A3-19-00 USB KEYBOARD' 'libinput Disable While Typing Enabled' 0 would work in theory, the device does not recognize the property. As a stopgap measure, you can use diseven.

With kernel 4.14.7 wi-fi works reasonably well, PEAP authentication (as used by e.g. UPC Wi-Free) does not. WIth 4.14.15, wi-fi does not work at all. With 4.15-rc9 and later, wi-fi works, including PEAP.

Sound

By default, headphones do not work - they might get some traces of sound if you push the jack halfway inside. To enable headphones including jack detection, put this file into /etc/modprobe.d/

After resuming from hibernation, the audio is quiet - the solution is to reinitialize (rmmod & modprobe sound modules, like this:

killall pulseaudio
rmmod snd_soc_sst_cht_bsw_rt5645
rmmod snd_soc_rt5645
modprobe snd_soc_rt5645
modprobe snd_soc_sst_cht_bsw_rt5645
This is included in systemd suspend script.

What works (well)

After compiling into the kernel what needs to be compiled, following works: suspend, hibernate, touchscreen, touchpad, screen brightness, storage, display, sound, wifi, keyboard, battery indicator, main USB port, dualboot with Windows (but why would you want this?), micro SD (shows as /dev/mmcblk2), micro HDMI output (show in xrandr as HDMI-1 and works normally - including youtube 1080p fullscreen output)

What does not work

Not tested:

Virtualbox

Virtualbox present in stretch-backports does not compile kernel modules for 4.14.5 - you need at Virtualbox 5.2.2 from testing. The best way is probably to compile the kernel on a 64-bit testing system and compile virtualbox modules there (m-a a-i virtualbox). https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=880068

Tablet mode

onboard with XFCE works surprisingly well, but I'd prefer tiling window manager (and decorationless windows). Onboard does not work with awesome, but it does with xmonad - you have to add something like this to the configuration:
myManageHook = touchManageHooks <+> manageHook myBaseConfig
touchManageHooks = composeAll [
                    className =? "Onboard"  --> doIgnore