4

I've made the silly choice to install the latest nvidia driver from the Nvidia's site (run file) but I was unable to login after that, after some work I figure out how to revert to the previos nvidia driver (510) by purging nvidia drivers, reinstaling it and using the third party drives option at the GUI to enable it. But now I don't have the Xorg login options at the Ubuntu's login screen anymore. If I click on the litle cog icon I get only Ubuntu and Gnome options, both using Wayland.

I've tryed to edit the gdm3/custom.conf file using WaylandEnable=false and true without sucess. So I'm stucked with wayland.

Can someone tell me what should I do to put the Xorg option back on the login screen?

I'm using Ubuntu 22.04.

JoaoM
  • 41
  • 1
    For future reference, you can install the proprietary Nvidia drivers from the default Ubuntu repositories by running sudo ubuntu-drivers autoinstall. There's no need to download from Nvidia. – mchid Jun 02 '22 at 23:24
  • Yes, I know. It was a dummy mistake tryning to improve poor warthunder's game performance. – JoaoM Jun 03 '22 at 11:08

2 Answers2

1

I'm posting this *comment as the answer to getting XOrg running again

Run the following command:

$ sudo ubuntu-drivers autoinstall

My machine has a NVIDIA TU116 [GeForce GTX 1660] video card & before I did this I was having various problems on Ubuntu 22.04 that I hadn't seen while running 20.04.

Also, there is another answer related to this which mentions that you need to alter your /etc/gdm3/custom.conf file.

It states that you need to uncomment the line:

#WaylandEnable=false

However, it seems that you do not have to uncomment that line. Once you install the NVidia drivers then it seems that 22.04 will run the X11 system.

After running the update I have switched the setting so it was commented out and my system still runs X11 -- not wayland. So wayland is related to the drivers, I guess? That isn't explained anywhere very clearly.

When I run the following command : $ echo $XDG_SESSION_TYPE it returns the value x11 If you're running wayland, it should report wayland

22.04 settings

raddevus
  • 1,800
0

I met the same problem after I altered the /etc/X11/xorg.conf file. Maybe because of the wrong format, when I log in the next time, I can not find Xorg login options, the former Ubuntu and Gnome options will use WayLand. My Solution is as follows:

Firstly, uninstall Xorg by sudo apt remove xorg .

Secondly, delete the folder /etc/X11 manually. Of course, you can back it up at first.

Thirdly, reinstall Xorg and ubuntu-desktop(may be removed when removing Xorg) by sudo apt install xorg and sudo apt install ubuntu-desktop.

Fourthly, stop GDM3 and restart it by sudo systemctl stop gdm3 and sudo systemctl start gdm3.

NOTICE, when you stop gdm3, you may face a black screen. Just using tty and starting gdm3 and Xorg comes back.

Artur Meinild
  • 26,018
Ethan
  • 1
  • first if you use --purge you don't manualy have to delete the folder? right. and second if u use systemctl restart gdm3 you don't need to go through tty to start it again. – Nijboer IT Jul 05 '23 at 07:57