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

@hustlerone
Copy link
Contributor Author

do we expect multiple seats?

@SuperSandro2000
Copy link
Member

Don't you get a new "seat" if you switch ttys aka Ctrl+Alt+FX?

@hustlerone
Copy link
Contributor Author

I'm gonna get to do some testing and I'll report back.

I guess we do need to set the seat to master, although this should also support multiple seats?

I should also make the hwAccel option actually work

@hustlerone
Copy link
Contributor Author

Does getty do multiseat? I don't know if I'm missing anything

@hustlerone
Copy link
Contributor Author

Okay, so switching VT's is way less sluggish now and I can now let kmscon rest again at the master seat used by systemd.

Promptly testing for DRM & friends

@hustlerone
Copy link
Contributor Author

what the fuck? what did git just do?

@github-actions github-actions bot added the 6.topic: python Python is a high-level, general-purpose programming language. label May 16, 2025
@hustlerone
Copy link
Contributor Author

This is ridicolous why is git co-authoring commits?

@github-actions github-actions bot removed the 6.topic: python Python is a high-level, general-purpose programming language. label May 16, 2025
@hustlerone
Copy link
Contributor Author

@SuperSandro2000 The issues are fixed on my end. Try to see if they're fixed on yours too.

The highlights of the current changes are that it doesn't screw with my system while resting on seat0 anymore and that it's way less sluggish.

@SuperSandro2000
Copy link
Member

I try to find a bit of time in the coming days to test this.

@hustlerone hustlerone force-pushed the master branch 2 times, most recently from 6578e32 to 433c615 Compare May 16, 2025 17:45
@hustlerone
Copy link
Contributor Author

what the hell is this CI error

@hustlerone hustlerone force-pushed the master branch 2 times, most recently from f959fa4 to fa0d87a Compare May 16, 2025 18:31
@hustlerone
Copy link
Contributor Author

Well, a stable version just dropped.

pkgs/libtsm: 4.0.2-unstable-2023-12-24 -> 4.1.0
@hustlerone
Copy link
Contributor Author

Start testing again. Having more than 1 session doesn't seem to give it a stroke anymore.

There's not much we can do for DRM yet (well, we could still use the patch that enables kmscon to release the GPU but you'd have to run a wrapper beforehand launching something like Sway when kmscon is running using DRM)

@hustlerone
Copy link
Contributor Author

Don't you get a new "seat" if you switch ttys aka Ctrl+Alt+FX?

Apparently VT's are all for seat0

@hustlerone
Copy link
Contributor Author

I have some module changes i'll upload soon

@nixpkgs-ci nixpkgs-ci bot added the 2.status: merge conflict This PR has merge conflicts with the target branch label Sep 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: merge conflict This PR has merge conflicts with the target branch 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

nixos/kmscon: prevents entering the desktop environment
6 participants