mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2026-12-02 22:13:29 +01:00
framework: 6.11 remove bluetooth workaround
6.11 is EOL, see: https://kernel.org/ The workaround, is no longer needed, see: https://github.com/FrameworkComputer/linux-docs/commit/ff5c08e826a6067cd1ac41f87a87ddda0c88532c Signed-off-by: Daniel Schaefer <dhs@frame.work>
This commit is contained in:
1 parent
9bd7c80d43
commit
8db5dd4f10
4 files changed
-58
No files matched your search
@@ -3,7 +3,6 @@
|
|||||||
imports = [
|
imports = [
|
||||||
../../../common/pc/laptop
|
../../../common/pc/laptop
|
||||||
../../../common/pc/ssd
|
../../../common/pc/ssd
|
||||||
../../bluetooth.nix
|
|
||||||
../../kmod.nix
|
../../kmod.nix
|
||||||
../../framework-tool.nix
|
../../framework-tool.nix
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
imports = [
|
imports = [
|
||||||
../../../common/pc/laptop
|
../../../common/pc/laptop
|
||||||
../../../common/pc/ssd
|
../../../common/pc/ssd
|
||||||
../../bluetooth.nix
|
|
||||||
../../kmod.nix
|
../../kmod.nix
|
||||||
../../framework-tool.nix
|
../../framework-tool.nix
|
||||||
./audio.nix
|
./audio.nix
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
imports = [
|
imports = [
|
||||||
../../../common/pc/laptop
|
../../../common/pc/laptop
|
||||||
../../../common/pc/ssd
|
../../../common/pc/ssd
|
||||||
../../bluetooth.nix
|
|
||||||
../../kmod.nix
|
../../kmod.nix
|
||||||
../../framework-tool.nix
|
../../framework-tool.nix
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,55 +0,0 @@
|
|||||||
# There is apparently a bug that affects Framework computers that causes black
|
|
||||||
# screen on resume from sleep or hibernate with kernel version 6.11. Framework
|
|
||||||
# have published a workaround; this applies that workaround.
|
|
||||||
#
|
|
||||||
# https://fosstodon.org/@frameworkcomputer/113406887743149089
|
|
||||||
# https://github.com/FrameworkComputer/linux-docs/blob/main/hibernation/kernel-6-11-workarounds/suspend-hibernate-bluetooth-workaround.md#workaround-for-suspendhibernate-black-screen-on-resume-kernel-611
|
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
# TODO: drop this if linux 6.11 goes EOL
|
|
||||||
}:
|
|
||||||
lib.mkIf
|
|
||||||
(
|
|
||||||
(config.boot.kernelPackages.kernelAtLeast "6.11") && (config.boot.kernelPackages.kernelOlder "6.12")
|
|
||||||
)
|
|
||||||
{
|
|
||||||
systemd.services = {
|
|
||||||
bluetooth-rfkill-suspend = {
|
|
||||||
description = "Soft block Bluetooth on suspend/hibernate";
|
|
||||||
before = [ "sleep.target" ];
|
|
||||||
unitConfig.StopWhenUnneeded = true;
|
|
||||||
serviceConfig = {
|
|
||||||
Type = "oneshot";
|
|
||||||
ExecStart = "${pkgs.util-linux}/bin/rfkill block bluetooth";
|
|
||||||
ExecStartPost = "${pkgs.coreutils}/bin/sleep 3";
|
|
||||||
RemainAfterExit = true;
|
|
||||||
};
|
|
||||||
wantedBy = [
|
|
||||||
"suspend.target"
|
|
||||||
"hibernate.target"
|
|
||||||
"suspend-then-hibernate.target"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
bluetooth-rfkill-resume = {
|
|
||||||
description = "Unblock Bluetooth on resume";
|
|
||||||
after = [
|
|
||||||
"suspend.target"
|
|
||||||
"hibernate.target"
|
|
||||||
"suspend-then-hibernate.target"
|
|
||||||
];
|
|
||||||
serviceConfig = {
|
|
||||||
Type = "oneshot";
|
|
||||||
ExecStart = "${pkgs.util-linux}/bin/rfkill unblock bluetooth";
|
|
||||||
};
|
|
||||||
wantedBy = [
|
|
||||||
"suspend.target"
|
|
||||||
"hibernate.target"
|
|
||||||
"suspend-then-hibernate.target"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
Reference in new issue
Block a user