[patch] Disable ttyxi input processing under Wayland
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
far2l (Ubuntu) |
Fix Released
|
Undecided
|
Dmitry Shachnev | ||
Noble |
Fix Released
|
Undecided
|
Dmitry Shachnev |
Bug Description
[ Impact ]
The response to keyboard button presses has a noticeable delay, and the ESC key has to be pressed twice. Bug reproduces only in Wayland sessions, but not in X11 sessions.
This seriously affects user experience, so fix should be backported to stable release.
Fix works as follows: far2l uses X11-specific technique to receive key combinations often not available in common terminal emulators, like Ctrl+0, and also to distinguish ESC key presses from char with code 27 sent to terminal. It is called ttyxi mode (xi for XInput it uses). But under Wayland this technique is not working due to Wayland security model, and also introduces delay bug. This patch disables this technique under Wayland, and enables other way for ESC key processing using delay measurement, like mc does.
[ Test plan ]
1. Install far2l in Ubuntu 24.04:
apt install far2l
2. Run far2l:
far2l
3. Press some keys to notice input delay; open any dialog (press F1 for example) and try to close it using ESC key to notice you should press it twice.
[ Where problems could occur ]
The fix is already in master branch of upstream far2l, it is also presents in far2l ppa and no problems were found during testing by enthusiasts. The only problem is extended key support will not work in common terminals, but is can not work under Wayland anyway. Still you can use kitty terminal emulator that has extended keyboard protocol allowing apps to receive any key combinations.
This patch (from upstream) fixes both issues (also attached as a file below):
https:/
far2l 2.6.1~beta+ds-1 from Debian already has similar fix applied.
[ Other info ]
The workaround is to run far2l as follows:
far2l --nodetect=xi --ee
First option, --nodetect=xi, disables ttyxi mode (it is X11-specific and can not operate under Wayland anyway). The second option enables ESC key processing using delays measurement, as it is done in mc.
In Noble + 1 this will be fixed by auto-sync of far2l 2.6.1~beta+ds-1 from Debian.
ProblemType: Bug
DistroRelease: Ubuntu 24.04
Package: far2l 2.6.0~beta+
ProcVersionSign
Uname: Linux 6.8.0-31-generic x86_64
ApportVersion: 2.28.1-0ubuntu2
Architecture: amd64
CasperMD5CheckR
CurrentDesktop: ubuntu:GNOME
Date: Sat Apr 27 09:08:40 2024
InstallationDate: Installed on 2024-04-25 (1 days ago)
InstallationMedia: Ubuntu 24.04 LTS "Noble Numbat" - Release amd64 (20240424)
ProcEnviron:
LANG=en_US.UTF-8
PATH=(custom, no user)
SHELL=/bin/bash
TERM=xterm-
XDG_RUNTIME_
SourcePackage: far2l
UpgradeStatus: No upgrade log present (probably fresh install)
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
tags: |
added: verification-done removed: verification-needed |
Patch file itself. Disables ttyxi input processing mode under Wayland fixing input delays and also enabling alternative ESC key processing mode using delays measurement as done in mc.