BOINC Xenial Drivers

Any time I want to apply updates, here is the cycle I have to do to keep nVidia and ATI/AMD drivers happy for BOINC.

#####################################################
BOINC drivers on Xenial
#####################################################

### Update the kernel
apt-get update
apt-get install linux-lowlatency-hwe-16.04 linux-tools-lowlatency-hwe-16.04 linux-image-lowlatency-hwe-16.04 linux-headers-lowlatency-hwe-16.04
apt-get dist-upgrade
apt-get autoremove

### For AMD/ATI driver issues:
Testing: https://launchpad.net/~paulo-miguel-dias/+archive/ubuntu/mesa/
OR stable https://launchpad.net/~paulo-miguel-dias/+archive/ubuntu/pkppa
apt-get install ppa-purge
ppa-purge ppa:paulo-miguel-dias/ppka
ppa-purge ppa:paulo-miguel-dias/mesa
add-apt-repository ppa:paulo-miguel-dias/mesa
apt-get update
apt-get dist-upgrade
apt-get install boinc-client-opencl clinfo mesa-opencl-icd

### For nvidia driver issues:
apt-get purge xserver-xorg-video-nouveau
apt-get purge nvidia*
apt-get install boinc-client-nvidia-cuda
update-alternatives --config gl_conf
update-alternatives --config x86_64-linux-gnu_gl_conf
ldconfig
update-initramfs -u
nvidia-xconfig

### Virtualbox crashes
apt-get purge virtualbox*
https://www.virtualbox.org/wiki/Linux_Downloads

### Reboot for the drivers if necessary
shutdown -r now

If I were running an x-server, there is nvidia-xconfig, but I run headless (mostly) and connect to boincmgr over an SSH tunnel.