Edit the /etc/X11/xorg.conf and in the ‘Screen’ section, change DefaultDepth and Depth from 24 to 30.
Section "Screen" Identifier "Screen0" Device "Device0" Monitor "Monitor0" DefaultDepth 30 Option "Stereo" "0" Option "nvidiaXineramaInfoOrder" "DFP-4" Option "metamodes" "nvidia-auto-select +0+0" Option "SLI" "Off" Option "MultiGPU" "Off" Option "BaseMosaic" "off" SubSection "Display" Depth 30 EndSubSection EndSection
Driver 415.27.0.0, Gtx 1080ti, Kubuntu 18.04