Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xserver fails to start with fonts.fontDir.enable = true; #101196

Open
gravndal opened this issue Oct 20, 2020 · 5 comments
Open

Xserver fails to start with fonts.fontDir.enable = true; #101196

gravndal opened this issue Oct 20, 2020 · 5 comments
Assignees
Labels
0.kind: bug Something is broken 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS

Comments

@gravndal
Copy link
Contributor

Describe the bug
X started using startx with fonts.fontDir.enable = true; doesn't find the fixed font.

To Reproduce
Steps to reproduce the behavior:

  1. Set fonts.fontDir.enable = true;
  2. Run startx in a tty

Expected behavior
X finding the font and starting.

Actual behavior

[    20.321] (EE) 
Fatal server error:
[    20.321] (EE) could not open default font 'fixed'(EE) 
[    20.321] (EE) 
Please consult the The X.Org Foundation support 
	 at http://wiki.x.org
 for help. 
[    20.321] (EE) Please also check the log file at "/home/r/.xorg.log" for additional information.
[    20.321] (EE) 
[    20.321] (II) AIGLX: Suspending AIGLX clients for VT switch
[    20.339] (EE) Server terminated with error (1). Closing log file.

Additional context
This only happens if fonts.fonts does not include xorg.fontmiscmisc, i.e. with fonts.enableDefaultFonts = false;

Notify maintainers

Introduced in eda7e23 cc @rnhmjoj @hir12111

Metadata

 - system: `"x86_64-linux"`
 - host os: `Linux 5.9.1, NixOS, 21.03pre248135.cabb90e2123 (Okapi)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.3.7`
 - channels(root): `"nixos-21.03pre248135.cabb90e2123, nixos-2003-20.03.3129.d3784204ba1, nixos-unstable-21.03pre247760.8133b9cb5f7"`
 - channels(r): `""`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute:
# a list of nixos modules affected by the problem
module:
@gravndal gravndal added the 0.kind: bug Something is broken label Oct 20, 2020
@rnhmjoj rnhmjoj self-assigned this Oct 20, 2020
@EmilioPeJu
Copy link
Contributor

Just let you know that I tested this with startx and I didn't have this problem, Could you please show your .xinitrc and the relevant part in ~/.xorg.log?

@gravndal
Copy link
Contributor Author

gravndal commented Oct 21, 2020

I can replicate it with this using build-vm:

{ config, pkgs, ...}:

{
  fonts = {
    fonts = with pkgs; [
      terminus_font
    ];

    enableDefaultFonts = false;
    fontDir.enable = true;
  };

  services.xserver = {
    enable = true;
    autorun = false;
    displayManager.startx.enable = true;
  };

  users.users.a = {
    password = "a";
    isNormalUser = true;
  };
}

I didn't notice this yesterday, but it looks like terminus_font is partly responsible as replacing it with noto-fonts for instance works fine.

$ nixos-version
21.03pre248242.72ac8255dc5 (Okapi)

@rnhmjoj
Copy link
Contributor

rnhmjoj commented Oct 21, 2020

I can't test right now, but the enableDefaultFonts = false; is suspicious. Does it happen if you leave that to true?

@gravndal
Copy link
Contributor Author

gravndal commented Oct 21, 2020

Testing on master (with #101246 applied): As stated in the op, no, with the default fonts enabled this does not happen as then fonts.fonts include xorg.fontmiscmisc (which contains the font X is having trouble finding).

It similarly doesn't happen if you change fonts to:

  fonts = {
    fonts = with pkgs; [
      xorg.fontmiscmisc      
      terminus_font
    ];

    enableDefaultFonts = false;
    fontDir.enable = true;
  };

What's odd to me is that this will work:

  fonts = {
    fonts = with pkgs; [
     liberation_ttf
    ];

    enableDefaultFonts = false;
    fontDir.enable = true;
  };

Or if terminus_font is replaced with tamsyn (another pcf.gz bitmap font).

Both of which also, much like #101196 (comment), results in a fontDir lacking fixed (9x18-ISO8859-1.pcf.gz according to fc-match)

@veprbl veprbl added the 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS label Oct 22, 2020
@stale
Copy link

stale bot commented Jun 7, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS
Projects
None yet
Development

No branches or pull requests

4 participants