Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
X crashes on first start, but loads fine after that
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
Timmer
Guru
Guru


Joined: 24 Aug 2004
Posts: 366
Location: Duluth, MN, USA

PostPosted: Thu Jul 16, 2020 12:16 am    Post subject: X crashes on first start, but loads fine after that Reply with quote

A few days ago, my computer starting booting to a TTY console, rather than to SDDM like usual. I'm assuming something got updated, but i'm not sure what. If I log in, and then restart the xdm service, then everything works like normal.

The Xorg log for the failed load has a segfault from the modesetting driver:
Code:

$ grep "(EE)" /var/log/Xorg.0.log.old
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[    25.712] (EE) /dev/dri/card0: failed to set DRM interface version 1.4: Permission denied
[    25.732] (EE)
[    25.732] (EE) Backtrace:
[    25.732] (EE) 0: /usr/bin/X (xorg_backtrace+0x53) [0x562dc090d973]
[    25.732] (EE) 1: /usr/bin/X (0x562dc075c000+0x1b5665) [0x562dc0911665]
[    25.732] (EE) 2: /lib64/libpthread.so.0 (0x7f4fa4cc7000+0x13120) [0x7f4fa4cda120]
[    25.732] (EE) 3: /usr/bin/X (0x562dc075c000+0xb4340) [0x562dc0810340]
[    25.732] (EE) 4: /usr/bin/X (xf86CollectOptions+0x77) [0x562dc07f38d7]
[    25.732] (EE) 5: /usr/lib64/xorg/modules/drivers/modesetting_drv.so (0x7f4fa529e000+0xb08e) [0x7f4fa52a908e]
[    25.732] (EE) 6: /usr/bin/X (InitOutput+0x9ce) [0x562dc07f6fce]
[    25.732] (EE) 7: /usr/bin/X (0x562dc075c000+0x5d4dc) [0x562dc07b94dc]
[    25.732] (EE) 8: /lib64/libc.so.6 (__libc_start_main+0xea) [0x7f4fa4b2ed3a]
[    25.732] (EE) 9: /usr/bin/X (_start+0x2a) [0x562dc07a2d1a]
[    25.732] (EE)
[    25.732] (EE) Segmentation fault at address 0x124
[    25.732] (EE)
[    25.732] (EE) Caught signal 11 (Segmentation fault). Server aborting
[    25.732] (EE)
[    25.732] (EE)
[    25.732] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[    25.732] (EE)
[    25.748] (EE) Server terminated with error (1). Closing log file.


I've tried downgrading some things that seemed like they might be related to the versions that were working last week. But so far I haven't had any luck. This included the kernel (from 5.7.8 back to 5.7.7) and mesa (from 20.1.3 to 20.1.2).

The updates last week included kde-apps, kde-plasma, and kde-frameworks though, so there's 332 packages to sort through. If anyone can point me in a less broad direction, I'd appreciate it.
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6687

PostPosted: Thu Jul 16, 2020 1:02 am    Post subject: Reply with quote

Looks like it tries to start before udev is done loading the video driver?

Try putting rc_after="dev-settle" in /etc/conf.d/xdm.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 15809

PostPosted: Thu Jul 16, 2020 1:24 am    Post subject: Re: X crashes on first start, but loads fine after that Reply with quote

Timmer wrote:
The Xorg log for the failed load has a segfault from the modesetting driver:
Code:
$ grep "(EE)" /var/log/Xorg.0.log.old
[    25.712] (EE) /dev/dri/card0: failed to set DRM interface version 1.4: Permission denied
The crash may be a buggy code path that was previously not taken, and now is taken when the X server fails to setup the DRM interface. Did the updates include the X server or anything in x11-drivers?
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 2807
Location: Canada

PostPosted: Thu Jul 16, 2020 1:45 am    Post subject: Re: X crashes on first start, but loads fine after that Reply with quote

Hu wrote:
Timmer wrote:
The Xorg log for the failed load has a segfault from the modesetting driver:
Code:
$ grep "(EE)" /var/log/Xorg.0.log.old
[    25.712] (EE) /dev/dri/card0: failed to set DRM interface version 1.4: Permission denied
The crash may be a buggy code path that was previously not taken, and now is taken when the X server fails to setup the DRM interface. Did the updates include the X server or anything in x11-drivers?



It is not by chance X run as user issue ?
Back to top
View user's profile Send private message
Timmer
Guru
Guru


Joined: 24 Aug 2004
Posts: 366
Location: Duluth, MN, USA

PostPosted: Fri Jul 17, 2020 2:12 am    Post subject: Reply with quote

Ant P. wrote:
Looks like it tries to start before udev is done loading the video driver?

Try putting rc_after="dev-settle" in /etc/conf.d/xdm.


That didn't do anything, but thanks for the suggestion.
Back to top
View user's profile Send private message
Timmer
Guru
Guru


Joined: 24 Aug 2004
Posts: 366
Location: Duluth, MN, USA

PostPosted: Fri Jul 17, 2020 2:33 am    Post subject: Re: X crashes on first start, but loads fine after that Reply with quote

Hu wrote:
Did the updates include the X server or anything in x11-drivers?


Nope. But the the path not taken has some merit. On the second load, card0 loads just fine.

I probably should have done this before, but here's the complete log.
Code:

$ cat /var/log/Xorg.0.log.old
[    24.455] (--) Log file renamed from "/var/log/Xorg.pid-2708.log" to "/var/log/Xorg.0.log"
[    24.456]
X.Org X Server 1.20.8
X Protocol Version 11, Revision 0
[    24.456] Build Operating System: Linux 5.7.5-gentoo x86_64 Gentoo
[    24.456] Current Operating System: Linux billy 5.7.8-gentoo #1 SMP Thu Jul 9 18:31:42 CDT 2020 x86_64
[    24.456] Kernel command line: BOOT_IMAGE=/vmlinuz-5.7.8-gentoo root=UUID=c7edfc8b-ff0e-4893-92e6-5553112f2e98 ro quiet splash
[    24.456] Build Date: 25 June 2020  05:11:15PM
[    24.456] 
[    24.456] Current version of pixman: 0.40.0
[    24.456]    Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
[    24.456] Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[    24.456] (==) Log file: "/var/log/Xorg.0.log", Time: Thu Jul 16 20:25:26 2020
[    24.460] (==) Using config directory: "/etc/X11/xorg.conf.d"
[    24.460] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[    24.460] (==) No Layout section.  Using the first Screen section.
[    24.460] (==) No screen section available. Using defaults.
[    24.460] (**) |-->Screen "Default Screen Section" (0)
[    24.460] (**) |   |-->Monitor "<default monitor>"
[    24.461] (==) No device specified for screen "Default Screen Section".
        Using the first device section listed.
[    24.461] (**) |   |-->Device "Intel Graphics"
[    24.461] (==) No monitor specified for screen "Default Screen Section".
        Using a default monitor configuration.
[    24.461] (==) Automatically adding devices
[    24.461] (==) Automatically enabling devices
[    24.461] (==) Automatically adding GPU devices
[    24.461] (==) Max clients allowed: 256, resource mask: 0x1fffff
[    24.461] (WW) The directory "/usr/share/fonts/TTF/" does not exist.
[    24.461]    Entry deleted from font path.
[    24.461] (WW) The directory "/usr/share/fonts/OTF/" does not exist.
[    24.461]    Entry deleted from font path.
[    24.461] (WW) The directory "/usr/share/fonts/Type1/" does not exist.
[    24.461]    Entry deleted from font path.
[    24.461] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/75dpi/".
[    24.461]    Entry deleted from font path.
[    24.461]    (Run 'mkfontdir' on "/usr/share/fonts/75dpi/").
[    24.461] (==) FontPath set to:
        /usr/share/fonts/misc/,
        /usr/share/fonts/100dpi/
[    24.461] (==) ModulePath set to "/usr/lib64/xorg/modules"
[    24.461] (II) The server relies on udev to provide the list of input devices.
        If no devices become available, reconfigure udev or disable AutoAddDevices.
[    24.461] (II) Loader magic: 0x5647b16a0d00
[    24.461] (II) Module ABI versions:
[    24.461]    X.Org ANSI C Emulation: 0.4
[    24.461]    X.Org Video Driver: 24.1
[    24.461]    X.Org XInput driver : 24.1
[    24.461]    X.Org Server Extension : 10.0
[    24.461] (++) using VT number 7

[    24.461] (II) systemd-logind: logind integration requires -keeptty and -keeptty was not provided, disabling logind integration
[    24.461] (II) xfree86: Adding drm device (/dev/dri/card0)
[    24.461] (EE) /dev/dri/card0: failed to set DRM interface version 1.4: Permission denied
[    24.461] (II) xfree86: Adding drm device (/dev/dri/card1)
[    24.463] (--) PCI:*(0@0:2:0) 8086:9bca:1028:0962 rev 4, Mem @ 0x604a000000/16777216, 0x4000000000/268435456, I/O @ 0x00003000/64, BIOS @ 0x????????/131072
[    24.463] (II) LoadModule: "glx"
[    24.464] (II) Loading /usr/lib64/xorg/modules/extensions/libglx.so
[    24.465] (II) Module glx: vendor="X.Org Foundation"
[    24.465]    compiled for 1.20.8, module version = 1.0.0
[    24.465]    ABI class: X.Org Server Extension, version 10.0
[    24.465] (II) LoadModule: "modesetting"
[    24.465] (II) Loading /usr/lib64/xorg/modules/drivers/modesetting_drv.so
[    24.465] (II) Module modesetting: vendor="X.Org Foundation"
[    24.465]    compiled for 1.20.8, module version = 1.20.8
[    24.465]    Module class: X.Org Video Driver
[    24.465]    ABI class: X.Org Video Driver, version 24.1
[    24.465] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[    24.494] (**) modeset(0): claimed PCI slot 0@0:2:0
[    24.494] (II) modeset(0): using default device
[    24.494] (II) modeset(G0): using drv /dev/dri/card1
[    24.494] (II) modeset(0): Creating default Display subsection in Screen section
        "Default Screen Section" for depth/fbbpp 24/32
[    24.494] (==) modeset(0): Depth 24, (==) framebuffer bpp 32
[    24.494] (EE)
[    24.494] (EE) Backtrace:
[    24.494] (EE) 0: /usr/bin/X (xorg_backtrace+0x53) [0x5647b1613973]
[    24.494] (EE) 1: /usr/bin/X (0x5647b1462000+0x1b5665) [0x5647b1617665]
[    24.494] (EE) 2: /lib64/libpthread.so.0 (0x7f41308c7000+0x13120) [0x7f41308da120]
[    24.494] (EE) 3: /usr/bin/X (0x5647b1462000+0xb4340) [0x5647b1516340]
[    24.494] (EE) 4: /usr/bin/X (xf86CollectOptions+0x77) [0x5647b14f98d7]
[    24.494] (EE) 5: /usr/lib64/xorg/modules/drivers/modesetting_drv.so (0x7f4130e9e000+0xb08e) [0x7f4130ea908e]
[    24.494] (EE) 6: /usr/bin/X (InitOutput+0x9ce) [0x5647b14fcfce]
[    24.494] (EE) 7: /usr/bin/X (0x5647b1462000+0x5d4dc) [0x5647b14bf4dc]
[    24.494] (EE) 8: /lib64/libc.so.6 (__libc_start_main+0xea) [0x7f413072ed3a]
[    24.494] (EE) 9: /usr/bin/X (_start+0x2a) [0x5647b14a8d1a]
[    24.494] (EE)
[    24.494] (EE) Segmentation fault at address 0x124
[    24.494] (EE)
Fatal server error:
[    24.494] (EE) Caught signal 11 (Segmentation fault). Server aborting
[    24.494] (EE)
[    24.494] (EE)
Please consult the The X.Org Foundation support
         at http://wiki.x.org
 for help.
[    24.494] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[    24.494] (EE)
[    24.505] (EE) Server terminated with error (1). Closing log file.


You can see at the end of 24.461, card0 gets permission denied. But then a few lines later at 24.463, card1 loads fine.

And here's the permissions. They both look the same to me:
Code:

$ ls -l /dev/dri
total 0
drwxr-xr-x  2 root root       100 Jul 16 20:25 by-path/
crw-rw----+ 1 root video 226,   0 Jul 16 20:25 card0
crw-rw----+ 1 root video 226,   1 Jul 16 20:25 card1
crw-rw-rw-  1 root video 226, 128 Jul 16 20:25 renderD128
Back to top
View user's profile Send private message
Timmer
Guru
Guru


Joined: 24 Aug 2004
Posts: 366
Location: Duluth, MN, USA

PostPosted: Tue Sep 15, 2020 10:41 pm    Post subject: Reply with quote

So I discovered something kind of by accident today. If I take "splash" out of my kernel command, then it boots normally.

So does that point to the framebuffer driver some how?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum