I'm using Kubuntu 17.04
My touchpad was having problems, so I asked for help and someone suggested removing libinput and rebooting. I did that, like an idiot.
After the reboot, my touchpad was working! But my USB mouse and the laptop's built in keyboard were not. Even a USB keyboard didn't work. Couldn't CTRL+ALT+F1 into the terminal either. So I tried recovery mode to just reinstall libusb and live with the USB mouse... but I can't connect to the internet through there. Lan cable doesn't work, wifi doesn't work, and the network-manager service just dies on me either way.
I am lost, I don't know what to do, I need this computer, but I'm a noob and can't fix things. Reinstalling is an option but it would be very very inconvenient.
I actually almost got it to boot into the terminal and I was almost able to log in, but SDDM started shortly after and killed my keyboard again, because libinput isn't installed.
Fixed.
Used a live ubuntu USB stick, and chroot'ed into my install and managed to reinstall libinput. All works fine now.
You could create a bootable usb and try and attempted to gain access via that to back up any important data you have, then just reinstall and start a fresh.
I have had issue with Ubuntu that have lead me down that path. I know it’s not really the response you where looking for but seems like a solid option at this point