Please run nvidia-bug-report.sh as root and attach the resulting .gz file to your post. Hovering the mouse over an existing post will reveal a paperclip icon.
It’s an Optimus system with hybrid graphics. Don’t use the .run installer, uninstall it. Use only the drivers from ubuntus graphics ppa. Have the package nvidia-prime installed, remove the ‘nomodeset’ parameter, run sudo prime-select nvidia and reboot.
I am already using the official package provided by Ubuntu repositories (nvidia-driver-390 metapackage that installs all necessary). Nvidia prime it’s installed (I am using Kubuntu in this laptop with nvidia-prime for 2 years). The 'nomodeset" parameter its removed from grub config (I already read your post about blank screen problems). But when I reboot with Nvidia I always get a blank screen when SDDM it’s launched.
#!/bin/sh
# Xsetup - run as root before the login dialog appears
if [ -e /sbin/prime-offload ]; then
echo running NVIDIA Prime setup /sbin/prime-offload
/sbin/prime-offload
fi
xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto
If I understand well that code, it’s not enough to put that two commands in the prime-offload? (I mean that its not necessary in Xsetup if we write it in prime-offload)
Then if now my Xsetup it’s ok, I only had to change the xorg.conf that I generated with nvidia-xconfig for the one you said. But it worries me that it have references to other monitors with different resolutions than mine. Could I proceed anyway?
I was thinking that maybe I had an automatic copy of my xorg.conf when upgraded (the one that worked well before), and it was there, so I did a test with that one and worked!. So I will write down here the change and configuration that made work again my Nvidia in a laptop with Optimus.
Added lines 9 and 10 to usr/share/sddm/scripts/Xsetup:
#!/bin/sh
# Xsetup - run as root before the login dialog appears
if [ -e /sbin/prime-offload ]; then
echo running NVIDIA Prime setup /sbin/prime-offload
/sbin/prime-offload
fi
xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto