Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
X fails to init (full freeze), works after some retries
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
Torangan
Apprentice
Apprentice


Joined: 21 Mar 2003
Posts: 178

PostPosted: Mon Nov 15, 2021 2:10 pm    Post subject: X fails to init (full freeze), works after some retries Reply with quote

I changed my system from an older generation to current, saving the old graphics card due to current pricings.
Right now I'm in KDE, everything works smooth.

But after each reboot, X will fail to initialize. System hangs, can't get to virtual console. Enter manual service selection (still using openrc), skip X, search for errors... nothing. After some tries to reboot or to manually start the service, at some point it simply starts. The pattern repeated often enough to be sure, nothing I changed was relevant. It occurs again.

I did find "Failed to initialize the NVIDIA kernel module." in the Xorg.1.log right now. Well, it is running with that exact one...

dmesg contains nothing right now as it is running just fine, if the error occurs I'm fully locked out. Can I check old dmesg out somehow? Or any other hints in which direction I should search?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54219
Location: 56N 3W

PostPosted: Mon Nov 15, 2021 2:53 pm    Post subject: Reply with quote

Torangan,

Do not start the display manager at boot. For investigation, remove it from the default runlevel.
Configure your normal users .xinitrc to start the desktop/window manager of your choice in response to startx at the console.

Boot to the console and examine dmesg. If you have video wornings or errors, put all of dmesg onto a pastebiin.
We probably need to fix them anyway. Use wgetpaste, so you don't need a GUI, or save dmesg to a file.

Try startx and make a note of the time of day. If it works, just use it.
If not, regain control and pastebin the Xorg.0.log that has the timestamp you noted above.
Do not start Xorg until the log is posted or saved. That's the log we need.

I suspect that you have a race condition somewhere, so sometimes it works,sometimes not.
I'm not expecting to see anything in the following without the above but you never know.

Put your kernel .config, Xorg.0.log and dmesg onto three pastebins and post the links.
Post the output of
Code:
lspci -nnk
emerge --info
that will show us your hardware and Gentoo settings,
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Torangan
Apprentice
Apprentice


Joined: 21 Mar 2003
Posts: 178

PostPosted: Mon Nov 15, 2021 3:38 pm    Post subject: Reply with quote

I did skip display manager installation to examine.

I'll write down those steps and do it tomorrow when I want to restart my PC. Took hours to get in and I want to use it right now.
Race conditions does sound likely, although I did rebuild xorg-server and nvidia-drivers a few times during experimenting.
Back to top
View user's profile Send private message
Torangan
Apprentice
Apprentice


Joined: 21 Mar 2003
Posts: 178

PostPosted: Tue Nov 16, 2021 2:45 pm    Post subject: Reply with quote

Race condition is a good guess. Repeated tries to just power on, power off did get me into X.

dmesg:
https://pastebin.com/5wZykc7r

xorg log after freeze
https://pastebin.com/zMHw49RF

xorg log success
https://pastebin.com/BDuUa2iA

kernel config
https://pastebin.com/Nd2um1UP

lspci

Code:
00:00.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse Root Complex [1022:1480]
        Subsystem: Micro-Star International Co., Ltd. [MSI] X570-A PRO motherboard [1462:7c37]
00:00.2 IOMMU [0806]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse IOMMU [1022:1481]
        Subsystem: Advanced Micro Devices, Inc. [AMD] Starship/Matisse IOMMU [1022:1481]
00:01.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Host Bridge [1022:1482]
00:01.1 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse GPP Bridge [1022:1483]
        Kernel driver in use: pcieport
00:01.2 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse GPP Bridge [1022:1483]
        Kernel driver in use: pcieport
00:02.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Host Bridge [1022:1482]
00:03.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Host Bridge [1022:1482]
00:04.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Host Bridge [1022:1482]
00:05.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Host Bridge [1022:1482]
00:07.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Host Bridge [1022:1482]
00:07.1 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse Internal PCIe GPP Bridge 0 to bus[E:B] [1022:1484]
        Kernel driver in use: pcieport
00:08.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Host Bridge [1022:1482]
00:08.1 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse Internal PCIe GPP Bridge 0 to bus[E:B] [1022:1484]
        Kernel driver in use: pcieport
00:14.0 SMBus [0c05]: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller [1022:790b] (rev 61)
        Subsystem: Micro-Star International Co., Ltd. [MSI] X570-A PRO motherboard [1462:7c37]
00:14.3 ISA bridge [0601]: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge [1022:790e] (rev 51)
        Subsystem: Micro-Star International Co., Ltd. [MSI] X570-A PRO motherboard [1462:7c37]
00:18.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Matisse Device 24: Function 0 [1022:1440]
00:18.1 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Matisse Device 24: Function 1 [1022:1441]
00:18.2 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Matisse Device 24: Function 2 [1022:1442]
00:18.3 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Matisse Device 24: Function 3 [1022:1443]
        Kernel driver in use: k10temp
        Kernel modules: k10temp
00:18.4 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Matisse Device 24: Function 4 [1022:1444]
00:18.5 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Matisse Device 24: Function 5 [1022:1445]
00:18.6 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Matisse Device 24: Function 6 [1022:1446]
00:18.7 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Matisse Device 24: Function 7 [1022:1447]
01:00.0 Non-Volatile memory controller [0108]: Samsung Electronics Co Ltd NVMe SSD Controller SM981/PM981/PM983 [144d:a808]
        Subsystem: Samsung Electronics Co Ltd NVMe SSD Controller SM981/PM981/PM983 [144d:a801]
        Kernel driver in use: nvme
20:00.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Matisse Switch Upstream [1022:57ad]
        Kernel driver in use: pcieport
21:01.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Matisse PCIe GPP Bridge [1022:57a3]
        Kernel driver in use: pcieport
21:04.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Matisse PCIe GPP Bridge [1022:57a3]
        Kernel driver in use: pcieport
21:05.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Matisse PCIe GPP Bridge [1022:57a3]
        Kernel driver in use: pcieport
21:08.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Matisse PCIe GPP Bridge [1022:57a4]
        Kernel driver in use: pcieport
21:09.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Matisse PCIe GPP Bridge [1022:57a4]
        Kernel driver in use: pcieport
21:0a.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Matisse PCIe GPP Bridge [1022:57a4]
        Kernel driver in use: pcieport
23:00.0 VGA compatible controller [0300]: NVIDIA Corporation GM107 [GeForce GTX 750 Ti] [10de:1380] (rev a2)
        Subsystem: Palit Microsystems Inc. GM107 [GeForce GTX 750 Ti] [1569:1380]
        Kernel driver in use: nvidia
        Kernel modules: nvidia_drm, nvidia
23:00.1 Audio device [0403]: NVIDIA Corporation GM107 High Definition Audio Controller [GeForce 940MX] [10de:0fbc] (rev a1)
        Subsystem: Palit Microsystems Inc. GM107 High Definition Audio Controller [GeForce 940MX] [1569:1380]
        Kernel driver in use: snd_hda_intel
26:00.0 SATA controller [0106]: ASMedia Technology Inc. ASM1062 Serial ATA Controller [1b21:0612] (rev 02)
        Subsystem: ASMedia Technology Inc. ASM1062 Serial ATA Controller [1b21:1060]
        Kernel driver in use: ahci
27:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 15)
        Subsystem: Micro-Star International Co., Ltd. [MSI] X570-A PRO motherboard [1462:7c37]
        Kernel driver in use: r8169
2a:00.0 Non-Essential Instrumentation [1300]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse Reserved SPP [1022:1485]
        Subsystem: Advanced Micro Devices, Inc. [AMD] Starship/Matisse Reserved SPP [1022:1485]
2a:00.1 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] Matisse USB 3.0 Host Controller [1022:149c]
        Subsystem: Advanced Micro Devices, Inc. [AMD] Matisse USB 3.0 Host Controller [1022:1486]
        Kernel driver in use: xhci_hcd
2a:00.3 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] Matisse USB 3.0 Host Controller [1022:149c]
        Subsystem: Advanced Micro Devices, Inc. [AMD] Matisse USB 3.0 Host Controller [1022:148c]
        Kernel driver in use: xhci_hcd
2b:00.0 SATA controller [0106]: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] [1022:7901] (rev 51)
        Subsystem: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] [1022:7901]
        Kernel driver in use: ahci
2c:00.0 SATA controller [0106]: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] [1022:7901] (rev 51)
        Subsystem: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] [1022:7901]
        Kernel driver in use: ahci
2d:00.0 Non-Essential Instrumentation [1300]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Function [1022:148a]
        Subsystem: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Function [1022:148a]
2e:00.0 Non-Essential Instrumentation [1300]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse Reserved SPP [1022:1485]
        Subsystem: Advanced Micro Devices, Inc. [AMD] Starship/Matisse Reserved SPP [1022:1485]
2e:00.3 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] Matisse USB 3.0 Host Controller [1022:149c]
        Subsystem: Micro-Star International Co., Ltd. [MSI] X570-A PRO motherboard [1462:7c37]
        Kernel driver in use: xhci_hcd
2e:00.4 Audio device [0403]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse HD Audio Controller [1022:1487]
        Subsystem: Micro-Star International Co., Ltd. [MSI] Starship/Matisse HD Audio Controller [1462:ec37]
        Kernel driver in use: snd_hda_intel



Code:

Portage 3.0.28 (python 3.9.8-final-0, default/linux/amd64/17.1/desktop/plasma, gcc-11.2.0, glibc-2.34-r2, 5.15.1-gentoo x86_64)
=================================================================
System uname: Linux-5.15.1-gentoo-x86_64-AMD_Ryzen_5_5600X_6-Core_Processor-with-glibc2.34
KiB Mem:    32878632 total,  32491788 free
KiB Swap:   16777212 total,  16777212 free
Timestamp of repository gentoo: Mon, 15 Nov 2021 17:15:01 +0000
Head commit of repository gentoo: d0916c0e2f878d707083df80c171edd6a763df73
sh bash 5.1_p8
ld GNU gold (Gentoo 2.37_p1 p1 2.37) 1.16
app-shells/bash:          5.1_p8::gentoo
dev-lang/perl:            5.34.0-r5::gentoo
dev-lang/python:          3.8.12_p1::gentoo, 3.9.8::gentoo, 3.10.0_p1::gentoo
dev-lang/rust:            1.56.1::gentoo
dev-util/cmake:           3.21.4::gentoo
sys-apps/baselayout:      2.8::gentoo
sys-apps/openrc:          0.44.8::gentoo
sys-apps/sandbox:         2.29::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.71-r1::gentoo
sys-devel/automake:       1.16.5::gentoo
sys-devel/binutils:       2.37_p1-r1::gentoo
sys-devel/gcc:            11.2.0::gentoo
sys-devel/gcc-config:     2.4::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.13::gentoo (virtual/os-headers)
sys-libs/glibc:           2.34-r2::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.europe.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-metamanifest: no
    sync-rsync-extra-opts: --exclude /profiles/arch/amd64/profile.bashrc

x-portage
    location: /usr/local/portage
    masters: gentoo
    priority: 0

steam-overlay
    location: /var/lib/layman/steam-overlay
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -w -O2 -pipe -march=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -O2 -pipe -w -O2 -pipe -march=native -fvisibility-inlines-hidden"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps y --changed-deps-report=n"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned qa-unresolved-soname-deps sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="de_DE.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--as-needed -Wl,--eh-frame-hdr -O2"
LINGUAS="de en en_US"
MAKEOPTS="-j13"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--exclude /profiles/arch/amd64/profile.bashrc"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi activities alsa amd64 bash-completion branding bzip2 c++0x cairo cdda cdr cli crypt custom-cxxflags dbus declarative dri dts dvd dvdr elogind emboss encode exif flac gdbm gif graphite gui hal iconv jemalloc jpeg kde kdeenablefinal kdehiddenvisibility kdenewldflags kdexdeltas kipi lcms libglvnd libnotify libtirpc lto mad mng mp3 mp4 mpeg multilib ncurses nls nptl nptlonly nsplugin ogg opengl openmp pam pango pch pcre pdf pgo plasma png policykit ppds profile pulseaudio qml qt qt3 qt3support qt5 readline sdl seccomp spell split-usr ssl startup-notification svg theora truetype udev udisks unicode upower usb userlocales vorbis vulkan widgets wxwidgets x264 xattr xcb xml xv xvid xvmc zlib zstd" ABI_X86="64" ADA_TARGET="gnat_2019" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 aes avx avx2 f16c fma3 pclmul popcnt rdrand sha sse3 sse4_1 sse4_2 sse4a ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev" KERNEL="linux" L10N="de en en_US" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-3 php7-4" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_9" PYTHON_TARGETS="python3_9" RUBY_TARGETS="ruby26 ruby27" USERLAND="GNU" VIDEO_CARDS="nvidia nouveau" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, RUSTFLAGS


Code tags added for easy reading -- NeddySeagoon
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54219
Location: 56N 3W

PostPosted: Tue Nov 16, 2021 8:41 pm    Post subject: Reply with quote

Torangan,

I don't see anything related to your Xorg startup issue. I'll think about that.

Your dmesg is truncated. The first 2.3 seconds are lost because the kernel ring buffer is too small. When you reconpile your kernel, fix that. Its an option where your enter a power of 2 for the buffer size.

Your kernel has
Code:
CONFIG_NR_CPUS=4
and dmesg shows a matching
Code:
[    2.361009] microcode: CPU0: patch_level=0x0a201016
[    2.361112] microcode: CPU1: patch_level=0x0a201016
[    2.361213] microcode: CPU2: patch_level=0x0a201016
[    2.361317] microcode: CPU3: patch_level=0x0a201016


Your emerge info says.
Code:
System uname: Linux-5.15.1-gentoo-x86_64-AMD_Ryzen_5_5600X_6-Core_Processor-with-glibc2.34
so you have a six core processor with two cores not used.

When you fix that it will match your
Code:
MAKEOPTS="-j13"
Only four cores would struggle with that.

Back to your Xorg log. When it fails, Xorg crashes hard. The log is truncated, its not flushed to the file.
Your kernel has
Code:
CONFIG_MAGIC_SYSRQ=y
so you may be able to regain enough control to force the kernel to shutdown properly and even flush the Xorg log.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Torangan
Apprentice
Apprentice


Joined: 21 Mar 2003
Posts: 178

PostPosted: Tue Nov 16, 2021 10:15 pm    Post subject: Reply with quote

Thanks for those hints, recompiling the kernel now. The new system felt so fast compared to the old one... with brake active...
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