Best way to unlock computer?

What do you mean by locks up? Do you mean that the desktop locks due to the inactivity or the whole system freezes?

system freezes, the only thing I can do is hard restart with the pc power button

Hi Hines_Figher,

That does not seem like normal operation. I can think of two situations that could fit your case:

1.) The display manager freezes, and will not respond to anything
2.) The machine’s experiencing such a big load it can’t answer to anything in a timely manner.

In case 1, you can still access your machine with ssh (we have a guide on enabling ssh on Ubuntu 18.04). In such a freezing situation, if you are able to log in with ssh, and the system does not show high load or swapping, the graphical session should be investigated further.

In case 2, you may not be able to login even with ssh, but you would get at least an error message that would help us getting closer to the root cause. A machine that is completely frozen will not respond to even a ping request, while an overloaded one should, given enough time. Also in this case you should hear the cooling fans as loudly as possible for the given model.

In either case if you are able to log in with ssh, you can query system load with the uptime command, and check memory usage with free to see if some resource is to blame about the situation.

I have enabled SSH per the guide. However I do not understand how I get to the terminal to log in with SSH if I cannot do anything on said computer.

Thanks

The idea here is to be able to login using any other computer and the network whether it is another Linux or MS windows host using Putty. What @sandmann meant is that you try to login if your computer freezes again AND if only the GUI is frozen. This way you can investigate in more detail on what is going on.

Is you system up to date? Have your updated your system?

I use Livepatch and it is up to date. Guess I gotta find out how to use Putty from my Mint machine

On your Mint machine you don’t really need Putty. Just open a terminal, type:

$ ssh <username-on-ubuntu>@<IP address of ubuntu>

The cliens will ask if the fingerprint of the remote machine is okay, answer with ‘yes’, provide the remote machine’s password, and you are logged in.

got connected with ssh just have to wait until ubuntu locks up again

so it finally froze, ssh in and get this:
Welcome to Ubuntu 18.04.4 LTS (GNU/Linux 4.15.0-109-generic x86_64)

19 packages can be updated.
0 updates are security updates.

*** System restart required ***
Last login: Sun Jul 5 16:39:35 2020 from 192.168.0.20
hines@hines-Vostro-260:~$

I did have an update minimized. Used the power button to hard start and I’m up and running again

just did it again, Dark Side of the Moon in my headphones. “Time” just started then omg I am out of time. Seriously, most disparaging. anyways the ssh response was the same as above except 21 packages can be updated. any other commands I should run when ssh’d in?
Thanks

The ssh test was intended to separate the issue from a lot of other possible issues. Seems like your machine does not freeze at all, as it can answer to your ssh login request, and tell everything about itself that is preconfigured (the number of packages that can be updated, useful links, etc.).

This boils down the issue to the graphical session and/or the graphical server, because the system itself running fine. For example, on such a freeze, you can execute the following on the terminal you get when logging in with ssh:

sudo systemctl isolate multi-user.target
sudo systemctl isolate graphical.target

Which will restart your whole graphical server, and also your session (so you don’t need to hard reset). This however will not solve the problem, but we have a lead. Do you see any error messages in your /var/log/Xorg.0.log at the time of this freezing happening?

Giving it a bit of thought, the issue may be as trivial as the screensaver turning on. Did you try to hit “space” on the keyboard when the screen goes black?

well trying to figure out how to read the log to see where that time is

I will try that…however it does not go “black” or blank, I can move the cursor around but i cannot do anything with it.

The screensaver is just a sideway thought I got, but if you have a moving cursor that’s not the culprit. To read the log you can use many tools, for example:

$ sudo cat /var/log/Xorg.0.log

To print out the whole contents of the file.

No such file or directory. Waiting for the next freeze.

Another question: what Graphical Display Manager are you using? The default, Gnome?

well I expect it is Gnome, but how do I determine? I run:
sudo dpkg-reconfigure gdm3
but the terminal just asks for my password then returns blank

So not froze yet but for kicks and giggles I ssh’d in from mint and ran:
sudo systemctl isolate multi-user.target
sudo systemctl isolate graphical.target

and it returned nothing:
hines@hines-Vostro-260:~ sudo systemctl isolate multi-user.target [sudo] password for hines: hines@hines-Vostro-260:~ sudo systemctl isolate graphical.target
hines@hines-Vostro-260:~$

further I ran both commands from terminal on ubuntu, sudo systemctl isolate multi-user.target opened a full screen terminal that I could not esc from, hard start.
sudo systemctl isolate graphical.target restarted the OS

This command does not restart the OS, only the graphical part running on top. After executing these two commands, where you able to login with a graphical session?