The officially official Devuan Forum!

You are not logged in.

#1 2023-07-04 19:04:44

GNUser
Member
Registered: 2017-03-16
Posts: 560  

[SOLVED] Random Xorg crashes after upgrading to Daedalus

It seems that Xorg's latest modesetting driver does not play nice with old-ish (5th generation) integrated Intel graphics. One solution is to force Xorg to use its intel driver instead of the default modesetting driver.

If all of these are true for you:

1. You are experiencing seemingly random Xorg crashes (e.g., while using a chromium-based web browser such as Brave or Chrome) after upgrading to Daedalus

2. After an Xorg crash, /var/log/Xorg.0.log.old shows Fatal server error: (EE) GLSL compile failure

3. Your machine has 5th generation Intel integrated graphics (use inxi -Gx to find out. In my case, command output shows arch: Gen-5.75)

Then try creating /usr/share/X11/xorg.conf.d/09-force-intel-driver.conf with this in it (you may have to change Device1 to Device0):

Section "Device"
	Identifier "Device1"
	Driver "intel"
EndSection

and then reboot. In my case, all Xorg crashes went away.

I hope this helps someone with the same issue.

----------

Some additional details:

In my case, crashes could be reliably triggered by visiting certain product pages on amazon.com while using Brave or Chrome browser (e.g., "Risk: Lord of the Rings Trilogy edition"). Disabling "Use hardware acceleration when available" in the browser did not help. Building, installing, and using mesa-amber as described in this post did not help. Using nomodeset kernel boot parameter does make the crashes go away, but seemingly at the expense of disabling the GPU and losing hardware graphics acceleration.

Here is what I see at the end of /var/log/Xorg.0.log.old after a crash:

vec2 rel_tex_coord(vec2 texture, vec4 wh, int repeat) 
{
	vec2 rel_tex; 
	rel_tex = texture * wh.xy; 
	if (repeat == RepeatFix + RepeatNone)
		return rel_tex; 
	else if (repeat == RepeatFix + RepeatNormal) 
		rel_tex = floor(rel_tex) + (fract(rel_tex) / wh.xy); 
	else if (repeat == RepeatFix + RepeatPad) { 
		if (rel_tex.x >= 1.0) 
			rel_tex.x = 1.0 - wh.z * wh.x / 2.; 
		else if (rel_tex.x < 0.0) 
			rel_tex.x = 0.0; 
		if (rel_tex.y >= 1.0) 
			rel_tex.y = 1.0 - wh.w * wh.y / 2.; 
		else if (rel_tex.y < 0.0) 
			rel_tex.y = 0.0; 
		rel_tex = rel_tex / wh.xy; 
	} else if (repeat == RepeatFix + RepeatReflect) {
		if ((1.0 - mod(abs(floor(rel_tex.x)), 2.0)) < 0.001)
[    63.908] (EE) 
Fatal server error:
[    63.908] (EE) GLSL compile failure
[    63.908] (EE) 
[    63.908] (EE) 
Please consult the The X.Org Foundation support 
	 at http://wiki.x.org
 for help. 
[    63.909] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[    63.909] (EE) 
[    63.909] (II) AIGLX: Suspending AIGLX clients for VT switch
[    63.968] (EE) Server terminated with error (1). Closing log file.

P.S. My other laptop, which has integrated Intel graphics Gen-7, is not affected by this problem.

Last edited by GNUser (2023-07-05 14:52:21)

Offline

#2 2023-07-05 00:06:09

Altoid
Member
Registered: 2017-05-07
Posts: 1,366  

Re: [SOLVED] Random Xorg crashes after upgrading to Daedalus

Hello:

GNUser wrote:

... you may have to change Device1 to Device0):

Section "Device"
	Identifier "Device1"
	Driver "intel"
EndSection

--- snip ---

... had to change Device0 to Device1 for the config file to have any effect. Crashes went away with this.

Reading your post I vaguely recalled a similar issue (many) years ago when I was attempting to go from a single screen layout to a two (and then three) screen layout.

I was trying to get a manually configured xorg.conf file to work but had started the screen numbering at 1 instead of at 0.   

Once I got it to work I never had to look at it again: I have used the same *.conf file with the same hardware through at least four different distributions and now with Devuan since Jesse.

See Device Section here: https://www.x.org/releases/current/doc/ … #heading10

Screen number

This option is mandatory for cards where a single PCI entity can drive more than one display (i.e., multiple CRTCs sharing a single graphics accelerator and video memory). One Device section is required for each head, and this parameter determines which head each of the Device sections applies to. The legal values of number range from 0 to one less than the total number of heads per entity. Most drivers require that the primary screen (0) be present.

In short: screen numbers start at 0.

Best,

A.

Offline

#3 2023-07-05 02:42:56

GNUser
Member
Registered: 2017-03-16
Posts: 560  

Re: [SOLVED] Random Xorg crashes after upgrading to Daedalus

Altoid wrote:

In short: screen numbers start at 0.

Maybe so, but the affected laptop only has one (built-in) screen and the config file has no effect unless I use Device1.

Last edited by GNUser (2023-07-05 14:39:11)

Offline

#4 2023-07-05 13:28:15

GNUser
Member
Registered: 2017-03-16
Posts: 560  

Re: [SOLVED] Random Xorg crashes after upgrading to Daedalus

For completion's sake, here is the output of inxi -Gx in the three configurations I mentioned in original post:

#1: Laptop's default configuration. Result: Xorg consistently crashes when visiting certain webpages using chromium-based web browsers.

$ inxi -Gx
Graphics:
  Device-1: Intel Core Processor Integrated Graphics vendor: Sony driver: i915
    v: kernel arch: Gen-5.75 bus-ID: 00:02.0
  Device-2: Microdia Webcam type: USB driver: uvcvideo bus-ID: 1-1.2:3
  Display: x11 server: X.Org v: 1.21.1.7 driver: X: loaded: modesetting
    unloaded: fbdev,vesa dri: crocus gpu: i915 resolution: 1366x768~60Hz
  API: OpenGL v: 2.1 Mesa 22.3.6 renderer: Mesa Intel HD Graphics (ILK)
    direct-render: Yes

#2: Workaround using nomodeset kernel boot parameter. Result: No Xorg crashes at the price of an inactive GPU.

$ inxi -Gx
Graphics:
  Device-1: Intel Core Processor Integrated Graphics vendor: Sony driver: N/A
    arch: Gen-5.75 bus-ID: 00:02.0
  Device-2: Microdia Webcam type: USB driver: uvcvideo bus-ID: 1-1.2:3
  Display: x11 server: X.Org v: 1.21.1.7 driver: X: loaded: vesa
    unloaded: fbdev,modesetting dri: swrast gpu: N/A resolution: 1366x768
  API: OpenGL v: 4.5 Mesa 22.3.6 renderer: llvmpipe (LLVM 15.0.6 128 bits)
    direct-render: Yes

#3: Current configuration, achieved with /usr/share/X11/xorg.conf.d/09-force-intel-driver.conf and no special kernel boot parameters. Result: No Xorg crashes, GPU is active.

$ inxi -Gx
Graphics:
  Device-1: Intel Core Processor Integrated Graphics vendor: Sony driver: i915
    v: kernel arch: Gen-5.75 bus-ID: 00:02.0
  Device-2: Microdia Webcam type: USB driver: uvcvideo bus-ID: 1-1.2:3
  Display: x11 server: X.Org v: 1.21.1.7 driver: X: loaded: intel
    dri: crocus gpu: i915 resolution: 1366x768~60Hz
  API: OpenGL v: 2.1 Mesa 22.3.6 renderer: Mesa Intel HD Graphics (ILK)
    direct-render: Yes

Other than this one strange issue on this one laptop, upgrade from Chimaera to Daedalus was smooth for all my machines. Thank you, Devuan team!

Happy hacking!

Last edited by GNUser (2023-07-05 18:38:44)

Offline

#5 2024-01-18 16:14:50

olive_
Member
Registered: 2024-01-18
Posts: 1  

Re: [SOLVED] Random Xorg crashes after upgrading to Daedalus

Even though I am using Debian, I am so grateful for this solution, because after upgrade to Bookworm Palemoon would crash the X system. With this fix (using Device1) it seems to work well.

Before, I also tried the the recipe on https://dev1galaxy.org/viewtopic.php?pid=36120 (building locally and installing mesa-amber) but that did not fix the problem. Now I wonder wether I should undo that, and the best way for doing it (dpkg -r ... for all the 6 packages plus the dependencies they installed plus removing build-essential devscripts which I normally don't use).

Offline

Board footer