Gnome desktop login failed on RHEL 8 x86_64 (SOLVED)

Latest response

Since this afternoon I am unable to login to the Gnome desktop as root on RHEL 8 x86_64.

It worked this morning.

I am really sorry I cannot provide more details, than this:

I can give the credentials, but then it flips back to the login screen.

An ordinary user login works.

Responses

Jan,

EDITED I see now, you said you could not log in as root. This may be a setting you've established on the system itself. Can you do a ctrl-alt-f3 (go to a pseudo-terminal) and attempt a login as root?

I would definitely scour the logs, and run a tail -f /var/log/{messages,secure} from another system to capture output in the logs during failed attempts.

  • Dig into /var/log/{messages,secure} for relevant details. Perhaps run tail -f /var/log/{messages,secure} during failed attempts.
  • As another test, attempt to log into a different system to see if the issue affects one system to rule out if it is systemic, or just one system.

Kind Regards,
RJ

I see now, you said you could not log in as root. This may be a setting you've established on the system itself. Can you do a ctrl-alt-f3 (go to a pseudo-terminal) and attempt a non-graphical login as root?

  • another thing... besides digging into logs, etc - perhaps log in as yourself, become root, do a systemctl isolate multi-user.target then do a systemctl isolate graphical.target to see if this was a temporary graphical issue.
  • As a reference point, do an sosreport not to send to Red Hat but for your own checkpoint in time reference and unpack the resulting sosreport in a place you can dig into for future reference as well. An sosreport contains useful logs and system state outputs, and making one as a checkpoint for your own future reference can be useful for later comparison if it happens again on that or another system.

Regards,
RJ

I've had a very few situations where root login failed unexplained, until (I hate to say this) I rebooted the system.

Edit due to useful info provided by RJ Hinton and Christian Labisch in their comments.

The cause of the issue was found, when doing:

Diagnose:

ctrl-alt-f3
journalctl #look for strange errors indicating why root login fails.
systemctl isolate multi-user
bash $PATH_to_NVIDIA-Linux-x86_64/NVIDIA-Linux-x86_64_preferred_version.run

It showed that the noveau driver was reactivated.

Solution: Check if the nouveau driver blacklist is still intact

cat /etc/modprobe.d/nvidia-installer-disable-nouveau.conf 
# generated by nvidia-installer
blacklist nouveau
options nouveau modeset=0

Content is correct (if the file or any other with a content like this, cannot be found it does not matter as mentioned by Christian Labisch)

taken from the comment of RJ Hinton and Christian Labisch below this post

vi /etc/default/grub
add to the  GRUB_CMDLINE_LINUX line:  rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1

make a new set of initramfs file (for each installed kernel you need a new one)

dracut --force
reboot

after the reboot you could better reinstall the nVidia driver for the running kernel

crt+alt+f3
systemctl isolate multi-user
bash $PATH_to_NVIDIA-Linux-x86_64/NVIDIA-Linux-x86_64_preferred_version.run
systemctl isolate graphical

Some people like Christian Labisch in the past hinted to do a final reboot to check if the nVidia drive loads during a reboot. Good practice.

I did it, also to test the /etc/default/grub change.

reboot

log back into the Gnome desktop, it worked for me.

Wow, that's unusual for it to be reactivated... unless a new kernel is a factor, and the new kernel line didn't receive the nouveau directives.

I'm not sure if in RHEL 8 this applies, but in RHEL 7, the /etc/default/grub file needs GRUB_CMDLINE_LINUX line modprobe.blacklist=nouveau so that subsequent kernel updates will have nouveau updated in grub.cfg.

Regards,
RJ

I just added the entry in GRUB_CMDLINE_LINUX and reran

dracut --force

That sounds like what I've done with RHEL 7.x based on the solution I posted in the next comment. I'm curious if a modprobe directive would be honored by the kernel at boot. It might be worthwhile to edit what you mentioned as a solution above to include your later steps.

Kind Regards,
RJ

Hi Jan,

Besides updating the initramfs ... also, don't forget to update the grub configuration as well. :)

sudo grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg

Regards,
Christian

I often use this https://access.redhat.com/solutions/1155663 which has what you just did.

Regards,
RJ

Be aware the machine where this issue was found is not a production machine

On production machines it is bad practice to allow root access to the graphical desktop.

Is logging in to the GUI as the root user supported in Red Hat Enterprise Linux?

Hi Jan and RJ,

This is what has to be added to GRUB_CMDLINE_LINUX in order to avoid unwanted reactivation of the nouveau drivers :

GRUB_CMDLINE_LINUX="rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1

The /etc/modprobe.d/*.conf file is not necessary ... more important is that the xorg.conf file is configured correctly. :)

Regards,
Christian

Nice find Christian, and thanks. The solution doesn't carry the good things you posted. Yeah, also, I've never seen modprobe used for this matter.

Kind Regards,
RJ

You're welcome, RJ ! :)

Hi Jan,

Hope the suggestions we provided were useful for you. :)

Regards,
Christian

Hi Christian and Rj,

Thanks for you valuable feedback.

Regards,

Jan Gerrit

You're welcome, Jan ! Glad you appreciate our assistance. :)

Regards,
Christian

Gladly