cannot play DVDs with ubuntu 18.04

sudo apt install libvdpau-va-gl1

Then change with sudo nano /etc/X11/Xsession.d/20vdpau-va-gl

remove any # in following block

[ ! -f /usr/lib/$(arch)-$(uname -s | tr '[A-Z]' '[a-z]')-gnu/vdpau/libvdpau_va_gl.so.1 ] || \
   export VDPAU_DRIVER=va_gl

This enables libvdpau-va-gl as the default VDPAU driver.

Reboot.

sudo -H gedit /etc/X11/Xsession.d/20vdpau-va-gl

remove means delete them.