GalliumOS / galliumos-distro

Docs, issues, and artwork sources for GalliumOS
https://galliumos.org/
GNU General Public License v2.0
347 stars 11 forks source link

[Solved] Touchpad Issues in Gallium oS #539

Open bmfesta2009 opened 4 years ago

bmfesta2009 commented 4 years ago

This should be made a sticky as I know it impacts allot of users. After spending months researching the mouse issue and tying it down to the CMT driver and xorg config files I actually was able to find the Chromium path of conf files that was missing in Gallium. Once I added the appropriate files for me my touchpad works exactly as it does in Chrome OS.

So here is what you need.

  1. Navigate to: https://chromium.googlesource.com/chromiumos/platform/xorg-conf/+refs
  2. Search for the latest stable release in release-R##-*. Example as of the time of this edit: https://chromium.googlesource.com/chromiumos/platform/xorg-conf/+/refs/heads/release-R84-13099.B
  3. Download the tgz file and extract it locally.
  4. For safety make a backup of /usr/share/X11/xorg.conf.d/
  5. Move the 40-touchpad-cmt.conf into /usr/share/X11/xorg.conf.d/
  6. Move 50-touchpad-cmt-{codename}.conf into /usr/share/X11/xorg.conf.d/
  7. Reboot

I have found that by moving all of the files into the xorg.conf.d folder it can cause the mouse to become unresponsive, this needs to be device specific. If you don't know the codename for your chromebook you can try this url: https://www.chromium.org/chromium-os/developer-information-for-chrome-os-devices

Chedski commented 4 years ago

Doing this on my Asus C202sa caused it to start booting to a blank screen with only an underline. I was able to switch to vts, but it changes back every 5 seconds. I am posting this from Links, and it is very frustrating.

Edit: I fixed this by removing the 20- and 40- files.

bmfesta2009 commented 4 years ago

Chedski,

I apologise for the negative impact, and not 100% sure how it caused that impact. But thanks to your feedback I have updated the above document and hopefully it helps others and can be vetted a few more times before and package changes.

kinggrowler commented 4 years ago

@bmfesta2009 , I looked on my GalliumOS 3.1 install on Acer EDGAR but discovered I already had all of these files for my firmware located in "/usr/share/xf86-input-cmt/" directory. Do you know if they need to be in both locations?

mgalgs commented 4 years ago

Hi, @bmfesta2009. I, too, have been struggling to get my Google Pixelbook Eve's touchpad working under Linux (currently using Manjaro). The chromium-os xorg repo you found is a gold mine!

Previously I had cobbled together some xorg confs from various sources and things were working pretty well except for the "jumpy" behavior you documented in #498. With the chromium xorg confs the jumpiness is fixed but now acceleration is way too fast and two-finger scroll is busted :sob:

I wanted to check a few things to make sure I followed the same process as you, namely:

Move the relevant files into /usr/share/X11/xorg.conf.d/ (don't worry about overwriting anything) The files I chose where:

* 50-_-eve_

I actually don't see any files with eve in their name. Are you using this branch? I just went ahead and slammed all *.conf from the tarball into /etc/X11/xorg.conf.d/ and that was enough to get things moving. But given the glitches I'm experiencing and the fact that there were no files with eve in the name I'm wondering if I grabbed the same source as you... Can you please share the direct link to the tarball you're using?

Possibly unrelated, but when I reboot my touchpad becomes unresponsive. I have to actually power off. Have you encountered this issue on your Eve machine?

danlaudk commented 4 years ago

Built-in touchpad on my Samsung 550 Lumpy is completely unresponsive or not recognized on Gallium 3.0 and 3.1 (also, touchpad doesn't appear on System-Mouse dropdown, nor on dmesg | grep input, nor on cat /proc/bus/input/devices and i also checked the hardware cnxn, and it was working fine under chromeOS). I'd like to try the above potential fix but I don't find Lumpy on the list https://chromium.googlesource.com/chromiumos/platform/xorg-conf/+refs (Lumpy is listed as compatible in https://wiki.galliumos.org/Hardware_Compatibility). What can I do?

( Everything else except Suspend/LidClose works amazingly smoothly (Full Firmware [UEFI] from Mr Chromebox for Sandy Bridge). )

bmfesta2009 commented 4 years ago

All,

After doing some more research and working with three more brands of chromebooks and Gallium OS I have updated my original documentation to reflect my findings. I was really close with my original, but it actually worked better by pulling all the files in and by going based on the latest release rather than device specific.

Let me know your feedback!

maccaches commented 4 years ago

I am still having issues on my HP Chromebook X2 after trying everything in this thread. Does anyone have any other suggestions for what I can try?

MrChromebox commented 4 years ago

@maccaches the X2's detachable keyboard has broken firmware, identifies as a touchscreen. I'm not sure how to work around that currently

maccaches commented 4 years ago

This wouldn't help, right? https://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid.git/tree/drivers/hid/hid-google-hammer.c

MrChromebox commented 4 years ago

@maccaches only if it's not already in the mainline Linux (or GalliumOS) kernel -- would need to check on that

maccaches commented 4 years ago

Looks like a variant of it is already in the GalliumOS kernel here on Github. I'm just trying to figure out what ChromeOS does differently, since my touchpad operates properly on it.

kinggrowler commented 4 years ago

None of the above solutions work for me and I have proposed a hacky band-aid that may be of interest. Check out https://github.com/GalliumOS/galliumos-distro/issues/554 for a workaround.

ghost commented 4 years ago

I would love for others to try this and offer any feedback or improve documentation. Also if this could get added to the package xserver-xorg-input-cmt that would be even better.

Pull requests are welcome :sunglasses:

But yeah I guess I'll try to make sure that's included in a future release. Actually I think the trackpad issue is one that merits some discussion because I've found that it works perfectly adequately in my opinion when I go out of my way to remove the cmt driver and use evdev (though it certainly needs some reconfiguration because clicking is insane ootb with evdev on Xfce)

iancrossfield commented 4 years ago

Unfortunately the fix suggested by OP resulted in a nonfunctional touchpad. I'm running GalliumOS 3.1 on Linux 4.16.18 on a 2017 Pixelbook ("Eve"). I downloaded xorg-conf-refs_heads_release-R83-13020.B.tar.gz, unzipped the contents, and moved them into /usr/share/X11/xorg.conf.d/ (after backing up that directory). When I rebooted, the touchpad was unresponsive to moves or clicks but everything else worked fine. I restored the xorg.conf.d directory to its original state, rebooted, and the touchpad came back. Any thoughts? or any suggested diagnostics I could send along?

mgalgs commented 4 years ago

@iancrossfield I had the exact same experience, also on Eve. FWIW, I ended up installing the latest Manjaro and the touchpad is actually working pretty well out of the box. Not as good as it was in ChromeOS but the most tolerable of any configuration I've found thus far. It has even improved since the last time I tried Manjaro on this machine a few months ago. 🤷

bmfesta2009 commented 4 years ago

Unfortunately the fix suggested by OP resulted in a nonfunctional touchpad. I'm running GalliumOS 3.1 on Linux 4.16.18 on a 2017 Pixelbook ("Eve"). I downloaded xorg-conf-refs_heads_release-R83-13020.B.tar.gz, unzipped the contents, and moved them into /usr/share/X11/xorg.conf.d/ (after backing up that directory). When I rebooted, the touchpad was unresponsive to moves or clicks but everything else worked fine. I restored the xorg.conf.d directory to its original state, rebooted, and the touchpad came back. Any thoughts? or any suggested diagnostics I could send along?

As a test I ran this again. I found including the 20 files and the 60 files caused conflict. Using the 40 and 50 still worked for me. I have updated the documentation. If you are on a Google Pixelbook you can do what I have running which is the 40 file and the 50 just for eve.

bmfesta2009 commented 4 years ago

After wiping my laptop I found my instructions to cause conflict unless I used device specific conf files. I have updated my documentation above once again.

spoelstraethan commented 4 years ago

You shouldn't need to do all the workarounds you are putting in. The issue stems from the fact that there is likely a race condition between libinput and cmt (the latter of which is optimized for Chromebooks and their touchpad "quirks").

Run this command to see what driver Xorg is actually using for your device.

grep "Using input" /var/log/Xorg.0.log

I'll have to look at more of the GalliumOS code, but it appears that there are a 40-libinput.conf and a 40-touchpad-cmt.conf by default, which would load libinput and then replace it due to the lexical ordering that happens in conf.d folders, but then the xserver-xorg-input-cmt service that GalliumOS uses for loading the ChromeOS touchpad configurations also copies a 50-touchpad-cmt-YOURMODEL.conf into the folder which loads later and therefore overrides the libinput or merges device specific customizations with the generic cmt configuration. This is likely what causes the really poor touchpad behaviors, because it might set conflicting options for sensitivity and hysteresis and other things that freak out your touchpad and the system.

There probably needs to be an upstream fix that more explicitly manages the order and gives the user an option between the two drivers rather than starting a service that almost always forces the cmt driver.

alexander-potemkin commented 2 years ago

Not sure if that's exactly related, but for the future googlers - I found a solution for my Chromebook here:

usermod -a -G input gdm; usermod -a -G input <user>

Switching to X11 with Gnome 3 worked like a charm then.

bewoodall commented 2 years ago

This worked for my Dell 7310 (codename lulu) running GalliumOS 3.1 (kernel 4.16.18-galliumos).

Thank you, @bmfesta2009!

onurece commented 2 years ago

I tried this on my Acer CB3-431-C5CQ running GalliumOS 3.1, but the mousepad still gets stuck after a while just like before.