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/regreet: greeter spans multiple monitors #226586

Open
Lord-Valen opened this issue Apr 17, 2023 · 3 comments
Open

nixos/regreet: greeter spans multiple monitors #226586

Lord-Valen opened this issue Apr 17, 2023 · 3 comments

Comments

@Lord-Valen
Copy link
Contributor

Describe the bug

The default behaviour for cage is to "Extend the display across all connected outputs". The greeter therefore spans across all monitors. In multihead setups, this often results in the login prompt being split between two or more monitors. For obvious reasons, that isn't desirable.

Steps To Reproduce

Steps to reproduce the behavior:

  1. programs.regreet.enable = true
  2. services.greetd.enable = true
  3. Have multiple monitors
  4. On greetd start, observe that the greeter spans across all monitors

Expected behavior

The greeter appears on one monitor or appears separately on each monitor.

Additional context

cage -m last should restrict cage to the last connected device but that results in an otherwise blank screen with the following error:

Failed to create /var/empty/.cache for shader cache (Operation not permitted)---disabling.

Notify maintainers

@fufexan @Peter015

Metadata

 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.23, NixOS, 23.05 (Stoat), 23.05pre-git`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.13.3`
 - channels(lord-valen): `""`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
@fufexan
Copy link
Contributor

fufexan commented Apr 17, 2023

I'm not sure what the best course of action is here. We could set sway as the default runner for the greeter, but it's a bit of a stretch to enable it by default in my opinion. I use it and it works fine, but I'm not sure whether users would want sway to be the default. Configuring it is also more involved.

If you wish to use sway to get around this problem, you can take a look at my configuration.

@Lord-Valen
Copy link
Contributor Author

If we want to stick with just cage in the module, it's probably best to see if we can get -m last working for now. Or wait for cage-kiosk/cage#247 implementation, though cage's development velocity has slowed down significantly.

Alternatively, we could add a compositor option to the module, giving the option to switch between cage and a minimal sway configuration (and possibly others in the future).

Lord-Valen added a commit to Lord-Valen/configuration.nix that referenced this issue Apr 17, 2023
Ma27 added a commit to Ma27/nixpkgs that referenced this issue Oct 18, 2023
In my case I'd like to be able to add `-m last` to `cage` to make sure
that the login form from regreet isn't displayed half on my external
monitor and half on my laptop screen, but on the last connected monitor
only.

That's basically the issue described in NixOS#226586, though it's not a
proper fix since the login form is shown on one monitor only.
@Ma27
Copy link
Member

Ma27 commented Oct 18, 2023

As a workaround until then you might be interested in #261816.

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

No branches or pull requests

4 participants