Showing posts with label kubuntu. Show all posts
Showing posts with label kubuntu. Show all posts

Friday, July 10, 2015

ZaReason Verix 547 Touchpad Freezes

This is another in my series of love notes to ZaReason's Verix 547 Linux-compatible laptop.  This time I'm working on some odd "pauses" or "freezes" in the behavior of the touchpad.

Every now and then, seemingly at random, I'll be moving the pointer with the trackpad and suddenly the pointer simply stops.  Clicking, swiping, dragging... nothing.  I can continue to type, so the keyboard is still active, but otherwise the trackpad is simply unresponsive.  Interestingly, if I switch away to a virtual terminal and come back, miraculously the touchpad is active again!

At first I thought it was related to the trackpad itself, which is:

$ xinput --list | grep Touch
⎜   ↳ SynPS/2 Synaptics TouchPad id=11   [slave  pointer  (2)]


$ cat /proc/bus/input/devices
...
I: Bus=0011 Vendor=0002 Product=0007 Version=01b1
N: Name="SynPS/2 Synaptics TouchPad"
P: Phys=isa0060/serio1/input0
S: Sysfs=/devices/platform/i8042/serio1/input/input5
U: Uniq=
H: Handlers=mouse0 event4
B: PROP=9
B: EV=b
B: KEY=6420 30000 0 0 0 0
B: ABS=260800011000003

...

So, a Synaptics part.  But I couldn't quite find anything that matched the exact behavior.  My weak Google-fu finally dropped me here:

https://devtalk.nvidia.com/default/topic/766166/elantech-touchpad-related-nvidia-driver-freeze/

It's not exactly the same environment - the author specifically calls out an ElanTech touchpad, but the behavior is smack on.  Naturally, this is an NVIDIA PRIME-/Optimus-related issue.  ::sigh::

Turns out this author helped identify a bug and it was fixed in an upstream Xorg release - but not the Xorg used in *ubuntu.  While my Xorg says it's 1.16.1 and the was applied to 1.16.0, apparently the patch didn't get accepted until a later release of 1.16.1 - comparing the release dates via 'X -version' showed me that.  Even xorg-edgers didn't have a later X release with the patched code.

A very kind soul packaged up a .deb with the patched xorg binaries and supplied them here:

http://askubuntu.com/questions/507744/touchpad-acting-weird-in-14-04-on-msi-cr70-2m/550603#550603

Long story short, I downloaded the .tar, extracted the .debs, and installed the ones that mattered.  (This user is obviously an X developer, as he had tons of debugging tools and virtualized X server tools installed.)  All I needed was xserver-common and xserver-xorg-core.

It worked!  The touchpad freeze is completely gone.  Thank you, friends!

Oh, and until I upgrade to Kubuntu 15.04, which comes with the fixed X, I put those two packages on hold in apt via:

echo "hold xserver-common" | dpkg --set-selections

This makes life easier when I'm doing upgrades and I might forget to uncheck the xorg packages.

OK, another laptop quirk knocked out!

Knocking out the little things with my ZaReason Verix 547

So, as I've detailed in prior posts, I'm running Kubuntu 14.10 on a new Verix 547 laptop from ZaReason, a vendor and integrator in Berkeley.  So far it's been going well, but there are niggles to deal with, of course.  Even ZaReason, which specifically configures and supports Linux on the machines they sell, has problems with some functionality on this laptop.  Just goes to show the power of OEMs that only test and guarantee operation on Windows - such a hassle!!

Here are some of the issues I've had out of the box with the Verix:

  1. lightdm absolutely refuses to show the greeter (login) screen.  I can still log in and it starts up a Plasma session, meaning the keyboard is active and the greeter is detecting my keystrokes and parsing the password, but the greeter is blank.
  2. There are intermittent pauses in the touchpad operation.  At random times the touchpad will simply cease accepting input.
  3. Sometimes the desktop environment (Plasma/KWin) would become corrupted and unresponsive after a resume from suspend.
  4. I can't get audio to output to the HDMI port.
Some of these I've already managed to get around.  Woo-hoo!  Thank you, Interwebz!!  Specifically:

  1. After searching for days and trying many hacks, lightdm was still always showing a blank screen for a greeter.  The strangest thing was that I could still type my password, press enter, and then the splash would come up and the desktop environment (Plasma) launched fine.  This would happen whenver the greeter was shown, such as logging out and relogging in.  However, the screen locker was fine - resuming from suspend would show the password field.

    After a LOT of fiddling around and searching, I knew that the problem was related to X and not to the touchpad.  For example, I could tap the pad and move the cursor outside the password field, and suddenly typing and pressing <enter> wouldn't log me in.

    Also, I didn't see any errors in the X or lightdm log.  Nothing that screamed "Hey, I can't display myself!".  I found a post that describes dealing with black screen issues with NVIDIA Prime systems.  It referred specifically to 14.04, but it talked about the same problem - booting up into a black screen with keyboard active and switching to a VT.

    The post was mainly concerned with corrupt xorg.conf's that were being rewritting by 'gpu-manager', which I don't appear to have running on my system.  BUT, when I compared their "correct" xorg.conf to my own conf file, I noticed something interesting.  They included this option in the Intel device section:

    Section "Device"
        Identifier "intel"
        Driver "modesetting"
    EndSection

    The "modesetting" driver was something I hadn't seen before.  Here was my xorg.conf, autogenerated by nvidia-xconfig:

    Section "Device"
        Identifier "intel"
        Driver "intel"
        BusID "PCI:0@0:2:0"
        Option "AccelMethod" "SNA"
    EndSection

    Mine was a tad different - notice the "intel" driver, but that's really it.  Everything else is just extra specification.  So, I modified the driver to go from "intel" to "modesetting" and... VOILA!  I can see the lightdm greeter now!  It's not pretty - very barebones, but it works!  I assume I can hack on the theme (background, etc.) to make it nicer.
This post is a little longer than I expected, so I'll address the other issues in subsequent posts.