As I suspected, it was a configuration problem. Here’s what I found to work for my case:
1 - Edited the content of my /lib/modprobe.d/nvidia-graphics-drivers.conf
file:
blacklist nouveau
blacklist lbm-nouveau
alias nouveau off
alias lbm-nouveau off
options nvidia-drm modeset=1
and then run on terminal: sudo update-initramfs -u
Ref: https://askubuntu.com/a/1310431/1175096
2 - I emptied out the content of /etc/X11/xorg.conf
.
Ref: Internal laptop screen not detected when using Nvidia driver
3 - I created a new conf file in /usr/share/X11/xorg.conf.d/
, named 30-nvidia-prime-overwrite-fucker.conf
. This is because gpu-manager usually overwrites 11-nvidia-prime.conf
at boot. The name really doesn’t matter, as long as you use a larger number at the beginning. My new file contained:
Section "OutputClass"
Identifier "Nvidia Prime"
MatchDriver "nvidia-drm"
Driver "nvidia"
Option "AllowEmptyInitialConfiguration"
# Option "IgnoreDisplayDevices" "CRT"
Option "PrimaryGPU" "Yes"
ModulePath "/lib/x86_64-linux-gnu/nvidia/xorg"
EndSection
which is exactly the content of 11-nvidia-prime.conf
but with the Option "IgnoreDisplayDevices" "CRT"
commented out.
Ref: https://askubuntu.com/a/689505/1175096
4 - In my /etc/default/grub
file I wrote:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
And then on terminal, to update grub:
sudo update-grub
My built-in screen is back and my external monitor is working as an extension screen!