Xinit SegFault: unw_get_proc_name failed: no unwind info found [-10]. Intel GMA i915, modesetting does not work have to use xf86videointel

Hello all,

I am trying to setup my beloved Thinkpad X60 with NixOS. Yes, I do have newer computers (also running NixOS), but I want to use the X60 since I enjoy using it and find that it has several superior qualities. It is 64 bit hardware (C2D) and has GMA graphics (i915).

Only issue is that I can’t get Xorg to start. Here is the relevant part of the log while using the modesetting driver:

[   266.531] (II) modeset(0): Output SVIDEO-1 disconnected
[   266.531] (II) modeset(0): Using exact sizes for initial modes
[   266.531] (II) modeset(0): Output LVDS-1 using initial mode 1024x768 +0+0
[   266.531] (==) modeset(0): Using gamma correction (1.0, 1.0, 1.0)
[   266.531] (==) modeset(0): DPI set to (96, 96)
[   266.531] (II) Loading sub module "fb"
[   266.531] (II) LoadModule: "fb"
[   266.531] (II) Module "fb" already built-in
[   266.532] (WW) glamor requires at least 128 instructions (64 reported)
[   266.532] (EE) modeset(0): Failed to initialize glamor at ScreenInit() time.
[   266.532] (EE) 
Fatal server error:
[   266.532] (EE) AddScreen/ScreenInit failed for driver 0
[   266.532] (EE) 
[   266.532] (EE) 
Please consult the The X.Org Foundation support 
         at http://wiki.x.org
 for help. 

And the intel driver (which I understand is unmaintained and will be removed soon):

[  1104.966] (II) Initializing extension XVideo-MotionCompensation
[  1104.966] (II) Initializing extension GLX
[  1105.025] (EE) 
[  1105.025] (EE) Backtrace:
[  1105.026] (EE) 0: /nix/store/sgzwfb9k14myjfdxmz7zg6wqhb7mi0d9-xorg-server-21.1.14/bin/X (OsSigHandler+0x33) [0x5c2c33]
[  1105.027] (EE) unw_get_proc_name failed: no unwind info found [-10]
[  1105.027] (EE) 1: /nix/store/wn7v2vhyyyi6clcyn0s9ixvl7d4d87ic-glibc-2.40-36/lib/libc.so.6 (?+0x0) [0x7fca94c48620]
[  1105.028] (EE) 2: /nix/store/sgzwfb9k14myjfdxmz7zg6wqhb7mi0d9-xorg-server-21.1.14/lib/xorg/modules/extensions/libglx.so (glxConvertConfigs+0x12) [0x7fca949ffb92]
[  1105.028] (EE) 3: /nix/store/sgzwfb9k14myjfdxmz7zg6wqhb7mi0d9-xorg-server-21.1.14/lib/xorg/modules/extensions/libglx.so (__glXDRIscreenProbe+0x2e8) [0x7fca94a07e98]
[  1105.029] (EE) 4: /nix/store/sgzwfb9k14myjfdxmz7zg6wqhb7mi0d9-xorg-server-21.1.14/lib/xorg/modules/extensions/libglx.so (xorgGlxServerInit+0xb7) [0x7fca949fe2b7]
[  1105.029] (EE) 5: /nix/store/sgzwfb9k14myjfdxmz7zg6wqhb7mi0d9-xorg-server-21.1.14/bin/X (_CallCallbacks+0x34) [0x44c474]
[  1105.030] (EE) 6: /nix/store/sgzwfb9k14myjfdxmz7zg6wqhb7mi0d9-xorg-server-21.1.14/bin/X (GlxExtensionInit+0x15f) [0x57e9bf]
[  1105.030] (EE) 7: /nix/store/sgzwfb9k14myjfdxmz7zg6wqhb7mi0d9-xorg-server-21.1.14/bin/X (InitExtensions+0x89) [0x4bbce9]
[  1105.031] (EE) 8: /nix/store/sgzwfb9k14myjfdxmz7zg6wqhb7mi0d9-xorg-server-21.1.14/bin/X (dix_main+0x1ac) [0x44ad8c]
[  1105.031] (EE) 9: /nix/store/wn7v2vhyyyi6clcyn0s9ixvl7d4d87ic-glibc-2.40-36/lib/libc.so.6 (__libc_start_call_main+0x7e) [0x7fca94c3227e]
[  1105.032] (EE) 10: /nix/store/wn7v2vhyyyi6clcyn0s9ixvl7d4d87ic-glibc-2.40-36/lib/libc.so.6 (__libc_start_main+0x89) [0x7fca94c32339]
[  1105.033] (EE) 11: /nix/store/sgzwfb9k14myjfdxmz7zg6wqhb7mi0d9-xorg-server-21.1.14/bin/X (_start+0x25) [0x433175]
[  1105.033] (EE) 
[  1105.033] (EE) Segmentation fault at address 0x0
[  1105.033] (EE) 
Fatal server error:
[  1105.033] (EE) Caught signal 11 (Segmentation fault). Server aborting
[  1105.033] (EE) 
[  1105.033] (EE) 
Please consult the The X.Org Foundation support 
         at http://wiki.x.org
 for help. 

I am wondering if anyone here has input. I have also built mesa with the following options to try and get the modesetting driver to work (note I have added the i915g driver, which supersedes the i915 driver according to https://docs.mesa3d.org/amber.html):

        environment.systemPackages = with pkgs; [
                (pkgs.mesa.overrideAttrs (oldAttrs: {
                        galliumDrivers = [
                                "crocus" # Intel legacy, x86 only
                                "i915" # Intel extra legacy, x86 only
                                "i915g" # Intel extra legacy, x86 only
                                "iris" # new Intel (Broadwell+)
                                "llvmpipe" # software renderer
                                "softpipe" # older software renderer
                                "zink" # generic OpenGL over Vulkan, experimental
                        ];
                }))
        ];

I am wondering if mesa-amber would be the ultimate solution for this? The only distro I know where it is available in arch linux, so I am planning on trying that this afternoon. If that works, then I am planning on trying to get amber working on nix.

Overall, I am still at a loss regardless. I had Debian 12 on this laptop before and it booted into X without any problems. It seems like a breaking change in some package has caused this recently. I am wondering if anyone else has input. Please let me know! Thank you

So i messed around with arch a bit. As expected, using modesetting with the default mesa package produced the same error as on NixOS. However, after installing mesa-amber, X started right up! Unfortunately though, the performance was abysmal. This is despite me being fairly confident that it was using hardware acceleration for rendering, but i cannot be sure.

Installing the xf86-video-intel driver though, as expected, completely fixed the issue. I would really appreciate being able to use this driver on NixOS until the modesetting driver is fixed…

On 24.11, the driver is still there (although, like I said it is not going to be available in the next release), but it doesnt work and causes the segfault.

On the final version of the intel driver before it was removed, it was built against the commit 31486f40f8e8f8923ca0799aea84b58799754564, which is a commit almost 2 years older than the one arch is currently on (b74b67f0f321875492968f7097b9d6e82a66d7df).

It seems like im going to have to try to build xorg with the newer driver. Luckily I have a remote build server setup so my poor X60 doesn’t cook itself.

Nix devs, please fix!!

Honestly you might be better off using software rendering at this point.

Have you tried a wayland compositor btw.?

Unfortunately, neither of those suggestions fit my use case. It seems like the issue is some kind of problem with nixos since other distros like archlinux use the same versions of packages and yet magically the intel driver works there and not here.

I am currently trying to investigate this backtrace:

[  3142.037] (EE) Backtrace:
[  3142.037] (EE) 0: /nix/store/sgzwfb9k14myjfdxmz7zg6wqhb7mi0d9-xorg-server-21.1.14/bin/X (OsSigHandler+0x33) [0x5c2c33]
[  3142.038] (EE) unw_get_proc_name failed: no unwind info found [-10]
[  3142.038] (EE) 1: /nix/store/wn7v2vhyyyi6clcyn0s9ixvl7d4d87ic-glibc-2.40-36/lib/libc.so.6 (?+0x0) [0x7f60eae48620]
[  3142.039] (EE) 2: /nix/store/sgzwfb9k14myjfdxmz7zg6wqhb7mi0d9-xorg-server-21.1.14/lib/xorg/modules/extensions/libglx.so (glxConvertConfigs+0x12) [0x7f60eac11b92]
[  3142.039] (EE) 3: /nix/store/sgzwfb9k14myjfdxmz7zg6wqhb7mi0d9-xorg-server-21.1.14/lib/xorg/modules/extensions/libglx.so (__glXDRIscreenProbe+0x2e8) [0x7f60eac19e98]
[  3142.040] (EE) 4: /nix/store/sgzwfb9k14myjfdxmz7zg6wqhb7mi0d9-xorg-server-21.1.14/lib/xorg/modules/extensions/libglx.so (xorgGlxServerInit+0xb7) [0x7f60eac102b7]
[  3142.041] (EE) 5: /nix/store/sgzwfb9k14myjfdxmz7zg6wqhb7mi0d9-xorg-server-21.1.14/bin/X (_CallCallbacks+0x34) [0x44c474]
[  3142.042] (EE) 6: /nix/store/sgzwfb9k14myjfdxmz7zg6wqhb7mi0d9-xorg-server-21.1.14/bin/X (GlxExtensionInit+0x15f) [0x57e9bf]
[  3142.042] (EE) 7: /nix/store/sgzwfb9k14myjfdxmz7zg6wqhb7mi0d9-xorg-server-21.1.14/bin/X (InitExtensions+0x89) [0x4bbce9]
[  3142.043] (EE) 8: /nix/store/sgzwfb9k14myjfdxmz7zg6wqhb7mi0d9-xorg-server-21.1.14/bin/X (dix_main+0x1ac) [0x44ad8c]
[  3142.044] (EE) 9: /nix/store/wn7v2vhyyyi6clcyn0s9ixvl7d4d87ic-glibc-2.40-36/lib/libc.so.6 (__libc_start_call_main+0x7e) [0x7f60eae3227e]
[  3142.044] (EE) 10: /nix/store/wn7v2vhyyyi6clcyn0s9ixvl7d4d87ic-glibc-2.40-36/lib/libc.so.6 (__libc_start_main+0x89) [0x7f60eae32339]
[  3142.046] (EE) 11: /nix/store/sgzwfb9k14myjfdxmz7zg6wqhb7mi0d9-xorg-server-21.1.14/bin/X (_start+0x25) [0x433175]
[  3142.046] (EE) 
[  3142.046] (EE) Segmentation fault at address 0x0
[  3142.046] (EE) 
Fatal server error:
[  3142.046] (EE) Caught signal 11 (Segmentation fault). Server aborting

Which could possibly according to this could be due to an illegal instruction since my cpu lacks avx support, but I have no clue. I really dont have much else to work with since, like I said, I havent been able to replicate this outside of nixos even with the same versions of most software.

I also managed to built and load a newer version of the intel video driver on my system, but to no avail. The driver is only broken on nixos, not other distros

No this is a segfault. AVX would yield SIGILL.

That post is also about software rendering on 32bit.

You’re likely hitting Xorg session fails to launch, probably due to mesa 24.2.1 -> 24.2.2 update · Issue #342763 · NixOS/nixpkgs · GitHub.

If it indeed works on other distros, that’s an interesting data point. Please report the exact distro used and the exact version of mesa and intel DDX.

1 Like

Ah, thank you for telling me about the AVX and also linking that issue. It is definitely the same issue. I read this comment on that thread (comment), which confirms that the very old intel gpus (like mine) do require the intel driver like Ive been finding out.

But yes, I installed Arch linux on the computer in question this morning to test and i was able to confirm that the xf86-video-intel driver does still work on arch with the exact same hardware. Mesa, the X server, and most of the other relevant software is either the same version or slightly newer than NixOS, so it doesnt seem like an upstream regression in any of those packages. Rather, it seems like there is some issue in NixOS that is causing this (source).

Hopefully this issue is able to be resolved, I am still investigating but I am nearly at my wits end with my limited knowledge of the inner-workings of NixOS and X.

Mesa version on arch testing system: 24.3.3-2
Intel DDX: 2.99.917+923+gb74b67f0-2

The computer also had Debian 12 installed on it prior to wiping it and installing NixOS, and X was working fine on there too. I am using NixOS stable 24.11

I haven’t tried bisecting myself, but if the user in this issue got it right, the problem should be in one of the two patches that got applied to mesa here.

1 Like

In release 24.11 (I am using), it doesnt appear like either of those patches are applied to mesa. I only see the opencv patch. So it doesnt appear like those are the culprit unless it is possible there is something else that I am missing.

I have also now installed the 24.2.1 version of mesa, which was working according to the user in this issue and I am unfortunately getting the same error log from startx.

I installed that version of mesa by overriding the version attribute of mesa using the overrideAttrs function. Not sure if that is the best way, but it seemed to build fine.

I found that the following works on 24.11:

        services.xserver.videoDrivers = [ "intel" ];

        nixpkgs.overlays = [
                (self: super: {
                        xorg = pkgs-r2405.xorg;
                        libxkbcommon = pkgs-r2405.libxkbcommon;
                })

                (self: super: {
                        mesa = pkgs-r2405.mesa;
                })

        ];

Where pkgs-r2405 is the 24.05 nixpkgs via my flake.nix.

Overriding mesa or xorg alone does not suffice.

As I’m sure you can imagine, I am having trouble with building older derivations on 24.11, so testing between versions is quite time consuming but I believe I am making progress. Just need to invest more time.

Please let me know if you have any other pointers!

1 Like

Welp, seems like I fixed the issue!

Building mesa with this patch

diff --git a/src/gallium/targets/dril/dril_target.c b/src/gallium/targets/dril/dril_target.c
index 6f62f524764..cc151cfcc74 100644
--- a/src/gallium/targets/dril/dril_target.c
+++ b/src/gallium/targets/dril/dril_target.c
@@ -453,7 +453,9 @@ drilCreateNewScreen(int scrn, int fd,
                     const __DRIconfig ***driver_configs, void *data)
 {
    const __DRIconfig **configs = init_dri2_configs(fd);
-   if (!configs && fd == -1) {
+   if (!configs) {
+      if (fd != -1)
+         return NULL;
       // otherwise set configs to point to our config list
       configs = calloc(ARRAY_SIZE(drilConfigs) * 2 + 1, sizeof(void *));
       int c = 0;

and building with the 24.05 version of Xorg (24.11 has now removed the xf86videointel driver, so I just build with the old version since I havent figured out overriding Xorg) fixes the issue.

This bug was introduced in 24.2.2, and the patch that you pointed out was what allowed me to find that out. This is the offending patch in mesa upstream.

I am going to try and submit this patch to mesa upstream. but I would also appreciate if we could get this patch on 24.11 and re-implement xf86videointel (now would probably be a good time to get it updated as well). I will create a PR!

Of course the modesetting driver should still be used by default on supported chipsets, but I see no reason to provide support for the older chipsets especially when we still have support for neomagic and other 25+ year old hardware.

Still not sure why this version of mesa is working on other distros with the intel driver, but I am satisfied for now.

Thanks!

I am going to try and submit this patch to mesa upstream. but I would also appreciate if we could get this patch on 24.11 and re-implement xf86videointel

I’ve seen your upstream MR. Let’s wait for what the Mesa devs have to say, if they accept it we’ll surely make a backport. xf86-video-intel can be easily brought back later.

now would probably be a good time to get it updated as well

Not much happened in the last 4 years, but ok.