43

I'm experiencing a serious problem with the new Ubuntu 18.04:

System
Dell XPS 13 with a freshly installed Ubuntu 18.04 LTS.

Problem description
The touchpad provides only primary button (single click and double click), but no secondary button. In particular, when using the "test Your Settings" option in Settings -> Devices -> Mouse & Touchpad, any click on the touchpad is signaled as primary button, no matter where I click (left or right side of the touchpad). This remains the case even after I change the Primary Button from Left to Right (in Settings -> Devices -> Mouse & Touchpad -> General).

In comparison, an external mouse connected to my laptop (via usb) works fine: it provides both primary and secondary buttons with sides corresponding to the choice of Primary Button (in Settings -> Devices -> Mouse & Touchpad -> General).

This may be related to Touchpad right click doesn't work on touchpad, only the buttons above it. Thinkpad E480 Ubuntu 18.04 LTS

Any ideas?

Update:
Meanwhile, I found out that in addition to the solution proposed by EntropyWins, one can also control this touchpad behavior via the Tweaks tool (a.k.a. gnome-tweaks) under Keyboard & Mouse -> Touchpad -> Mouse Click Emulation. In any case, as EntropyWins explains in his answer, this is not a bug.

Yuvalem
  • 660
  • See if this useful: https://askubuntu.com/questions/957099/dell-vostro-3568-model-ubuntu-17-04-touch-pad-left-and-right-click-behaving-same – pomsky Apr 27 '18 at 13:15
  • The above fix might work because as I understand it, it overrides the newer libinput driver with the older synaptics driver. My fix below requires a simpler settings flip and still uses the new driver, so hopefully it is a bit less likely to cause other problems in the future. It also doesn't require a reboot! – PatKilg Apr 27 '18 at 16:41

3 Answers3

62

Basically, Ubuntu 18.04 currently defaults to "Mac" behavior on the touchpad. The technical details are that Ubuntu defaults libinput touchpads to "clickfingers" behavior.

To revert that, run this in a terminal:

gsettings set org.gnome.desktop.peripherals.touchpad click-method areas

Another option (thanks OP) is to install gnome-tweak-tool (either through your software manager or through sudo apt install gnome-tweak-tool in the terminal). Navigate to the “Keyboard & Mouse” sub-menu in the left menu of gnome-tweak-tool, and select “Areas” from the touchpad’s “Mouse Click Emulation” options in the right side panel, as shown in the red box in the image below: Relevant setting in gnome-tweak highlighted

[Warning: This fix is for the libinput driver that ships as the default input driver for Ubuntu 18.04. YMMV if you've installed the (different) synaptics driver before trying this fix.]

maciek
  • 155
PatKilg
  • 742
  • 3
    Worked like a charm, thanks heaps!

    I wonder if the default MAC setting is a smart thing...

    – Yuvalem Apr 27 '18 at 19:16
  • I tried to be clear about that in the bug report ;-) – PatKilg Apr 29 '18 at 01:42
  • 10
    Also, I take Linus' approach to what is a bug: Don't f**k with things the user expects to work as it always has worked... – PatKilg Apr 29 '18 at 01:48
  • 4
    Switching to the "area" method disables the right click altogether in my case (18.04, Acer Extensa 2510G). And I DO HATE the "fingers" method because you have to keep one finger on the touchpad or the menu disappears. Useless acrobatics just. – Pavel Apr 29 '18 at 22:51
  • 2
    Both methods now work correctly after renaming 50-libinput.conf to 90-libinput.conf to make sure it's read after 70-synaptics.conf. Hmm. – Pavel Apr 29 '18 at 23:17
  • 2
    Pavel--the reason my fix didn't work for you is (likely) because you have the synaptics drivers installed. 18.04 does not ship with the synaptics driver controlling the touchpad, you likely installed it yourself (or your flavor included them). My fix is for the libinput driver, not the synaptics driver. – PatKilg Apr 30 '18 at 13:19
  • @Pavel, where are the .conf files you mentioned located? I cannot find them on my system. I see the same behaviour as you do. – emk2203 Apr 30 '18 at 22:33
  • In /usr/share/X11/xorg.conf.d/ @emk2203 – Pavel Apr 30 '18 at 23:24
  • That did the trick. But how did you get both methods to work? For me, it's either the buttons or the clickfingers with gnome-tweaks. – emk2203 May 01 '18 at 00:04
  • 1
    @PatKilg Yes, I already had the synaptics driver installed although I didn't do it manually. Perhaps carried over from previous version upgrades. – Pavel May 23 '18 at 22:20
  • I had the same problem on the same machine as the OP. Like @Pavel, I had the Synaptics driver installed without knowing it. Once I got rid of the offending driver, by removing the package xserver-xorg-input-synaptics, this solution worked like a charm! – Vectornaut Aug 18 '18 at 05:13
  • PS: Don't run this gsettings command using sudo by accident or it won't work. – Mihai Todor Jul 02 '19 at 20:49
  • 1
    @MihaiTodor I suggest never running a commands with sudo unless you have a very good reason ;-) – PatKilg Jul 03 '19 at 21:53
  • Yeah, bad things can happen when setting up a new system and you're in a rush :) – Mihai Todor Jul 03 '19 at 22:00
  • Package gnome-tweak-tool is not available, but is referred to by another package. – NIMISHAN Feb 24 '20 at 05:34
  • This answer is scoped to Ubuntu 18.04. I suspect recent viewers are finding this after upgrading Ubuntu to 20.04. The command line fix should still work, but check out this post for gnome-tweak installation instructions: https://itsubuntu.com/install-gnome-tweak-tool-on-ubuntu-20-04/ – PatKilg May 08 '20 at 16:15
5

Right button event is generated when two fingers are held down on the touchpad when a physical click is generated. The location of the fingers does not matter and there are no software-defined button areas.

This is the default behavior on Ubuntu 18+ and Apple touchpads.

maciek
  • 155
  • In 18.04 I had no problems with this, just updated to 20.04.1 LTS and now secondary/right clicks are REALLY problematic, intermittent and difficult to get constantly. I can't see how to map the secondary stylus button to one of the buttons on my CTH-480 wacom and I can't see how to affect the sensitivity to correct this either. I can map a key combination to a physical button but I can't assign a right/secondary click. big problem... – Tom Rhodes Oct 03 '20 at 09:22
1

Switching to the "area" method disables the right click altogether

solution- reboot or logout required to apply the tweak