Session ends abruptly for no reason - please help

Dear all,

I have endeavour OS with XFCE installed in a desktop computer.

It happens quite often (not every day but definitely every week) that the computer starts going slow, and after a while it reboots out of the blue.

In fact, perhaps “reboots” is not the correct word, but the session ends for no reason and suddenly I see the greeting page where I must enter my password to access a new session (that’s a screen I don’t see when I boot the machine from scratch, I have only one user).

When the new session starts, all windows are lost (obviously) and all apps must be started from scratch. The logout happens very quickly so perhaps it’s not really a reboot, and I can see a VPN connection from the previous is still active (and that’s something I must do manually when I power on the machine).

I don’t know why this happens but I would very much like to make it stop, it’s very annoying as all my work needs to be resumed every time it happens.

Some information about my machine from neofetch, please kindle let me know whethere there’s another detail that could be relevant for diagnosis or debugging:

OS: EndeavourOS Linux x86_64
Host: 30C70009MB ThinkStation P330
Kernel: 5.15.90-1-lts
Uptime: 3 days, 5 hours, 53 mins
Packages: 1552 (pacman)
Shell: zsh 5.9
Resolution: 1920x1080, 1920x1080, 1920x1080
DE: Xfce 4.18
WM: Xfwm4
WM Theme: Nordic
Theme: Nordic-darker-v40 [GTK2], Arc-Darker [GTK3]
Icons: Qogir [GTK2/3]
Terminal: xfce4-terminal
Terminal Font: JetBrainsMono Nerd Font 9
CPU: Intel i7-8700 (12) @ 4.600GHz
GPU: Intel CoffeeLake-S GT2 [UHD Graphics 630]
Memory: 5783MiB / 15839MiB

Thanks a lot.
Cheers, Manuel

We will need more details. With the little information you have given its not helpful to us to help you solve the issue. It could be a software issue or it could be a hardware issue. Have you checked the file system? Have you checked Htop to see if something is using up a lot of resources that is probably causing the issue? Try wiping out your cache and see if it still happens

rm -R ~/.cache you can just remove the whole folder it will be recreated

Gees … you never shut down or restart your laptop? first, just do restart the laptop by clicking restart.

This is really suspicious. The system is using 5.7Gb from 16Gb RAM.

Runs the below command and share the link here.
inxi -Faz | eos-sendlog

try looking at xsessions-errors this could tell you what is going on as well and as said By S4ndm4n 5 gigs of usage is very strange

Thanks @s4ndm4n. Here it is: https://0x0.st/oFgx.txt

5 Gb is quite low, often Firefox is taking up more than 10Gb.

Cheers, Manuel

Thanks, @thefrog. I had a look at the ~/.xsession-errors (I guess that’s what you mean), but I’m not sure what I should be looking for in it. It has 41795 lines, most of them written by a Java program that I run a lot.

I think there are many ways to check the file system. Do you recommend any in particular?

For example:

$ sudo file -sL /dev/sda2
[sudo] password for souto: 
/dev/sda2: Linux rev 1.0 ext4 filesystem data, UUID=4655e51b-56c9-4a20-845c-15b2501093d1 (needs journal recovery) (extents) (64bit) (large files) (huge files)

I can see programs there that use a lot of resources (normally Firefox), but I don’t see why that could cause rebooting. It could cause slow down, but it shouldn’t force me to start a new session.

I have removed the cache, we’ll see whether that helps.
Thanks. Manuel

what is the temprature of your cpu/gpu

inxi -s

it sounds like it could be something to do with the gpu

to check file system i usually sudo fsck /dev/sd?

what i would look for in the xsession-errors file is for something that is repepative around the time the event occurs. and yes its the one in your homefolder ~/.xsessions-errors

I don’t know anything about firefox. I havent used it in years just became way to heavy for me I use brave not that its any lighter but I like it better

According to your inixi report, there are a few strange things that caught my eye.

Sensors:
  System Temperatures: cpu: 39.0 C mobo: N/A
  Fan Speeds (RPM): N/A

CPU temp is shown but it doesn’t show any CPU fan. Is it off or not working?

Info:
  Processes: 389 Uptime: 3d 16h 27m wakeups: 15 Memory: 15.47 GiB
  used: 13.13 GiB (84.9%)

And memory usage is not normal for a machine running XFCE and :enos: . I have 40 gigs of ram and it hardly hit 2 GB when I’m not using virtual machines. Even if I use my browser for hours it doesn’t go up as much as that. I use Brave as well because it has better memory usage than other browsers and it’s faster.

Seems like your session is crashing due to your system running out of RAM. Which causes the session to refresh itself. Don’t know if you have already done but it’s better to restart your computer. Which will refresh everything in your system and release any cached memory.

If possible use pastebin.com to share your xsession-errors. I bet your session is running out of memory which leads “X” to crash which intern makes the session crash.

1 Like

How many tabs or instances of Firefox are open? I often have 4 to 5 tabs open but have only 8gb of ram and it comes nowhere near this
Have you set up swap?

Thanks, @smokey

I have many tabs open in Firefox, more than I can count. Currently 18 instances with many tabs each. However, I don’t see how that could be the reason for the sudden rebooting, that’s how I work in all my machines and I don’t have that problem in other machines. The issue must be specific to this machine (either software or hardware), not how I use Firefox. But perhaps I’m totally off the mark of course.

There is a swap but not as a separate partition:

 souto@eos  ~  fsck -N /dev/sda2                                            
fsck from util-linux 2.38.1
[/usr/bin/fsck.ext4 (1) -- /] fsck.ext4 /dev/sda2 
 souto@eos  ~  df -Th           
Filesystem     Type      Size  Used Avail Use% Mounted on
dev            devtmpfs  7,8G     0  7,8G   0% /dev
run            tmpfs     7,8G  1,7M  7,8G   1% /run
/dev/sda2      ext4      217G  128G   79G  62% /
tmpfs          tmpfs     7,8G  135M  7,7G   2% /dev/shm
tmpfs          tmpfs     7,8G   56M  7,7G   1% /tmp
/dev/sda1      vfat      300M  316K  300M   1% /boot/efi
tmpfs          tmpfs     1,6G  112K  1,6G   1% /run/user/1000
/dev/sdb1      exfat      60G  6,1G   54G  11% /run/media/souto/3731-3038

What else could I show?
Thanks, Manuel

Hi @s4ndm4n

Thank you so much for your reply and for having a detailed look.

I don’t know, how can I check. I thought I can hear the fan from time to time, but perhaps it’s something else.

Ok, I use Firefox and in my experience it has always done this, I try to close tabs when I’m done with them, from time to time, but before I do, I’m used to seeing it having these high thirst for memory.

Do you mean restart when the problem happens? What I try to do is to press the SysRq and type REISUB to rebook cleanly, but it’s not always responsive. Sometimes I have no other option than pressing the power button.

Would it help if I kill Firefox from time to time?

Here’s my .xsession-errors file. Unfortunately pastebin has a 512 kb limit, I was exceeding that.

I could be wrong but I think @s4ndm4n is getting at is you should probably reboot before you get started. With the Uptime you have and the fact your memory usuage is way out there. even for the swap file thats a lot of memory usage. Not sure how long this is been going on however with the work load you have I would definitely invest in more RAM. From what I could see in the xsessions-error file you have basic error messages I have had in the past and they never caused my session to end. From all I can tell your work load is more than your memory can handle. I would go at the least 32gig of ram.

not sure the fan speed is a problem my laptop doesn’t show fan speed either however I don’t worry about it as i have a 6 fan cooling pad that my laptop sits on. This doesn’t show the gpu or the driver that i find a bit concerning

You’re correct. What I’m trying to tell him is that his workload is overflowing physical RAM he has. And he should get into using bookmarks and make the browser start with one tab. FF taking 5GiG of RAM is too much.

I think it’s how you use the entire system.

This is my system usage.

                     ./o.                  s4ndm4n@darksideofmoon 
                   ./sssso-                ---------------------- 
                 `:osssssss+-              OS: EndeavourOS Linux x86_64 
               `:+sssssssssso/.            Kernel: 5.15.90-1-lts 
             `-/ossssssssssssso/.          Uptime: 2 hours, 6 mins 
           `-/+sssssssssssssssso+:`        Packages: 1339 (pacman) 
         `-:/+sssssssssssssssssso+/.       Shell: zsh 5.9 
       `.://osssssssssssssssssssso++-      Resolution: 1920x1080 
      .://+ssssssssssssssssssssssso++:     DE: Xfce 4.18 
    .:///ossssssssssssssssssssssssso++:    WM: Xfwm4 
  `:////ssssssssssssssssssssssssssso+++.   WM Theme: Materia-dark 
`-////+ssssssssssssssssssssssssssso++++-   Theme: Qogir-Dark [GTK2], Arc-Darker [GTK3] 
 `..-+oosssssssssssssssssssssssso+++++/`   Icons: Qogir-dark [GTK2], Arc-X-D [GTK3] 
   ./++++++++++++++++++++++++++++++/:.     Terminal: xfce4-terminal 
  `:::::::::::::::::::::::::------``       Terminal Font: Fira Mono for Powerline 10 
                                           CPU: Intel i5-6500 (4) @ 3.600GHz 
                                           GPU: Intel HD Graphics 530 
                                           Memory: 26104MiB / 39049MiB 

I’m running a Windows 10 VM at the moment of writing. My up time is 2h. If you can before you start open the terminal and run the below code.

sudo shutdown -r now

Which would restart the entire system. Because keeping a computer up for a long time does lead to issues like this.

Thanks @thefrog
What I don’t understand is why this issue never happened in other machines with less RAM that this one (in paricular, laptops running MX Linux or Windows).

Ok, I’ll follow this advice. Thanks @s4ndm4n.
I normally use poweroff instead, I suppose it’s equivalent.

I honestly don’t know. I’m what I would call a power hobbiest. I’m not in IT or even work for that matter. I am disabled. I love these kinds of problems because they help me learn. I can then pass that knowledge on someday. There could be a corrupt file that is trying to load that logs you out This is why its important to clean cache.

Why do people do this? Opening so many tabs is just going to eat up resources.