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.
Table of Contents
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:
- 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.
- 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.
- 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.
- 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.
- 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.
- 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?
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.
- 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.
- 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.
- Change the session from Genome to Xorg
At the gdm3 login screen use the gear icon at the bottom right and select Xorg Session.
- 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 - 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 - 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.
- 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 Facebook, LinkedIn, Twitter, Telegram, Tumblr, & Medium and subscribe to receive updates like this.
Recommend Products for Raspberry Pi Users
We have some Raspberry Pi accessory recommendations that we think you’ll find useful. These are products we’ve personally selected that we believe are must-haves for any Raspberry Pi owner. Take a moment to look through the list – you can click on any item to view more details or purchase it directly from Amazon. Whether you’re just getting started with your Pi or looking to expand its capabilities, we’re confident you’ll find something helpful among our top picks. Let us know if you have any other questions!
Declaimer: The below products contain affiliate links. We may receive a small commission if you purchase through these links at no additional cost to you. You can read our full affiliate disclosure here.