I stuck at [ ok ] started x11 server
configuration.nix and config/hardware : Filebin | w903s7v8nvuq0b0s
I stuck at [ ok ] started x11 server
configuration.nix and config/hardware : Filebin | w903s7v8nvuq0b0s
Thatâs a pitifully small amount of information, and the link doesnât go anywhere⌠I donât think anyoneâs clairvoyant enough to help you based on this.
Heh.
@mahdi-ln laptop with integrated GPU and nvidia dGPU? The wiki has an article on nvidia, you probably need optimus mode: Nvidia - NixOS Wiki
But yes, thatâs just usually what causes these graphics issues. It could be any number of things, would be nice to know what your config/hardware is.
The link isnât working, Iâd recommend a github gist, pastebin, or preferably just the full file in a code block (using ```) here.
Further debugging if my psychic powers failed me would be pressing ctrl+alt+F3, logging in and then getting the output of
sudo journalctl -xe --unit display-manager.service
My graphic card is integrated (AMD Mobility Radeon X1400). Download link updated.
This is the next problem I used #`which nixos-install` --root /mnt
command in my current linux distro to install nixos (as the manual said) and it didnât ask me for root password. I donât know what is user/pass
Ok, so:
# Enable the X11 windowing system. # services.xserver.enable = true;
Your X11 is commented out. There is no GUI to start. No idea why that message is coming up, but your config doesnât seem finished. Have a look at this section of the manual.
It also shouldnât be saying anything about starting X11 though. Are you sure you shared the correct config?
it didnât ask me for root password. I donât know what is user/pass
Thatâs odd, but if you donât enter a password into the install prompt, none will be set, which means that your root user is completely disabled. Personally I think this is good practice, you should never sign in as root anyway and have a dedicated admin user with sudo
access instead.
Iâd add a user to my nixos configuration, thereâs more instructions on that in the manual here.
After that you can just go through the steps to mount the installation to /mnt
again and then use sudo nixos-enter
. From there you can use nixos-rebuild switch
to apply your new configuration, and passwd
to set the password of whichever users you like, be that the root account or the one you added in your config.
I have a feeling not many people use the setup instructions youâve been following, youâre definitely hitting a few rough edges here.
Sorry I sent wrong configuration. Link updated.
sudo journalctl -xe --unit display-manager.servic
result:
The very first line in that output explains whatâs going on You can scroll with the arrow keys, right arrow would help.
It would also be helpful if you could dump the output to a file and share that, just <command> > lightdm.log
, and then you can copy it out of /mnt
.
Sep 16 10:08:17 nixos lightdm[790]: Could not enumerate user data directory /var/lib/lightdm-data: Error opening directory '/var/lib/lightdm-data': No such file or directory
Interesting, so on NixOS that directory is supposed to be created by systemd on boot.
Can you run systemd-tmpfiles --cat-config
and get the output of that? Iâd like to know if the directory config is broken or if systemd isnât creating the tmpfiles for some reason.
During entering nixos was an error
[m@m-pc ~]$ sudo nixos-enter
setting up /etc...
chroot: failed to run command âsystemd-tmpfilesâ: No such file or directory
[root@nixos:/]# systemd-tmpfiles --cat-config
# /etc/tmpfiles.d/00-nixos.conf
# This file is created automatically and should not be modified.
# Please change the option âsystemd.tmpfiles.rulesâ instead.
d /run/keys 0750 root 96
z /run/keys 0750 root 96
d /nix/var 0755 root root - -
L+ /nix/var/nix/gcroots/booted-system 0755 root root - /run/booted-system
d /run/lock 0755 root root - -
d /var/db 0755 root root - -
L /etc/mtab - - - - ../proc/mounts
L /var/lock - - - - ../run/lock
R! /etc/group.lock - - - - -
R! /etc/passwd.lock - - - - -
R! /etc/shadow.lock - - - - -
R! /etc/mtab* - - - - -
R! /nix/var/nix/gcroots/tmp - - - - -
R! /nix/var/nix/temproots - - - - -
d /run/lightdm 0711 lightdm lightdm -
d /var/cache/lightdm 0711 root lightdm -
d /var/lib/lightdm 1770 lightdm lightdm -
d /var/lib/lightdm-data 1775 lightdm lightdm -
d /var/log/lightdm 0711 root lightdm -
d /etc/NetworkManager/system-connections 0700 root root -
d /etc/ipsec.d 0700 root root -
d /var/lib/NetworkManager-fortisslvpn 0700 root root -
d /var/lib/misc 0755 root root -
d /nix/var/nix/daemon-socket 0755 root root - -
d /var/lib/udisks2 0755 root root -
R /var/lib/polkit-1
R /var/lib/PolicyKit
L+ /run/opengl-driver - - - - /nix/store/xvn16nb2b9iw8fjzhypxlm0wpvlglhaa-opengl-drivers
r /run/opengl-driver-32
# /etc/tmpfiles.d/home.conf
# 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.
# See tmpfiles.d(5) for details
Q /home 0755 - - -
q /srv 0755 - - -
# /etc/tmpfiles.d/journal-nocow.conf
# 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.
# See tmpfiles.d(5) for details
# Set the NOCOW attribute for directories of journal files. This flag
# is inherited by their new files and sub-directories. Matters only
# for btrfs filesystems.
#
# WARNING: Enabling the NOCOW attribute improves journal performance
# substantially, but also disables the btrfs checksum logic. In
# btrfs RAID filesystems the checksums are needed for rebuilding
# corrupted files. Without checksums such rebuilds are not
# possible.
#
# In a single-disk filesystem (or a filesystem without redundancy)
# enabling the NOCOW attribute for journal files is safe, because
# they have their own checksums and a rebuilding wouldn't be possible
# in any case.
h /var/log/journal - - - - +C
h /var/log/journal/%m - - - - +C
h /var/log/journal/remote - - - - +C
# /etc/tmpfiles.d/lvm2.conf
d /run/lock/lvm 0700 root root -
d /run/lvm 0700 root root -
# /etc/tmpfiles.d/static-nodes-permissions.conf
# 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.
# This file adds permissions on top of static-nodes.conf generated by
# kmod-static-nodes.service. Rules specified here should match the
# permissions specified for udev in 50-udev-default.rules.
z /dev/snd/seq 0660 - audio -
z /dev/snd/timer 0660 - audio -
z /dev/loop-control 0660 - disk -
z /dev/net/tun 0666 - - -
z /dev/fuse 0666 - - -
z /dev/kvm 0666 - kvm -
z /dev/vhost-net 0666 - kvm -
z /dev/vhost-vsock 0666 - kvm -
# /etc/tmpfiles.d/systemd-nologin.conf
# 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.
# See tmpfiles.d(5), systemd-user-sessions.service(8) and pam_nologin(8).
# This file has special suffix so it is not run by mistake.
F! /run/nologin 0644 - - - "System is booting up. Unprivileged users are not permitted to log in ye>
# /etc/tmpfiles.d/systemd-nspawn.conf
# 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.
# See tmpfiles.d(5) for details
Q /var/lib/machines 0700 - - -
# Remove old temporary snapshots, but only at boot. Ideally we'd have
# "self-destroying" btrfs snapshots that go away if the last
# reference to it does. To mimic a scheme like this at least remove
# the old snapshots on fresh boots, where we know they cannot be
# referenced anymore. Note that we actually remove all temporary files
# in /var/lib/machines/ at boot, which should be safe since the
# directory has defined semantics. In the root directory (where
# systemd-nspawn --ephemeral places snapshots) we are more strict, to
# avoid removing unrelated temporary files.
R! /var/lib/machines/.#*
R! /.#machine.*
# /etc/tmpfiles.d/systemd-tmp.conf
# 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.
# See tmpfiles.d(5) for details
# Exclude namespace mountpoints created with PrivateTmp=yes
x /tmp/systemd-private-%b-*
X /tmp/systemd-private-%b-*/tmp
x /var/tmp/systemd-private-%b-*
X /var/tmp/systemd-private-%b-*/tmp
# Remove top-level private temporary directories on each boot
R! /tmp/systemd-private-*
R! /var/tmp/systemd-private-*
# Handle lost systemd-coredump temp files. They could be lost on old filesystems,
# for example, after hard reboot.
x /var/lib/systemd/coredump/.#core*.%b*
r! /var/lib/systemd/coredump/.#*
# /etc/tmpfiles.d/systemd.conf
# 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.
# See tmpfiles.d(5) for details
d /run/user 0755 root root -
F! /run/utmp 0664 root utmp -
d /run/systemd/ask-password 0755 root root -
d /run/systemd/seats 0755 root root -
d /run/systemd/sessions 0755 root root -
d /run/systemd/users 0755 root root -
d /run/systemd/machines 0755 root root -
d /run/systemd/shutdown 0755 root root -
d /run/systemd/netif 0755 systemd-network systemd-network -
d /run/systemd/netif/links 0755 systemd-network systemd-network -
d /run/systemd/netif/leases 0755 systemd-network systemd-network -
d /run/systemd/netif/lldp 0755 systemd-network systemd-network -
d /run/log 0755 root root -
z /run/log/journal 2755 root systemd-journal - -
Z /run/log/journal/%m ~2750 root systemd-journal - -
a+ /run/log/journal - - - - d:group::r-x,d:group:adm:r-x,d:group:wheel:r-x,group::r-x,group:adm:>
a+ /run/log/journal/%m - - - - d:group:adm:r-x,d:group:wheel:r-x,group:adm:r-x,group:wheel:r-x
a+ /run/log/journal/%m/*.journal* - - - - group:adm:r--,group:wheel:r--
z /var/log/journal 2755 root systemd-journal - -
z /var/log/journal/%m 2755 root systemd-journal - -
z /var/log/journal/%m/system.journal 0640 root systemd-journal - -
a+ /var/log/journal - - - - d:group::r-x,d:group:adm:r-x,d:group:wheel:r-x,group::r-x,group:adm:>
a+ /var/log/journal/%m - - - - d:group:adm:r-x,d:group:wheel:r-x,group:adm:r-x,group:wheel:r-x
a+ /var/log/journal/%m/system.journal - - - - group:adm:r--,group:wheel:r--
d /var/lib/systemd 0755 root root -
d /var/lib/systemd/coredump 0755 root root 3d
d /var/lib/private 0700 root root -
d /var/log/private 0700 root root -
d /var/cache/private 0700 root root -
# /etc/tmpfiles.d/tmp.conf
# 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.
# See tmpfiles.d(5) for details
# Clear tmp directories separately, to make them easier to override
q /tmp 1777 root root 10d
q /var/tmp 1777 root root 30d
# /etc/tmpfiles.d/var.conf
# 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.
# See tmpfiles.d(5) for details
q /var 0755 - - -
L /var/run - - - - ../run
d /var/log 0755 - - -
f /var/log/wtmp 0664 root utmp -
f /var/log/btmp 0660 root utmp -
f /var/log/lastlog 0664 root utmp -
d /var/cache 0755 - - -
d /var/lib 0755 - - -
d /var/spool 0755 - - -
# /etc/tmpfiles.d/x11.conf
# 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.
# See tmpfiles.d(5) for details
# Make sure these are created by default so that nobody else can
# or empty them at startup
D! /tmp/.X11-unix 1777 root root 10d
D! /tmp/.ICE-unix 1777 root root 10d
D! /tmp/.XIM-unix 1777 root root 10d
D! /tmp/.font-unix 1777 root root 10d
# Unlink the X11 lock files
r! /tmp/.X[0-9]*-lock
lines 240-268/268 (END)
That directory should be created, in other words. Apparently systemd-tmpfiles is invoked as a systemd service, so weâll probably see whatâs going wrong with:
journalctl -xe --unit systemd-tmpfiles-setup.service
And just to be certain:
systemctl status systemd-tmpfiles-setup.service
A quick fix would be to create the directory by hand, but NixOS really uses this tmpfiles stuff a lot so if something is broken here it really needs to be fixed.
Not that I understand how this can be broken, but weâll see.
âDetected unsafe pathâ messages was in orange. I think it means they were warning
â systemd-tmpfiles-setup.service - Create Volatile Files and Directories
Loaded: loaded (/etc/systemd/system/systemd-tmpfiles-setup.service; enabled; vendor preset: enabled)
Active: active (exited) since Fri 2022-09-16 21:17:02 UTC; 3min 18s ago
Docs: man:tmpfiles.d(5)
man:systemd-tmpfiles(8)
Process: 475 ExecStart=systemd-tmpfiles --create --remove --boot --exclude-prefix=/dev (code=exited, status=73)
Main PID: 475 (code=exited, status=73)
IP: 0B in, 0B out
CPU: 22ms
Sep 16 21:17:02 nixos systemd-tmpfiles[475]: Detected unsafe path transition / (owned by m) â /var (owned by root) during canonicalization of /var/log/journal.
Sep 16 21:17:02 nixos systemd-tmpfiles[475]: Detected unsafe path transition / (owned by m) â /var (owned by root) during canonicalization of /var/log/journal.
Sep 16 21:17:02 nixos systemd-tmpfiles[475]: Detected unsafe path transition / (owned by m) â /var (owned by root) during canonicalization of /var/log/journal/ce3f293d94224796bea5e16d6ae0d51d.
Sep 16 21:17:02 nixos systemd-tmpfiles[475]: Detected unsafe path transition / (owned by m) â /var (owned by root) during canonicalization of /var/log/journal/ce3f293d94224796bea5e16d6ae0d51d.
Sep 16 21:17:02 nixos systemd-tmpfiles[475]: Detected unsafe path transition / (owned by m) â /var (owned by root) during canonicalization of /var/log/journal/ce3f293d94224796bea5e16d6ae0d51d.
Sep 16 21:17:02 nixos systemd-tmpfiles[475]: Detected unsafe path transition / (owned by m) â /run (owned by root) during canonicalization of /run/log/journal.
Sep 16 21:17:02 nixos systemd-tmpfiles[475]: Detected unsafe path transition / (owned by m) â /run (owned by root) during canonicalization of /run/log/journal.
Sep 16 21:17:02 nixos systemd-tmpfiles[475]: Detected unsafe path transition / (owned by m) â /var (owned by root) during canonicalization of /var/log/journal/ce3f293d94224796bea5e16d6ae0d51d/system.journal.
Sep 16 21:17:02 nixos systemd-tmpfiles[475]: Detected unsafe path transition / (owned by m) â /var (owned by root) during canonicalization of /var/log/journal/ce3f293d94224796bea5e16d6ae0d51d/system.journal.
Sep 16 21:17:02 nixos systemd[1]: Finished Create Volatile Files and Directories.
Your root directory is owned by uid 1000. Probably an artefact of how you mounted your root drive.
Mount it, and sudo chown -R root:root /mnt
. I guess systemd chickens out and doesntât create these directories because of the root dir permissions.