Skip to content

Conversation

@hustlerone
Copy link
Contributor

@hustlerone hustlerone commented Mar 20, 2025

Things done

Adjusted the systemd unit for kmscon to fix #385497

This however will completely disable DRM for kmscon and now seats will be unspecified.
If someone absolutely requires DRM for kmscon, let me know.

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` labels Mar 20, 2025
@hustlerone hustlerone marked this pull request as draft March 20, 2025 14:25
@hustlerone
Copy link
Contributor Author

As per fbcon fashion, there's rendering issues. I guess the PR will get much more complicated if this doesn't turn out to be a fluke.

@github-actions github-actions bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Mar 20, 2025
@hustlerone hustlerone marked this pull request as ready for review March 20, 2025 14:31
@hustlerone
Copy link
Contributor Author

Ok, this might just be a greetd issue I'm having.

Either way, it would be great if someone would test this under "normal" circumstances

@liff
Copy link
Contributor

liff commented Mar 21, 2025

Enabled with GNOME and it seems to work like it used to. Didn’t test extensively, but at least GDM is able to start now.

@hustlerone
Copy link
Contributor Author

Yeah, I suspect the current rev we're in actually works as intended and we actually have to disable DRM specifically.

There also is the option to patch kmscon to allow it to free the gpu on demand. However, we would also have to modify every single derivation that starts a graphical session or needs /dev/dri/cardX so it also tells kmscon to free the GPU, just so we use DRM for kmscon (and I don't know any benefits of using DRM over fbcon for kmscon)

@github-actions github-actions bot removed 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` labels Mar 30, 2025
@hustlerone
Copy link
Contributor Author

how do i undo this git has played me

@github-actions github-actions bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. and removed 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Mar 30, 2025
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review/3032/5352

Copy link

@andrewathalye andrewathalye left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Graphical sessions do launch, but I’ve noticed both PipeWire and 3D acceleration don’t seem to work properly. PipeWire only shows the dummy output, even though the service is running and WirePlumber works, 3D acceleration works in X11 but not Wayland apps.

@andrewathalye
Copy link

This is the same whether I use DRM or no-drm, hwaccel or no-hwaccel in configuration

@hustlerone
Copy link
Contributor Author

hwaccel is supposed to be for drawing kmscon only.

If you run under kmscon, you have to wrap your graphical sessions with kmscon-launch-gui like so:

kmscon-launch-gui sway

@andrewathalye
Copy link

libEGL warning: pci id for fd 24: 10de:1e84, driver (null)

pci id for fd 51: 10de:1e84, driver (null)
pci id for fd 64: 10de:1e84, driver (null)
libEGL warning: egl: failed to create dri2 screen
pci id for fd 64: 10de:1e84, driver (null)
pci id for fd 69: 10de:1e84, driver (null)
libEGL warning: egl: failed to create dri2 screen

I get these kinds of errors when launching e.g. Anki or Firefox and using Wayland. When using X11, video acceleration works, and the compositor itself seems to have GPU access, but only when I use seatd. If I try to use logind instead it doesn’t launch.

This is something to do with the way Nix is launching kmscon I think

@hustlerone
Copy link
Contributor Author

Also could be seat-related. Kmscon is starting to get a much needed facelift

@gaelj
Copy link
Contributor

gaelj commented Jan 24, 2026

Please rebase this on latest master, I'd love to see it merged

@nixpkgs-ci nixpkgs-ci bot added the 2.status: merge conflict This PR has merge conflicts with the target branch label Jan 24, 2026
@hustlerone hustlerone changed the title fix kmscon package & modules fix kmscon module Jan 24, 2026
@nixpkgs-ci nixpkgs-ci bot removed the 2.status: merge conflict This PR has merge conflicts with the target branch label Jan 24, 2026
@nixpkgs-ci nixpkgs-ci bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Jan 24, 2026
@nixpkgs-ci nixpkgs-ci bot added 12.approvals: 2 This PR was reviewed and approved by two persons. and removed 12.approvals: 1 This PR was reviewed and approved by one person. labels Jan 27, 2026
ccicnce113424

This comment was marked as duplicate.

@ccicnce113424 ccicnce113424 requested review from ccicnce113424 and removed request for ccicnce113424 and omasanori January 27, 2026 09:50
Copy link
Contributor

@ccicnce113424 ccicnce113424 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pressing the Backspace key did not move the cursor backward. Furthermore, the following error appeared after logging in:

/nix/store/qm7yzix9jc0bwmBkOvw5Bbbnad99kiyl-set-environment:36: can't find terminal definition for $TERM
/nix/store/qm7yzix9jc0bwmBkOvw5Bbbnad99kiyl-set-environment:56: can't find terminal definition for $TERM

@hustlerone
Copy link
Contributor Author

That's strange considering i copied the service verbatim.

I don't have the issue on agetty. What's your setup?

@ccicnce113424
Copy link
Contributor

ccicnce113424 commented Jan 27, 2026

Pressing the Backspace key did not move the cursor backward. Furthermore, the following error appeared after logging in:

/nix/store/qm7yzix9jc0bwmBkOvw5Bbbnad99kiyl-set-environment:36: can't find terminal definition for $TERM
/nix/store/qm7yzix9jc0bwmBkOvw5Bbbnad99kiyl-set-environment:56: can't find terminal definition for $TERM

This seems to occur only when the user's default shell is zsh.
users.defaultUserShell = pkgs.zsh;

@gaelj
Copy link
Contributor

gaelj commented Jan 27, 2026

I'm using zsh too and it's working well for me when the VT is opened first time, which covers 90% of my use. But if I open another VT and then I go back into an already open VT:

  • screen stays black until I press a key (always)
  • Ctrl key appears to be "stuck" (always pressed) but this happens on random. I haven't found a way to unstick it once the VT is in this mode

However both problems still exist when I don't use this PR, so it looks like an upstream issue.

@ccicnce113424
Copy link
Contributor

Pressing the Backspace key did not move the cursor backward. Furthermore, the following error appeared after logging in:

/nix/store/qm7yzix9jc0bwmBkOvw5Bbbnad99kiyl-set-environment:36: can't find terminal definition for $TERM
/nix/store/qm7yzix9jc0bwmBkOvw5Bbbnad99kiyl-set-environment:56: can't find terminal definition for $TERM

After applying #483176, it no longer occurs.

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

Labels

6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 12.approvals: 2 This PR was reviewed and approved by two persons.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

nixos/kmscon: prevents entering the desktop environment

10 participants