You are not logged in.
I have my computer configured to autologin to a virtual console (https://wiki.archlinux.org/index.php/Ge … al_console) as well as auto start X at login (https://wiki.archlinux.org/index.php/Xi … X_at_login). To do both, I followed the ArchWiki.
When I boot my computer, I see a "Booting Arch Linux ..." screen, then a "Starting version ..." screen, then this screen:
-9008-c22c55802658 rw loglevel=3 quiet
Build Date: 02 September 2020 06:17:44AM
Current version of pixman: 0.40.0
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Tue Sep 15 20:13:41 2020
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
(EE)
Fatal server error:
(EE) no screens found(EE)
(EE)
Please consult the The X.
Org Foundation support
at http://wiki.x.org
for help.
(EE) Please also check t
he log file at "/var/log/Xorg.0.log” for additional information.
(EE)
(EE) Server
terminated with error (1). Closing log file.This screen is shown for about 13 seconds, then I get the "Arch Linux 5.8.9-arch2-1 (tty1)" screen and Gnome seems to start successfully. So I am still able to use my computer, but this message is annoying as it slows my boot time. Also, I'm not sure if it is causing other errors. Note that I do not get this error if I disable either the auto-login or auto-startx.
Here are the contents of /var/log/Xorg.0.log (I am not knowledgeable enough to make sense of it myself):
[ 2.435] (WW) Failed to open protocol names file lib/xorg/protocol.txt
[ 2.435]
X.Org X Server 1.20.9
X Protocol Version 11, Revision 0
[ 2.435] Build Operating System: Linux Arch Linux
[ 2.435] Current Operating System: Linux trevorslaptop 5.8.9-arch2-1 #1 SMP PREEMPT Sun, 13 Sep 2020 23:44:55 +0000 x86_64
[ 2.435] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-linux root=UUID=f3d96db5-fe16-4847-9008-c22c55802658 rw loglevel=3 quiet
[ 2.435] Build Date: 02 September 2020 06:17:44AM
[ 2.435]
[ 2.435] Current version of pixman: 0.40.0
[ 2.435] Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
[ 2.435] Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 2.435] (==) Log file: "/var/log/Xorg.0.log", Time: Fri Sep 18 20:15:39 2020
[ 2.436] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[ 2.436] (==) No Layout section. Using the first Screen section.
[ 2.436] (==) No screen section available. Using defaults.
[ 2.436] (**) |-->Screen "Default Screen Section" (0)
[ 2.436] (**) | |-->Monitor "<default monitor>"
[ 2.436] (==) No monitor specified for screen "Default Screen Section".
Using a default monitor configuration.
[ 2.437] (==) Automatically adding devices
[ 2.437] (==) Automatically enabling devices
[ 2.437] (==) Automatically adding GPU devices
[ 2.437] (==) Automatically binding GPU devices
[ 2.437] (==) Max clients allowed: 256, resource mask: 0x1fffff
[ 2.437] (WW) The directory "/usr/share/fonts/misc" does not exist.
[ 2.437] Entry deleted from font path.
[ 2.437] (WW) The directory "/usr/share/fonts/TTF" does not exist.
[ 2.437] Entry deleted from font path.
[ 2.437] (WW) The directory "/usr/share/fonts/OTF" does not exist.
[ 2.437] Entry deleted from font path.
[ 2.437] (WW) The directory "/usr/share/fonts/Type1" does not exist.
[ 2.437] Entry deleted from font path.
[ 2.437] (WW) The directory "/usr/share/fonts/100dpi" does not exist.
[ 2.437] Entry deleted from font path.
[ 2.437] (WW) The directory "/usr/share/fonts/75dpi" does not exist.
[ 2.437] Entry deleted from font path.
[ 2.437] (==) FontPath set to:
[ 2.437] (==) ModulePath set to "/usr/lib/xorg/modules"
[ 2.437] (II) The server relies on udev to provide the list of input devices.
If no devices become available, reconfigure udev or disable AutoAddDevices.
[ 2.437] (II) Module ABI versions:
[ 2.437] X.Org ANSI C Emulation: 0.4
[ 2.437] X.Org Video Driver: 24.1
[ 2.437] X.Org XInput driver : 24.1
[ 2.437] X.Org Server Extension : 10.0
[ 2.437] (++) using VT number 1
[ 2.438] (II) systemd-logind: took control of session /org/freedesktop/login1/session/_31
[ 2.439] (--) PCI:*(0@0:2:0) 8086:9b41:8086:2212 rev 2, Mem @ 0xd0000000/16777216, 0xc0000000/268435456, I/O @ 0x00001c00/64, BIOS @ 0x????????/131072
[ 2.439] (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
[ 2.439] (II) LoadModule: "glx"
[ 2.441] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[ 2.444] (II) Module glx: vendor="X.Org Foundation"
[ 2.444] compiled for 1.20.9, module version = 1.0.0
[ 2.444] ABI class: X.Org Server Extension, version 10.0
[ 2.444] (==) Matched intel as autoconfigured driver 0
[ 2.444] (==) Matched modesetting as autoconfigured driver 1
[ 2.444] (==) Matched fbdev as autoconfigured driver 2
[ 2.444] (==) Matched vesa as autoconfigured driver 3
[ 2.444] (==) Assigned the driver to the xf86ConfigLayout
[ 2.444] (II) LoadModule: "intel"
[ 2.445] (WW) Warning, couldn't open module intel
[ 2.445] (EE) Failed to load module "intel" (module does not exist, 0)
[ 2.445] (II) LoadModule: "modesetting"
[ 2.445] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[ 2.446] (II) Module modesetting: vendor="X.Org Foundation"
[ 2.446] compiled for 1.20.9, module version = 1.20.9
[ 2.446] Module class: X.Org Video Driver
[ 2.446] ABI class: X.Org Video Driver, version 24.1
[ 2.446] (II) LoadModule: "fbdev"
[ 2.446] (WW) Warning, couldn't open module fbdev
[ 2.446] (EE) Failed to load module "fbdev" (module does not exist, 0)
[ 2.446] (II) LoadModule: "vesa"
[ 2.446] (WW) Warning, couldn't open module vesa
[ 2.446] (EE) Failed to load module "vesa" (module does not exist, 0)
[ 2.446] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[ 2.446] (EE) open /dev/dri/card0: No such file or directory
[ 2.446] (WW) Falling back to old probe method for modesetting
[ 2.446] (EE) open /dev/dri/card0: No such file or directory
[ 2.446] (EE) Screen 0 deleted because of no matching config section.
[ 2.446] (II) UnloadModule: "modesetting"
[ 2.446] (EE) Device(s) detected, but none match those in the config file.
[ 2.446] (EE)
Fatal server error:
[ 2.446] (EE) no screens found(EE)
[ 2.446] (EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
[ 2.446] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[ 2.446] (EE)
[ 2.447] (EE) Server terminated with error (1). Closing log file.Last edited by tda (2020-09-21 17:59:09)
Offline
Device(s) detected, but none match those in the config file.
Do you have a /etc/X11/xorg.conf.d/NN-Nvidia/Amd/Intel.conf file? it may be misconfigured. It seems Xorg couldn't load your graphic driver settings, Which it Should, even without this config file.
Which commands did you use to achieve autologin to tty?
Offline
My /etc/X11/xorg.conf.d/ folder is empty. I followed the ArchWiki page to do autologin, so I created the following override.conf file:
$ cat /etc/systemd/system/getty@tty1.service.d/override.conf
[Service]
ExecStart=
ExecStart=-/usr/bin/agetty --autologin trevor --noclear %I $TERMOffline
As X starts the second time, I gather there is some sort of race condition such that something is not yet ready or initialized when the autologin / autostart runs. The most likely candidate may be late KMS. Do you have the i915 module listed in your mkinitcpio.conf?
If it is not this, the next step would be to post your shell profile and rc as these would be sourced before the successful run of X but not before the unsuccessful one (so there may be a relevant difference to be found there).
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
There isn't anything named i915 in /etc/mkinitcpio.conf (assuming that is where I'm supposed to check). Should there be?
Also, here is my .bash_profile and .bashrc:
$ cat .bash_profile
[[ -f ~/.bashrc ]] && . ~/.bashrc
if systemctl -q is-active graphical.target && [[ ! $DISPLAY && $XDG_VTNR -eq 1 ]]; then
exec startx
fi$ cat .bashrc
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
# basic
export VISUAL=vim
export EDITOR="$VISUAL"
alias ls='ls --color=auto'
set -o viOffline
This looks familiar to https://bbs.archlinux.org/viewtopic.php?id=258740.
After you fix the Xorg conf and|or misplaced driver configurations you should read that thread and fix the race condition causer you just copied from the Wiki...
I gather there is some sort of race condition such that something is not yet ready or initialized when the autologin / autostart runs.
Yep, deja vu al right. ![]()
Last edited by GaKu999 (2020-09-19 03:54:17)
Offline
I am just following @Inspector Parrot idea here. Pls recheck you are using intel GPU. If it's true, then add/append i915 (don't remove anyting though.), and restart.
# cat /etc/mkinitcpio.conf
MODULES= ( i915 )
...
# mkinitcpio && mkinitcpio -g /boot/initramfs-linux.imgOffline
@solskog That seems to have fixed it! So the problem was that the Kernel Mode Setting was happening too late? And that is something I just have to configure manually using the technique you described (i.e. it wasn't due to an install error or package I didn't have installed)?
Offline
I also believe it's a race condition between systemd's graphical.target and your .bash_profile
cat .bash_profile
if systemctl -q is-active graphical.target && [[ ! $DISPLAY && $XDG_VTNR -eq 1 ]]And I think the following simpler condition check could be enough. but force a early start KMS is a secure approach. so why not try both.
[[ -z $DISPLAY ]] && exec startxLast edited by solskog (2020-09-19 05:35:57)
Offline
Ok, I can confirm that modifying /etc/mkinitcpio.conf (and not changing the .bash_profile) fixes my problem. But changing the .bash_profile (and not changing /etc/mkinitcpio.conf) does not fix my problem.
Offline
The server fails because the GPU isn't fully initialized when its run. This is taken care of by early KMS.
The "is-active graphical.target" test is just stupid, but would lead to a different kind of problem (in particular it would fail and you'd not get even an attempt to start X11)
Testing "$XDG_VTNR -eq 1" is still somewhat reasonable to allow you a parallel console-only login on a second VT in case there's eg. some issue w/ the graphical environment. It will also prevent attempts to startx in case you ssh into the machine etcetc. so
[[ ! $DISPLAY && $XDG_VTNR -eq 1 ]] && startxwould make for a nice check.
Offline
Now this is just a complementary:
This will replace the current shell with startx.
$ exec startx
This will leave the shell in the background.
$ startxLast edited by solskog (2020-09-19 08:36:28)
Offline
Ok thanks for the info. So were you suggesting I try to use the following in my .bash_profile?
[[ ! $DISPLAY && $XDG_VTNR -eq 1 ]] && startxI did, and X failed to start in this case. After my error screen that hangs for 13 seconds, I got the messages:
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server errorand I remained in the console.
Offline
With or withoug early KMS enabled? Xorg log?
Offline
That was WITHOUT early KMS enabled. Here's the log:
$ cat /var/log/Xorg.0.log
[ 2.458] (WW) Failed to open protocol names file lib/xorg/protocol.txt
[ 2.459]
X.Org X Server 1.20.9
X Protocol Version 11, Revision 0
[ 2.459] Build Operating System: Linux Arch Linux
[ 2.459] Current Operating System: Linux trevorslaptop 5.8.9-arch2-1 #1 SMP PREEMPT Sun, 13 Sep 2020 23:44:55 +0000 x86_64
[ 2.459] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-linux root=UUID=f3d96db5-fe16-4847-9008-c22c55802658 rw loglevel=3 quiet
[ 2.459] Build Date: 02 September 2020 06:17:44AM
[ 2.459]
[ 2.459] Current version of pixman: 0.40.0
[ 2.459] Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
[ 2.459] Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 2.459] (==) Log file: "/var/log/Xorg.0.log", Time: Sat Sep 19 18:52:43 2020
[ 2.460] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[ 2.460] (==) No Layout section. Using the first Screen section.
[ 2.460] (==) No screen section available. Using defaults.
[ 2.460] (**) |-->Screen "Default Screen Section" (0)
[ 2.460] (**) | |-->Monitor "<default monitor>"
[ 2.460] (==) No monitor specified for screen "Default Screen Section".
Using a default monitor configuration.
[ 2.460] (==) Automatically adding devices
[ 2.460] (==) Automatically enabling devices
[ 2.460] (==) Automatically adding GPU devices
[ 2.460] (==) Automatically binding GPU devices
[ 2.460] (==) Max clients allowed: 256, resource mask: 0x1fffff
[ 2.461] (WW) The directory "/usr/share/fonts/misc" does not exist.
[ 2.461] Entry deleted from font path.
[ 2.461] (WW) The directory "/usr/share/fonts/TTF" does not exist.
[ 2.461] Entry deleted from font path.
[ 2.461] (WW) The directory "/usr/share/fonts/OTF" does not exist.
[ 2.461] Entry deleted from font path.
[ 2.461] (WW) The directory "/usr/share/fonts/Type1" does not exist.
[ 2.461] Entry deleted from font path.
[ 2.461] (WW) The directory "/usr/share/fonts/100dpi" does not exist.
[ 2.461] Entry deleted from font path.
[ 2.461] (WW) The directory "/usr/share/fonts/75dpi" does not exist.
[ 2.461] Entry deleted from font path.
[ 2.461] (==) FontPath set to:
[ 2.461] (==) ModulePath set to "/usr/lib/xorg/modules"
[ 2.461] (II) The server relies on udev to provide the list of input devices.
If no devices become available, reconfigure udev or disable AutoAddDevices.
[ 2.461] (II) Module ABI versions:
[ 2.461] X.Org ANSI C Emulation: 0.4
[ 2.461] X.Org Video Driver: 24.1
[ 2.461] X.Org XInput driver : 24.1
[ 2.461] X.Org Server Extension : 10.0
[ 2.462] (++) using VT number 1
[ 2.463] (II) systemd-logind: took control of session /org/freedesktop/login1/session/_31
[ 2.464] (--) PCI:*(0@0:2:0) 8086:9b41:8086:2212 rev 2, Mem @ 0xd0000000/16777216, 0xc0000000/268435456, I/O @ 0x00001c00/64, BIOS @ 0x????????/131072
[ 2.464] (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
[ 2.464] (II) LoadModule: "glx"
[ 2.465] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[ 2.469] (II) Module glx: vendor="X.Org Foundation"
[ 2.469] compiled for 1.20.9, module version = 1.0.0
[ 2.469] ABI class: X.Org Server Extension, version 10.0
[ 2.469] (==) Matched intel as autoconfigured driver 0
[ 2.469] (==) Matched modesetting as autoconfigured driver 1
[ 2.469] (==) Matched fbdev as autoconfigured driver 2
[ 2.469] (==) Matched vesa as autoconfigured driver 3
[ 2.469] (==) Assigned the driver to the xf86ConfigLayout
[ 2.469] (II) LoadModule: "intel"
[ 2.469] (WW) Warning, couldn't open module intel
[ 2.469] (EE) Failed to load module "intel" (module does not exist, 0)
[ 2.469] (II) LoadModule: "modesetting"
[ 2.470] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[ 2.471] (II) Module modesetting: vendor="X.Org Foundation"
[ 2.471] compiled for 1.20.9, module version = 1.20.9
[ 2.471] Module class: X.Org Video Driver
[ 2.471] ABI class: X.Org Video Driver, version 24.1
[ 2.471] (II) LoadModule: "fbdev"
[ 2.471] (WW) Warning, couldn't open module fbdev
[ 2.471] (EE) Failed to load module "fbdev" (module does not exist, 0)
[ 2.471] (II) LoadModule: "vesa"
[ 2.471] (WW) Warning, couldn't open module vesa
[ 2.471] (EE) Failed to load module "vesa" (module does not exist, 0)
[ 2.471] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[ 2.471] (EE) open /dev/dri/card0: No such file or directory
[ 2.471] (WW) Falling back to old probe method for modesetting
[ 2.471] (EE) open /dev/dri/card0: No such file or directory
[ 2.471] (EE) Screen 0 deleted because of no matching config section.
[ 2.471] (II) UnloadModule: "modesetting"
[ 2.471] (EE) Device(s) detected, but none match those in the config file.
[ 2.471] (EE)
Fatal server error:
[ 2.471] (EE) no screens found(EE)
[ 2.471] (EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
[ 2.471] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[ 2.471] (EE)
[ 2.471] (EE) Server terminated with error (1). Closing log file.With early KMS enabled, your suggestion for the .bash_profile fixes my error. However, with early KMS my original .bash_profile fixes the error as well.
Offline
Again: those are different issues.
Your primary problem is that the GPU is late, that's taken care of by early KMS.
The "is-active graphical.target" *can* trigger an additional problem (as in the other threads) which you want to avoid. It is completely unrelated to the missing GPU.
Offline
Ok thanks. So the early KMS seems to have fixed my problem.
I'm wondering why the "systemctl -q is-active graphical.target" hasn't been removed from the ArchWiki xinit page if it causes so many problems.
Offline
I'm wondering why the "systemctl -q is-active graphical.target" hasn't been removed from the ArchWiki xinit page if it causes so many problems.
I wondered the same thing; that section has been edited and reverted at least once.
There is some controversy. See the discussion page for that topic: https://wiki.archlinux.org/index.php/Ta … X_at_login
If enough people join the discussion on the wiki and point out that there are still problems with the existing code, maybe the section will be changed.
Offline
Another solution for this longstanding issue maybe (change USER to your login user):
$ cat /etc/systemd/system/getty@tty1.service.d/override.conf
[Unit]
Description=Auto login
Requires=graphical.target
After=graphical.target
[Service]
ExecStart=
ExecStart=-/usr/bin/agetty --autologin USER --noclear %I $TERM
$ cat .bash_profile
[[ ! $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx@tda Will this work in your setup without early KMS?
Last edited by solskog (2020-09-20 03:19:09)
Offline
@solskog Thanks for the suggestion, but it doesn't seem to work. I seem to get the same behavior as I described in my first post, except I very briefly see the following message at the end of the "Starting version ..." screen:
[ Skip ] Ordering cycle found, skipping Login PromptsOffline
@tda Now I understand that the Requires=graphical.target created a odering dependency cycle, remove it. Will this solve the issue?
[Unit]
Description=Auto login
After=graphical.target
[Service]
ExecStart=
ExecStart=-/usr/bin/agetty --autologin USER --noclear %I $TERMLast edited by solskog (2020-09-20 05:46:40)
Offline
Unfortunately, removing the "Requires=graphical.target" line does not seem to change the behavior.
Last edited by tda (2020-09-20 06:00:59)
Offline
I use this way to startx too, and my /etc/systemd/system/getty@tty1.service.d/override.conf is this:
[Service]
Type=Simple
ExecStart=
ExecStart=-/usr/bin/agetty --autologin USER --noclear %I $TERMWiki mentions that when starting X automatically it may be useful to start getty@tty1.service immediately by adding Type=simple into the drop-in snippet. So maybe this will help.
Offline
nb. that any effort to slow down the X11 start until the GPU has finished will only achieve that: slow stuff down.
Unless there's a reason to avoid early KMS (eg. because you want to select the GPU during the boot) initializing the GPU early is faster ![]()
Also I doubt that systemd will somehow check the GPU status before moving to the graphical.target - afaiu the (falsely implemented) idea, this is to check whether you're attempting to boot a graphical.target (and not stop w/ the multi-user.target)
Offline
Just for the record, adding "Type=Simple" to the override.conf did not seem to fix or have any effect on my problem.
Last edited by tda (2020-09-20 18:18:41)
Offline