GDM doesn't shows wayland-session and login into x11

Today, I loged-in to gnome-session as x11 by default. When i opend kitty terminal or wofi run launcher from the terminal it shows:
Failed to connect to display
I reboot the system and then tried to login as wayland but couldn’t find the gear icon
What should I do from here? Please help :pray:

I’m assuming you are using an Nvidia gpu?

No, my laptop has intel integrated graphics
fastfetch : Intel Iris Plus Graphics G1 (Ice Lake)

It might be still worth trying what they mentioned there, that’s what got the gear icon to appear for me.

  1. ln -s /dev/null /etc/udev/rules.d/61-gdm.rules
  2. Reboot
    Then the gear icon should show up where you can choose between xorg and wayland sessions.

do i have to give the same name ?? because in /etc/udev/rules.d/ directory does not have this null file.

The filename shouldn’t matter, I just used the filename they used in the example for myself because I couldn’t think of a better name.

After performing the above step and reboot the system.
Nothing happened, still didn’t see the gear icon.
Can we change the session to wayland through terminal ??

And opening any other wayland application like kitty-terminal, wofi run-launcher gives the error:
Failed to connect to display
I am opening kitty through gnome-terminal $ kitty gives this error message: [275 17:15:43.478326] [glfw error 65544]: Wayland: Failed to connect to display
GLFW initialization failed

I checked on my laptop which has an intel chip as well, I can see the gear icon without having to do anything. But it seems with Intel and AMD gpu it should choose Wayland as the default sessions.

So what should i do next ??

You can try what is mentioned in the last link I shared, KMS. Under /etc/dracut.conf.d there should be a file which has “force_drivers+” in it, add “i915” to it and then reinstall your kernel that should force a rebuild of your initramfs.

No, there isn’t any such file

And file contents are

Create a new file in that directory with the following content.
force_drivers+=" i915 "
Then rebuild your initramfs:
systemd-boot: sudo reinstall-kernels
grub: sudo dracut-rebuild
Then reboot and see if the gear icon shows up in gdm.