14

I have an issue with my Ubuntu 18.04 Desktop system. I had installed virtualbox and vagrant and all was working fine. However, a couple days later, I opened my PC, reached to the login screen, but keyboard and mouse were not working at all. I restarted couple of times, but nothing.

I went to recovery mode and then to root shell. I tried doing:

sudo apt update
sudo apt upgrade
sudo apt update --fix-missing 
sudo add-apt-repository ppa:graphics-drivers/ppa

This gave this error:

cannot add PPA: 'ppa:~grahics-drivers/ubuntu/ppa'.
ERROR:'~graphics-drivers' user or team does not exist.

I got this same "user or team doesn't exist" error on many commands. No resolv.conf file found.

One of the questions I found trying to solve my issue had an answer suggesting to use this command:

sudo apt purge nvidia-*

I ran this, and then it said to do:

sudo add-apt-repository ppa:graphics-drivers/ppa

Then the same error was shown:

cannot add PPA: 'ppa:~grahics-drivers/ubuntu/ppa'.
ERROR:'~graphics-drivers' user or team does not exist.

I rebooted the PC with init 5 and I was able to login, but now, after I login and the account opens, the keyboard and mouse are again not working. Now they are working only for login and mouse works before login only. Recovery mode console is getting of no use.

suryavansh
  • 371
  • 1
  • 2
  • 9

6 Answers6

14

Maybe it is just because for some reason the Xserver module was removed. I fixed it by this:

  1. Press Ctrl+Alt+F1 to enter the TTY mode.

  2. Run:

    sudo apt install xserver-xorg-input-all 
    
傅继晗
  • 252
13

This is how I solved my issue:

  1. Reached the root shell and logged in by pressing the Shift key then selecting Advanced option.

  2. Pressed Ctrl+Alt+F2/F3/F4/F5. It asked for login details but nothing worked. It gave me this error:

    ERROR : ****** incorrect details. pam_nologin(8)
    
  3. Pressed Ctrl+D to close root shell and then selected clean, then dpkg, then network, and back to root. This time Ctrl+Alt+F3 worked.

  4. I was asked for login details and this time no error was shown.

  5. As I had purged my NVIDIA drivers, I ran these commands:

    sudo add-apt-repository ppa:graphics-drivers/ppa
    sudo ubuntu-drivers devices
    sudo ubuntu-drivers autoinstall      #this installed `nvidia-418` for me on its own.
    sudo apt-get update --fix-missing
    sudo apt-get install xserver-xorg-input-all
    sudo apt-get update && sudo apt-get upgrade -y
    sudo shutdown -r now                 # this is to shutdown and restart.
    

IT WORKED. I was able to login to my system and then still the keyboard and mouse was working and I checked the graphics card info: it was the latest driver.

I don't know what had happened before, but this small weird error took me three days and good two nights to solve.

suryavansh
  • 371
  • 1
  • 2
  • 9
7

This is what I had to do:

  1. Get to the GRUB page (turn on computer and press Escape (in UEFI) or Shift (in BIOS) after you see the maker logo) .

  2. Select Advanced options for Ubuntu.

  3. Enter the Recovery Menu by selecting Ubuntu, with Linux-xxx (recovery mode).

  4. You might need to select network to make sure you are connected to the internet.

  5. Select root.

  6. Run:

    cd /home/username
    
  7. Run:

    sudo apt install xserver-xorg-input-all
    
nayriz
  • 201
0

Previously CUDA only supports Ubuntu 18.04.1 but not 18.04.2. I got similar problems to yours when I tried to install CUDA on Ubuntu 18.04.2. However, I just found that Ubuntu 18.04.2 is now officially supported. You may give it a shot again using the latest CUDA.

0

This is not the most elegant solution to the problem, but maybe it saves someone's time.

None of the solution I found here or on the Internet helped. So I tried to upgrade to Ubuntu 20.04 with the command

sudo do-release-upgrade

and the issue resolved itself. Before you try it, make sure to backup your system.

0

I tried this solution, but it didn't work. Later I realized I had another issue. I realized that right after login I was stuck on Activities and it wasn't keyboard neither mouse issue (touchpad somehow was disabled using Fn+F10).

Stuck on activities (right after login) issue


  1. Ctrl+Alt+F3
  2. Login and run:
    killall -3 gnome-shell
    
  3. Return to the graphic tty: Ctrl+Alt+F2

karel
  • 122,292
  • 133
  • 301
  • 332