You are not logged in.

#1 2020-04-22 15:18:19

Mickanos
Member
From: Lorient, France
Registered: 2020-04-19
Posts: 7

[SOLVED] Xorg freezes seemingly randomly

Hello,
I installed Arch on an oldish laptop a few months ago, and while I'm pretty happy that I got most of it running as I want it but there still are a few issues that I need to tackle.

One of them is that my Xorg is very unstable. Some days it is fine but some days it crashes almost every hour. I have a hard time figuring out the pattern.
Since I have a status bar displaying cpu usage, load and available memory, I know that crashes do not happen when the system runs out of ressources.
In fact, earlier today I was running a Python script that was using 100% of my cpu with no problem, and the computer crashed later when I had only emacs running. (and crashed several other times today when I had only emacs running as well).
It also sometimes happend that the computer freezes for 30 secondes or so and then just unfreezes and gets back to working. Maybe other times it would if I waited long enough, but I have once left it by itself for 5 minutes before giving up and cutting power.

Here are pastebins of the files /.local/share/xorg/Xorg.0.log and /.local/share/xorg/Xorg.0.log.old
I haven't been able to find anything that seemed relevant to me in there.
https://gist.github.com/5237f64b40b2a5b … d55768af42
https://gist.github.com/c995db2bbd2d42d … d0ebd3b537

I have check this wiki article : https://wiki.archlinux.org/index.php/In … tel_driver as my computer has an intel graphic chip.
Disabling the 3D acceleration did not seem to help and using the "NoAccel' caused programs to malfunction (Kitty and Min at least).

I also thought it might be connected to swap. I am a bit confused by the fact that the commands free -m ans swapon -s give different results :

[mickael@noether ~]$ LC_ALL=C swapon -s
Filename				Type		Size	Used	Priority
/dev/sda3                              	partition	2097172	0	-2
[mickael@noether ~]$ LC_ALL=C free -m
              total        used        free      shared  buff/cache   available
Mem:           1911         553         778         139         580        1073
Swap:          2048           0        2048

I'm confused why swapon -s tells me that none of my swap is used and free -m tells me that all of it is used and shared).

So far, none of my ideas have gotten me anywhere, and I really need a stable environment as I'm getting back to teaching classes through Teams next week.
Is there another log file I could check out to learn more about what happens when my computer freezes?

Thank you for taking the time of checking my post out.

Edit: I forgot to add that I run i3 windows manager. It might very much be relevant to the problem at hand.
Edit 2: Added LC_ALL=C to my commands so the output would be in english.

Update : The problem was apparently solved by removing the package xf86-video-intel

Last edited by Mickanos (2020-04-24 21:56:35)

Offline

#2 2020-04-22 15:44:45

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [SOLVED] Xorg freezes seemingly randomly

Mickanos wrote:

I'm sorry that my command outputs are in french. If you there's a way to get them in english for sharing here, I'd be happy to do so.

CoC - Pasting pictures and code


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2020-04-22 15:54:15

Mickanos
Member
From: Lorient, France
Registered: 2020-04-19
Posts: 7

Re: [SOLVED] Xorg freezes seemingly randomly

Slithery wrote:
Mickanos wrote:

I'm sorry that my command outputs are in french. If you there's a way to get them in english for sharing here, I'd be happy to do so.

CoC - Pasting pictures and code

Thank you. I had missed that instruction. I corrected my post.

Offline

#4 2020-04-22 17:03:47

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,797

Re: [SOLVED] Xorg freezes seemingly randomly

Mickanos wrote:

... later when I had only emacs running.

I approve wink

I am a bit confused by the fact that the commands free -m ans swapon -s give different results :

[mickael@noether ~]$ LC_ALL=C swapon -s
Filename				Type		Size	Used	Priority
/dev/sda3                              	partition	2097172	0	-2
[mickael@noether ~]$ LC_ALL=C free -m
              total        used        free      shared  buff/cache   available
Mem:           1911         553         778         139         580        1073
Swap:          2048           0        2048

I'm confused why swapon -s tells me that none of my swap is used and free -m tells me that all of it is used and shared).

I think you are reading that wrong.

The first line tells you about your real memory.   The only thing I see is that you don't have a lot of real memory.  Like less than 2GB  You are using less than half of it (553MB) , some of it being used for sharing and cache.
The second line says you have 2G of swap available, but you have not needed to use any of it yet.

What is this system?   It does not have much memory at all.   Is this a virtual machine?  Is this a small ARM based machine?  Edit: Or a 'netbook'?
With that little memory, using X is going to be really marginal.

And, of course we all know -- emacs  == Eight Megs And Constantly Swapping.


Edit:  Missed the -m switch on your free command.  Updated my MBs to GBs and my kBs to MBs

Last edited by ewaller (2020-04-22 17:13:04)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Online

#5 2020-04-22 18:43:46

Mickanos
Member
From: Lorient, France
Registered: 2020-04-19
Posts: 7

Re: [SOLVED] Xorg freezes seemingly randomly

The machine is a cheap netbook I bought some 5 years ago.
I mostly intended to use it for work (which, in my case is mostly reading PDFs, using Emacs for LaTeX, thunderbird and teaching through Microsoft Teams in those weird days), browsing the web and the occasonial Doom game. Back then it seemed like a good idea to only spend 300€ in a netbook.
Now, it's mostly that I try to recycle my stuff and not to throw it away unless it's really disfunctionnal.

That's also one of the reasons I installed Archlinux. I hoped I'd be able to really control what programs are running and get something light enough to run on this laptop. Since I don't have much RAM, it was my first hypothesis that I was running out of memory and that my SWAP was not working right. But it doesn't look like I'm running out of RAM when it freezes, as my status bar tells me that in the five seconds before the freeze, I had maybe 700 MB or so left.


Are you saying it's hopeless to run X properly on this computer, and that I should look for lighter alternatives?

Edit : About the SWAP confusion, I figured out what happened : I was reading it wrong when I was looking at it in french. SWAP in french is "Partition d'échange". Since the name of the line is pretty long, all the numbers on that line are pushed to the right, so much that they appear to be in the wrong column.
This is a completely unrelated matter, and I will try to figure out who should be warned about it.

Last edited by Mickanos (2020-04-22 19:07:16)

Offline

#6 2020-04-22 20:19:48

seth
Member
Registered: 2012-09-03
Posts: 51,379

Re: [SOLVED] Xorg freezes seemingly randomly

2GB is low, but w/ a lean WM (like i3) and maybe vim rather than emacs (:-P) can work fine.
The biggest hogs these days are browsers, so don't open too many tabs.

When this happens, can you still switch to another VT (ctrl+alt+F2/3/4/…)?
Can you ping the machine or ssh into it?

Offline

#7 2020-04-23 11:46:13

Mickanos
Member
From: Lorient, France
Registered: 2020-04-19
Posts: 7

Re: [SOLVED] Xorg freezes seemingly randomly

seth wrote:

When this happens, can you still switch to another VT (ctrl+alt+F2/3/4/…)?
Can you ping the machine or ssh into it?

I had to wait for the freeze to happen again to check all of this (except for switching to another VT, which doesn't work).
So, the machine can't be pinged, appears offline on the LAN and is unreachable by ssh.

I should add that yesterday after your post, I worked for hours on emacs without a single problem, and today it froze pretty much 5 minutes after power up, with only Min and Evince opened. And Min had only two tabs opened.
I don't believe the problem is directly related to ressources, so I suppose there is something faulty in my configuration or installation.
However, it started happening pretty much after I installed Xorg and i3. Most of the specific configuration I did happenned after the problem had started happenning, so whatever is wrong must be at a pretty basic level.

Last edited by Mickanos (2020-04-23 12:33:38)

Offline

#8 2020-04-23 14:34:52

seth
Member
Registered: 2012-09-03
Posts: 51,379

Re: [SOLVED] Xorg freezes seemingly randomly

Sound like the kernel halts - please post a complete system journal ("sudo journalctl -b" - w/o crash, that won't work anyway. We'll just look for possible causes)

Offline

#9 2020-04-23 14:47:18

Mickanos
Member
From: Lorient, France
Registered: 2020-04-19
Posts: 7

Re: [SOLVED] Xorg freezes seemingly randomly

Here is the output of sudo journalctl -b
http://dpaste.com//12V62FW

Thank you for your help.

Edit :
From lines 1223 to lines 1234, I see this :

Apr 23 14:31:34 noether kernel: i915 0000:00:02.0: GPU HANG: ecode 8:1:85dffffb, in systemd-logind [408]
Apr 23 14:31:34 noether kernel: GPU hangs can indicate a bug anywhere in the entire gfx stack, including userspace.
Apr 23 14:31:34 noether kernel: Please file a _new_ bug report at https://gitlab.freedesktop.org/drm/intel/issues/new.
Apr 23 14:31:34 noether kernel: Please see https://gitlab.freedesktop.org/drm/intel/-/wikis/How-to-file-i915-bugs for details.
Apr 23 14:31:34 noether kernel: drm/i915 developers can then reassign to the right component if it's not a kernel issue.
Apr 23 14:31:34 noether kernel: The GPU crash dump is required to analyze GPU hangs, so please always attach it.
Apr 23 14:31:34 noether kernel: GPU crash dump saved to /sys/class/drm/card0/error
Apr 23 14:31:34 noether kernel: i915 0000:00:02.0: Resetting rcs0 for stopped heartbeat on rcs0
Apr 23 14:31:34 noether kernel: i915 0000:00:02.0: systemd-logind[408] context reset due to GPU hang
Apr 23 14:31:49 noether kernel: i915 0000:00:02.0: GPU HANG: ecode 8:1:85dffffb, in systemd-logind [408]
Apr 23 14:31:50 noether kernel: i915 0000:00:02.0: Resetting rcs0 for stopped heartbeat on rcs0
Apr 23 14:31:50 noether kernel: i915 0000:00:02.0: systemd-logind[408] context reset due to GPU hang

Could this mean my graphic chipset is at fault?
Here is the content of the GPU crash dump : http://dpaste.com//25A2J4B
Here is the output of lspci | grep VGA :

00:02.0 VGA compatible controller: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Integrated Graphics Controller (rev 21)

I followed the instructions from this thread : https://bbs.archlinux.org/viewtopic.php?id=203123 and switched the AccelMethod to uxa.
I will report on results, but due to the irregular appearance of freezes, it's gonna be hard to say quickly wether or not it worked.

Last edited by Mickanos (2020-04-23 15:16:37)

Offline

#10 2020-04-23 16:09:05

seth
Member
Registered: 2012-09-03
Posts: 51,379

Re: [SOLVED] Xorg freezes seemingly randomly

That thread is dead old - the xorg logs are gone from the gist, do you use the intel driver at all?
What if you switch to the modesetting driver? (just remove xf86-video-intel, be sure to not have configlets left around in /{usr/share,etc}/X11/xorg.conf.d/* that reference it (or X11 won't start)

Also, try passing "intel_idle.max_cstate=1" and "i915.enable_psr=0" to the kernel list and/or disable DRI/DRI3, https://wiki.archlinux.org/index.php/In … RI3_issues and https://wiki.archlinux.org/index.php/In … tel_driver (latter is intel only)

Offline

#11 2020-04-23 19:10:29

Mickanos
Member
From: Lorient, France
Registered: 2020-04-19
Posts: 7

Re: [SOLVED] Xorg freezes seemingly randomly

seth wrote:

That thread is dead old - the xorg logs are gone from the gist, do you use the intel driver at all?

Ah yes, sorry about the log. My github account got flagged, even though I created it a week ago and only ever used it to post pastebins here with gist.
Anyway, here's a pastebin of my actual xorg log. http://dpaste.com//0B7XHNB
I reverted my change to uxa.

seth wrote:

What if you switch to the modesetting driver? (just remove xf86-video-intel, be sure to not have configlets left around in /{usr/share,etc}/X11/xorg.conf.d/* that reference it (or X11 won't start)

Also, try passing "intel_idle.max_cstate=1" and "i915.enable_psr=0" to the kernel list and/or disable DRI/DRI3, https://wiki.archlinux.org/index.php/In … RI3_issues and https://wiki.archlinux.org/index.php/In … tel_driver (latter is intel only)

For now, I removed my xf86-video-intel package and took 20-intel.conf out of /etc/X11/xorg.conf.d/.
I'm thinking I should probably wait to see if that fixes the problem or if the freeze still occurs. Or would you rather that I try passing the kernel options right away?

About disabling DRI, I tried that earlier and it didn't fix the problem.

Offline

#12 2020-04-23 21:36:21

seth
Member
Registered: 2012-09-03
Posts: 51,379

Re: [SOLVED] Xorg freezes seemingly randomly

Or would you rather that I try passing the kernel options right away?

I'd first see whether the modesetting driver can induce the freeze as well.
If yes, it makes more sense to pass the kernel parameters and if no, you won't have to wonder which of your changes was the crucial one.

Offline

#13 2020-04-24 21:54:41

Mickanos
Member
From: Lorient, France
Registered: 2020-04-19
Posts: 7

Re: [SOLVED] Xorg freezes seemingly randomly

I've been working for hours today without having any freeze problem.
Hopefully, the problem has indeed been solved by removing the package xf86-video-intel.
I'm going to mark the thread as solved, but will report back if the problem shows up again after all.

Thank you very much for your help, Seth. I will now be able to torture my high-schoolers through webcam with maths without having to give them a break everytime my computer crashes. wink

Offline

Board footer

Powered by FluxBB