118

I have been using Ubuntu since Christmas, and just recently I have been receiving delayed input while using the Ubuntu terminal. It especially takes affect when using vim or man commands, which is strange as no other software I have has no delay when typing even UTerm and UXTerm have no delay.

What I have tried:

  • restarting pc
  • updating drivers
  • changed keyboard input

System Info:

  • OS Name: Ubuntu 22.04.4 LTS
  • OS Type: 64-bit
  • Gnome version: 42.9
  • Windowing system: X11

This problem occurred from March 30th to June 7th, any solutions from here as of now are not guaranteed to work.

7 Answers7

93

Update: Official updates have been released for all affected versions. All you need now is apt update && apt upgrade. You do not need to follow the instructions below.

There is now a PPA with an early fix for this issue. Caution: This PPA is meant for testing. There are no guarantees. It may fix this issue and cause other issues. Use at your own risk.

For me, it solved the problem and everything seems to work. Also, it doesn't break apt, as my previous answer did.

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

The changes will take effect after a system restart.

mikabytes
  • 1,196
35

Unfortunately mutter and its related packages received a faulty update in Ubuntu. Developers are aware of the issue and are working on it.

Upstream Mutter issue: https://gitlab.gnome.org/GNOME/mutter/-/issues/3384

Downstream Ubuntu issue: https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/2059847

[Please don't add meaningless noise (comments like "it's buggy for me too") to those bugs because that only distracts developers and makes it harder to find actual useful information. However, feel free to comment there if you believe you have something new to add that hasn't been pointed out before.]


Here's how to revert to the previous version.

Update 4 (2024-06-07): Official updates have been released for both Ubuntu 22.04 and 23.10. You should revert any change you have made previously (e.g. unhold the packages you put on hold, remove the PPA you added) and then upgrade your system. This should hopefully fix this problem once and for all.

Update 3 (2024-05-10): Still no official update packages for this problem for 22.04 and 23.10. However, according to recent comments at the downstream Ubuntu issue (linked above), a fresh update takes precedence over the fixed packages in the PPA (at least in 22.04, I'm not sure about 23.10). Therefore the PPA approach, linked from the 1st "Update" below, does not work at the moment. You may want to resort to my original approach of putting the packages on hold.

Update 2 (2024-04-25): Ubuntu 24.04 has just been released. It includes the fix. Unfortunately older Ubuntu versions (22.04 and 23.10) are still waiting for this fix to be released.

Update: For the best method currently, see mikabytes's answer: https://askubuntu.com/a/1509474/398785. The following below is my earlier answer which is no longer the preferred method.

The instructions are somewhat vague because I cannot test them, a bit of experience might be required. Edits to this answer are welcome.

Go go https://packages.ubuntu.com/, type "mutter" to the upper search box and select your distribution (but not its "-updates" or "-backports" counterpart). You'll get a (hopefully complete) list of packages built from the same source, e.g. mutter, mutter-common, mutter-common-bin, libmutter-<version> etc., all bearing the same version number.

Download each of these packages whose newer (broken) counterpart is already installed on your system. Once downloaded, downgrade them with sudo dpkg -i ....

Once downgraded, put them on "hold" so that a next apt upgrade won't update them again. It goes like echo mutter hold | sudo dpkg --set-selections and repeat for all other packages.

Finally, log out of your graphical desktop and log back in.

Keep an eye on updates. Once a fix is released, remove the packages from the "hold" state by executing the previous commands with install instead of hold. Then upgrade your system as usual.

egmont
  • 8,990
  • 1
  • 34
  • 47
10

EDIT: There is now a better solution, please see my other answer. I'll leave the answer below as is, including the comments, but I won't spend any more time on it.


Based on egmont's answer, these are the exact commands that I executed to fix this issue. You will need to restart the computer when done.

This will leave apt in a temporary broken state. This is intentional. We are manually downgrading specific packages. You won't be able to use apt until you run the restore script at the end. Do not run apt install --fix-broken before mutter is restored, or it will damage your installation.

Tested by me on Ubuntu 23.10. Other users report it works for 22.04, although one user had problems when restoring the system (see comments).

Uncomment the lines that are suitable for you.

arch=$(dpkg --print-architecture) # one of amd64 arm64 armhf ppc64el riscv64 s390x

Ubuntu 23.10

version="45.0-3ubuntu3" package="13-0"

Ubuntu 23.04

#version="44.3-0ubuntu1.1" # only amd64 #version="44.0-2ubuntu4" # other archs #package="12-0"

Ubuntu 22.04

#version="42.0-3ubuntu2" #package="10-0"

wget -nc http://se.archive.ubuntu.com/ubuntu/pool/main/m/mutter/libmutter-${package}${version}$arch.deb wget -nc http://se.archive.ubuntu.com/ubuntu/pool/main/m/mutter/mutter-common_${version}all.deb if [ "$package" != "10-0" ]; then wget -nc http://se.archive.ubuntu.com/ubuntu/pool/main/m/mutter/mutter-common-bin${version}_$arch.deb fi

sudo dpkg -i mutter.deb

echo libmutter-$package hold | sudo dpkg --set-selections

Later, when there's an upstream fix for this and you want to upgrade, run these commands to restore your system:

echo libmutter-${package} install | sudo dpkg --set-selections
sudo apt update && sudo apt --fix-broken upgrade
mikabytes
  • 1,196
10

Based on mikabytes's answer, I've found another solution that not will not leave apt in a broken state. For Ubuntu 22.04.4:

# Download the packages.
wget -nc https://launchpad.net/ubuntu/+source/mutter/42.9-0ubuntu5/+build/26711789/+files/gir1.2-mutter-10_42.9-0ubuntu5_amd64.deb
wget -nc https://launchpad.net/ubuntu/+source/mutter/42.9-0ubuntu5/+build/26711789/+files/libmutter-10-0_42.9-0ubuntu5_amd64.deb
wget -nc https://launchpad.net/ubuntu/+source/mutter/42.9-0ubuntu5/+build/26711789/+files/mutter-common_42.9-0ubuntu5_all.deb

Install the packages.

sudo dpkg -i mutter.deb

Mark as hold.

sudo apt-mark hold gir1.2-mutter-10 sudo apt-mark hold libmutter-10-0 sudo apt-mark hold mutter-common

6

For any users looking for a quick fix to this issue, I have found that Konsole is not GTK/mutter-based and is not suffering from this issue. Konsole can be installed on Gnome through the software store.

db 1070
  • 103
2

As a mixture of other replies and comments (most notably @drupov, @mmalone), the simples solution seems to be to create a /etc/apt/preferences.d/mutter-fix file with content

Package: gir1.2-mutter-10 
Pin: version 42.9-0ubuntu7vv1 
Pin-Priority: 1001

Package: mutter-common Pin: version 42.9-0ubuntu7vv1 Pin-Priority: 1001

Package: libmutter-10-0 Pin: version 42.9-0ubuntu7vv1 Pin-Priority: 1001

and then sudo apt upgrade

For other distros, it might be /etc/apt/preferences

smido
  • 185
0

This problem was driving me crazy since I use the terminal constantly (as many Linux users do).

I finally read the information about the bug at the link and noticed that they report that it occurs on:

  • Mutter: 46.0
  • Present in XOrg: Yes
  • Graphics: NVIDIA 550.67
  • Present in Wayland: No

I have NVIDIA 1660, running Ubuntu 22.04.4 and am running on X11.

I didn't know that X11 was part of the problem, so I'm happy to try Wayland if past issues are resolved.

The slowness and skipping letters when I typed fast in the terminal was just driving me crazy. I kept hoping (for at least 6 weeks now) that it would finally get resolved.

Switched To Wayland

Since the problem didn't get resolved, I finally switched over to Wayland.
The problem seems entirely resolved and I'm really happy.

Also prior issues that I saw in wayland are resolved:

  1. Why won't my Android emulator start on Ubuntu 22.04?
  2. Why doesn't Remmina handle sending Alt-Tab to remote computer on 22.04 Jammy Jellyfish?

Happy to be on Wayland, now that features work for me. Glad this resolved my terminal issue.

Additional Info

Someone commented that a fixed has been published -- it ended up being published the same day (06-07-2024) I gave up and moved to Wayland.

I always check for updates every day but I didn't receive any fix on the 8th (Saturday) or 9th (Sunday).

Today (06-10-2024), I ran updates and I saw the following:

mutter updates

I'm guessing that since the original issue had to do with Mutter that these are the updates which would fix the issue (if I were still running X11). Just thought seeing the updates might be helpful to someone.

Wayland continues to work fine for me now.

raddevus
  • 1,998