2

I am using a system76 computer. I have been running Ubuntu 20.04 for some time fine.

Last night I upgraded to 22.04 after I was prompted to do so.

But now when I try to log in, I can only do so into a bash shell. I can't get the windowing system to start from there. I have tried startx and other things that I have found on various sites where it seems others had a similar problem.

I tried chmod 755 /tmp /etc/tmp, I tried uninstalling and reinstalling Xorg, I tried deleting .Xauthority. All of which I found recommended in various places.

When I type startx from the bash shell prompt, I get the following error messages:

(EE)
Fatal server error:
(EE) Could not create lock file in /tmp/.tXO-lock
(EE)
(EE)
Please consult The X.Org Foundation support
    at http://wiki.x.org
 for help.
(EE)
xinit:  giving up
xinit:  unable to connect to X server:  Connection refused
xinit:  server error

Can anybody help me?

RedNyc
  • 73
  • What did it make you think something messed with the file permissions? – Simón Aug 13 '22 at 20:30
  • Somebody suggested on another site in answer to a similar sort of problem that startx wasn't working because it couldn't access /tmp and /etc/tmp. So, that person suggested doing a chmod 755 on those directories. It didn't help me, though. – RedNyc Aug 13 '22 at 23:32

2 Answers2

2

First, it's unclear to me if you're being forced to login to a terminal session because X doesn't start automatically, or because it fails after your sign-in attempt.

Then, anyways, if you can afford it (meaning the net is working fine, and you don't have any special configuration you would like to preserve --although you can always backup your entire home and etc directories, and you should before a major upgrade) instead of trying to fix individual packages, I would suggest trying to purge and reinstall all of ubuntu-desktop at once (in the past I would try to avoid this only because network bandwidth was expensive).

Simón
  • 455
  • Yes, X didn't start automatically so I hit Ctrl-Alt-F4 (on someone's suggestion on another board to someone else's somewhat similar post to my issue) and logged in to the bash shell. – RedNyc Aug 13 '22 at 23:33
  • Also, I don't want to lose my stuff in my home directory and at this point, I don't know how to save it. It won't let me mount my external drives, it seems. – RedNyc Aug 13 '22 at 23:34
  • If you suspect there's just some broken configuration, you can simply create a new user account and then move your data. But that would only work if the problem was after you tried to sign-in. – Simón Aug 14 '22 at 00:44
  • 1
    Thank you for these thoughts! – RedNyc Aug 15 '22 at 01:24
0

I couldn't figure out at first how to back up my stuff in my home directory, so I was super reluctant to just try a new install and just have the drive wiped. I should have backed all my stuff up ahead of doing the upgrade, but I foolishly thought that since it was just an upgrade, there wouldn't be a problem.

Eventually, I was able through the bash login to mount an external drive and back up my home directory stuff. Then on another computer I created a Ubuntu 22.04 installation USB drive. From there on, everything worked like a charm.

Why did all this happen? My guess is that something went wrong with the mechanism that makes an idle machine lock a user out after a while (so that you have to login again).

I guess that because when I woke up the next morning after I left the upgrade process running, the screen was locked and no matter what I did I couldn't log in through the graphical interface, but I had to go to tty4 (or, I probably could have gone to any other of those tty-s, but I only learned about that, as I wrote above, when I studied posts online from other people who had a problem similar to mine, and from the kind people who tried to help those people out).

Anyway, it all worked like a charm once I simply did a fresh install (after backing all my stuff up). I got the idea from Simon, above, so THANK YOU SIMON!!! :)

RedNyc
  • 73
  • Thank you for sharing all your experience. In short: the great lesson to learn is the same as always: backing up before a major change seems like a waste of time that we can save, but when something unexpected happens, we end up losing more time than the backup takes. In the best case, if everything goes well, we can simply discard the backup and that's it. – Simón Aug 16 '22 at 05:17
  • Indeed! Thank you Simon! – RedNyc Aug 17 '22 at 18:19