I deleted my /etc/X11/ dir and now I can't log in

Hi folks. I recently installed the nvidia GPU driver from the official repository but, because my television tells lies in its EDID information, it always makes all fonts unreadably small. I vaguely remember the solution to this was to modify one (or more?) file(s) in /etc/X11/conf.d/ to disable the use of EDID, specify the screen’s dimensions in millimetres, and then use the cvt tool to add a modeline which contained the resolution, and then X11 would calculate a DPI from the information provided. Given that I was trying to do this from little more than vague recollection, I did cp -r /etc/X11/ /etc/X11.backup, but by the time I’d inevitably lost track of what I was doing during internet searches, I couldn’t remember if I’d actually backed up the X11 config before making any changes. I wasn’t too worried, though, because I was sure I remembered someone telling me that if I did make a mistake, I could just delete the X11directory, reboot, and a default X11 config would be rebuilt. So because I wasn’t sure that the backup would undo any changes I might have made, I just deleted the /etc/X11/ directory and rebooted.

Unfortunately, since then, my computer refuses to allow me to log in. I don’t know if it thinks I’m entering the wrong password because it doesn’t have the correct keyboard information in a rebuilt X11 config, or if it is allowing me to log in, but then immediately kicking me back out to the login screen because it can’t start the desktop properly. In legacy, non-EFI days, I’d just press “3” on the Grub OS selection menu before choosing to boot into openSuse, so I could just log in as root on a CLI, rename the backup folder to X11 and reboot, but there’s nowhere I can see to specify a runlevel on the Grub menu. Trying the system recovery option just seems to behave like the standard openSUSE 15.3 option, too.

Anyone got any suggestions?

Oh I forgot to say that the nvidia driver is still clearly being used, because all the text is still illegibly small.

Hi
Press ‘e’ to edit the grub menu at the end of the linuxefi line add a 3 :wink: Should be able to force a re-install of xdm and xorg-X11-server to re-populate…


zypper in -f xdm xorg-X11-server

I suppose that will automatically reinstall xinit as well, but whatever xorg.con* file(s) NVidia drivers had installed/configured there will have to be redone if necessary. An ‘Option “DPI” “144 x 144”’ or something like it in some xorg.con* file might have been used to deal with the TV’s unintelligible fonts. That particular option is specific to NVidia’s drivers. The generic X config method for controlling DPI is the DisplaySize option. It’s typically simpler to use a startup script with e.g. xrandr --dpi 144. https://wiki.archlinux.org/title/Xorg is a good resource to figure this out if necessary.

Awesome. Thanks malcolm. I managed to boot into run level 3 and got it sorted in a flash, thanks again.

@ mrmazda Yeah, doing that did remove some files in the /etc/X11/xorg.conf.d/ directory, but everything seemed to still work as it always did, but because I’d backed up the original xorg.conf.d files, I just modified them, and everything is working perfectly now.

I thought about adding a short, simple post to the New User/How To forum about anticipating the potential for unreadable fonts, and how to rectify the problem, but then I noticed it’s read only. I’m not a new user of openSSUSE, but I have to solve this problem so infrequently that I forget what to do every single time, so I might just write what I do here with all the information in one place, just so I can hopefully find it in a DuckDuckGo search when I need it. So if you see me post a thread about solving a problem you’ve already helped me with, feel free to ignore it: although any corrections would certainly be wecome.

Thanks guys.

When you want to post aHowto, you can do so in theUnreviewed How To and FAQ

Man I’ve literally just posted it in here because I could have sworn I couldn’t post to that forum. Maybe I got it mixed up with another one. I guess I’ll have a look at posting a copy of it in that one tomorrow, and deleting the one I’ve just posted in here.

You said you tried “New User/How To forum”, in fact there is “New User How To/FAQ (read only)” and I assume you tried that one. But as the title says, it is read only.

I pointed you to “Unreviewed Hoe To and FAQ”. Bot are sub-forums of “How To/FAQ Forums”. which is mentioned as the very first of “Get Technical Help Here” from the main page.

And BTW, do not spend much energy in trying to delete a thread, because you can not.