Synaptics TouchPad on Panasonic CF-MX4

This wulf7 [1] is a really nice guy that helped me run full featured Synaptics TouchPad with FreeBSD on Panasonic Toughbook CF-MX4 [2][3]. Now it works for moused and libinput with all multitouch gestures like two or three finger scroll, scale, etc! The problem was in detection mechanism as device is connected over multiplexer with both PS/2 and SMBus but multitouch works only over SMBus. Although fix requires change and rebuild of FreeBSD Kernel I hope it gets quickly to the upstream [4]. I had a chance to exercise building whole FreeBSD distribution into the USB memstick image, so I could test driver fix on a target computer without even touching its hard drive contents :-)

/* psm has a special support for GenMouse + SynTouchpad combination */
if (active_ports_count >= 2) {
    for (port = 0; port < KBDC_AUX_MUX_NUM_PORTS; port++) {

That 2 above had to be changed into 1 in /usr/src/sys/dev/atkbdc/psm.c. Nice? That’s what I call a one-bit-fix :-)

In addition, when you work with Synaptics Touchpad in Xorg and you want to use its all features like tap-to-click, natural (swapped) two finger scroll, two and three finger gestures, don’t use moused,xmodmap, or xinput as this will produce inconsistent behavior in applications based on different toolkits (i.e. GTK will scroll up while Qt will scroll down etc), instead use the new way of input based on libinput and modify MatchIsTouchpad section of /usr/local/share/X11/xorg.conf.d/40-libinput.conf like:

Section "InputClass"
        Identifier "libinput touchpad catchall"
        MatchIsTouchpad "on"
        MatchDevicePath "/dev/input/event5"
        Option "NaturalScrolling" "on"
        Option "Tapping" "on"
        Option "ClickMethod" "clickfinger"
        Driver "libinput"
EndSection

[1] https://github.com/wulf7/iichid
[2] https://github.com/wulf7/iichid/issues/51
[3] https://github.com/wulf7/iichid/issues/53
[4] https://reviews.freebsd.org/D28502

Google Android Nexus Device Un-Brick

GoogleNexus

If you happen to brick your Google Nexus device you can always use stock ROM images [1] to revert it to a default and operational state. Package contains not only OS but also bootloader and radio firmware images!

I have bricked my device by installing custom firmware that messed partitions layout inside a Flash Memory. I have seen lots of people having similar problem of endless bootloader-loop. There is no need to send a device to a service when bootloader is operational. All you need is a stock firmware image from Google [1], USB cable, and fastboot utility from Android SDK. If you happen to damage a bootloader, then hardware manipulation at low-level is necessary over JTAG, I can help to recover your device in that case.. no worries :-)

[1] https://developers.google.com/android/nexus/images

Fixing corrupted GPT backup

When you setup system on a fresh disk you may encounter a problem of corrupted GPT backup. This will happen even more likely when you messed with MBR before on that disk. Free and Open GDISK utility will help you. GDISK will tell you current state of the disk and partition tables, also warn you on possible problems. When you print available partitions (‘p’) and they seem okay, you can simply write out (‘w’) the partition table, that would fix the GPT backup corruption problem :-)