Question: I've installed ubuntu 16.04 LTS, removing windows 7, through bootable pen. Everything went well during installation. With ubuntu already running, after doing all the updates, most of the times, after a while my touchpad and keyboard freezes. First, I'm unable to click anywhere but can move mouse, no keyboard working. Then, mouse freezes completlty.

Tried the solution displayed at:
[Touchpad stops working after a while, Ubuntu 14.10, Dell Latitude E7440](https://askubuntu.com/questions/587343/touchpad-stops-working-after-a-while-ubuntu-14-10-dell-latitude-e7440)

```
rm -rf /etc/modprobe.d/blacklist_i2c_hid.conf

```

And at:
[Proper touchpad thumb & palm detection with libinput](https://askubuntu.com/questions/649103/proper-touchpad-thumb-palm-detection-with-libinput/678122#678122)

```
sudo apt-get install xserver-xorg-input-libinput
sudo apt-remove xserver-xorg-input-synaptics

```

Then added some configurations

```
sudo vi /usr/share/X11/xorg.conf.d/90-libinput.conf 

Section "InputClass"
    Identifier "libinput touchpad catchall"
    MatchIsTouchpad "on"
    MatchDevicePath "/dev/input/event*"
    Driver "libinput"
    Option "Tapping" "True"
    Option "DisableWhileTyping" "True"
EndSection

```

Still, after this, it froze again. All I can do is force shutdown.

Anything else I can or should do?

Answer: 
Just want to thank and confirm this has helped me.

TLDR: I use Dell Latitude E6420 with Ubuntu 21.10, the package name used is
nvidia-driver-390.

```
sudo apt install nvidia-driver-390

```

First I tried driver version 495 (package name: nvidia-driver-495), it rebooted and go to to safe graphics - 640x480 resolution.
Then did "grep -i nvidia /var/log/dmesg", it stated that Nvidia NVS 4200 is detected but support has been dropped on this version, the latest version supporting NVS 4200 is 390, pointing to <https://www.nvidia.com/en-gb/drivers/unix/>.

Hope this helps anyone else if the package version changes.
It's been stable after installing this package, previously it locked up about 1 min after booting onto the graphical logon screen.
---

1. sudo gedit /etc/default/grub

GRUB\_CMDLINE\_LINUX\_DEFAULT="quiet splash usbcore.autosuspend=-1 acpi\_enforce\_resources=lax"

2. sudo bash -c 'echo -1 > /sys/module/usbcore/parameters/autosuspend'
3. sudo nano /lib/udev/rules.d/60-persistent-v4l.rules

SUBSYSTEM=="usb", ATTRS{idVendor}=="04f2", ATTRS{idProduct}=="b36e" RUN+="/bin/sh -c 'echo enabled > /sys$env{DEVPATH}/../power/wakeup'"

4.cp /lib/udev/rules.d/60-persistent-v4l.rules /etc/udev/rules.d/

5.sudo nano /etc/rc.local 

sudo sh -c "echo USB0 > /proc/acpi/wakeup"
sudo sh -c "echo USB1 > /proc/acpi/wakeup"
sudo sh -c "echo USB2 > /proc/acpi/wakeup"
sudo sh -c "echo USB3 > /proc/acpi/wakeup"
sudo sh -c "echo enabled > /sys/bus/usb/devices/3-1/power/wakeup"

=============also, get a usb powered hub, put the mouse on that.