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

nixos/hidpi: Reasonable defaults for high-density displays #88669

Open
wants to merge 3 commits into
base: master
from

Conversation

@Mic92
Copy link
Contributor

Mic92 commented May 23, 2020

Motivation for this change

This is a smaller subset of #87730
It does not contain any x11 settings yet.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Copy link
Member

emilazy left a comment

Looks good to me in general, I'd be happy to enable this on my systems.

nixos/modules/hardware/video/high-dpi.nix Outdated Show resolved Hide resolved
nixos/modules/hardware/video/high-dpi.nix Outdated Show resolved Hide resolved
@Mic92 Mic92 force-pushed the Mic92:hidpi branch from 3cc6cc5 to e4af21d May 24, 2020
@ofborg ofborg bot removed the 8.has: documentation label May 24, 2020
@Mic92 Mic92 force-pushed the Mic92:hidpi branch 2 times, most recently from 94f8e86 to 2c0c134 May 24, 2020
@Mic92 Mic92 changed the title nixos/high-dpi: Reasonable defaults for high-density displays nixos/hidpi: Reasonable defaults for high-density displays May 24, 2020
@Mic92
Copy link
Contributor Author

Mic92 commented May 24, 2020

Switched to ter-132n.psf.gz. Spleen would be also a reasonable alternative however we also use terminus in our default setup. That's I want to keep it consistent when HiDPI displays are used. If has good reason to use a different console font, please propose so in a different PR.

@Mic92 Mic92 force-pushed the Mic92:hidpi branch from 2c0c134 to 93e91d4 May 24, 2020
@Mic92 Mic92 force-pushed the Mic92:hidpi branch from 93e91d4 to 825deb8 May 24, 2020
push @attrs, "# High-DPI console";
push @attrs, 'console.font = lib.mkDefault "${pkgs.terminus_font}/share/consolefonts/ter-u28n.psf.gz";';
push @attrs, "# high-resolution display";
push @attrs, 'hardware.video.hidpi.enable = lib.mkDefault true;';

This comment has been minimized.

Copy link
@NickHu

NickHu May 24, 2020

Contributor

I'm not sure having this is the best heuristic for HiDPI - what if the monitor is just really large? In general I don't think it's correct to determine HiDPI from resolution

This comment has been minimized.

Copy link
@lheckemann

lheckemann May 24, 2020

Member

IMHO it's a reasonable assumption that if we have lots of pixels it's okay to make stuff bigger, even if it's not correct in absolutely all cases.

This comment has been minimized.

Copy link
@Mic92

Mic92 May 25, 2020

Author Contributor

If you have a better method. i.e. a simple way to decode edid, we can change it.
Notice that this PR does not change the way hidpi is detected.

@Mic92 Mic92 force-pushed the Mic92:hidpi branch from 825deb8 to 2fb5a99 May 25, 2020
v32n has more characters.
@@ -42,7 +42,7 @@
</para>

<para>
If the text is too small to be legible, try <command>setfont ter-132n</command>
If the text is too small to be legible, try <command>setfont ter-v32n</command>

This comment has been minimized.

Copy link
@Mic92

Mic92 May 25, 2020

Author Contributor

Should we just detect larger tty's in the installer and scale up automatically during boot?

This comment has been minimized.

Copy link
@Mic92

Mic92 May 25, 2020

Author Contributor

Anyway. This should not be part of this PR.

@Mic92
Copy link
Contributor Author

Mic92 commented May 25, 2020

Any other concerns?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.