I'm using KDE Neon based on Ubuntu 20.04 latest release version with last KDE on a Asus laptop with AMD Ryzen 4800H and Nvidia RTX 2060.

I'm trying to install Nvidia drivers using ubuntu-drivers command in order to install nvidia-drivers-470.

I have already changed Systemd Target (similar to Runtime Level) to multi-user.target in order to prevent X from running an other OpenGL applications.

After that, I blacklisted Nouveau module from kernel and updated init-ramfs.

I'm finally trying to configure my display manager (KDE) from a script, which I have already written, called optimus.sh inside /usr/local/bin



xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto

On Lightdm I would be editing /etc/lightdm.conf directly to change the following line:


However, there is no equivalent to lightdm.conf on KDE.

Do you know if there is a different way to achieve this step?

1 Answer 1


xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto

You need to add this to the following file: /usr/share/sddm/scripts/Xsetup This will run the lines when SDDM starts. If the Xsetup file is not there, you can create it.

I hope this helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.