How to get touchpad gestures working in browsers under Wayland

I want to use the two-finger left and right swipe to go back and forth on pages and the two-finger pinch to zoom in and zoom out on the pages in my browsers, Chromium and Brave Beta. I am using Wayland.

Brave: 1.60.97 Chromium: 118.0.5993.96 (Official Build) beta (64-bit)
Chromium: 118.0.5993.88 (Official Build) Arch Linux (64-bit)

(base) [uncharted@victus-amd ~]$ inxi --admin --verbosity=7 --filter --width
System:
  Kernel: 6.5.8-arch1-1 arch: x86_64 bits: 64 compiler: gcc v: 13.2.1
    clocksource: tsc available: hpet,acpi_pm
    parameters: BOOT_IMAGE=/boot/vmlinuz-linux
    root=UUID=f3a13708-d97d-4129-a702-b2f1264ef82c rw
    resume=UUID=48eb7ca9-84db-45a0-9652-f45c7090b35b loglevel=3 nowatchdog
    nvme_load=YES
  Desktop: KDE Plasma v: 5.27.8 tk: Qt v: 5.15.11 wm: kwin_wayland vt: 1
    dm: SDDM Distro: Arch Linux
Machine:
  Type: Laptop System: HP product: Victus by HP Laptop 16-e0xxx v: N/A
    serial: <superuser required> Chassis: type: 10 serial: <superuser required>
  Mobo: HP model: 8934 v: 80.73 serial: <superuser required> UEFI: AMI
    v: F.18 date: 07/25/2023
Battery:
  ID-1: BAT0 charge: 42.5 Wh (76.7%) condition: 55.4/55.4 Wh (100.0%)
    volts: 15.1 min: 15.4 model: HP Primary type: Li-ion serial: <filter>
    status: discharging cycles: 165
Memory:
  System RAM: total: 16 GiB note: est. available: 14.97 GiB
    used: 4.2 GiB (28.1%)
  RAM Report: permissions: Unable to run dmidecode. Root privileges required.
CPU:
  Info: model: AMD Ryzen 5 5600H with Radeon Graphics bits: 64 type: MT MCP
    arch: Zen 3 gen: 4 level: v3 note: check built: 2021-22
    process: TSMC n7 (7nm) family: 0x19 (25) model-id: 0x50 (80) stepping: 0
    microcode: 0xA50000D
  Topology: cpus: 1x cores: 6 tpc: 2 threads: 12 smt: enabled cache:
    L1: 384 KiB desc: d-6x32 KiB; i-6x32 KiB L2: 3 MiB desc: 6x512 KiB L3: 16 MiB
    desc: 1x16 MiB
  Speed (MHz): avg: 566 high: 1397 min/max: 400/4280 scaling:
    driver: amd-pstate-epp governor: powersave cores: 1: 400 2: 400 3: 1397
    4: 400 5: 400 6: 1397 7: 400 8: 400 9: 400 10: 400 11: 400 12: 400
    bogomips: 79080
  Flags: 3dnowprefetch abm adx aes aperfmperf apic arat avic avx avx2 bmi1
    bmi2 bpext cat_l3 cdp_l3 clflush clflushopt clwb clzero cmov cmp_legacy
    constant_tsc cpb cppc cpuid cqm cqm_llc cqm_mbm_local cqm_mbm_total
    cqm_occup_llc cr8_legacy cx16 cx8 de decodeassists erms extapic
    extd_apicid f16c flushbyasid fma fpu fsgsbase fsrm fxsr fxsr_opt ht
    hw_pstate ibpb ibrs ibs invpcid irperf lahf_lm lbrv lm mba mca mce
    misalignsse mmx mmxext monitor movbe msr mtrr mwaitx nonstop_tsc nopl npt
    nrip_save nx ospke osvw overflow_recov pae pat pausefilter pclmulqdq
    pdpe1gb perfctr_core perfctr_llc perfctr_nb pfthreshold pge pku pni popcnt
    pse pse36 rapl rdpid rdpru rdrand rdseed rdt_a rdtscp rep_good sep sha_ni
    skinit smap smca smep ssbd sse sse2 sse4_1 sse4_2 sse4a ssse3 stibp succor
    svm svm_lock syscall tce topoext tsc tsc_scale umip v_spec_ctrl
    v_vmsave_vmload vaes vgif vmcb_clean vme vmmcall vpclmulqdq wbnoinvd wdt
    xgetbv1 xsave xsavec xsaveerptr xsaveopt xsaves
  Vulnerabilities:
  Type: gather_data_sampling status: Not affected
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data status: Not affected
  Type: retbleed status: Not affected
  Type: spec_rstack_overflow mitigation: safe RET, no microcode
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
    prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
    sanitization
  Type: spectre_v2 mitigation: Retpolines, IBPB: conditional, IBRS_FW,
    STIBP: always-on, RSB filling, PBRSB-eIBRS: Not affected
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: AMD Navi 14 [Radeon RX 5500/5500M / Pro 5500M]
    vendor: Hewlett-Packard driver: amdgpu v: kernel arch: RDNA-1 code: Navi-1x
    process: TSMC n7 (7nm) built: 2019-20 pcie: gen: 3 speed: 8 GT/s lanes: 16
    ports: active: none empty: HDMI-A-1 bus-ID: 03:00.0 chip-ID: 1002:7340
    class-ID: 0380
  Device-2: AMD Cezanne [Radeon Vega Series / Radeon Mobile Series]
    vendor: Hewlett-Packard driver: amdgpu v: kernel arch: GCN-5 code: Vega
    process: GF 14nm built: 2017-20 pcie: gen: 3 speed: 8 GT/s lanes: 16
    link-max: gen: 4 speed: 16 GT/s ports: active: eDP-1 empty: DP-1
    bus-ID: 09:00.0 chip-ID: 1002:1638 class-ID: 0300 temp: 41.0 C
  Device-3: Luxvisions Innotech HP Wide Vision HD Camera driver: uvcvideo
    type: USB rev: 2.0 speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 1-3:2
    chip-ID: 30c9:000e class-ID: 0e02
  Display: wayland server: X.org v: 1.21.1.8 with: Xwayland v: 23.2.1
    compositor: kwin_wayland driver: X: loaded: amdgpu
    unloaded: modesetting,radeon,vesa alternate: fbdev dri: radeonsi
    gpu: amdgpu,amdgpu display-ID: 0
  Monitor-1: eDP-1 res: 1920x1080 size: N/A modes: N/A
  API: EGL v: 1.5 hw: drv: amd radeonsi platforms: device: 0 drv: radeonsi
    device: 1 drv: radeonsi device: 2 drv: swrast surfaceless: drv: radeonsi
    wayland: drv: radeonsi x11: drv: radeonsi inactive: gbm
  API: OpenGL v: 4.6 compat-v: 4.5 vendor: amd mesa v: 23.2.1-arch1.2
    glx-v: 1.4 direct-render: yes renderer: AMD Radeon Graphics (renoir LLVM
    16.0.6 DRM 3.54 6.5.8-arch1-1) device-ID: 1002:1638 memory: 500 MiB
    unified: no display-ID: :1.0
  API: Vulkan v: 1.3.264 layers: N/A device: 0 type: discrete-gpu name: AMD
    Radeon RX 5500M (RADV NAVI14) driver: mesa radv v: 23.2.1-arch1.2
    device-ID: 1002:7340 surfaces: xcb,xlib,wayland device: 1
    type: integrated-gpu name: AMD Radeon Graphics (RADV RENOIR)
    driver: mesa radv v: 23.2.1-arch1.2 device-ID: 1002:1638
    surfaces: xcb,xlib,wayland
Audio:
  Device-1: AMD Navi 10 HDMI Audio vendor: Hewlett-Packard
    driver: snd_hda_intel v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 16
    bus-ID: 03:00.1 chip-ID: 1002:ab38 class-ID: 0403
  Device-2: AMD Renoir Radeon High Definition Audio vendor: Hewlett-Packard
    driver: snd_hda_intel v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 16
    link-max: gen: 4 speed: 16 GT/s bus-ID: 09:00.1 chip-ID: 1002:1637
    class-ID: 0403
  Device-3: AMD ACP/ACP3X/ACP6x Audio Coprocessor vendor: Hewlett-Packard
    driver: snd_rn_pci_acp3x v: kernel alternate: snd_pci_acp3x, snd_pci_acp5x,
    snd_pci_acp6x, snd_acp_pci, snd_rpl_pci_acp6x, snd_pci_ps,
    snd_sof_amd_renoir, snd_sof_amd_rembrandt pcie: gen: 3 speed: 8 GT/s
    lanes: 16 link-max: gen: 4 speed: 16 GT/s bus-ID: 09:00.5
    chip-ID: 1022:15e2 class-ID: 0480
  Device-4: AMD Family 17h/19h HD Audio vendor: Hewlett-Packard
    driver: snd_hda_intel v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 16
    link-max: gen: 4 speed: 16 GT/s bus-ID: 09:00.6 chip-ID: 1022:15e3
    class-ID: 0403
  API: ALSA v: k6.5.8-arch1-1 status: kernel-api
    tools: alsactl,alsamixer,amixer
  Server-1: PipeWire v: 0.3.83 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    4: pw-jack type: plugin tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    vendor: Hewlett-Packard driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s
    lanes: 1 port: f000 bus-ID: 04:00.0 chip-ID: 10ec:8168 class-ID: 0200
  IF: eno1 state: down mac: <filter>
  Device-2: Realtek RTL8852AE 802.11ax PCIe Wireless Network Adapter
    vendor: Hewlett-Packard driver: rtw89_8852ae v: kernel pcie: gen: 1
    speed: 2.5 GT/s lanes: 1 port: e000 bus-ID: 05:00.0 chip-ID: 10ec:8852
    class-ID: 0280
  IF: wlan0 state: up mac: <filter>
  IP v4: <filter> type: dynamic noprefixroute scope: global
    broadcast: <filter>
  IP v6: <filter> type: noprefixroute scope: link
  WAN IP: <filter>
Bluetooth:
  Device-1: Realtek Bluetooth Radio driver: btusb v: 0.8 type: USB rev: 1.0
    speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 1-4:3 chip-ID: 0bda:2852
    class-ID: e001 serial: <filter>
  Report: btmgmt ID: hci0 rfk-id: 3 state: down bt-service: enabled,running
    rfk-block: hardware: no software: yes address: <filter> bt-v: 5.2 lmp-v: 11
    status: discoverable: no pairing: no
Logical:
  Message: No logical block device data found.
RAID:
  Message: No RAID data found.
Drives:
  Local Storage: total: 709.83 GiB used: 115.38 GiB (16.3%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Western Digital
    model: WD Blue SN570 250GB size: 232.89 GiB block-size: physical: 512 B
    logical: 512 B speed: 31.6 Gb/s lanes: 4 tech: SSD serial: <filter>
    fw-rev: 234110WD temp: 31.9 C scheme: GPT
  ID-2: /dev/nvme1n1 maj-min: 259:5 vendor: SK Hynix
    model: PC711 HFS512GDE9X073N size: 476.94 GiB block-size: physical: 512 B
    logical: 512 B speed: 31.6 Gb/s lanes: 4 tech: SSD serial: <filter>
    fw-rev: HPS0 temp: 30.9 C scheme: GPT
  Message: No optical or floppy data found.
Partition:
  ID-1: / raw-size: 117.19 GiB size: 114.79 GiB (97.95%)
    used: 19.13 GiB (16.7%) fs: ext4 dev: /dev/nvme0n1p1 maj-min: 259:1
    label: EndeavorOS uuid: f3a13708-d97d-4129-a702-b2f1264ef82c
  ID-2: /boot/efi raw-size: 513 MiB size: 512 MiB (99.80%)
    used: 35.3 MiB (6.9%) fs: vfat dev: /dev/nvme0n1p4 maj-min: 259:4
    label: NO_LABEL uuid: 4E5A-9F03
  ID-3: /home raw-size: 111.29 GiB size: 108.99 GiB (97.93%)
    used: 24 GiB (22.0%) fs: ext4 dev: /dev/nvme0n1p2 maj-min: 259:2
    label: Uncharted_Home uuid: e6aeaa99-1115-42ae-880d-89ec2980df5f
  ID-4: /run/media/uncharted/Edu raw-size: 97.66 GiB
    size: 97.66 GiB (100.00%) used: 72.21 GiB (73.9%) fs: ntfs
    dev: /dev/nvme1n1p5 maj-min: 259:10 label: Edu uuid: EEE6563FE656086B
Swap:
  Kernel: swappiness: 10 (default 60) cache-pressure: 100 (default) zswap: yes
    compressor: zstd max-pool: 20%
  ID-1: swap-1 type: partition size: 3.91 GiB used: 0 KiB (0.0%) priority: -2
    dev: /dev/nvme0n1p3 maj-min: 259:3 label: N/A
    uuid: 48eb7ca9-84db-45a0-9652-f45c7090b35b
Unmounted:
  ID-1: /dev/nvme1n1p1 maj-min: 259:6 size: 260 MiB fs: vfat label: SYSTEM
    uuid: 44D3-64CF
  ID-2: /dev/nvme1n1p2 maj-min: 259:7 size: 16 MiB fs: <superuser required>
    label: N/A uuid: N/A
  ID-3: /dev/nvme1n1p3 maj-min: 259:8 size: 377.81 GiB fs: ntfs
    label: Windows uuid: DCF819C9F819A336
  ID-4: /dev/nvme1n1p4 maj-min: 259:9 size: 702 MiB fs: ntfs label: N/A
    uuid: 0C82D1B782D1A60C
  ID-5: /dev/nvme1n1p6 maj-min: 259:11 size: 522 MiB fs: ntfs
    label: Windows RE tools uuid: 5A28C42D28C409C9
USB:
  Hub-1: 1-0:1 info: hi-speed hub with single TT ports: 4 rev: 2.0
    speed: 480 Mb/s (57.2 MiB/s) lanes: 1 mode: 2.0 chip-ID: 1d6b:0002
    class-ID: 0900
  Device-1: 1-3:2 info: Luxvisions Innotech HP Wide Vision HD Camera
    type: video driver: uvcvideo interfaces: 2 rev: 2.0
    speed: 480 Mb/s (57.2 MiB/s) lanes: 1 mode: 2.0 power: 500mA
    chip-ID: 30c9:000e class-ID: 0e02
  Device-2: 1-4:3 info: Realtek Bluetooth Radio type: bluetooth driver: btusb
    interfaces: 2 rev: 1.0 speed: 12 Mb/s (1.4 MiB/s) lanes: 1 mode: 1.1
    power: 500mA chip-ID: 0bda:2852 class-ID: e001 serial: <filter>
  Hub-2: 2-0:1 info: super-speed hub ports: 2 rev: 3.1
    speed: 10 Gb/s (1.16 GiB/s) lanes: 1 mode: 3.2 gen-2x1 chip-ID: 1d6b:0003
    class-ID: 0900
  Hub-3: 3-0:1 info: hi-speed hub with single TT ports: 4 rev: 2.0
    speed: 480 Mb/s (57.2 MiB/s) lanes: 1 mode: 2.0 chip-ID: 1d6b:0002
    class-ID: 0900
  Hub-4: 4-0:1 info: super-speed hub ports: 2 rev: 3.1
    speed: 10 Gb/s (1.16 GiB/s) lanes: 1 mode: 3.2 gen-2x1 chip-ID: 1d6b:0003
    class-ID: 0900
Sensors:
  System Temperatures: cpu: 52.6 C mobo: N/A
  Fan Speeds (rpm): fan-1: 0 fan-2: 0
  GPU: device: amdgpu temp: 43.0 C mem: 0.0 C fan: 65535 watts: 3.00
    device: amdgpu temp: 42.0 C
Info:
  Processes: 339 Uptime: 1d 1h 16m wakeups: 4 Init: systemd v: 254
  default: graphical tool: systemctl Compilers: gcc: 13.2.1 clang: 16.0.6
  Packages: pm: pacman pkgs: 1724 libs: 354 tools: yay Shell: Bash v: 5.1.16
  running-in: konsole inxi: 3.3.30

From the Arch Wiki (I don’t use chromium or have a touchpad so I can’t test anything)

Touchpad Gestures for Navigation

To enable two finger swipe to go back and forward through your history, use the following flags:

–ozone-platform-hint=auto --enable-features=TouchpadOverscrollHistoryNavigation

https://wiki.archlinux.org/title/chromium

1 Like

Found the solution.

Use this command line argument to enable swipe left and right for page navigation:
–enable-features=TouchpadOverscrollHistoryNavigation

Change this flag - Preferred Ozone platform - in chrome://flags to Wayland in order to enable pinch to zoom
chrome://flags/#ozone-platform-hint

2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.