You are not logged in.

#1 2022-07-01 13:52:58

borrate
Member
Registered: 2022-07-01
Posts: 11

startx crash

The first time that I execute startx, it crashes and takes me back to the terminal. If I run it again it works. This happens everyday.

I would like to know how can I troubleshoot and, hopefully, fix this issue.
Thanks in advance.

Output from journalctl -p 3 -b:

Jul 01 08:58:49 systemd-coredump[1601]: [?] Process 1106 (Xorg) of user 1000 dumped core.
                                               
                                               Module linux-vdso.so.1 with build-id 0a9dd56f2d1d7d248eeef56d29e78f6fddab09d4
                                               Module libffi.so.8 with build-id f0a9586cf0f42d2b9971bd1065ca3a6b19f4a2c2
                                               Module libgobject-2.0.so.0 with build-id a7dfc5c24acdbd0bcc40e3a427f917f679eef0d1
                                               Module libgudev-1.0.so.0 with build-id 460465b63a086d945124662363191903c0002793
                                               Module libwacom.so.9 with build-id 1fc3438938e7017596beb2e3483ce3af72c4f492
                                               Module libevdev.so.2 with build-id 09eb82a0dfca98325f54b3918875cff09a5c1428
                                               Module libmtdev.so.1 with build-id 862cf8d5b0a0dd4d4d225e17f54be93ab9c3b34e
                                               Module libinput.so.10 with build-id 9de57b91e0d1d09e53606692e2c51c8b31d3dfe1
                                               Module libinput_drv.so with build-id cf829f2000cbe7c7b226d0bc4c8188ab0fa99b62
                                               Module libnvidia-glcore.so.515.48.07 with build-id 3b70a6428fe9eebb0f42d3ee81227f877bbb16be
                                               Module libnvidia-tls.so.515.48.07 with build-id 49a02ec774cdfa043e3ce95652b5161601005094
                                               Module libglxserver_nvidia.so with build-id a9fca87e5150260a9683f359a2a0dc8433354336
                                               Module libwfb.so with build-id 777e498e46a373b91c472caa6cf79f9a9e0291b2
                                               Module libdl.so.2 with build-id 94198b268228074fa9f405bbedbbae94112593ed
                                               Module librt.so.1 with build-id f696f0167950c759f9ea43d46167fae35d43dded
                                               Module nvidia_drv.so with build-id bda9953e74990bf8cb8bf7d677631273c35a9162
                                               Module libxcb.so.1 with build-id 13d677412a71468381b11092915d231f664d18d3
                                               Module libX11.so.6 with build-id 310f8f1b8d7457d326407e0eb794353c62769b73
                                               Module libGLX.so.0 with build-id 02bd4ac6acc4da9288c543ea1a0cdaa70c5e151a
                                               Module libGLdispatch.so.0 with build-id de981c020bd9dbdc159b11f4a2a541310cc3b8d5
                                               Module libGL.so.1 with build-id b915a2e48be6c9fd3cc6f9f4c7aab1f7aeed8a4c
                                               Module libglx.so with build-id 5352d695aa33faa708c542a86db8bfe753835de8
                                               Module libpcre.so.1 with build-id 845483dd0acba86de9f0313102bebbaf3ce52767
                                               Module libbrotlicommon.so.1 with build-id acfd597a977c8087bb6184383daae2e828a9ce42
                                               Module libglib-2.0.so.0 with build-id f1d15261ce1317b9003a1f0957d5a528d063f630
                                               Module libgraphite2.so.3 with build-id ce58945ebb55b86d3a4e717b6eae29efc4720d8e
                                               Module libresolv.so.2 with build-id 89a368a6ad1b392d126a2a5beb9c2f61ade00279
                                               Module libkeyutils.so.1 with build-id ac405ddd17be10ce538da3211415ee50c8f8df79
                                               Module libkrb5support.so.0 with build-id 15f223925ef59dee4379ebbc0fcd14eda9ba81a2
                                               Module libcom_err.so.2 with build-id 3360a28740ffbbd5a5c0c21d09072445908707e5
                                               Module libk5crypto.so.3 with build-id cc77a742cb62447a53d98285b41558b8acd92866
                                               Module libkrb5.so.3 with build-id 371cc767dacb17cb42c9c44b88eebbed5ee9a756
                                               Module libgpg-error.so.0 with build-id 4738b8a9478177c202cccd64e0eb65d3dea2bfae
                                               Module libbrotlidec.so.1 with build-id 66c54e9301f7e102ecc1d88547e5f0e8a056fe22
                                               Module libharfbuzz.so.0 with build-id c58fe082cbde02fc176e3c3663a6d81386eb5027
                                               Module libpng16.so.16 with build-id 2dc0bce07f199bf983c07a05fb95a6f4af83a9b3
                                               Module libbz2.so.1.0 with build-id 919597c477c9b2cb9cdbb7745ed6494ac0e6da60
                                               Module libpthread.so.0 with build-id 95ae4f30a6f12ccbff645d30f8e1a3ee23ec7d36
                                               Module libgssapi_krb5.so.2 with build-id 292f1ce32161c0ecc4a287bc8494d5d7c420a03f
                                               Module libgcc_s.so.1 with build-id 0e3de903950e35ae59a5de8c00b1817a4a71ca01
                                               Module liblz4.so.1 with build-id e63600ab23b2f6997f42fac2fa56e1f02ce159a1
                                               Module libzstd.so.1 with build-id ab54c2881f53ab314e134f3e08c76d504376dd5d
                                               Module liblzma.so.5 with build-id 28b40c7af8098a66af6ee093b6986b91cad7694d
                                               Module libgcrypt.so.20 with build-id 8bf3cb884124273640de797a3e77d86c98434ea4
                                               Module libcap.so.2 with build-id 21b00ab76bb16fde56fd741f07233c78069f0579
                                               Module libfreetype.so.6 with build-id f89dd5502e75aca28fb5c3ccd0dbd26fe822bfef
                                               Module libfontenc.so.1 with build-id 5a11f1fb8c3f2714be9eb6697318f20e301e1d2f
                                               Module libz.so.1 with build-id fefe3219a96d682ec98fcfb78866b8594298b5a2
                                               Module ld-linux-x86-64.so.2 with build-id 0effd0e43efa4468d3c31871c93af0b7f3005673
                                               Module libc.so.6 with build-id 60df1df31f02a7b23da83e8ef923359885b81492
                                               Module libxcvt.so.0 with build-id 30bad674c8227152bb709556a3657d0258554309
                                               Module libtirpc.so.3 with build-id 5bef2adfdee3df283f593b3e2d37b6dac405256a
                                               Module libdrm.so.2 with build-id 658072e933ab3de11aea1408bdf4e72dd6e80255
                                               Module libudev.so.1 with build-id 541e6841430a5ee36134325ec0ce669c2c0b9053
                                               Module libdbus-1.so.3 with build-id 7f4b16b4b407cbae2d7118d6f99610e29a18a56a
                                               Module libunwind.so.8 with build-id e7f3b22127b00d8b14b2560df707cbbeb0134861
                                               Module libsystemd.so.0 with build-id a220b34e873e29bb116d88be0bf11fac7089ef4d
                                               Module libxshmfence.so.1 with build-id d9b3ce4edb0b6a0818bcc57dda020d2da5e3c895
                                               Module libXfont2.so.2 with build-id 154202dd7ddb86f6ae4d3bc762dfd8570b86882a
                                               Module libXdmcp.so.6 with build-id d864159ab0008415667db8d5f251696d75c90df2
                                               Module libXau.so.6 with build-id 60db1eac70f819bea9d4c366603c1583067510b4
                                               Module libnettle.so.8 with build-id a2cc6a257b0729585e870b345b83497c478ee28b
                                               Module libpciaccess.so.0 with build-id eacbec3cbdaae4e27f40804adbd53fe406ebd804
                                               Module libm.so.6 with build-id 1b7296ef9fd806e47060788389293c824b09ad72
                                               Module libpixman-1.so.0 with build-id d2170a3ac106c2a68597bf7910ab04b1cdd69c14
                                               Module Xorg with build-id 2a8b8dd78a48b4ad3d23c49cf5698b8873041ff2
                                               Stack trace of thread 1106:
                                               #0  0x00007f92f028e36c n/a (libc.so.6 + 0x8e36c)
                                               #1  0x00007f92f023e838 raise (libc.so.6 + 0x3e838)
                                               #2  0x00007f92f0228535 abort (libc.so.6 + 0x28535)
                                               #3  0x000055a5f4b41f00 OsAbort (Xorg + 0x15cf00)
                                               #4  0x000055a5f4b42213 FatalError (Xorg + 0x15d213)
                                               #5  0x000055a5f4b3a10c n/a (Xorg + 0x15510c)
                                               #6  0x00007f92f023e8e0 n/a (libc.so.6 + 0x3e8e0)
                                               #7  0x00007f92eecb1238 n/a (nvidia_drv.so + 0xb1238)
                                               #8  0x00007f92eec9c50d n/a (nvidia_drv.so + 0x9c50d)
                                               #9  0x00007f92ef0b7cc1 n/a (nvidia_drv.so + 0x4b7cc1)
                                               ELF object binary architecture: AMD x86-64

Output from Xorg.0.log.old:

[    32.962] (--) NVIDIA(GPU-0): LG Electronics LG HDR QHD (DFP-2): connected
[    32.962] (--) NVIDIA(GPU-0): LG Electronics LG HDR QHD (DFP-2): Internal DisplayPort
[    32.962] (--) NVIDIA(GPU-0): LG Electronics LG HDR QHD (DFP-2): 1440.0 MHz maximum pixel clock
[    32.962] (--) NVIDIA(GPU-0): 
[    34.045] (EE) 
[    34.045] (EE) Backtrace:
[    34.045] (EE) 0: /usr/lib/Xorg (xorg_backtrace+0x2dd) [0x55a5f4b3a0ad]
[    34.045] (EE) 1: /usr/lib/libc.so.6 (__sigaction+0x50) [0x7f92f023e8e0]
[    34.046] (EE) 2: /usr/lib/xorg/modules/drivers/nvidia_drv.so (nvidiaUnlock+0x492c8) [0x7f92eecb1238]
[    34.046] (EE) 3: /usr/lib/xorg/modules/drivers/nvidia_drv.so (nvidiaUnlock+0x3459d) [0x7f92eec9c50d]
[    34.046] (EE) 4: /usr/lib/xorg/modules/drivers/nvidia_drv.so (nvidiaUnlock+0x44fd51) [0x7f92ef0b7cc1]
[    34.046] (EE) 
[    34.046] (EE) Segmentation fault at address 0x2808
[    34.046] (EE) 
Fatal server error:
[    34.046] (EE) Caught signal 11 (Segmentation fault). Server aborting

Offline

#2 2022-07-01 13:58:15

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,480
Website

Re: startx crash

I'd suspect a potential race condition in the module loading *especially* if the attempt to launch X that fails is an auto-start setup in your profile or shellrc with autologin.

If this is the case, the solution is "early" loading of the DRM module in the initramfs:
https://wiki.archlinux.org/title/NVIDIA … de_setting

Last edited by Trilby (2022-07-01 13:58:42)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2022-07-05 12:11:41

borrate
Member
Registered: 2022-07-01
Posts: 11

Re: startx crash

Thank you Trilby.

I tried what you suggested and added the Nvidia modules to /etc/mkinitcipio.conf and ran /usr/bin/mkinitcpio -P

MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)

I also added the kernel parameter nvidia-drm.modeset=1 but the problem persists. I checked Xorg.0.log.old and journalctl -p 3 -b and its exactly the same error.

What else can I look for?

Thanks again.

Offline

#4 2022-07-05 14:54:20

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,486

Re: startx crash

Please post the entire xorg log and a system journal (sudo journalctl -b), you can use the tip in the first link below.
I guess this is is an optimus system?

Offline

#5 2022-07-05 16:06:23

borrate
Member
Registered: 2022-07-01
Posts: 11

Re: startx crash

Hello Seth, it's a desktop PC
Here are the logs you requested.

Thank you and let me know if you need more info.

Offline

#6 2022-07-05 16:20:41

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,486

Re: startx crash

1. remove /etc/X11/xorg.conf - it's just gonna blur the error and I don't see any meaningful option in it (and even if, the static config would still not be a good way to apply such)
2. neither of the logs show "nvidia-drm.modeset=1" in the kernel command line (though it's in the journal) so the logs are maybe dated (but the crash is in the journal)
3. You've at least networkmanager and dhcpcd enabled, pick one, disable the other (there seems no wifi, so just dhcpcd will do) - reboot and see whether the issue remains.

Offline

#7 2022-07-07 11:55:41

borrate
Member
Registered: 2022-07-01
Posts: 11

Re: startx crash

1. I removed /etc/X11/xorg.conf. It was created by nvidia-settings
2. You're right, when I added nvidia-drm.modeset=1 I didn't realized that the log location changed from /var/log to .local/share/xorg
3. I disabled dhcpcd because I use network-manager-applet

Here are the updated logs
Xorg.0.log
Xorg.0.log.old
journalctl -b

Offline

#8 2022-07-07 12:12:23

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,486

Re: startx crash

Ok, the system is "clean" now, but the issue remains.
I suspect it to be around rtkit-daemon and the HDMI output (circumstantial evidence, the event proximity and nvidiaUnlock releasing some mutex) - do you use the HDMI for audio?

Offline

#9 2022-07-07 13:02:02

borrate
Member
Registered: 2022-07-01
Posts: 11

Re: startx crash

I don't use HDMI for audio. Only usb for output and the front panel mic jack

Offline

#10 2022-07-07 13:10:00

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,486

Re: startx crash

Try to blacklist snd-hda-codec-hdmi, https://wiki.archlinux.org/title/Kernel … acklisting (use the /bin/true method) and see what happens.

Offline

#11 2022-07-07 15:34:42

borrate
Member
Registered: 2022-07-01
Posts: 11

Re: startx crash

I created /etc/modprobe.d/blacklist_snd_hda_codec_hdmi.conf with the line

install snd_hda_codec_hdmi /bin/true

I ran mkinitcpio -v to ensure that the file was being loaded and then run mkinitcpio -P

Then I turned off an on the computer and startx didn't work so I saved those logs:
Xorg.0.log
Xorg.0.old.log

Then rebooted and startx worked the second time as usual. Here are the journals:
journalctl-b-1
journalctl-b

I was going to enter a virtual meeting and found out that the mic wasn't working but the usb audio output was. I deleted the blacklist and rebooted and the microphone worked.

Offline

#12 2022-07-07 15:50:01

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,486

Re: startx crash

Then let's just throw some s…tuff against the wall:
- remove xf86-video-vesa
- disable docker
- delay the first startx call (ie. boot the mutli-user.target, login, get a cup of coffe, startx)

Does any of this impact the behavior?

Offline

#13 2022-07-08 12:29:53

borrate
Member
Registered: 2022-07-01
Posts: 11

Re: startx crash

- pacman - R xf86-video-vesa: it still crashes
- systemctl disable docker: it still crashes
- login, wait 1 min, startx: it doesn't crashes. I tried 3 times to be sure, powering off the computer before each try.

I think you may be getting somewhere. How can we check what happens after login?

Offline

#14 2022-07-08 15:22:32

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,486

Re: startx crash

Well, there's *some* race condition for pretty much sure - it's just not the late KMS.

I'll just blame lennart:

Jul 07 09:41:00 sopapo pulseaudio[1301]: No such profile: output:hdmi-stereo-extra3
Jul 07 09:41:00 sopapo pulseaudio[1301]: Failed to initialize daemon due to errors while executing startup commands. Source of commands: /etc/pulse/default.pa
Jul 07 09:41:00 sopapo systemd[545]: pulseaudio.service: Main process exited, code=exited, status=1/FAILURE
Jul 07 09:41:00 sopapo systemd[545]: pulseaudio.service: Failed with result 'exit-code'.
Jul 07 09:41:00 sopapo systemd[545]: Failed to start Sound Service.
Jul 07 09:41:00 sopapo systemd[545]: pulseaudio.service: Scheduled restart job, restart counter is at 1.

Check /etc/pulse/default.pa and make it not use hdmi-stereo-extra3 as default profile.

Offline

#15 2022-07-10 23:59:31

borrate
Member
Registered: 2022-07-01
Posts: 11

Re: startx crash

After that change, the pulseaudio error is gone but the startx issue persists sad
Where else could we look?

Offline

#16 2022-07-11 10:57:20

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,170

Re: startx crash

The journals posted sofar have Too Much Information

- ensure docker is still disabled
- add audit=0 as kernel paramater to the boot command
(Combining those 2 things should make the journals much more readable )

boot, run startx fast
reboot, login, wait few minutes and run startx

post both journals .


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#17 2022-07-11 13:35:04

borrate
Member
Registered: 2022-07-01
Posts: 11

Re: startx crash

Hello Lone_Wolf, here are the requested journals:
journalctl -b error
journalctl -b no error

Offline

#18 2022-07-12 11:01:06

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,170

Re: startx crash

Your processor is an i5-8400 that usually comes with an intel integrated GPU.

In the logs there's no sign of an iGPU, did you disable it in bios or is this your processor a variant without iGPU (like a Xeon) ?

please post lspci -k as normal user to clarify what hardware linux sees on your machine.


Jul 11 09:28:13 sopapo systemd-udevd[268]: nvidia: Process '/usr/bin/bash -c '/usr/bin/mknod -Z -m 666 /dev/nvidiactl c $(grep nvidia-frontend /proc/devices | cut -d \  -f 1) 255'' failed with exit code 1.
Jul 11 09:28:13 sopapo systemd[1]: Found device TOSHIBA_HDWD110 Toshiba-1.
Jul 11 09:28:13 sopapo systemd-udevd[268]: nvidia: Process '/usr/bin/bash -c 'for i in $(cat /proc/driver/nvidia/gpus/*/information | grep Minor | cut -d \  -f 4); do /usr/bin/mknod -Z -m 666 /dev/nvidia${i} c $(grep nvidia-frontend /proc/devices | cut -d \  -f 1) ${i}; done'' failed with exit code 1.

These messages are suspicious, but present in both logs .

It's a "shot in the dark" , but try disabling rtkit-daemon.service .


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#19 2022-07-12 12:18:21

borrate
Member
Registered: 2022-07-01
Posts: 11

Re: startx crash

Yes, it comes with an integrated GPU and I don't recall having disabled it, just installing NVIDIA drivers.
Here is the output of lspci -k

I disabled rtkit-daemon but the problem persists, should I keep it disabled?

Offline

#20 2022-07-12 13:18:58

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,170

Re: startx crash

Nope, you can restore rtkit .

There's no sign of the iGPU in lspci also, this is getting weird .

Could you boot with arch installation iso and check if lspci there does see your iGPU ?

Jul 11 09:28:12 sopapo kernel: DMI: Micro-Star International Co., Ltd. MS-7B24/B360M BAZOOKA (MS-7B24), BIOS 2.10 04/02/2018

Your bios firmware version is rather old, but I can't find that bios version on https://www.msi.com/Motherboard/B360M-B … pport#bios
What brand & model is this system ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#21 2022-07-12 17:21:18

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,486

Re: startx crash

The board might simply disable the IGP when you add a GPU.

https://forums.developer.nvidia.com/t/4 … ion/181876
https://forums.developer.nvidia.com/t/s … 060/170876

That user runs into an nvidiaUnlock abort because i195 didn't support their IGP an they ended up w/ the fbdev driver.
But keep in mind that for borrate, this is also a race condition - once settled, everything's fine.

@borrate, is this also an issue on warm reboots?
What if you slow down the boot by passing "boot_delay=50" to the kernel?

Offline

#22 2022-07-13 19:45:59

borrate
Member
Registered: 2022-07-01
Posts: 11

Re: startx crash

@Lone_Wolf
lspci -k from arch install iso
I think is the original BIOS and that is why is not listed for download. I'll never thought of updating it, I'll try this weekend.

@seth
It happens on warm reboots too, but inconsistently, sometimes it does not crashes.
I tried a couple of times with boot_delay=50 and it got stuck on motherboard splash screen, waited a couple of minutes and rebooted manually, I'll try again with a smaller number just to see if I can boot correctly.

Last edited by borrate (2022-07-13 19:47:11)

Offline

Board footer

Powered by FluxBB