You are not logged in.

#1 2021-03-31 12:44:54

Wednesday
Member
Registered: 2010-05-05
Posts: 8

[Solved] X server shuts down automatically after starting

Hi.
Yesterday after a reboot I found out that my X server shut down automatically right after typing startx, with no errors ("Waiting for X server to shut down. Server terminated successfully. Closing log file."). The last two lines of my log (see below) indicates maybe a nvidia driver problem (I've got a GTX 1080 Ti) ?. Xmonad never starts, or at least I don't see it.

[   481.424] (II) NVIDIA(GPU-0): Deleting GPU-0
[   481.430] (II) Server terminated successfully (0). Closing log file.

I've checked my pacman log and on that day there were neither xorg related nor nvidia related updates. Weirdly enough, this happens only on my profile (other profiles run startx normally) so it is profile-related, but I've made no change to my .xinitrc or .bashrc or .bash_profile. Actually on that day I've only installed rofi and frece, which use rust. There was also a lot of haskell related updates but that's about it.

Here is my .xinitrc

#!/bin/sh
setxkbmap fr
numlockx &
# This is to test if .xinitrc is executed correctly, and it is
#touch test.test
eval $(/usr/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh)
export SSH_AUTH_SOCK
exec xmonad

My .bash_profile

#
# ~/.bash_profile
#

[[ -f ~/.bashrc ]] && . ~/.bashrc

My /var/log/Xorg.0.log is pretty long so I've uploaded it on my server

Here is my xorg.conf which I've never touched

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 460.67


Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
EndSection

Section "InputDevice"

    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"

    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

What I've tried so far, but did not solve the problem :

  • Re-install xorg-server, nvidia, nvidia-utils, nvidia-settings

  • Delete xorg.conf and re-run sudo nvidia-config to regenerate it

  • Check if my .xinitrc is executed correctly, and it is (I've put a touch test.test in it, it was created)

  • Comment out each line at a time for my .xinitrc, several at a time...

  • Check if xmonad compiles correctly, it does.

I'm completely at blank now so any help would be really appreciated, thanks for reading me !

Last edited by Wednesday (2021-03-31 13:39:08)

Offline

#2 2021-03-31 12:56:11

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,805

Re: [Solved] X server shuts down automatically after starting

There's no error in the log, This progression means xorg started but didn't get anything to run or whatever was supposed to run exited. Check your ~/.xsession-errors I'm assuming xmonad is not starting properly, maybe start another WM and a normal terminal and try to launch xmonad inside to check whether you get errors.

More general, that xorg.conf which you've never touched does nothing useful but has the potential of leading to subtle breakage, just remove it. Your .xinitrc is inherently incomplete note the notes in https://wiki.archlinux.org/index.php/Xinit#xinitrc but neither of these will lead to the issue you seem to currently have.

Offline

#3 2021-03-31 13:02:21

Wednesday
Member
Registered: 2010-05-05
Posts: 8

Re: [Solved] X server shuts down automatically after starting

Thanks. Actually I was about to edit my post, I've indeed deleted this xorg.conf. Here are the files in my /usr/share/X11/xorg.conf.d folder

10-nvidia-drm-outputclass.conf

Section "OutputClass"
    Identifier "nvidia"
    MatchDriver "nvidia-drm"
    Driver "nvidia"
    Option "AllowEmptyInitialConfiguration"
    ModulePath "/usr/lib/nvidia/xorg"
    ModulePath "/usr/lib/xorg/modules"
EndSection

10-quirks.conf

# Collection of quirks and blacklist/whitelists for specific devices.


# Accelerometer device, posts data through ABS_X/ABS_Y, making X unusable
# http://bugs.freedesktop.org/show_bug.cgi?id=22442 
Section "InputClass"
        Identifier "ThinkPad HDAPS accelerometer blacklist"
        MatchProduct "ThinkPad HDAPS accelerometer data"
        Option "Ignore" "on"
EndSection

# https://bugzilla.redhat.com/show_bug.cgi?id=523914
# Mouse does not move in PV Xen guest
# Explicitly tell evdev to not ignore the absolute axes.
Section "InputClass"
        Identifier "Xen Virtual Pointer axis blacklist"
        MatchProduct "Xen Virtual Pointer"
        Option "IgnoreAbsoluteAxes" "off"
        Option "IgnoreRelativeAxes" "off"
EndSection

# https://bugs.freedesktop.org/show_bug.cgi?id=55867
# Bug 55867 - Doesn't know how to tag XI_TRACKBALL
Section "InputClass"
        Identifier "Tag trackballs as XI_TRACKBALL"
        MatchProduct "trackball"
        MatchDriver "evdev"
        Option "TypeName" "TRACKBALL"
EndSection

# https://bugs.freedesktop.org/show_bug.cgi?id=62831
# Bug 62831 - Mionix Naos 5000 mouse detected incorrectly
Section "InputClass"
        Identifier "Tag Mionix Naos 5000 mouse XI_MOUSE"
        MatchProduct "La-VIEW Technology Naos 5000 Mouse"
        MatchDriver "evdev"
        Option "TypeName" "MOUSE"
EndSection

40-libinput.conf

# Match on all types of devices but joysticks
#
# If you want to configure your devices, do not copy this file.
# Instead, use a config snippet that contains something like this:
#
# Section "InputClass"
#   Identifier "something or other"
#   MatchDriver "libinput"
#
#   MatchIsTouchpad "on"
#   ... other Match directives ...
#   Option "someoption" "value"
# EndSection
#
# This applies the option any libinput device also matched by the other
# directives. See the xorg.conf(5) man page for more info on
# matching devices.

Section "InputClass"
        Identifier "libinput pointer catchall"
        MatchIsPointer "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

Section "InputClass"
        Identifier "libinput keyboard catchall"
        MatchIsKeyboard "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

Section "InputClass"
        Identifier "libinput touchpad catchall"
        MatchIsTouchpad "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

Section "InputClass"
        Identifier "libinput touchscreen catchall"
        MatchIsTouchscreen "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

Section "InputClass"
        Identifier "libinput tablet catchall"
        MatchIsTablet "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

I will check my .xsession-errors right away.

Offline

#4 2021-03-31 13:09:29

Wednesday
Member
Registered: 2010-05-05
Posts: 8

Re: [Solved] X server shuts down automatically after starting

V1del, thanks a lot for your input : indeed if I exec dwm instead of xmonad it runs fine. So I guess the problem comes from haskell updates which broke my xmonad config... I guess this is solved for here and I should see that on xmonad boards now wink

Thanks !

Offline

#5 2021-03-31 13:26:08

Wednesday
Member
Registered: 2010-05-05
Posts: 8

Re: [Solved] X server shuts down automatically after starting

Now this is getting weird : after one reboot, the same happens now witch exec dwm too, but it worked fine once. So I'm suspecting this does not come from the WM themselves... I've got no .xsession-errors file.

Last edited by Wednesday (2021-03-31 14:04:52)

Offline

#6 2021-03-31 13:38:43

Wednesday
Member
Registered: 2010-05-05
Posts: 8

Re: [Solved] X server shuts down automatically after starting

Ok, sorry for the triple post (!). I've followed your advice and started a brand new .xinitrc from the default one in /etc/X11/xinit/xinitrc, kept its structure, changed my WM and programs, and everything runs fine now. So I guess my .xinitrc was faulty in the end, I don't know how it worked up to now and stopped working yesterday, but that is it. I'll edit the post to solved. Thanks again.

Offline

Board footer

Powered by FluxBB