Solution:
sudo gedit /etc/gdm3/custom.conf
sudo gedit /etc/gdm3/custom.conf
and hen the file is open then uncomment the following lines:
WaylandEnable=false
AutomaticLoginEnable=true
AutomaticLogin=<youruser>
in my case <youruser> is equal to max
WaylandEnable=false
AutomaticLoginEnable=true
AutomaticLogin=<youruser>
in my case <youruser> is equal to max