[SOLVED] Disable Touchpad while typing Ubuntu Linux

I see somewhat similar posts, but none that address my needs. Sorry if this is a duplicate somewhere.

I am running Ubuntu 22.04.1 (fully updated) on a 12th Gen Framework Laptop with 64 GB RAM. I had the same issues when I had 32GB and I upgraded with matching Crucial RAM ( Crucial RAM 64GB Kit (2x32GB) DDR4 3200MHz CL22 (or 2933MHz or 2666MHz) Laptop Memory CT2K32G4SFD832A)

12th Gen Intel® Core™ i7-1280P × 20

I can not really use the laptop without an external keyboard. No matter how much I focus to not touch the trackpad, my cursor detects some touch (or proximity??) and the cursor skips on the page and then I am typing in a different area.

I have searched for answers for weeks. I have Gnome Tweaks installed and I have the setting for “Disable Touchpad while typing” set.

I have also experimented with the following login command in my .profile:

Disable the touchpad when typing please

syndaemon -i 0.40 -K -R -d

I have tried 0.05 up to 1.0 in small increments.

None of the above, neither the Gnome Tweaks nor the syndaemon fix solves the problem.

I now must take a bluetooth keyboard and mouse everywhere because even for the most trivial task, the typing is basically impossible.

Any solutions would be greatly appreciated.

I had the same problems under Wayland, but I am running X11 because Google Meet would not work under Wayland.

1 Like

Have you tried libinput?

That should have better palm detection by default.

Edit:
You could also run a shell script to disable the touchpad and enable it again after inactivity with a key binding.

@Anachron Can you give an example of using libinput that you think would work?

Thanks

Afaik it should be enough to just remove whatever driver you’re currently using and install/load libinput instead. It should have palm detection by default.

You can run libinput list-devices, mine says:

Device:           PIXA3854:00 093A:0274 Touchpad
Kernel:           /dev/input/event21
Group:            7
Seat:             seat0, default
Size:             111x73mm
Capabilities:     pointer gesture
Tap-to-click:     disabled
Tap-and-drag:     enabled
Tap drag lock:    disabled
Left-handed:      disabled
Nat.scrolling:    disabled
Middle emulation: disabled
Calibration:      n/a
Scroll methods:   *two-finger edge
Click methods:    *button-areas clickfinger
Disable-w-typing: enabled
Disable-w-trackpointing: enabled
Accel profiles:   flat *adaptive
Rotation:         n/a

You can tweak it if required using this guide.

1 Like

Thank you. I am going to give it a try.

What I have does not work.

On a fresh (clean installation of Ubuntu 22.04.1 fully updated. Without making any changes whatsoever:

  • X11 - typing automatically stops the touchpad from responding until typing is done.
  • Wayland- typing automatically stops the touchpad from responding until typing is done.

My result also matches your libinput list-devices results with Disable-w-typing: enabled.

By default, Touchégg and xserver-xorg-input-libinput is installed on Ubuntu.

Touchégg is an app that runs in the background and transform the gestures you make on your touchpad or touchscreen into visible actions in your desktop.

Libinput: Now, there is something called “Touch jump detected and discarded” that can appear in the logs after you experience a cursor jump.

It’s not super common (I’ve not been able to recreate it), but this may be what you’re experiencing.

Some users experiencing this on Ubuntu have had success using a different kernel:

sudo apt-get install linux-oem-22.04
(kernel 5.17)

sudo apt-get install linux-oem-22.04c
(kernel 6.1.0)

But this is only going to help if you’re seeing “Touch jump detected and discarded” in the dmesg or journalctl logs.

@Matt_Hartley and @Anachron

Thank you for your inputs - Matt’s assertion that the standard install of Ubuntu 22.04 stops the touchpad when typing helped a lot.

Here is what I think has happened in my config:

  • trying to make the mouse work in virtualbox was complex
  • I found many ‘solutions’ that did not work before I found one that did work to make the mouse work in virtualbox
  • as is typical for finding ‘solutions’, there is no ‘undo this step’ instruction when a solution does not work
  • one of these ‘solutions’ rendered my system incapable of disabling the touchpad on typing - I have no idea which one - I spent hours researching this

In the end, I reinstalled Ubuntu 22.04 from scratch - and made sure to chose the ‘erase entire disk’ option to remove any prior config.

This worked. I admit is is a drastic solution, but not as painful for some people because I keep a git repo of all my install scripts and configs.

The total time to reinstall was about an hour with the reconfig. Far shorter than my research time to try and undo some stetting.

I will also try and make Wayland work with google meet and other screen sharing.

Thanks for your inputs. This request is closed!

2 Likes

You might try using a kvm/libvirt/virtmanager (apologies, I don’t know the proper terminology) virtual machine rather than virtualbox, if that will work for you.

Thank @lbkNhubert - I am definitely not going to retry virtualbox.

I am rethinking my whole 'Windows VM" solution. I installed Windows 10 and after many config issues, made it work using virtualbox. I was thinking that I was going to need to use Windows often for 3 things:
Zoom, Teams, Excel.

Zoom on Linux works well enough if I turn off the GPU
Teams works well enough - just has a really annoying login process
Excel? Would be nice, but after 2 months, I confess that Libre Calc works well enough.

I also installed and made Wine work. It works, but has a lot of limitations.

I am debating whether I need Windows at all.

If I do install Windows again, it is going to be using kvm.

1 Like

I run a windows VM in qemu.
I have no issues at all.

Even with 2GB ram and 2 CPUs it runs smooth with guest drivers.

2 Likes

Delighted to hear that! Marking solved.

Hello, sorry to necro, however this forum topic comes up often if you are searching for the issue, and another solution other than ‘reinstall’ is available and was answered later. Here’s the link:

It basically involves telling libinput that the keyboard and numpad (if you have it) are internal.