You are not logged in.

#1 2023-03-22 00:55:27

michaelmoreno
Member
Registered: 2021-10-04
Posts: 18

xinit: unable to connect to X server: Connection Refused

Trying to launch qtile on a new arch machine, content of .xinitrc is simply qtile start. Running startx gives the following error:

[    44.317]
X.Org X Server 1.21.1.7
X Protocol Version 11, Revision 0
[    44.317] Current Operating System: Linux arch-m16 6.2.7-arch1-1 #1 SMP PREEMPT_DYNAMIC Sat, 18 Mar 2023 01:06:36 +0000 x86_64
[    44.317] Kernel command line: BOOT_IMAGE=/vmlinuz-linux root=UUID=2d88a8a2-2672-4f14-89b9-61b4b8331acc rw cryptdevice=UUID=b20972a7-d7ed-4bbe-8990-07e2a1c560e5:cryptroot root=/dev/mapper/cryptroot loglevel=3 quiet
[    44.317]
[    44.320] Current version of pixman: 0.42.2
[    44.324]    Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
[    44.324] Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[    44.330] (==) Log file: "/home/mm/.local/share/xorg/Xorg.0.log", Time: Tue Mar 21 12:35:28 2023
[    44.331] (==) Using config directory: "/etc/X11/xorg.conf.d"
[    44.333] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[    44.333] (==) No Layout section.  Using the first Screen section.
[    44.333] (==) No screen section available. Using defaults.
[    44.333] (**) |-->Screen "Default Screen Section" (0)
[    44.333] (**) |   |-->Monitor "<default monitor>"
[    44.333] (==) No device specified for screen "Default Screen Section".
        Using the first device section listed.
[    44.333] (**) |   |-->Device "integrated"
[    44.333] (==) No monitor specified for screen "Default Screen Section".
        Using a default monitor configuration.
[    44.333] (==) Automatically adding devices
[    44.333] (==) Automatically enabling devices
[    44.333] (==) Automatically adding GPU devices
[    44.333] (==) Automatically binding GPU devices
[    44.333] (==) Max clients allowed: 256, resource mask: 0x1fffff
[    44.333] (WW) The directory "/usr/share/fonts/misc" does not exist.
[    44.333]    Entry deleted from font path.
[    44.333] (WW) The directory "/usr/share/fonts/TTF" does not exist.
[    44.333]    Entry deleted from font path.
[    44.333] (WW) The directory "/usr/share/fonts/OTF" does not exist.
[    44.333]    Entry deleted from font path.
[    44.333] (WW) The directory "/usr/share/fonts/Type1" does not exist.
[    44.333]    Entry deleted from font path.
[    44.333] (==) FontPath set to:
        /usr/share/fonts/100dpi,
        /usr/share/fonts/75dpi
[    44.333] (==) ModulePath set to "/usr/lib/xorg/modules"
[    44.333] (II) The server relies on udev to provide the list of input devices.
        If no devices become available, reconfigure udev or disable AutoAddDevices.
[    44.333] (II) Module ABI versions:
[    44.333]    X.Org ANSI C Emulation: 0.4
[    44.333]    X.Org Video Driver: 25.2
[    44.333]    X.Org XInput driver : 24.4
[    44.333]    X.Org Server Extension : 10.0
[    44.333] (++) using VT number 1

[    44.334] (II) systemd-logind: took control of session /org/freedesktop/login1/session/_31
[    44.334] (II) xfree86: Adding drm device (/dev/dri/card0)
[    44.334] (II) Platform probe for /sys/devices/pci0000:00/0000:00:02.0/drm/card0
[    44.334] (II) systemd-logind: got fd for /dev/dri/card0 226:0 fd 13 paused 0
[    44.335] (--) PCI:*(0@0:2:0) 8086:9a60:1043:130c rev 1, Mem @ 0x6230000000/16777216, 0x4000000000/268435456, I/O @ 0x00005000/64, BIOS @ 0x????????/131072
[    44.335] (--) PCI: (1@0:0:0) 10de:2520:1043:130c rev 161, Mem @ 0x85000000/16777216, 0x6000000000/8589934592, 0x6200000000/33554432, I/O @ 0x00004000/128, BIOS @ 0x????????/524288
[    44.335] (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
[    44.335] (II) LoadModule: "glx"
[    44.336] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[    44.336] (II) Module glx: vendor="X.Org Foundation"
[    44.336]    compiled for 1.21.1.7, module version = 1.0.0
[    44.336]    ABI class: X.Org Server Extension, version 10.0
[    44.336] (II) LoadModule: "modesetting"
[    44.336] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[    44.336] (II) Module modesetting: vendor="X.Org Foundation"
[    44.336]    compiled for 1.21.1.7, module version = 1.21.1
[    44.336]    Module class: X.Org Video Driver
[    44.336]    ABI class: X.Org Video Driver, version 25.2
[    44.336] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[    44.336] (WW) Falling back to old probe method for modesetting
[    44.336] (II) modeset(0): using default device
[    44.336] (II) modeset(G0): using drv /dev/dri/card0
[    44.336] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[    44.336] (EE)
Fatal server error:
[    44.336] (EE) Cannot run in framebuffer mode. Please specify busIDs        for all framebuffer devices
[    44.336] (EE)
[    44.336] (EE)
Please consult the The X.Org Foundation support
         at http://wiki.x.org
 for help.
[    44.336] (EE) Please also check the log file at "/home/mm/.local/share/xorg/Xorg.0.log" for additional information.
[    44.336] (EE)
[    44.343] (EE) Server terminated with error (1). Closing log file.

I assume this has to do with the fact that I've spent all day trying different solutions to get hybrid graphics working - first tried bumblebee, then prime-run, optimus-manager. Have installed and reinstalled numerous video driver related packages, removed kms from /etc/mkinitcpio.conf and regenerated the initramfs with sudo mkinitcpio -p linux, then undid that change when deciding not to go with bumblebee, etc. I'm guessing I've messed some configuration up somewhere, but I'm too far in too easily tell which change caused it, and I'm not wanting to wipe and my reinstall entire arch system unless as a last resort.

lspci -k | grep -A 2 -E "(VGA|3D)"

0000:00:02.0 VGA compatible controller: Intel Corporation TigerLake-H GT1 [UHD Graphics] (rev 01)
        DeviceName: Second VGA
        Subsystem: ASUSTeK Computer Inc. Device 130c
        Kernel driver in use: i915
--
0000:01:00.0 VGA compatible controller: NVIDIA Corporation GA106M [GeForce RTX 3060 Mobile / Max-Q] (rev a1)
        DeviceName: VGA
        Subsystem: ASUSTeK Computer Inc. Device 130c
        Kernel modules: nouveau, nvidia_drm, nvidia

tree /etc/X11

/etc/X11
├── xinit
│   ├── xinitrc
│   ├── xinitrc.d
│   │   └── 50-systemd-user.sh
│   └── xserverrc
└── xorg.conf.d
    └── 10-optimus-manager.conf

cat /etc/X11/xorg.conf.d/10-optimus-manager.conf

Section "Device"
        Identifier "integrated"
        Driver "modesetting"
        BusID "PCI:0:0:2:0"
        Option "DRI" "3"
EndSection

cat /etc/X11/xinit/xinitrc (EDIT: I actually have no idea where this file came from. I don't even have xterm installed)

#!/bin/sh

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

# merge in defaults and keymaps

if [ -f $sysresources ]; then
    xrdb -merge $sysresources
fi

if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
fi

if [ -f "$userresources" ]; then
    xrdb -merge "$userresources"
fi

if [ -f "$usermodmap" ]; then
    xmodmap "$usermodmap"
fi

# start some nice programs

if [ -d /etc/X11/xinit/xinitrc.d ] ; then
 for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
  [ -x "$f" ] && . "$f"
 done
 unset f
fi

twm &
xclock -geometry 50x50-1+1 &
xterm -geometry 80x50+494+51 &
xterm -geometry 80x20+494-0 &
exec xterm -geometry 80x66+0+0 -name login

cat /etc/X11/xinit/xinitrc.d/50-systemd-user.sh

#!/bin/sh
#  SPDX-License-Identifier: LGPL-2.1-or-later
#
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.

systemctl --user import-environment DISPLAY XAUTHORITY

if command -v dbus-update-activation-environment >/dev/null 2>&1; then
    dbus-update-activation-environment DISPLAY XAUTHORITY
fi

pacman -Q | grep -E 'nvidia|video|mesa|nouveau'

mesa 22.3.6-1
mesa-utils 8.5.0-2
nvidia 525.89.02-12
nvidia-prime 1.0-4
nvidia-utils 525.89.02-2
opencl-nvidia 525.89.02-2
xf86-video-intel 1:2.99.917+923+gb74b67f0-1
xf86-video-vesa 2.6.0-1
xorg-bdftopcf 1.1.1-1
xorg-docs 1.7.2-2
xorg-font-util 1.4.0-1
xorg-fonts-100dpi 1.0.4-2
xorg-fonts-75dpi 1.0.4-1
xorg-fonts-alias-100dpi 1.0.5-1
xorg-fonts-alias-75dpi 1.0.5-1
xorg-fonts-encodings 1.0.7-1
xorg-iceauth 1.0.9-1
xorg-mkfontscale 1.2.2-1
xorg-server 21.1.7-1
xorg-server-common 21.1.7-1
xorg-server-devel 21.1.7-1
xorg-server-xephyr 21.1.7-1
xorg-server-xnest 21.1.7-1
xorg-server-xvfb 21.1.7-1
xorg-sessreg 1.1.3-1
xorg-setxkbmap 1.3.3-2
xorg-smproxy 1.0.7-1
xorg-util-macros 1.20.0-2
xorg-x11perf 1.6.2-1
xorg-xauth 1.1.2-1
xorg-xbacklight 1.2.3-3
xorg-xcmsdb 1.0.6-1
xorg-xcursorgen 1.0.8-1
xorg-xdpyinfo 1.3.3-4
xorg-xdriinfo 1.0.7-1
xorg-xev 1.2.5-1
xorg-xgamma 1.0.7-1
xorg-xhost 1.0.9-1
xorg-xinit 1.4.2-1
xorg-xinput 1.6.3-3
xorg-xkbcomp 1.4.6-1
xorg-xkbevd 1.1.5-1
xorg-xkbprint 1.0.6-1
xorg-xkbutils 1.0.5-1
xorg-xkill 1.0.6-1
xorg-xlsatoms 1.1.4-1
xorg-xlsclients 1.1.5-1
xorg-xmodmap 1.0.11-1
xorg-xpr 1.1.0-1
xorg-xprop 1.2.6-1
xorg-xrandr 1.5.2-1
xorg-xrdb 1.2.1-1
xorg-xrefresh 1.0.7-1
xorg-xset 1.2.5-1
xorg-xsetroot 1.1.3-1
xorg-xvinfo 1.1.5-1
xorg-xwayland 22.1.8-1
xorg-xwd 1.0.8-1
xorg-xwininfo 1.1.5-3
xorg-xwud 1.0.6-1
xorgproto 2022.2-1

Last edited by michaelmoreno (2023-03-22 01:11:24)

Offline

#2 2023-03-22 06:33:45

seth
Member
Registered: 2012-09-03
Posts: 63,438

Re: xinit: unable to connect to X server: Connection Refused

I actually have no idea where this file came from. I don't even have xterm installed

pacman -Qo /etc/X11/xinit/xinitrc

Your personal ~/.xinitrc would be far more interesting.

I assume this has to do with the fact that I've spent all day trying different solutions to get hybrid graphics working

Quite likely.

Remove optimus-manager,  /etc/X11/xorg.conf.d/10-optimus-manager.conf, bbswitch, bumblebee, every single xf86-video-* package, re-add the kms hook or at least add i915 to the modules, likely add the ibt=off parameter (see the installation note in the nvidia wiki) and post you ~/.xinitrc and complete system journal

sudo journalctl -b | curl -F 'file=@-' 0x0.st

and your Xorg log, https://wiki.archlinux.org/title/Xorg#General

Offline

Board footer

Powered by FluxBB