Addressing Another Terminal Input Lag with Ubuntu 22.04

22.04command linegnome-terminalkernel

  • Ubuntu 22.04.4 LTS
  • Kernel : Linux 6.5.0-28-generic
  • Gnome version: 42.9
  • Windowing system: X11

I am experiencing another terminal lag with Ubuntu 22.04. Typing is always 1 character late and I am suffering from so many typo in my code due to this issue. System is not lagging, only terminal. My experience is exactly similar with the lag issue due to libmutter from last month as mentioned in this thread : input delay on Terminal Ubuntu 22.04.4, and the solution was :

sudo add-apt-repository ppa:vanvugt/mutter
sudo apt update && sudo apt upgrade

In fact, my terminal was lagging as well last month, I followed the solution above and it worked well. A few days ago I received kernel update and recently my terminal started to lag again. List of two latest kernels :

dpkg --list | grep linux-image
linux-image-6.5.0-28-generic    6.5.0-28.29~22.04.1     Generic Linux kernel image (running)
linux-image-generic-hwe-22.04   6.5.0.28.29~22.04.1     Signed kernel image generic

I tried with the same solution as before and also tried to reinstall libmutter but it did not work anymore. When I tried to boot to the other kernel, only 6.5.0-28-generic is listed in boot options. I couldn't keep track what other packages were upgraded this past month. Any suggestions on how to investigate this issue ?

[Update]

I have confirmed from Ubuntu Bugs Launchpad that the same repeating issue with terminal lag is currently affecting other people as well. Again, it is due to libmutter update that apparently was implemented without the fix.

Best Answer

Indeed, there was a recent update to mutter/libmutter and dependencies without fixing the issue but overwriting previous fixed versions.

In the the Ubuntu Bugs Launchpad issue you mentioned, however, there is a very recent comment which states that the fix for this has now been built and published to the official proposed pocket. This new version is 42.9-0ubuntu8.

So you can take the following steps to try this new version:

  1. enable the proposed pocket on your system by going to the "Development Options" tab of the "Software & Updates" application and tick Pre-released updates (jammy-proposed)
  2. sudo apt update
  3. sudo apt install mutter/jammy-proposed
  4. sudo apt install libmutter-10-0/jammy-proposed
  5. disable the proposed pocket again by unticking the option in (1.)
  6. reboot the system

Attention: Once you enable the proposed pocket, apt will probably notify you that a lot of additional updates are available. However, most likely you don't want to update all these other components to the versions currently being tested in the proposed pocket. So don't run a general "upgrade" command, don't perform any upgrades in the "Software Updater" application and make sure to disable the proposed pocket again as noted in step (5.).

On my system the problem is now fixed again (apparently, the new version contains the exact same fix as mentioned in the main question on this issue). This fix will hopefully be part of the official versions outside of the proposed pocket soon, but until then this is one way to fix it.

Related Question