We have a Raspberry Pi 2 Model B using Raspbian installed from/on NOOBS card. The GUI desktop was fully functional for several days.

While trying to get Python picamera module to work, decided to do: sudo apt-get upgrade This was the first time we had done that.

Now the system boots to the GUI desktop, but at the desktop, the keyboard and mouse do not respond.

If I press Shift immediately after power-up, I can get into the NOOBS pre-boot screen. On that screen the keyboard and mouse work just fine. If I let it begin booting Raspbian I can pause and resume the boot process (pause and resume message display) using Ctrl-S and Ctrl-Q.

Notable messages include: Ones from usb 1-1.2 and usb 1-1.3 reporting that it detected the mouse and the keyboard as new USB devices, apparently without issue. Then, just after "[info] Loading kernel module snd-bcm2835.", I get:

libkmod: ERROR ../libkmod/libkmod.c 554: kmod_search_moddep: could not open moddep file '/lib/modules/3.18.5-v7+/modules.dep.bin'

later I get:

[....] Checking if shift key is held down:Error opening '/dev/input/event*': No such file or directory

and another instance of the same "Error opening '/dev/input/event*'..." a few lines later, after entering runlevel 2.

Do the messages relating to /dev/input/event* indicate why the keyboard and mouse don't respond in the GUI?

Why would they respond prior to launching the GUI?

Is it possible or likely that the earlier "kmod" issue is related to the subsequent keyboard/mouse problem? What might the resolution for that be? (What is a moddep file?)

If fixing this requires interacting with the system, how can I prevent the system from launching the GUI on boot?

  • 1
    Although it was working previously can you please try plugging the keyboard and mouse into to a powered USB hub
    – rob
    Commented Mar 31, 2015 at 7:13
  • I don't have a powered hub available, but I did try powering up with just the mouse (no keyboard). The mouse still did not respond once the GUI was running.
    – cncsnw
    Commented Apr 1, 2015 at 14:55

2 Answers 2


Something went wrong with your update, or something happened to the root filesystem.

libkmod: ...could not open moddep file '/lib/modules/3.18.5-v7+/modules.dep.bin'

Kmod stuff is for kernel module loading. That file should exist. It probably would not have been involved in an update either, since 3.18.5-v7+ was the first pi 2 kernel for Raspbian, i.e., you already had that.

All I can recommend is that you download a current raspbian image, unzip it and mount the image (you'll need another linux system for this), mount your card, and see what's up in /lib/modules/3.18.5-v7 in the second partition. It should look exactly the same as the one in the image. If not, just delete whatever is there and copy everything (all the subdirectories, etc) over from the image.

I can't promise that will fix everything but it should provide whatever was missing that's caused your input problem.

Your other option is to just backup what you want from the card and reinstall from scratch.


I had a very similar issue after an apt upgrade. Something went wrong during upgrade, and when I rebooted mouse and keyboard didn't work. WiFi didn't work either, but luckily cable network did work. So I managed to remotely login with VNC. From there mouse and keyboard worked, so I could sudo dpkg --configure -a, which completed the installation process, and everything's ok now.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.