Random logouts from Ubuntu 20.04 LTS

I have been experiencing random logouts. When I click on a program, or a new tab on a browser, or article, or hyperlink, my laptop will log out. I have three laptops with Ubuntu 20.04 LTS and they all do that. Two are HP's and one is a System 76? Anyone else having a similar problem?

So suddenly you're logged out of your session (and you wind up at the login screen again perhaps), but the system obviously doesn't reboot?

If so, then you've encountered another strange graphics driver bug (I think). I've previously seen this with Ubuntu 10.04 on 2002-to-2004-era Intel integrated graphics, but I thought those issues had long been resolved.

Please share with us the contents of the X server log from when the system logged you out. To find which log file this is, you can use this "one-liner" from the terminal:

{ grep -l 'Fatal server error' /var/log/Xorg*.log > \
  /tmp/the_logfiles_containing_errors.txt || echo -e "\n   Sorry -- you do" \
  " not have any logs from when the server crashed.\n\n   Please run this" \
  " command again right after logging in after the system\n   rudely logs" \
  " you out.\n" >&2 && false; } && xargs -a \
 /tmp/the_logfiles_containing_errors.txt -- ls --sort=time | head -1 | \
 xargs -- pluma

This messy code tells you if you still have logs from the last time the system logged you out, and if you do have a log of that, it opens the log in Pluma (the MATE text editor, though maybe I didn't have to say that). Please copy the contents of that Pluma window into a post here surrounded by [code] tags. This log will go a long way toward helping solve the problem, as the log contains your hardware setup and the exact moment when the X server crashed and (potentially) why.

Okay. I will try to get the log and post it the next time it happens,

Did you already run the command? You may not have to wait. Try running the command first, then wait if the command can't find any such logs.

First random logout but nothing:
jim@Darter-Pro-76:~$ { grep -l 'Fatal server error' /var/log/Xorg*.log > \

/tmp/the_logfiles_containing_errors.txt || echo -e "\n Sorry -- you do"
" not have any logs from when the server crashed.\n\n Please run this"
" command again right after logging in after the system\n rudely logs"
" you out.\n" >&2 && false; } && xargs -a
/tmp/the_logfiles_containing_errors.txt -- ls --sort=time | head -1 |
xargs -- pluma

Sorry -- you do not have any logs from when the server crashed.

Please run this command again right after logging in after the system
rudely logs you out.

Really? Wow. I'm flabbergasted. You didn't reboot and then run my command, did you?

If you haven't rebooted since this happened, show us the output of the dmesg command. And please enclose the output in triple backticks (```) so that it appears in a monospace font.

It'd also be useful if you showed us the contents of your .xsession-errors.old, located directly in your home directory.

I resigned in, as it had kicked me out, and ran the command and then rebooted and ran the command, no difference. I am not good at the terminal , but use the GUI, so maybe I screwed something up?
I am not even sure of your `dmesg - triple backticks (```) s command. I don't even knows what a backtick is? Which key?

Please see the following -

The backtick key is the first key, second row where ~ and ` are shown. It is sometimes referred to as a backtick.

Myself, I would highlight the the dmesg text and click on </> which selects
preformatted as a nice way to deliver text. Or perhaps blockquote would be better.

Had another random log out, this time on a dell laptop. Last one was on System 76 laptop. The command you gave me still shows nothing. Not sure if this will help but it is from the log file viewer, xorg:
[ 972.176]
X.Org X Server 1.20.9
X Protocol Version 11, Revision 0
[ 972.176] Build Operating System: Linux 4.15.0-130-generic x86_64 Ubuntu
[ 972.176] Current Operating System: Linux jim-Laptop22 5.4.0-71-generic #79-Ubuntu SMP Wed Mar 24 10:56:57 UTC 2021 x86_64
[ 972.176] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.4.0-71-generic root=UUID=55fe0cf5-cd6b-41b8-9a37-bd41f8aa6a63 ro quiet splash vt.handoff=7
[ 972.176] Build Date: 17 January 2021 09:13:31AM
[ 972.176] xorg-server 2:1.20.9-2ubuntu1.2~20.04.1 (For technical support please see http://www.ubuntu.com/support)
[ 972.176] Current version of pixman: 0.38.4
[ 972.176] Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
[ 972.176] Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 972.176] (==) Log file: "/var/log/Xorg.0.log", Time: Tue Apr 13 06:23:09 2021