NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.65k stars 13.8k forks source link

kmscon does not reset when login shell exits #315198

Open jflanglois opened 4 months ago

jflanglois commented 4 months ago

Describe the bug

When using services.kmscon.enable = true, the login tty does not reset after quitting the shell. I've also noticed that the welcome message does not appear.

Steps To Reproduce

Steps to reproduce the behavior:

  1. nix run github:jflanglois/debug-kmscon (source; add --extra-experimental-features "nix-command flakes" if not set up for flakes)
  2. Wait for qemu VM to boot up and auto login
  3. Log out (via ctrl-d, exit, or logout...)
  4. Observe that the console does not reset and cannot be interacted with anymore (e.g. ctrl-c doesn't do anything)

Expected behavior

The tty resets by clearing the console and presenting a new login prompt.

Additional context

This used to work, but stopped working in the last year. My next steps were going to be to bisect nixpkgs, but I haven't gotten to it yet and figured I'd raise this issue in the meantime. ~I should note that kmscon hasn't changed since 2013, so I suspect it might be something to do with login~ (edit: I didn't realize it had been forked, so it may be the issue). Also of note is that getty seems to have login use ttyS0, so there might be something there too.

Metadata

 $ , nix-info -m
- system: `"x86_64-linux"`
 - host os: `Linux 6.9.1-zen1, NixOS, 24.11 (Vicuña), 24.11.20240524.bfb7a88`
 - multi-user?: `no`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.2`
 - nixpkgs: `not found`

(note: nixpkgs isn't found because the system is managed with flakes. The vm is a more typical base setup.)


Add a :+1: reaction to issues you find important.

syntaxman commented 3 months ago

FWIW, there was another fork from Aetf's version: MacSlow/kmscon It has several improvements. Those were included in a PR that Aetf never applied, unfortunately. I doubt he ever even saw the PR.

I rather hoped that MacSlow would be willing to take over the project and keep it going. At this point, it would be nice if the derivation for this package included those patches. I'm not knowledgeable enough about nix to create or override the derivation myself, at least not yet.