Open mzabani opened 4 years ago
You can get better logs with journalctl -b -u display-manager
. But it looks like you may not have a displayManager enabled? Usually you would use gdm with gnome.
Sorry for taking so long, and thanks for the tips. This is the output of journalctl -b -u display-manager
:
-- Logs begin at Mon 2017-10-23 19:08:02 -02, end at Wed 2019-12-11 17:25:10 -03. --
Dec 11 17:24:40 nixos systemd[1]: Starting X11 Server...
Dec 11 17:24:40 nixos systemd[1]: Started X11 Server.
Dec 11 17:24:40 nixos systemd[1]: display-manager.service: Main process exited, code=exited, status=1/FAILURE
Dec 11 17:24:40 nixos systemd[1]: display-manager.service: Failed with result 'exit-code'.
Dec 11 17:24:40 nixos systemd[1]: display-manager.service: Service RestartSec=200ms expired, scheduling restart.
Dec 11 17:24:40 nixos systemd[1]: display-manager.service: Scheduled restart job, restart counter is at 1.
Dec 11 17:24:40 nixos systemd[1]: Stopped X11 Server.
Dec 11 17:24:40 nixos systemd[1]: Starting X11 Server...
Dec 11 17:24:40 nixos systemd[1]: Started X11 Server.
Dec 11 17:24:40 nixos systemd[1]: display-manager.service: Main process exited, code=exited, status=1/FAILURE
Dec 11 17:24:40 nixos systemd[1]: display-manager.service: Failed with result 'exit-code'.
Dec 11 17:24:41 nixos systemd[1]: display-manager.service: Service RestartSec=200ms expired, scheduling restart.
Dec 11 17:24:41 nixos systemd[1]: display-manager.service: Scheduled restart job, restart counter is at 2.
Dec 11 17:24:41 nixos systemd[1]: Stopped X11 Server.
Dec 11 17:24:41 nixos systemd[1]: Starting X11 Server...
Dec 11 17:24:41 nixos systemd[1]: Started X11 Server.
Dec 11 17:24:41 nixos systemd[1]: display-manager.service: Main process exited, code=exited, status=1/FAILURE
Dec 11 17:24:41 nixos systemd[1]: display-manager.service: Failed with result 'exit-code'.
Dec 11 17:24:41 nixos systemd[1]: display-manager.service: Service RestartSec=200ms expired, scheduling restart.
Dec 11 17:24:41 nixos systemd[1]: display-manager.service: Scheduled restart job, restart counter is at 3.
Dec 11 17:24:41 nixos systemd[1]: Stopped X11 Server.
Dec 11 17:24:41 nixos systemd[1]: display-manager.service: Start request repeated too quickly.
Dec 11 17:24:41 nixos systemd[1]: display-manager.service: Failed with result 'exit-code'.
Dec 11 17:24:41 nixos systemd[1]: Failed to start X11 Server.
I tried enabling gdm too, but it also failed, although in a different way:
journalctl -b -u display-manager
-- Logs begin at Mon 2017-10-23 19:08:02 -02, end at Wed 2019-12-11 17:31:31 -03. --
Dec 11 17:30:46 nixos systemd[1]: Starting X11 Server...
Dec 11 17:30:46 nixos systemd[1]: Started X11 Server.
Dec 11 17:30:46 nixos gdm[856]: Child process -872 was already dead.
Dec 11 17:31:17 nixos gdm[856]: Child process -1215 was already dead.
Dec 11 17:31:21 nixos gdm[856]: Child process -1223 was already dead.
I'm having exactly the same issue on a new machine (no upgrade involved).
On Crtl-Alt-F7
i see a cursor blinking continuously (this is as soon as I tried to systemctl start display-manager.server
), while on Ctrl-Alt-F1
I am able to see these logs:
Starting X11 Server...
Started X11 Server
display-manager.service: Main process exited, code=exited, status=1/FAILURE
display-manager.service: Failed with result 'exit-code'.
display-manager.service: Scheduled restart job, restart counter is at 1.
Stopped X11 Server
Starting X11 Server...
...
If you don't have a display manager - I think that setting services.xserver.desktopManager.xterm.enable = true
may fix this.
Thanks @matthewbauer.
I tried it with combinations of enabled/disabled
desktopManager.xterm
and enabled/disabled
displayManager.service
, with running nix-channel --update
before nixos-install
, but the result is still the same, unfortunately.
Sharing some information I learned while trying to get my setup working, here. I don’t have a working system yet, I’m still trying to get it to work.
19.09
, amdgpu-pro
errors out with abiCompat
, specifically that it is compatible with xserver 1.19
and not 1.20
. (1.20
is the default on 19.09
at the moment)Using amdgpu
, the OS gets installed alright, but X11 server exits with an error upon trying to startx
. Logs below (~/.xorg.log
):
[...]
[ 856.488] (==) Using config file: "/etc/X11/xorg.conf"
[ 856.489] (==) Using config directory: "/etc/X11/xorg.conf.d"
[ 856.489] (==) Using system config directory "/nix/store/z927pbwkkwagg0lx4imiyfip1jkxpy5j-xorg-server-1.20.5/share/X11/xorg.conf.d"
[ 856.489] (==) ServerLayout "Layout[all]"
[ 856.489] (**) |-->Screen "Screen-amdgpu[0]" (0)
[ 856.489] (**) | |-->Monitor "<default monitor>"
[ 856.489] (**) | |-->Device "Device-amdgpu[0]"
[ 856.489] (==) No monitor specified for screen "Screen-amdgpu[0]".
Using a default monitor configuration.
[ 856.489] (**) |-->Screen "Screen-radeon[0]" (1)
[ 856.489] (**) | |-->Monitor "<default monitor>"
[ 856.489] (**) | |-->Device "Device-radeon[0]"
[ 856.489] (==) No monitor specified for screen "Screen-radeon[0]".
Using a default monitor configuration.
[ 856.489] (**) Option "DontZap" "on"
[ 856.489] (**) Option "AllowMouseOpenFail" "on"
[ 856.489] (==) Automatically adding devices
[ 856.489] (==) Automatically enabling devices
[ 856.489] (==) Automatically adding GPU devices
[ 856.489] (==) Max clients allowed: 256, resource mask: 0x1fffff
[ 856.489] (**) FontPath set to:
[...]
[ 856.494] (II) AMDGPU(0): [KMS] drm report modesetting isn't supported.
[ 856.494] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[ 856.494] (EE) Screen 0 deleted because of no matching config section.
[ 856.494] (II) UnloadModule: "amdgpu"
[ 856.494] (EE) Device(s) detected, but none match those in the config file.
[ 856.494] (EE)
Fatal server error:
[ 856.494] (EE) no screens found(EE)
[ 856.494] (EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
[ 856.494] (EE) Please also check the log file at "/home/aniketd/.xorg.log" for additional information.
[ 856.494] (EE)
[ 856.495] (EE) Server terminated with error (1). Closing log file.
I tried to be smart with a /etc/X11/xorg.conf.d/20-radeon.conf
, with the following contents:
Section "Device"
Identifier "RADEON HDMI"
Driver "amdgpu"
Screen 0
EndSection
Section "Screen" Identifier "Screen 0" Device "RADEON HDMI" EndSection
But my hunch is that this didn’t get picked up, because it led to no difference in the `.xorg.log` output.
**note**: You see “amdgpu” and “radeon” both in the generation of the xorg configuration most likely because I used videoDrivers = [ "amdgpu" "radeon" ]; (although I’m not super sure about this)
I don’t know what I should do next.
[ the same posted [on discourse](https://discourse.nixos.org/t/working-amdgpu-configurations/2305/11?u=aniketd) ]
I found a solution that works - using boot.kernelPackages = pkgs.linuxPackages_5_4;
(for now), but using the unstable
channel. This unfortunately does not work on the 19.09
channel. Corresponding discussion on discourse
My case was simple. I own a Legacy NVIDIA card, and at some point, I suppose the default NVIDIA driver is no longer compatible with it. I'm not sure why the error doesn't appear in journalctl when using -u display-manager
, but looking at all of journalctl
showed me the driver was incompatible. The solution for me was to add this to configuration.nix:
boot.kernelPackages = pkgs.linuxPackages.extend (self: super: {
nvidia_x11 = super.nvidia_x11_legacy390;
});
I'll keep this issue open because it seems @aniketd 's error is different from mine, and could be a bug in nixpkgs.
Hello, I'm a bot and I thank you in the name of the community for opening this issue.
To help our human contributors focus on the most-relevant reports, I check up on old issues to see if they're still relevant. This issue has had no activity for 180 days, and so I marked it as stale, but you can rest assured it will never be closed by a non-human.
The community would appreciate your effort in checking if the issue is still valid. If it isn't, please close it.
If the issue persists, and you'd like to remove the stale label, you simply need to leave a comment. Your comment can be as simple as "still important to me". If you'd like it to get more attention, you can ask for help by searching for maintainers and people that previously touched related code and @ mention them in a comment. You can use Git blame or GitHub's web interface on the relevant files to find them.
Lastly, you can always ask for help at our Discourse Forum or at #nixos' IRC channel.
I upgraded from linuxPackages_5_4
(20.09's linuxPackages_latest
) to linuxPackages_5_11
(unstable's
linuxPackages_latest`) and also got this error. There may be some issue with X11 on some hardward and/or configurations resulting in X11 having issues with some non-5.4 kernels?
I'm currently on 20.09
with linuxPackages_5_10
with no issues, as a data-point, if it helps @lapp0
EDIT (Aug 2021): linuxPackages_5_13
and linuxPackages_5_12
gave me this same error, still on linuxPackages_5_10
Thanks, can confirm linuxPackages_5_10
works. linuxPackages_5_4
has an unrelated bug with my configuration under 21.05
so I'm glad there's a working kernel for me!
I marked this as stale due to inactivity. → More info
@matthewbauer @NixOSInfra Just bringing to your notice that may be this issue can be closed.
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
Describe the bug After booting, the display manager doesn't come up with NixOS 19.09. There's another posted issue with the same symptom but which seems to be a different problem: https://github.com/NixOS/nixpkgs/issues/62383
To Reproduce
nixos-rebuild switch --upgrade
from a 18.09 NixOS system.systemctl status display-manager.service
:Nov 30 10:44:50 nixos systemd[1]: display-manager.service: Service RestartSec=200ms expired, scheduling restart. Nov 30 10:44:50 nixos systemd[1]: display-manager.service: Scheduled restart job, restart counter is at 3. Nov 30 10:44:50 nixos systemd[1]: Stopped X11 Server. Nov 30 10:44:50 nixos systemd[1]: display-manager.service: Start request repeated too quickly. Nov 30 10:44:50 nixos systemd[1]: display-manager.service: Failed with result 'exit-code'. Nov 30 10:44:50 nixos systemd[1]: Failed to start X11 Server.
nix run nixpkgs.nix-info -c nix-info -m
"x86_64-linux"
Linux 4.19.84, NixOS, 19.09.1320.4ad6f1404a8 (Loris)
yes
yes
nix-env (Nix) 2.3
"nixos-18.09.2574.a7e559a5504, nixpkgs-19.09pre183693.baa75f0c25a"
"nixos-19.09.1320.4ad6f1404a8, nixpkgs-20.03pre202154.58fb23f72ad"
/nix/var/nix/profiles/per-user/root/channels/nixos