Page 1 of 1

libinput ignores Option "DisableWhileTyping"

Posted: Sun Mar 31, 2024 5:48 am
by yoshi
My touchpad is always in the way when typing -
I also have tapping activated, so I type random characters all over the place...

The Option "DisableWhileTyping" in /etc/X11/xorg.conf.d/30-touchpad.conf should fix
that according to my research.

Code: Select all

 $ more /etc/X11/xorg.conf.d/30-touchpad.conf
Section "InputClass"
    Identifier "touchpad"
    Driver "libinput"
    MatchIsTouchpad "on"
    Option "Tapping" "on"
    Option "DisableWhileTyping" "true"
EndSection

Code: Select all

$ xinput list
⎡ Virtual core pointer                    	id=2	[master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
⎜   ↳ ELAN0630:00 04F3:3072 Touchpad          	id=10	[slave  pointer  (2)]
⎜   ↳ ELAN0630:00 04F3:3072 Mouse             	id=11	[slave  pointer  (2)]

Code: Select all

$ xinput list-props 10
Device 'ELAN0630:00 04F3:3072 Touchpad':
	Device Enabled (176):	1
	...
	libinput Natural Scrolling Enabled Default (321):	0
	libinput Disable While Typing Enabled (322):	1
	libinput Disable While Typing Enabled Default (323):	1
	...

Just it doesn't ....
I can still type and tap and scroll and move the mouse while typing.
Any suggestions?

Code: Select all

Snapshot created on: 20211227_1221
System:    Kernel: 5.10.0-28-amd64 [5.10.209-2] x86_64 bits: 64 compiler: gcc v: 10.2.1 
           parameters: BOOT_IMAGE=/vmlinuz-5.10.0-28-amd64 root=UUID=<filter> ro video=1366x768 
           splash psmouse.synaptics_intertouch=0 ipv6.disable=1 
           Desktop: Xfce 4.18.1 tk: Gtk 3.24.24 info: xfce4-panel, plank wm: xfwm 4.18.0 vt: 7 
           dm: LightDM 1.26.0 Distro: MX-21.3_x64 Wildflower October 20  2021 
           base: Debian GNU/Linux 11 (bullseye) 
Machine:   Type: Laptop System: LENOVO product: 81A4 v: Lenovo ideapad 120S-11IAP serial: <filter> 
           Chassis: type: 10 v: Lenovo ideapad 120S-11IAP serial: <filter> 
           Mobo: LENOVO model: LNVNB161216 v: SDK0P29277 WIN serial: <filter> UEFI: LENOVO 
           v: 6GCN32WW date: 05/15/2019 
Battery:   ID-1: BAT1 charge: 15.0 Wh (71.8%) condition: 20.9/32.2 Wh (64.8%) volts: 7.8 min: 7.5 
           model: LENOVO BASE-BAT type: Li-poly serial: <filter> status: Discharging cycles: 365 
CPU:       Info: Dual Core model: Intel Celeron N3350 bits: 64 type: MCP arch: Goldmont family: 6 
           model-id: 5C (92) stepping: 9 microcode: 48 cache: L2: 1024 KiB 
           flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 4377 
           Speed: 993 MHz min/max: 800/2400 MHz Core speeds (MHz): 1: 993 2: 993 
           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 status: Not affected 
           Type: spec_store_bypass status: Not affected 
           Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization 
           Type: spectre_v2 mitigation: Retpolines, IBPB: conditional, IBRS_FW, STIBP: disabled, 
           RSB filling, PBRSB-eIBRS: Not affected 
           Type: srbds status: Not affected 
           Type: tsx_async_abort status: Not affected 
Graphics:  Device-1: Intel HD Graphics 500 vendor: Lenovo driver: i915 v: kernel bus-ID: 00:02.0 
           chip-ID: 8086:5a85 class-ID: 0300 
           Device-2: Realtek EasyCamera type: USB driver: uvcvideo bus-ID: 1-8:3 
           chip-ID: 0bda:5627 class-ID: 0e02 serial: <filter> 
           Display: x11 server: X.Org 1.20.11 compositor: xfwm4 v: 4.18.0 driver: loaded: intel 
           display-ID: :0.0 screens: 1 
           Screen-1: 0 s-res: 1366x768 s-dpi: 96 s-size: 361x203mm (14.2x8.0") 
           s-diag: 414mm (16.3") 
           Monitor-1: eDP1 res: 1366x768 hz: 60 dpi: 133 size: 260x140mm (10.2x5.5") 
           diag: 295mm (11.6") 
           OpenGL: renderer: Mesa DRI Intel HD Graphics 500 (APL 2) v: 4.6 Mesa 20.3.5 
           compat-v: 3.0 direct render: Yes 
Audio:     Device-1: Intel Celeron N3350/Pentium N4200/Atom E3900 Series Audio Cluster 
           vendor: Lenovo driver: snd_hda_intel v: kernel alternate: snd_soc_skl,snd_sof_pci 
           bus-ID: 00:0e.0 chip-ID: 8086:5a98 class-ID: 0403 
           Sound Server-1: ALSA v: k5.10.0-28-amd64 running: yes 
           Sound Server-2: PulseAudio v: 14.2 running: yes 
Network:   Device-1: Intel Dual Band Wireless-AC 3165 Plus Bluetooth driver: iwlwifi v: kernel 
           port: 1040 bus-ID: 02:00.0 chip-ID: 8086:3166 class-ID: 0280 
           IF: wlan0 state: up mac: <filter> 
Bluetooth: Device-1: Intel Bluetooth wireless interface type: USB driver: btusb v: 0.8 
           bus-ID: 1-7:2 chip-ID: 8087:0a2a class-ID: e001 
           Report: hciconfig ID: hci0 rfk-id: 10 state: down bt-service: N/A rfk-block: 
           hardware: no software: no address: <filter> 
           Info: acl-mtu: 1021:5 sco-mtu: 96:6 link-policy: rswitch hold sniff 
           link-mode: slave accept 
Drives:    Local Storage: total: 241.59 GiB used: 145.49 GiB (60.2%) 
           ID-1: /dev/mmcblk0 maj-min: 179:768 model: SC200 size: 183.35 GiB block-size: 
           physical: 512 B logical: 512 B type: SSD serial: <filter> scheme: MBR 
           SMART Message: Unknown smartctl error. Unable to generate data. 
           ID-2: /dev/mmcblk1 maj-min: 179:0 vendor: HP model: DF4064 size: 58.24 GiB block-size: 
           physical: 512 B logical: 512 B type: SSD serial: <filter> rev: 0x8 scheme: GPT 
           SMART Message: Unknown smartctl error. Unable to generate data. 
Partition: ID-1: / raw-size: 30.68 GiB size: 30.03 GiB (97.87%) used: 20.22 GiB (67.3%) fs: ext4 
           dev: /dev/dm-0 maj-min: 253:0 mapped: root.fsm 
           ID-2: /boot raw-size: 566 MiB size: 540.3 MiB (95.45%) used: 195.9 MiB (36.3%) fs: ext4 
           dev: /dev/mmcblk1p6 maj-min: 179:6 
           ID-3: /boot/efi raw-size: 100 MiB size: 96 MiB (96.00%) used: 26 MiB (27.1%) fs: vfat 
           dev: /dev/mmcblk1p2 maj-min: 179:2 
Swap:      Kernel: swappiness: 15 (default 60) cache-pressure: 100 (default) 
           ID-1: swap-1 type: file size: 1024 MiB used: 64.1 MiB (6.3%) priority: -2 
           file: /swapfile_1G 
Sensors:   System Temperatures: cpu: 63.0 C mobo: N/A 
           Fan Speeds (RPM): N/A 
Repos:     Packages: note: see --pkg apt: 2307 lib: 1111 
           No active apt repos in: /etc/apt/sources.list 
           Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list 
           1: deb http://mirror.sg.gs/debian bullseye-updates main contrib non-free
           Active apt repos in: /etc/apt/sources.list.d/debian.list 
           1: deb http://mirror.sg.gs/debian bullseye main contrib non-free
           2: deb http://security.debian.org/debian-security bullseye-security main contrib non-free
           Active apt repos in: /etc/apt/sources.list.d/docker.list 
           1: deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian bullseye stable
           Active apt repos in: /etc/apt/sources.list.d/mx.list 
           1: deb http://mirror.easyname.at/mxlinux-packages/mx/repo/ bullseye main non-free
           Active apt repos in: /etc/apt/sources.list.d/protonvpn-stable.list 
           1: deb [arch="all", signed-by=/usr/share/keyrings/protonvpn-stable-archive-keyring.gpg] https://repo.protonvpn.com/debian stable main
           Active apt repos in: /etc/apt/sources.list.d/tor.list 
           1: deb [signed-by=/usr/share/keyrings/tor-archive-keyring.gpg] tor: //apow7mjfryruh65chtdydfmqfpj5btws7nbocgtaovhvezgccyjazpqd.onion/torproject.org bullseye main
Info:      Processes: 252 Uptime: 3d 17h 22m wakeups: 24 Memory: 3.66 GiB used: 2.58 GiB (70.5%) 
           Init: SysVinit v: 2.96 runlevel: 5 default: 5 tool: systemctl Compilers: gcc: 10.2.1 
           alt: 10 Client: shell wrapper v: 5.1.4-release inxi: 3.3.06 
Boot Mode: UEFI

Re: libinput ignores Option "DisableWhileTyping"

Posted: Sun Mar 31, 2024 6:46 am
by j2mcgreg
I have a deep aversion to touchpads, so I disable them at my first opportunity and always use a mouse instead.

Re: libinput ignores Option "DisableWhileTyping"

Posted: Sun Mar 31, 2024 6:47 am
by Jerry3904
I use touchpad-indicator (in the repos) to take care of that on my Lenovo.

Re: libinput ignores Option "DisableWhileTyping"

Posted: Sun Mar 31, 2024 8:22 am
by Charlie Brown
In fact it's already set to disabled by default.

In case you'd like to turn back to (the good old) Synaptics (at least to try) :

Code: Select all

sudo mv /etc/X11/xorg.conf.d/30-touchpad-libinput.conf{,.old} ; sudo apt update ; sudo apt install xserver-xorg-input-synaptics -y
Reboot.


To revert back to libinput (for whatever reason) :

Code: Select all

sudo mv /etc/X11/xorg.conf.d/30-touchpad-libinput.conf.old /etc/X11/xorg.conf.d/30-touchpad-libinput.conf ; sudo apt remove xserver-xorg-input-synaptics -y
Reboot.

Re: libinput ignores Option "DisableWhileTyping"

Posted: Sun Mar 31, 2024 10:47 am
by MXRobo
Not trying to be too intrusive, and posting for three reasons, one missed? two curious as to why synaptics would be in the boot parameters when using libinput, mouse too when using touchpad.

splash psmouse.synaptics_intertouch=0 ipv6.disable=1 potential issue?
EDIT - I'm not suggesting to change it - as per post #8, just curious (two) as to why they'd be used with libinput and a mouse. :smile:

viewtopic.php?p=769837#p769837 three maybe?

Cheers!

Re: libinput ignores Option "DisableWhileTyping"

Posted: Sun Mar 31, 2024 12:39 pm
by yoshi
Jerry3904 wrote: Sun Mar 31, 2024 6:47 am I use touchpad-indicator (in the repos) to take care of that on my Lenovo.
tried that one, but gives me at least one second before the touchpad gets disabled after keystroke and also blocks way longer than configured.
So it's lagging beyond usability :(

Re: libinput ignores Option "DisableWhileTyping"

Posted: Sun Mar 31, 2024 12:49 pm
by yoshi
@Charlie Brown & @MXRobo

I used to use synaptic - but for some reason from time to time the touchpad would
freeze.
I tried all kind of stuff to fix it - that's why the boot parameter is still there. Historic...

What would work is the following script which I would call from CLI when the touchpad freezes:

Code: Select all

  	module=i2c_hid; 	#touchpad freezes after suspend 

    	#sudo 
    	modprobe -r  $module  &&\

    	#sudo 
    	modprobe  $module &&\
    	 echo "$module reloaded successfully";
Since switching to libinput in MX-Tweaks no freeze - but unfortunately also no disable while typing.

Re: libinput ignores Option "DisableWhileTyping"

Posted: Mon Apr 01, 2024 6:26 am
by yoshi
As @MXRobo suggested, I changed the boot parameters by removing the synaptic stuff and rebooting...

Code: Select all

System:    Kernel: 5.10.0-28-amd64 [5.10.209-2] x86_64 bits: 64 compiler: gcc v: 10.2.1 
           parameters: BOOT_IMAGE=/vmlinuz-5.10.0-28-amd64 root=UUID=<filter> ro video=1366x768 
           splash ipv6.disable=1 
           Desktop: Xfce 4.18.1 tk: Gtk 3.24.24 info: xfce4-panel, plank wm: xfwm 4.18.0 vt: 7 
           dm: LightDM 1.26.0 Distro: MX-21.3_x64 Wildflower October 20  2021 
           base: Debian GNU/Linux 11 (bullseye) 
Machine:   Type: Laptop System: LENOVO product: 81A4 v: Lenovo ideapad 120S-11IAP serial: <filter> 
           Chassis: type: 10 v: Lenovo ideapad 120S-11IAP serial: <filter> 
           Mobo: LENOVO model: LNVNB161216 v: SDK0P29277 WIN serial: <filter> UEFI: LENOVO 
           v: 6GCN32WW date: 05/15/2019 
Unfortunately makes no difference...

Re: libinput ignores Option "DisableWhileTyping"  [Solved]

Posted: Sat Apr 06, 2024 5:08 am
by yoshi
modified the touchpad-indicator source code
(python) according to this post:

https://github.com/atareao/Touchpad-Ind ... -487394655

now the lag is gone and it disables the keyboard.
I wonder if it is related how the keyboard is connected
in the laptop...
I read that USB keyboards are considered external and don't trigger the disable ... my keyboard might be internally connected via USB

but doesn't matter - my problem is solved, even if I wasn't able to do it without an additional external program

Re: libinput ignores Option "DisableWhileTyping"

Posted: Sat Apr 06, 2024 7:21 am
by Jerry3904
Very well done!

We will want to test that for possible use with MX more generally. Would you be willing to provide a link to your patched code?

Re: libinput ignores Option "DisableWhileTyping"

Posted: Sat Apr 06, 2024 12:57 pm
by yoshi
Jerry3904 wrote: Sat Apr 06, 2024 7:21 am Very well done!

We will want to test that for possible use with MX more generally. Would you be willing to provide a link to your patched code?
Sure
https://gist.github.com/joshi11/9441f7b ... c78c476761

Re: libinput ignores Option "DisableWhileTyping"

Posted: Sat Apr 06, 2024 2:34 pm
by Jerry3904
Thanks!