No option in mint 21.3 to have touchpad Disabled while mouse attached

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Post Reply
Fran1974
Level 1
Level 1
Posts: 4
Joined: Tue Nov 08, 2016 12:56 am

No option in mint 21.3 to have touchpad Disabled while mouse attached

Post by Fran1974 »

There is no option in mint 21.3 to have touchpad Disabled while mouse is attached.
If you turn mousepad off, it stays off every reboot, so if you ever reboot w/o a mouse, you are screwed.
Please add back that control panel option
==========

Code: Select all

System-Laptop 24-04-02
  Kernel: 5.15.0-101-generic x86_64 bits: 64 compiler: gcc v: 11.4.0 Desktop: MATE 1.26.0
    info: mate-panel wm: marco 1.26.0 dm: LightDM 1.30.0 Distro: Linux Mint 21.3 Virginia
    base: Ubuntu 22.04 jammy
Machine:
  Type: Laptop Mobo: N/A model: N/A serial: <superuser required> UEFI: American Megatrends LLC.
    v: NP03_LP4XB556_BM04x_P2C1U2M5L1A2T0F3S1 date: 10/25/2023
Battery:
  ID-1: BAT1 charge: 23.7 Wh (73.8%) condition: 32.1/33.9 Wh (94.8%) volts: 7.7 min: 7.7
    model: LiP5000 JSL2022 type: Li-poly serial: <filter> status: Discharging cycles: 8
CPU:
  Info: quad core model: Intel Celeron N5095 bits: 64 type: MCP smt: <unsupported> arch: Tremont
    rev: 0 cache: L1: 256 KiB L2: 1.5 MiB L3: 4 MiB
  Speed (MHz): avg: 2848 high: 2880 min/max: 800/2900 cores: 1: 2880 2: 2861 3: 2850 4: 2804
    bogomips: 15974
  Flags: ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Graphics:
  Device-1: Intel JasperLake [UHD Graphics] driver: i915 v: kernel ports: active: eDP-1
    empty: DP-1,HDMI-A-1,HDMI-A-2 bus-ID: 00:02.0 chip-ID: 8086:4e55 class-ID: 0300
  Device-2: icSpring camera type: USB driver: uvcvideo bus-ID: 1-5:5 chip-ID: 32e6:9005
    class-ID: 0e02
  Display: x11 server: X.Org v: 1.21.1.4 compositor: marco v: 1.26.0 driver: X:
    loaded: modesetting unloaded: fbdev,vesa gpu: i915 display-ID: :0 screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.0x11.2") s-diag: 582mm (22.9")
  Monitor-1: eDP-1 model: BOE Display res: 1920x1080 hz: 60 dpi: 142 size: 344x194mm (13.5x7.6")
    diag: 395mm (15.5") modes: 1920x1080
  OpenGL: renderer: Mesa Intel UHD Graphics (JSL) v: 4.6 Mesa 23.2.1-1ubuntu3.1~22.04.2
    direct render: Yes
Audio:
  Device-1: Intel driver: snd_hda_intel v: kernel bus-ID: 00:1f.3 chip-ID: 8086:4dc8
    class-ID: 0403
  Sound Server-1: ALSA v: k5.15.0-101-generic running: yes
  Sound Server-2: JACK v: 1.9.20 running: no
  Sound Server-3: PulseAudio v: 15.99.1 running: yes
  Sound Server-4: PipeWire v: 0.3.48 running: yes
Network:
  Message: No device data found.
  IF-ID-1: wlxa843a437b057 state: up mac: <filter>
Bluetooth:
  Device-1: Realtek 802.11ac NIC type: USB driver: btusb,rtl8821cu bus-ID: 1-8:7
    chip-ID: 0bda:c820 class-ID: e001 serial: <filter>
  Report: hciconfig ID: hci0 rfk-id: 0 state: up address: <filter> bt-v: 2.1 lmp-v: 4.2
    sub-v: f098 hci-v: 4.2 rev: 75b8
Drives:
  Local Storage: total: 491.59 GiB used: 51.86 GiB (10.5%)
  ID-1: /dev/sda vendor: HEORIADY model: SSD HEORIADY M.2 512GB size: 476.94 GiB speed: 6.0 Gb/s
    type: SSD serial: <filter> rev: 1A0 scheme: GPT
  ID-2: /dev/sdb type: USB model: General UDisk size: 14.65 GiB type: N/A serial: <filter>
    rev: 5.00
Partition:
  ID-1: / size: 113.71 GiB used: 25.06 GiB (22.0%) fs: ext4 dev: /dev/sda5
  ID-2: /boot/efi size: 296 MiB used: 32.6 MiB (11.0%) fs: vfat dev: /dev/sda1
Swap:
  ID-1: swap-1 type: file size: 2 GiB used: 0 KiB (0.0%) priority: -2 file: /swapfile
USB:
  Hub-1: 1-0:1 info: Hi-speed hub with single TT ports: 8 rev: 2.0 speed: 480 Mb/s
    chip-ID: 1d6b:0002 class-ID: 0900
  Device-1: 1-2:2 info: LogiLink UDisk flash drive type: Mass Storage driver: usb-storage
    interfaces: 1 rev: 2.0 speed: 480 Mb/s power: 100mA chip-ID: abcd:1234 class-ID: 0806
    serial: <filter>
  Device-2: 1-3:3 info: Lenovo Optical Mouse type: Mouse driver: hid-generic,usbhid
    interfaces: 1 rev: 2.0 speed: 1.5 Mb/s power: 100mA chip-ID: 17ef:608d class-ID: 0301
  Device-3: 1-4:4 info: SiGma Micro USB Keyboard type: Keyboard,HID driver: hid-generic,usbhid
    interfaces: 2 rev: 1.1 speed: 12 Mb/s power: 100mA chip-ID: 1c4f:007c class-ID: 0300
  Device-4: 1-5:5 info: icSpring camera type: Video driver: uvcvideo interfaces: 2 rev: 2.0
    speed: 480 Mb/s power: 100mA chip-ID: 32e6:9005 class-ID: 0e02
  Device-5: 1-6:6 info: Genesys Logic microSD Reader/Writer type: Mass Storage
    driver: usb-storage interfaces: 1 rev: 2.0 speed: 480 Mb/s power: 500mA chip-ID: 05e3:0727
    class-ID: 0806 serial: <filter>
  Device-6: 1-8:7 info: Realtek 802.11ac NIC type: Bluetooth driver: btusb,rtl8821cu
    interfaces: 3 rev: 2.0 speed: 480 Mb/s power: 500mA chip-ID: 0bda:c820 class-ID: e001
    serial: <filter>
  Hub-2: 2-0:1 info: Super-speed hub ports: 6 rev: 3.1 speed: 10 Gb/s chip-ID: 1d6b:0003
    class-ID: 0900
Sensors:
  System Temperatures: cpu: 63.0 C mobo: N/A
  Fan Speeds (RPM): N/A
Repos:
  Packages: 2379 apt: 2372 flatpak: 7
  No active apt repos in: /etc/apt/sources.list
  Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list
    1: deb http: //packages.linuxmint.com virginia main upstream import backport
    2: deb http: //archive.ubuntu.com/ubuntu jammy main restricted universe multiverse
    3: deb http: //archive.ubuntu.com/ubuntu jammy-updates main restricted universe multiverse
    4: deb http: //archive.ubuntu.com/ubuntu jammy-backports main restricted universe multiverse
    5: deb http: //security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
Info:
  Processes: 252 Uptime: 17m wakeups: 1 Memory: 15.4 GiB used: 2.1 GiB (13.7%) Init: systemd
  v: 249 runlevel: 5 Compilers: gcc: 11.4.0 alt: 11/12 Client: Unknown python3.10 client
  inxi: 3.3.13
Last edited by karlchen on Tue Apr 02, 2024 7:41 am, edited 1 time in total.
User avatar
spamegg
Level 14
Level 14
Posts: 5312
Joined: Mon Oct 28, 2019 2:34 am
Contact:

Re: No option in mint 21.3 to have touchpad Disabled while mouse attached

Post by spamegg »

Welcome to the Forum.

I have that option in Cinnamon:
Screenshot from 2024-04-02 21-05-29.png
Are you saying it was removed from MATE?
Tell Mint developers, not sure how much control they have over MATE:
https://github.com/orgs/linuxmint/discussions
sleeper12
Level 21
Level 21
Posts: 14741
Joined: Thu May 25, 2017 3:22 pm

Re: No option in mint 21.3 to have touchpad Disabled while mouse attached

Post by sleeper12 »

User avatar
hglee
Level 7
Level 7
Posts: 1520
Joined: Fri Jun 22, 2018 4:31 pm

Re: No option in mint 21.3 to have touchpad Disabled while mouse attached

Post by hglee »

You can easily create a short 'tpad' command that can enable & disable your touchpad.

For example, open a Terminal (ctrl-alt-T), and create a file named 'tpad' with the simple nano text editor...

Code: Select all

sudo nano /usr/local/bin/tpad

Next, copy & paste these five lines of text directly into the nano editor window...

Code: Select all

#!/bin/bash
X=`xinput --list|grep -iEo 'Touchpad\s*id\=[0-9]{1,2}'|grep -Eo '[0-9]{1,2}'`
if [[ $1 != 0 && $1 != 1 ]];then echo "Input \"$1\" ignored";exit;fi;#hglee
if [ $1 -eq 0 ];then xinput --disable $X && echo "Touchpad DISABLED";exit;fi
if [ $1 -eq 1 ];then xinput --enable $X && echo "Touchpad ENABLED";fi
To save the text, tap Ctrl-O then Enter. Then tap Ctrl-X to exit nano.
Finally, make your 'tpad' script file executable...

Code: Select all

sudo chmod +x /usr/local/bin/tpad
The tpad file is located in your /usr/local/bin subdirectory, which is in the Linux command search path -- so now you can just type tpad 0 to disable your touchpad, or tpad 1 to enable it. Any input other than 0 or 1 is ignored with no device changes made.

When run, tpad confirms with either a 'Touchpad DISABLED' or 'Touchpad ENABLED' message.

You can add tpad 1 to your Startup Applications, so that your touchpad gets a wake-up call at every restart.

The tpad script utilizes xinput to enable|disable the touchpad, so it's likely to work with any capable Linux.
Linux Mint 21.3 Virginia, MATE 1.26.0, kernel 5.15.0*, Dell 2-in-1
AMD Ryzen 7 5825U / Barcelo iGPU - 14" WUXGA Touchscreen
MediaTek MT7921 WiFi-6 BT-5.2; 32GB DDR4@3200MHz; XPG 2TB-NVMe
User avatar
hglee
Level 7
Level 7
Posts: 1520
Joined: Fri Jun 22, 2018 4:31 pm

Re: No option in mint 21.3 to have touchpad Disabled while mouse attached

Post by hglee »

A nap made for a tpad code tweak.

tpad (above) now gracefully ignores any inputs other than 0 or 1.
Linux Mint 21.3 Virginia, MATE 1.26.0, kernel 5.15.0*, Dell 2-in-1
AMD Ryzen 7 5825U / Barcelo iGPU - 14" WUXGA Touchscreen
MediaTek MT7921 WiFi-6 BT-5.2; 32GB DDR4@3200MHz; XPG 2TB-NVMe
User avatar
Dan-cer
Level 6
Level 6
Posts: 1243
Joined: Fri Jul 29, 2022 4:56 pm
Location: Germany, Lower Saxony

Re: No option in mint 21.3 to have touchpad Disabled while mouse attached

Post by Dan-cer »

What I don't quite understand is that this problem can be solved directly in the hardware in the simplest way. Doesn't every notebook have special hotkeys to deactivate the touchpad? Fn + <one of the Fn numbers> ?
Why then a software config?
How you get better results when searching for yourself.
Having problems with translate into English? Use Deepl Translator 1-click-button in editor - available for Firefox and chromium-based browsers.
User avatar
hglee
Level 7
Level 7
Posts: 1520
Joined: Fri Jun 22, 2018 4:31 pm

Re: No option in mint 21.3 to have touchpad Disabled while mouse attached

Post by hglee »

Dan-cer wrote: Tue May 07, 2024 6:19 amWhy then a software config?
For me, another diverting exercise in something I'd not considered before. And sharing this with fellow curiosity explorers here.

The OP's "you are screwed" scenario might be addressed by having tpad 1 ride shotgun in their Startup Applications, as I allude in my reply.
Linux Mint 21.3 Virginia, MATE 1.26.0, kernel 5.15.0*, Dell 2-in-1
AMD Ryzen 7 5825U / Barcelo iGPU - 14" WUXGA Touchscreen
MediaTek MT7921 WiFi-6 BT-5.2; 32GB DDR4@3200MHz; XPG 2TB-NVMe
User avatar
hglee
Level 7
Level 7
Posts: 1520
Joined: Fri Jun 22, 2018 4:31 pm

Re: No option in mint 21.3 to have touchpad Disabled while mouse attached

Post by hglee »

Here's a version of tpad that also tells you the device number of your touchpad:

Code: Select all

#!/bin/bash
X=`xinput --list|grep -iEo 'Touchpad\s*id\=[0-9]{1,2}'|grep -Eo '[0-9]{1,2}'`
if [[ $1 != 0 && $1 != 1 ]];then echo "Input \"$1\" ignored";exit;fi;#hglee
if [ $1 -eq 0 ];then xinput --disable $X && echo "Touchpad device $X now DISABLED";exit;fi
if [ $1 -eq 1 ];then xinput --enable $X && echo "Touchpad device $X now ENABLED";fi
On my laptop, the command tpad 1 then replies 'Touchpad device 13 now ENABLED'.

You can confirm your device numbers with the xinput --list command.

Your touchpad device number can change from time to time.
Linux Mint 21.3 Virginia, MATE 1.26.0, kernel 5.15.0*, Dell 2-in-1
AMD Ryzen 7 5825U / Barcelo iGPU - 14" WUXGA Touchscreen
MediaTek MT7921 WiFi-6 BT-5.2; 32GB DDR4@3200MHz; XPG 2TB-NVMe
User avatar
MikeNovember
Level 7
Level 7
Posts: 1893
Joined: Fri Feb 28, 2020 7:37 am
Location: Nice, Paris, France

Re: No option in mint 21.3 to have touchpad Disabled while mouse attached

Post by MikeNovember »

Hi,

You can disable / enable the touchpad wit Mate.

Launch the control center, then click on "mouse", and you will get a "mouse preferences" window.

There are two tabs, "mouse" and "touchpad". In the touchpad tab to can enable / disable it.

Here a screen capture (in French):
Capture du 2024-05-16 09-15-51.png
What you want to do, enable touchpad when there is no mouse, and disable it when there is a mouse attached, is not intended (never was in Mate: Mate Desktop version in Linux Mint 21.x is 1.26.0-1, while it was 1.26.0 in Linux Mint 20.3, both have identical functionalities).

Note that there is no conflict between mouse and touchpad: you can have both at the same time (on my system, the cursor can be controlled by mouse, touchpad and graphics pad, the three functioning permanently).

Potential conflicts are between touchpad and keyboard typing, that's why I have disabled touchpad when typing.

Regards,

MN
_____________________________
Linux Mint 21.3 Mate host with Ubuntu Pro enabled, VMware Workstation Player with Windows 10 Pro guest, ASUS G74SX (i7-2670QM, 16 GB RAM, GTX560M with 3GB RAM, 1TB SSD).
Post Reply

Return to “MATE”