** Description changed:

- There are two annoying bugs in far2l in the Wayland session: the
- response to keyboard button presses has a noticeable delay, and the ESC
- key has to be pressed twice. There are no such problems in X11 sessions.
+ [ Impact ]
  
- This patch (from upstream) fixes both:
+ 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-secific 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 27 code
+ 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) fixing both issues (also attached as a file below):
  https://patch-diff.githubusercontent.com/raw/elfmz/far2l/pull/2043.diff
+ 
+ [ 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.
  
  ProblemType: Bug
  DistroRelease: Ubuntu 24.04
  Package: far2l 2.6.0~beta+ds-1build2 [modified: 
usr/lib/far2l/far2l_ttyx.broker]
  ProcVersionSignature: Ubuntu 6.8.0-31.31-generic 6.8.1
  Uname: Linux 6.8.0-31-generic x86_64
  ApportVersion: 2.28.1-0ubuntu2
  Architecture: amd64
  CasperMD5CheckResult: pass
  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-256color
-  XDG_RUNTIME_DIR=<set>
+  LANG=en_US.UTF-8
+  PATH=(custom, no user)
+  SHELL=/bin/bash
+  TERM=xterm-256color
+  XDG_RUNTIME_DIR=<set>
  SourcePackage: far2l
  UpgradeStatus: No upgrade log present (probably fresh install)

** Description changed:

  [ 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-secific 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 27 code
  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) fixing both issues (also attached as a file below):
  https://patch-diff.githubusercontent.com/raw/elfmz/far2l/pull/2043.diff
  
- [ Other info
+ [ 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.
  
  ProblemType: Bug
  DistroRelease: Ubuntu 24.04
  Package: far2l 2.6.0~beta+ds-1build2 [modified: 
usr/lib/far2l/far2l_ttyx.broker]
  ProcVersionSignature: Ubuntu 6.8.0-31.31-generic 6.8.1
  Uname: Linux 6.8.0-31-generic x86_64
  ApportVersion: 2.28.1-0ubuntu2
  Architecture: amd64
  CasperMD5CheckResult: pass
  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-256color
   XDG_RUNTIME_DIR=<set>
  SourcePackage: far2l
  UpgradeStatus: No upgrade log present (probably fresh install)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2063919

Title:
  [patch] Disable ttyxi input processing under Wayland

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/far2l/+bug/2063919/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to