ubuntu 21.04 -- keyboard not typing in apps [SOLVED]
hello,
I installed ubuntu on RPi 8gb, initially keyboard was working well, but for some reason, it stops working in terminal, or browser address bars. It only work in login screen and main search windows. I re write SD card and boot again and it still continues. On screen keyboard also same , not activating in terminal or browser address bars, but working well in search or login windows, pleae help why this happened and why it repeates after reinstalltion of linux again ?
Thanks
I installed ubuntu on RPi 8gb, initially keyboard was working well, but for some reason, it stops working in terminal, or browser address bars. It only work in login screen and main search windows. I re write SD card and boot again and it still continues. On screen keyboard also same , not activating in terminal or browser address bars, but working well in search or login windows, pleae help why this happened and why it repeates after reinstalltion of linux again ?
Thanks
-
- Posts: 1
- Joined: Sat Apr 24, 2021 5:29 pm
Re: ubuntu 21.04 -- keyboard not typing in apps
i am also facing the same issue.
rbp 4 -8gig - logitech touchpad keyboard.
rbp 4 -8gig - logitech touchpad keyboard.
Re: ubuntu 21.04 -- keyboard not typing in apps
Same issue here. Fresh install of Ubuntu 21.04 on Raspberry Pi 4 (4GB) with Logitech wireless keyboard TK820 (not BT).
It worked at first, but after installing available updates and Python3, keyboard input stopped working in terminal, Firefox, etc. Password can be typed on the initial login screen and mouse moves the cursor, but no keyboard input
Seems to be a Wayland problem. If I login using Xorg, everything works as expected, so sticking with Xorg for now.
It worked at first, but after installing available updates and Python3, keyboard input stopped working in terminal, Firefox, etc. Password can be typed on the initial login screen and mouse moves the cursor, but no keyboard input

Seems to be a Wayland problem. If I login using Xorg, everything works as expected, so sticking with Xorg for now.
Re: ubuntu 21.04 -- keyboard not typing in apps
Usb keyboard with pi4/4 works ok, sometimes are lags.
Ubuntu is on usb memory.
Btw, anybody knows, how to activate/deactivate screen keyboard ?
Ubuntu is on usb memory.
Btw, anybody knows, how to activate/deactivate screen keyboard ?
Pi4-4G RaspiOS 32 BuLlSeYe
Re: ubuntu 21.04 -- keyboard not typing in apps
I am having this problem as well. Starting from a fresh install of Ubuntu desktop as of 4/24/2021, simply going through the initial setup steps and restarting reproduces this problem. Ctrl-Alt-F3 at the login screen takes me to a terminal where the keyboard works just fine. I can also successfully log in to gnome, but at that point the keyboard stops working in text boxes. Interestingly enough, Ctl-Alt-t in gnome still brings up a terminal window, which of course, I can't type in... FWIW, logging in using Xorg instead of Wayland worked for me as well. Not sure what the implications of that are?
Last edited by n00btube on Mon May 03, 2021 2:58 pm, edited 3 times in total.
Re: ubuntu 21.04 -- keyboard not typing in apps
In ubuntu impish keyboard works.
Pi4-4G RaspiOS 32 BuLlSeYe
Re: ubuntu 21.04 -- keyboard not typing in apps
Logitech Wireless KB235 same problem with ubuntu
Re: ubuntu 21.04 -- keyboard not typing in apps
i never really had any real issues on my first rpi-4..using ubuntu 19-04 or 19-10 i think also mine was a first revision board,,,really i think it may be a combination of the revision changes and the driver ...i got my rpi -4 in mid 2019 from mem i still have the board although not working any more.
i do remember however that i was using an M-2 usb drive on it different hard ware from the argon one i got later
i also remember that i was using a gigabyte key board atr the time this was back in the times we had to limit the ram to 3 gig for the usb 3 ports to work.. so
is it usb driver ..etc. Vs mouse driver..etc.. kernel parameters .. whatever the change it seems to me..that mostly it must be software related.. past and present..
i actually use 2 dongles one for k-b and one for mouse..still i often have issues..ios my rpi-4 faulty..?
good question..???
late 2020
20-20 i never really got into using my rpi-4 until 2020
wondering how much corona had to do with more than just the people..
i do remember however that i was using an M-2 usb drive on it different hard ware from the argon one i got later
i also remember that i was using a gigabyte key board atr the time this was back in the times we had to limit the ram to 3 gig for the usb 3 ports to work.. so
is it usb driver ..etc. Vs mouse driver..etc.. kernel parameters .. whatever the change it seems to me..that mostly it must be software related.. past and present..
i actually use 2 dongles one for k-b and one for mouse..still i often have issues..ios my rpi-4 faulty..?
good question..???
late 2020
20-20 i never really got into using my rpi-4 until 2020
wondering how much corona had to do with more than just the people..
Re: ubuntu 21.04 -- keyboard not typing in apps
Had very same issue. Solution was to use USB keyboard and mouse.
Re: ubuntu 21.04 -- keyboard not typing in apps
I'm having the same issue with a wireless mouse/kb after doing an os upgrade. Not finding any fixes.
Re: ubuntu 21.04 -- keyboard not typing in apps
Doesn't seem to be an issue on the one I compiled away from distro channels.
Flashed usb stick with raspi pi imager versions:
Tried Ubuntu server + ubuntu-stido desktop - wireless mouse times out
The same with ubuntu-desktop
Someone will have to look at the APCI calls because I think its associated with power management I'm going to try a few things here disabling or removing some APci functions away and let you know if I find the fix. Switching to desktop images
Trying out Ubuntu desktop 64 bit loaded up with Pi imager...
Trying XFCE with lightdm as the manager..... still freezes up
changing back display manager manually
Also to help me out, if you guys are using auto-login feature, which time to time breaks the wireless mouse in Gnome.
I find changing this in users caused it to lock up. Because /etc/gdm3/custom.conf has autologin set so I put a # to comment the lines out Its funny because it looks like a second script added that entry on line 8 and the normal entries are entered about 10 lines below, but commented out.
Run:
And tell me what lines of text you have in yellow and red
Also, run:
because the ones loaded by PI Loader are empty even though the error we are trying to fix is not caused by this error, but should be fixed
should be:
But I can't remember where that entry is or generated from.... still looking
Switched window managers back and forth (by logging out) the problem went away. Which was most likely fixed by running:
There are still things not correct, as user id should be 1000 instead of 0 To look at it pass this at a command shell:
Flashed usb stick with raspi pi imager versions:
Tried Ubuntu server + ubuntu-stido desktop - wireless mouse times out
The same with ubuntu-desktop
Someone will have to look at the APCI calls because I think its associated with power management I'm going to try a few things here disabling or removing some APci functions away and let you know if I find the fix. Switching to desktop images
Trying out Ubuntu desktop 64 bit loaded up with Pi imager...
Trying XFCE with lightdm as the manager..... still freezes up
changing back display manager manually
Code: Select all
( sudo dpkg-reconfigure gdm3)
I find changing this in users caused it to lock up. Because /etc/gdm3/custom.conf has autologin set so I put a # to comment the lines out Its funny because it looks like a second script added that entry on line 8 and the normal entries are entered about 10 lines below, but commented out.
Run:
Code: Select all
systemctl status display-manager.service
Also, run:
Code: Select all
echo $XDG_RUNTIME_DIR
should be:
Code: Select all
$XDG_RUNTIME_DIR=/run/user/1000
Switched window managers back and forth (by logging out) the problem went away. Which was most likely fixed by running:
Code: Select all
sudo dpkg-reconfigure gdm3
Code: Select all
echo $UID
Re: ubuntu 21.04 -- keyboard not typing in apps
I remember about a decade ago we had the similar thing go on with Ubuntu when gnome started playing with the idea of 3d accelerated desktop. Back then all you had to do is:airpost wrote: ↑Fri Apr 23, 2021 3:08 pmhello,
I installed ubuntu on RPi 8gb, initially keyboard was working well, but for some reason, it stops working in terminal, or browser address bars. It only work in login screen and main search windows. I re write SD card and boot again and it still continues. On screen keyboard also same , not activating in terminal or browser address bars, but working well in search or login windows, pleae help why this happened and why it repeates after reinstalltion of linux again ?
Thanks
Code: Select all
sudo dpkg -reconfigure ubuntu-desktop
default user pool is UID 1000-3000 but if you look at the environment variable on the terminal window with the command:
Code: Select all
echo $UID
Code: Select all
0
normally, it is:
Code: Select all
1000
Another command that comes in handy from time to time to reset the whole system (literally a true reset)
Code: Select all
sudo -i
dconf reset -f /
Re: ubuntu 21.04 -- keyboard not typing in apps
It will return 0 if you are @root but if PAM is broke entirely and the window manager doesn't load a "Home" or "root" as its home it will be 0 @pi which it shouldn't do under any normal circumstances
Its a small error in PAM that all debian installations have. It is from this error: "gkr-pam: unable to locate daemon control file"
when someone runs
Code: Select all
systemctl status display-manager.service
"pam_unix(lightdm:session): session opened for user pi by (uid=0)"
Then the system is unlocked by "sudo" instead of a password login Then UID is switch to user UID afterwards when it looks for a "home" directory to load any window management options.
Like I said this is a small error that most debian systems have especially if a gui is configured. Regardless if autologin was ever used.
Re: ubuntu 21.04 -- keyboard not typing in apps
Your distribution has pam_gnome_keyring enabled, but you are not running gnome-keyring? No need to check environment variables unless there is a problem.
That is not an error, and there is no mistake in the wording. A session was opened for user pi by user root. Identical messages occur for sshd logins."pam_unix(lightdm:session): session opened for user pi by (uid=0)"
Absolute nonsense. A window manager is not the same as a display manager. The switch to user happens before the window manager starts. sudo uses pam, but pam does not use sudo.Which the error returned from the window manager when it is starting. When it errors, its error catch assumes "user ingroup nopasswdlogin" and the first entry of suoders is used […]
Then the system is unlocked by "sudo" instead of a password login Then UID is switch to user UID afterwards when it looks for a "home" directory to load any window management options.
Your suggestion to check that "echo $UID" is non-zero is based on misunderstanding and confabulation.
Re: ubuntu 21.04 -- keyboard not typing in apps
The Official Ubuntu Desktop that you install with Raspberry pi Imager does indeed work for keyboard input, up untill you do a sudo apt update && sudo apt upgrade.
Please do not confuse people by saying that it's working, i have tested this with multible keyboards, multible raspberry pies and multible installs
the issue is the same, as soon as you do a sudo apt update && sudo apt upgrade you are unable to type in browser, terminal and basicly anywhere within the ubuntu desktop. you can still bring up the terminal with the shortcuts, so it's registering the keyboard input, but it's not transferring any inputs into any text based application within the desktop enviroment.
Forward this to both raspberry pi officials and to the Raspberry pi Ubuntu Desktop Developers, since it's a big issue when it comes to security, without updating Ubuntu i can't see how i can secure my setup.
Please do not confuse people by saying that it's working, i have tested this with multible keyboards, multible raspberry pies and multible installs
the issue is the same, as soon as you do a sudo apt update && sudo apt upgrade you are unable to type in browser, terminal and basicly anywhere within the ubuntu desktop. you can still bring up the terminal with the shortcuts, so it's registering the keyboard input, but it's not transferring any inputs into any text based application within the desktop enviroment.
Forward this to both raspberry pi officials and to the Raspberry pi Ubuntu Desktop Developers, since it's a big issue when it comes to security, without updating Ubuntu i can't see how i can secure my setup.

Re: ubuntu 21.04 -- keyboard not typing in apps
this would be helpfull, if i could type in the terminaldrtechno wrote: ↑Wed Jun 02, 2021 11:34 amI remember about a decade ago we had the similar thing go on with Ubuntu when gnome started playing with the idea of 3d accelerated desktop. Back then all you had to do is:airpost wrote: ↑Fri Apr 23, 2021 3:08 pmhello,
I installed ubuntu on RPi 8gb, initially keyboard was working well, but for some reason, it stops working in terminal, or browser address bars. It only work in login screen and main search windows. I re write SD card and boot again and it still continues. On screen keyboard also same , not activating in terminal or browser address bars, but working well in search or login windows, pleae help why this happened and why it repeates after reinstalltion of linux again ?
ThanksThis fixes the compositing issues that causes this. Other problems that can cause the user to lose control of the desktop is PAM not assigning the UID to the user session, and xorg user pool of uids are configured and refuse input because it is not listening to the user who is outside the assigned UID pool. There is only a few instances that this happens, but are mitigated if power management is disabled properly (since there is no acpi controller/microprocessor on board) Example:Code: Select all
sudo dpkg -reconfigure ubuntu-desktop
default user pool is UID 1000-3000 but if you look at the environment variable on the terminal window with the command:it should return a number between 1000-3000 This Pi images return:Code: Select all
echo $UID
Which is not a proper nor valid UID for it on any platform.Code: Select all
0
normally, it is:on any platform.Code: Select all
1000
Another command that comes in handy from time to time to reset the whole system (literally a true reset)Code: Select all
sudo -i dconf reset -f /

-
- Posts: 4
- Joined: Tue Aug 22, 2017 4:02 pm
Re: ubuntu 21.04 -- keyboard not typing in apps
This isn't really a fix, as such, but if you change from Wayland to X11, by clicking the icon in the lower right corner of the login screen, the issue is resolved (but then you are running X11 instead of Wayland, for what that may be worth to you).
-
- Posts: 1
- Joined: Wed Jun 30, 2021 8:19 pm
Re: ubuntu 21.04 -- keyboard not typing in apps found a workaround
I found a workaround for this problem (at least for me).
It seems as if the kernel module hid_logitech_dj prevents keyboard and mouse events from reaching apps in Wayland when using Logitech unifying receivers.
I could not (at least for now) get module blacklisting to work (either by modprobe.d or by udev rules).
Thats why I just remove the module to get this working again (as root):
Does anyone have a suggestion where to file this bug?
It seems as if the kernel module hid_logitech_dj prevents keyboard and mouse events from reaching apps in Wayland when using Logitech unifying receivers.
I could not (at least for now) get module blacklisting to work (either by modprobe.d or by udev rules).
Thats why I just remove the module to get this working again (as root):
- sudo rmmod hid_logitech_dj && sudo rm /lib/modules/$(uname -r)/kernel/drivers/hid/hid-logitech-dj.ko
- Remove receiver
- Reconnect receiver
Does anyone have a suggestion where to file this bug?
Re: ubuntu 21.04 -- keyboard not typing in apps
Pi4-4G RaspiOS 32 BuLlSeYe
Re: ubuntu 21.04 -- keyboard not typing in apps
Same issue. Noticed, USB "wired" keyboard that system was setup with works fine and gets focus in all windows for text input (eg. Chromium, Terminal..). However, when switching to a functioning USB unifying logitech keyboard (tried 2 diff unifying receiver/keyboard combo's from other working computers) ,and same thing.. the K400 Plus and K860 .. both with unifying receiver FW updates.. do the same : They can type text for the login password, and also if I touchpad/mouse click the search.. can type in that.. but can't get the keyboard to gain focus within a new terminal, nor chromium window. For the K400 plus, the touchpad works fine and keyboard works only like I said.. login and search screen, etc.. but no focus into core apps (terminal input, chromium, etc..). Please update when a Fix is coming.. else , back to the long-azz wired USB keyboard for Ubuntu 21.. and separate mouse. .. and JUST NOTICED !! : ** Once you plug back in the wired USB keyboard, you CAN type from the wireless USB/unifying receiver keyboard !!?.. so just the USB wired keyboard plugged in somehow gets recognized and allows input/focus typing from EITHER keyboard !??.. bizzare.
Re: ubuntu 21.04 -- keyboard not typing in apps
I have exactly the same problem at RPi4 + Ubuntu 21.04 (latest updates) and a Logitech K235 mouse/keyboard combo.matzelchen wrote: ↑Wed Jun 30, 2021 9:07 pmI could not (at least for now) get module blacklisting to work (either by modprobe.d or by udev rules).
I added this to blacklist and it works now (included workaround to disallow dynamic loading).
Code: Select all
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
Last edited by CvH on Thu Jul 08, 2021 8:43 am, edited 1 time in total.
-
- Posts: 2
- Joined: Sat Oct 05, 2013 4:59 pm
Re: ubuntu 21.04 -- keyboard not typing in apps
I can confirm this worked for me.CvH wrote: ↑Thu Jul 08, 2021 8:14 amCode: Select all
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
For those who are wondering how to use keyboard input, you can go to settings > Accessibility > and use On screen Keyboard OR press CTRL + ALT + F3 to get terminal.
Re: ubuntu 21.04 -- keyboard not typing in apps
Also FYI, another way to get keyboard back to do the modprobe steps above without using the on-screen menu is to just login with the regular Xorg/X11 session, which doesn't have a broken keyboard with the Logitech unified receiver.
(You want to go back to using Wayland afterwards though since good things are coming down the pipeline in the mutter wayland display server gnome uses.)
1. Use the mouse to use the menu a the top right of the screen to logout.
2. At the gdm3 login screen use the gear icon at bottom right to select Gnome Xorg Session
3. Login.
4. Open a terminal
5. Run:
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
6. Once you get back to your session, logout using the top right menu.
7. Use the bottom right gear to select the regular Gnome Session
8. Login.
9. Profit!
(You want to go back to using Wayland afterwards though since good things are coming down the pipeline in the mutter wayland display server gnome uses.)
1. Use the mouse to use the menu a the top right of the screen to logout.
2. At the gdm3 login screen use the gear icon at bottom right to select Gnome Xorg Session
3. Login.
4. Open a terminal
5. Run:
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
6. Once you get back to your session, logout using the top right menu.
7. Use the bottom right gear to select the regular Gnome Session
8. Login.
9. Profit!
Re: ubuntu 21.04 -- keyboard not typing in apps
THIS WORKED FOR ME! (satadru's procedure of 15-Jul-2021)