Can't disable nouveau drivers in Ubuntu 18.04

I found the solution. I'll write it here for who may have the same problem.

My gdm3 session was running in wayland. To check it:

 $ loginctl
 SESSION     UID  USER     SEAT     TTY             
       2    1000  velix    seat0    tty2            
      c2    1000  velix                                             
      c1     120  gdm      seat0    tty1

The command loginctl show-session <session-n> -p Type show the session type:

$ loginctl show-session c1 -p Type
Type=Wayland

To change it, edit the file /etc/gdm3/custom.conf and uncomment the line WaylandEnable=false.

After rebooting:

$ loginctl show-session c1 -p Type
Type=x11

Now blacklisting nouveau drivers in /etc/modprobe.d/blacklist.conf (as in the question) works and doesn't give the above error.

The key point is to run xorg instead of wayland

(That's why it was working in my 17.10 ubuntu, forced to run xorg)


https://bugs.launchpad.net/nvidia-drivers-ubuntu/+bug/1784598

try:

sudo systemctl disable nvidia-fallback.service