Occasional Keyboard freeze

Bug #1807056 reported by Dilip
42
This bug affects 8 people
Affects Status Importance Assigned to Milestone
GNOME Shell
New
Unknown
gnome-shell (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

https://gitlab.gnome.org/GNOME/gnome-shell/issues/907

---

I am using 18.04 and sometimes, whatever I type does not work. It is as if there is no keyboard connected while I have my laptop keyboard and an external keyboard connected to the machine. I even enabled On Screen Keyboard and tried to type through it. Same result.

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: gnome-shell 3.28.3-0ubuntu0.18.04.3
ProcVersionSignature: Ubuntu 4.15.0-42.45-generic 4.15.18
Uname: Linux 4.15.0-42-generic x86_64
NonfreeKernelModules: wl
ApportVersion: 2.20.9-0ubuntu7.5
Architecture: amd64
CurrentDesktop: communitheme:ubuntu:GNOME
Date: Thu Dec 6 05:41:04 2018
DisplayManager: gdm3
InstallationDate: Installed on 2018-11-29 (6 days ago)
InstallationMedia: Ubuntu 18.04.1 LTS "Bionic Beaver" - Release amd64 (20180725)
SourcePackage: gnome-shell
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Dilip (dilip-meet) wrote :
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Can you please try removing the gnome-shell extensions:

b'org.gnome.shell' b'enabled-extensions' b"['<email address hidden>', '<email address hidden>']"

and tell us if that improves the situation?

Changed in gnome-shell (Ubuntu):
status: New → Incomplete
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Please also open a Terminal window and leave the command 'top' running to see if any process is using high CPU when the problem happens.

Revision history for this message
Dilip (dilip-meet) wrote :

@Daniel I did try without any extension. It was happening even then. So I put them back for comfort sake.

Also, how will I type the " top " command as I cannot type anything when the issues happen. It gets ok by itself after sometime ( without me doing anything ). The interesting part is that the mouse is working fine. It is not a total freeze. I can copy, cut and paste using the mouse. Thanks.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Yes if you're using Xorg (the default "Ubuntu" session) then mouse cursor movement is done by the Xorg process so it will keep moving even if gnome-shell was frozen.

I meant that you should run 'top' before the problem happens and leave it running so you can watch that window.

When the problem happens is it only keyboard input that freezes or window contents too?

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Oh, actually this sounds like it might be related to USB or other kernel problems.

Next time the problem happens, reboot to recover the machine and then run this command to collect the log of the previous (frozen) boot:

  journalctl -b-1 > prevboot.txt

and attach the file 'prevboot.txt' here.

Revision history for this message
Dilip (dilip-meet) wrote :

Thanks for explaining. Only keyboard input gets lost. Windows, mouse everything else works fine. I tried for a single machine when inputs got lost
1.in built laptop keyboard

2. External USB keyboard

3. On Screen Keyboard

Input of all 3 does not work. But at times, enabling OSK makes the recovery faster.

I will try top and see. Only keyboard freezes, should I hard reboot and collect the log as mentioned above ?

Revision history for this message
Dilip (dilip-meet) wrote :

I got out of Yaru and used default Ubuntu while login just to be sure. The freeze occurred again. I had ' top ' running. Took a quick screenshot

Revision history for this message
Dilip (dilip-meet) wrote :

Another screenshot of 'top' while freeze

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Please follow the steps in comment 6.

Revision history for this message
Dilip (dilip-meet) wrote :

Ok. I was confused whether to hit the power button to exit and then come back. That is what you are asking to do, right ?

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Yes, that command collects the log of the previous boot. Not the current one.

Revision history for this message
Dilip (dilip-meet) wrote :

@Daniel Attaching Prevboot.txt from the command you gave

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thanks. I can't find any obvious explanation in that log.

Are you able to try installing a shell that's not gnome-shell? I would like to know if the problem is confined to gnome-shell.

Try installing package 'unity-session' and log into Unity instead. Does the problem still happen?

Revision history for this message
Dilip (dilip-meet) wrote :

I am sorry. This is my primary laptop. I plan to keep the Ubuntu as default as possible.

Revision history for this message
Dilip (dilip-meet) wrote :

I installed Cinnamon DE from ppa:embrosyn/cinnamon . I will let you know if the problem happens again.

Revision history for this message
Dilip (dilip-meet) wrote :

@Daniel , It happened in Cinnamon as well. I had some important work so I was using Windows 10 ( dual boot ) all these days. The issue is limited to 18.04. I wanted to update this thread and started using Cinnamon today. The keyboard just froze for about 1 minute and then everything got ok by itself.

Revision history for this message
Dilip (dilip-meet) wrote :

What I have noticed is that the freeze occurred only once in Cinnamon. Nothing since it happened first. I will update here if some progress happens.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Can you try a different desktop that doesn't share code with Gnome Shell? Unfortunately Cinnamon does, so isn't a useful test.

Revision history for this message
Dilip (dilip-meet) wrote :

@Daniel I have been using Cinnamon for around 15 days now. Other than the first instance where I felt that there is a freeze, it never happened in Cinnamon. In the last couple of days, I once switched to default Ubuntu DE and the freeze came back in no time. I guess it is more or less safe to say that this keyboard freeze is almost non-existent in Cinnamon.

Changed in gnome-shell (Ubuntu):
status: Incomplete → New
Revision history for this message
Dilip (dilip-meet) wrote :

Today, I came back to Ubuntu default DE and the freeze came back instantly. But for good, I found a workaround. If you try to type something on the dash search, the issue goes away. Good, right ? It worked for me a couple of times. I will see if this can be a permanent workaround.

Revision history for this message
Dilip (dilip-meet) wrote :

I think this is a permanent workaround. It could get rid of keyboard freeze this time as well by trying to type something on the dash search.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Sounds like a great workaround. But I have more questions :)

1. Please double-check again that uninstalling your extensions doesn't help. Because I still find it strange that other people don't report this bug so most likely it's caused by something that most other people don't have, like the extensions.

2. Can we assume that you have to use the mouse to get to the dash search?

3. Can you please try live booting 19.04 (don't install it just boot from USB) and tell us if the same problem occurs? http://cdimages.ubuntu.com/daily-live/current/

4. Can you please log the bug upstream with the Gnome Shell developers here:
   https://gitlab.gnome.org/GNOME/gnome-shell/issues
   and then tell us the new bug ID?

Changed in gnome-shell (Ubuntu):
status: New → Incomplete
Revision history for this message
Dilip (dilip-meet) wrote :

1. Once did try when I posted this in AskUbuntu. That was the first suggestion I got. I posted this on Discourse.Ubuntu but the thread got locked, but still got a like after one month of lock. In the It's Foss Community where I tried to seek help, there was someone who said it happens to him/her as well.

I will try without extensions once more. I am more of less sure that is not the case.

2. Yes, I used mouse to click on the dash search and when I typed, it worked.

3. Ok, I will see.

4. Done :)

https://gitlab.gnome.org/GNOME/gnome-shell/issues/907

Changed in gnome-shell (Ubuntu):
importance: Undecided → High
status: Incomplete → New
description: updated
Revision history for this message
Sebastien Bacher (seb128) wrote :

the log in one of the comments has that warning, unsure if it could have to do with the issue

'[2863:2863:1213/070907.015272:ERROR:x11_input_method_context_impl_gtk.cc(144)] Not implemented reached in virtual void libgtkui::X11InputMethodContextImplGtk::SetSurroundingText(const base::string16 &, const gfx::Range &)'

Changed in gnome-shell (Ubuntu):
status: New → Triaged
Revision history for this message
Dilip (dilip-meet) wrote :

As suggested, I tried the latest daily build of Disco from USB. I used it for around 30 minutes.There was a moment which appeared to be a freeze. It went ok when I tried the dash search. Again, I am not sure whether I imagined it. Currently, I am not in a position to use Disco indefinitely. Thought I would update you guys.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Yeah, I guess that could be related to keyboard freezes.

Dilip, on the affected machine can you please look in Settings > Universal Access, scroll to the bottom so as to show all of "Typing" and "Pointing & Clicking", and then take a screenshot of that window?

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

^^^

Dilip, please do the above and also:

1. Settings > Universal Access > Always Show Universal Access Menu = ON

2. Click on the person icon in the top panel.

3. Are any of the switches in that panel ON?

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

(all on the original Ubuntu 18.04 installation)

Changed in gnome-shell (Ubuntu):
status: Triaged → Incomplete
Revision history for this message
Dilip (dilip-meet) wrote :

First one, please find the screenshot attached

The second one, None of the switches on the panel from user icon are ON.

Revision history for this message
Dilip (dilip-meet) wrote :

Screenshot of buttons attached

Changed in gnome-shell (Ubuntu):
status: Incomplete → Triaged
Revision history for this message
Dilip (dilip-meet) wrote :

Now that I have a workaround, I tried to be fully on Ubuntu default DE. What I noticed in past hour are

1. The freeze is more prominent in CommuniTheme session

2. There is also mouse freeze. But it happens less frequently than keyboard freeze. It goes away if we try to access dash search. In fact, clicking on the dash search area.

Revision history for this message
Dilip (dilip-meet) wrote :

Freeze is very less in default Ubuntu DE. CommuniTheme session is literally unusable.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thanks. That's the answer to "caused by something that most other people don't have". Most Ubuntu users only encounter the community theme (now known as Yaru) where it is included in Ubuntu 18.10 and later.

I wonder - have you made any other changes to gnome-shell that other users typically wouldn't have?

Revision history for this message
Dilip (dilip-meet) wrote :

Other than installing Cinnamon for testing and the dash to panel and arc menu extensions, none. With my previous experience, I tried to keep Ubuntu as default as possible.

Revision history for this message
Dilip (dilip-meet) wrote :

As suggested by @Daniel, I have removed all extensions and been using default Ubuntu DE all day. Sadly, the keyboard freeze is annoyingly present in default Ubuntu session as well.The workaround fixes the issue as discussed before.

PS : I also removed the Yaru install through Ubuntu Software to make sure that it is not interfering. The freeze is still there, but much less annoying than in the Yaru session.

Revision history for this message
Dilip (dilip-meet) wrote :

I got so annoyed by the keyboard freeze and banking on "something else" is causing the issue, I erased my 18.04 and reinstalled it yesterday evening. Now in the morning, I started using Ubuntu again for typing. It was fine for a couple of hours. But now the freeze has come back.

I have not installed even GIMP or Inkscape. Only thing I have added is official deb files of Google Chrome and Opera, and VLC from the store. Other than that, whatever Ubuntu provides by default.

Revision history for this message
Dilip (dilip-meet) wrote :

A small correction, I logged in 1.5 hours ago. So the freeze came back within an hour.

Revision history for this message
Dilip (dilip-meet) wrote :

Even after erasing and fresh install using 18.04 live USB, the freeze issue exists. When I searched the word " Communitheme in the Ubuntu partition and I found a bunch of them still exists. Please check the screenshot. Is there any way to remove these residues of Yaru ?

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Those files come from package 'ubuntu-session', so they are apparently correct. Not related to this bug anyway.

My 18.04 desktop has those files but does not have this bug.

Revision history for this message
Dilip (dilip-meet) wrote :

Looks like this issue does not exist when we use Ubuntu with Wayland in 18.04. I am using it now. Will update the details if there is any change.

Revision history for this message
Dilip (dilip-meet) wrote :

During the time I used Wayland, I had no issue.I couldn't try it extensively because VLC when a video is played gets froze and I have to use the power button to do anything on the computer.

Revision history for this message
Gitau Harrison (gitauharrison) wrote :

I encounter the occasional keyboard freezes on my Ubuntu 18.04 (Communitheme). Clicking the 'Show Application' menu strangely restores keyboard functionality.

Changed in gnome-shell:
status: Unknown → New
Revision history for this message
Dilip (dilip-meet) wrote :

I found a new issue within this bug. At times, the mouse right-click does not show any menu at all. Clicking on the dash search box fixes it though.

At first, I thought I was trying to copy or paste ( my intended action ) on a folder on which I had no permission. But when the dash search box typing issue fixed it, I thought of reporting here.

Revision history for this message
Dilip (dilip-meet) wrote :

Can confirm #43

The latest I experienced of this bug, all I have to do is click on **show applications** ( 9 dots ) icon to get rid of the freeze. Looks like not necessary to click on the search box or type a letter in it.

Revision history for this message
Dilip (dilip-meet) wrote :

The behaviour has changed recently. When the freeze occurs, whatever we type goes to the dash search. It is visible only when we click the 3x3 icon and visualize the dash search panel. Earlier, whatever we type was disappears altogether. ie, when the freeze occurs and I continue to type, it is nowhere to be seen. But when we take dash search panel to unfreeze it, we can see what we typed after the freeze in the search box. Hope I explained properly.

Revision history for this message
Dilip (dilip-meet) wrote :

I took a screenshot of typing switching to dash search box as reported in comment #46. Typing froze, and what I typed was put into the dash search box as seen below. It was supposed to be in the browser where I was typing it.

Revision history for this message
Dilip (dilip-meet) wrote :

This time it happened during Ubuntu 18.04.3 installation through bootable USB. When I was entering the user name and password during installation, the keyboard froze. It took me around 15 minutes to get out of the mess and have a proper installation. It will unfreeze for a second and when I type two characters in the password box, it freezes again. There is not even a cursor blinking in the boxes when I click on them.

Revision history for this message
foad (momtazi) wrote :

has there been a resolution to this problem ? it is happening to me and the frequency is increasing and it now happening every 3-4 minutes and it is becoming impossible to use ubuntu. any help would be appreciated. i hate to move away from ubuntu. many thanks

Revision history for this message
Dilip (dilip-meet) wrote :

Not happening in Lubuntu installed on 18.04 default through Synaptic Package Manager. Thought of reporting here.

Revision history for this message
Rodrigo Carmona (rcarmonad) wrote :

I have the same issue.
It happens in 18.04.3, 18.10 and 19.10.
It happens on a stock, recently installed ubuntu.
I installed wayland and it continues.

Revision history for this message
Rodrigo Carmona (rcarmonad) wrote :

The other thing that happens, its like when i'm using terminator, the focus goes on and off.
It's reeeeeally anoying.

Revision history for this message
Dilip (dilip-meet) wrote :

I installed 20.04. And the bug is back as is from 18.04. I can get out of this if I wait or type on the search box. Thanks.

Revision history for this message
Dilip (dilip-meet) wrote :

Installed Kubuntu Desktop. No keyboard freeze. Everything fine in 20.04.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Please clarify if you mean the bug is fixed in 20.04, or present in 20.04?

Changed in gnome-shell (Ubuntu):
status: Triaged → Incomplete
Revision history for this message
Dilip (dilip-meet) wrote :

@Daniel bug exists in default 20.04 which uses Gnome.

Then I installed Kubuntu Desktop through Synaptic package manager. Started using Kubuntu through login session option, replacing GDM with SSDM. In such a case, no keyboard freeze occurs.

In short,

Download the latest Ubuntu 20.04 ISO from Ubuntu.com and do a fresh install of 20.04, the bug exists.

Changed in gnome-shell (Ubuntu):
status: Incomplete → Confirmed
importance: High → Medium
tags: added: focal
Revision history for this message
Mert Ertin (mertertin) wrote :

This is the main reason i quit Ubuntu. The bug was always there since I begun with 18.04 and my workaround was to press the power key on my laptop and click cancel when shutdown window appears. It was taking away from professional feel of a computer and making it feel like a 2013 smart phone. I believe one of the reasons not a lot of people report this issue is because they silently read forum posts that have no resolution for about 2 years and then go install another distro like I did. It's sad that Ubuntu had a few other bugs that were appearantly experienced by a very few people, therefore never getting really addressed; like this keyboard bug will be ignored on this page as it have been the last 2 years. Yes, I'm bitter. Because Ubuntu was my first "escape from Windows" solution and I really liked it until I couldn't stand the unnoticed bugs anymore.

Revision history for this message
Abhishek Roy (abhishekroy261193) wrote :

I am facing same problem as the problem mentioned. My keyboard is getting freeze for few minutes after which it is again working fine. I have checked in linux mint too, I am facing same problem. Any help in this regard will be highly helpful in this regard.

Revision history for this message
CGeng (mrmorning) wrote :

On Ubuntu 20.04, I have similar problem. Actually, I met this problem since 19.10, however in 19.04, it was fine.

My default GUI env is GNOME, and I switched to KDE recently but the problem still occur sometimes.

This problem is a little bit different from other people in these aspects.

1. This problem not only happen in gnome-shell. it happens almost every where, especially when you type in a textbox. For example, in chrome and pycharm, I met the similar problem. Which indicates that this bug is a general problem.

2. When my keyboard is freezing, I cannot type in the TEXTBOX. however, other part of keyboard still work such as Capslock and Super(Meta) button etc. Simply speaking, when the keyboard is freezing, I can still push META button to present all windows, however I CANNOT type anything to input in the TEXTBOX.

Revision history for this message
CGeng (mrmorning) wrote :

Update about #59

I recently find that the bug occured on my ubuntu may because of IBUS, a input engine. Everytime the bug occurs, I turned down ibus and it works.

Revision history for this message
Marcin Raniszewski (ranisz) wrote :

The same problem: my keyboard is getting freeze (especially after entering text in text boxes: Chrome, Kate) for few minutes after which it is again working fine.

Revision history for this message
John Grey (john-thegreys) wrote :

I'm getting something very similar. When editing text - mainly (perhaps always) when selecting text the keyboard freezes for a short time. Resizing/moving the window seems to recover this, but it recovers by itself after about 10 seconds.
This is with Libre Office text, geany and kate editors.
Also happening on two different computers - a Toshiba Z830 and an Acer Aspire XC-605
Ubuntu 20.04.1 Gnome 3.36.8 Wayland

Revision history for this message
radicsge (radicsge) wrote :

As CGeng (mrmorning)said

`sudo apt remove ibus`

worked. Thanks!

Revision history for this message
Ahmmad Ismail (blueray453) wrote :

I have the same issue. My keyboard freeze very frequently. However, my mouse keeps working.

To find out the problem I have changed the OS from Linux Mint to Zorin. The problem did not go away (both ubuntu based).

Also I called a technician. He said there were issues with one of my HDD, I sent it to the warranty. I found that keyboard can also freeze due to high temperature of CPU. Though my CPU temperature almost never exceeds 50 degree, we cleaned the fan and others (Because of these, I could not use my machine for few days. this is why the delay to respond your query).

I ran `sudo apt remove ibus`. The issue is still there. However, `killall -3 gnome-shell` helps.

Anyways, I got `journalctl --since "10min ago" -f` output during freeze (somehow the command was initiated during freeze). The output is given bellow.

It is a ~3000 line log saved in https://pastebin.com/taawktGa

Please help me find a solution for this problem.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.