Table of Contents
  • Home
  • /
  • Blog
  • /
  • How To Fix Typing Issue In Ubuntu On Raspberry Pi?
November 22, 2021
|
6m

How To Fix Typing Issue In Ubuntu On Raspberry Pi?


How To Fix Typing Issue In Ubuntu On Raspberry Pi

If you ever used Ubuntu on the new Raspberry Pi 4B model, you might have seen a strange typing issue in Ubuntu on Raspberry Pi. We had the same problem either. The time when we tried Ubuntu 21.04 on the new Raspberry Pi 4B model, we didn’t know about this typing problem like you. Anyways, after some research, we found a solution to this problem. Now, we want to show you how to fix this ‘keyboard not typing in apps’ issue in Ubuntu running on Raspberry Pi.

Keyboard Issue We Had With Ubuntu Running On Raspberry Pi:

We downloaded the Ubuntu for our Raspberry Pi Model 4B. We wrote the downloaded Ubuntu image on a 64 GB SanDisk Extreme SD card using Raspberry Pi Imager. We inserted the SD card into the Raspberry Pi and fired up the Raspberry Pi connecting to the power adopter. Raspberry Pi booted normally, and we saw Ubuntu setup wizard in a few seconds. We completed the setup wizard without any issues. Now it’s time to log in. We log into the Raspberry Pi as expected. Then we decided to try opening some basic applications. First, we opened the Firefox browser. Following this, we opened the terminal window. So far, everything looks good. Now, there is a surprise waiting for us. When we tried typing a command on the terminal shell, nothing typed. Then we saw the same problem in the browser as well. We were unable to type anything in the browser”s address bar. What surprised us more is we were able to close and open the terminal windows from the keyboard.

Prerequisites Ubuntu on Raspberry Pi:

  1. Have a Raspberry Pi 4 Model B You need a Raspberry Pi 4 Model B to experience this issue as described in the post. Older Pi models may not face this.

  2. Install Ubuntu 21.04 or higher The issue is seen in Ubuntu 21.04 or later versions as per the post. So you need to have Ubuntu 21.04 or newer installed on your Raspberry Pi.

  3. Use a compatible keyboard Try different keyboards, including wired and wireless ones from Logitech, Dell etc. The issue may depend on the keyboard model too.

  4. Have admin access on Ubuntu You need sudo access to run commands to blacklist kernel modules and update initramfs. So make sure you login as a user with sudo privileges.

  5. Backup data before modifications Take backups before blacklisting modules or updating initramfs as these are core system changes and may cause issues if done incorrectly.

  6. Time and patience The process involves multiple reboots, changing sessions back and forth between Genome and Xorg. Keepadditional time and patience to test and troubleshoot while following these steps.

In summary, have the core hardware with Ubuntu installed, accessories like keyboard, user permissions and time to follow troubleshooting steps mentioned in the post to resolve the typing issues faced in Ubuntu on Raspberry Pi. Let me know if you need any clarification on the prerequisites.

Our Troubleshooting Steps To Fix The Typing Issue In Ubuntu On Raspberry Pi:

Then we changed the Logitech keyboard with the new Dell keyboard to fix the issue. But, this didn’t solve the problem. Then we tried the on-screen keyboard, again no luck. Later we decided to try the new Ubuntu v21.10 64 bit. We ended up in the same problem again. Everything went in vain. Then we found a solution to this problem. We decided to try that out. However, this time we succeeded in solving the typing issue in Ubuntu on Raspberry Pi. We would be able to fix the keyboard issue in Ubuntu running on Raspberry Pi. Let’s see how we fixed the problem.

How To Fix Typing Issue In Ubuntu On Raspberry Pi?


The problem could be because the kernel module hid_logitech_dj prevents keyboard events from reaching apps.
This could be solved either by getting module blacklisting (either by modprobe.d or by udev rules) to work or removing the module.
Use this command to remove the receiver and reconnect back:

$ sudo rmmod hid_logitech_dj && sudo rm /lib/modules/$(uname -r)/kernel/drivers/hid/hid-logitech-dj.ko

Or run these series of commands in xorg session to blacklist the module:

$ sudo -s
$ echo “blacklist hid_logitech_dj” >> /etc/modprobe.d/local-dontload.conf
$ echo “install hid_logitech_dj /bin/false” >> /etc/modprobe.d/local-dontload.conf
$ depmod -a
$ update-initramfs -u
$ reboot

We have shown the step-by-step procedure If you want to take a look at it.

Step 1. Keyboard not typing in apps in Ubuntu on Raspberry Pi

In this picture, you can see that the cursor is not fully white. That means nobody can type anything in the terminal.

Step 2. Log out from the current login session in Ubuntu

You can log out from the current login session from the power button that appears in the right top corner.

Step 3. Change the session from Genome to Xorg

At the gdm3 login screen use the gear icon at the bottom right and select Xorg Session.

Step 4. Login to the Xorg session and blacklist the module

Enter the password to log in to the Xorg session. Open the terminal (Ctrl + Alt + t).Run these commands:

$ sudo -s
$ echo “blacklist hid_logitech_dj” >> /etc/modprobe.d/local-dontload.conf
$ echo “install hid_logitech_dj /bin/false” >> /etc/modprobe.d/local-dontload.conf
$ depmod -a
$ update-initramfs -u


Step 5. Reboot the Raspberry Pi after bash prompt returns

It may take 2 to 3 minutes to update. Wait until the bash prompt returns then reboot.

$ reboot

Step 6. Change the session from Xorg to Genome again

Once you get back to your session, log out using the power button at the top-right menu. Once you see the log-in screen, use the gear icon at the bottom right and select Genome Session.

Step 7. Keyboard typing in apps in Ubuntu running on Raspberry Pi

Now you can see the keyboard typing in the terminal. This is how you can fix the keyboard problem on Ubuntu 21.10 running on Raspberry Pi.

We hope this post would help you in learning How to Fix Typing Issues in Ubuntu on Raspberry Pi. Thanks for reading this post. Visit our social media page on FacebookLinkedInTwitterTelegramTumblr, & Medium and subscribe to receive updates like this.

Arun KL

Arun KL is a cybersecurity professional with 15+ years of experience in IT infrastructure, cloud security, vulnerability management, Penetration Testing, security operations, and incident response. He is adept at designing and implementing robust security solutions to safeguard systems and data. Arun holds multiple industry certifications including CCNA, CCNA Security, RHCE, CEH, and AWS Security.

Recently added

Best Reads

View All

Learn More About Cyber Security Security & Technology

“Knowledge Arsenal: Empowering Your Security Journey through Continuous Learning”

Cybersecurity All-in-One For Dummies - 1st Edition

"Cybersecurity All-in-One For Dummies" offers a comprehensive guide to securing personal and business digital assets from cyber threats, with actionable insights from industry experts.

Tools

Featured

View All

Learn Something New with Free Email subscription

Subscribe

Subscribe