mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-28 14:22:50 +03:00
Merge pull request #33915 from lheckemann/remove-amd-hybrid-graphics
amd-hybrid-graphics module: remove
This commit is contained in:
commit
822c949833
@ -144,6 +144,11 @@ following incompatible changes:</para>
|
||||
will be accessible at <literal>/run/memcached/memcached.sock</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
The <varname>hardware.amdHybridGraphics.disable</varname> option was removed for lack of a maintainer. If you still need this module, you may wish to include a copy of it from an older version of nixos in your imports.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
</section>
|
||||
|
@ -225,7 +225,6 @@
|
||||
./services/games/terraria.nix
|
||||
./services/hardware/acpid.nix
|
||||
./services/hardware/actkbd.nix
|
||||
./services/hardware/amd-hybrid-graphics.nix
|
||||
./services/hardware/bluetooth.nix
|
||||
./services/hardware/brltty.nix
|
||||
./services/hardware/freefall.nix
|
||||
|
@ -1,46 +0,0 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
|
||||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
hardware.amdHybridGraphics.disable = lib.mkOption {
|
||||
default = false;
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Completely disable the AMD graphics card and use the
|
||||
integrated graphics processor instead.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
###### implementation
|
||||
|
||||
config = lib.mkIf config.hardware.amdHybridGraphics.disable {
|
||||
systemd.services."amd-hybrid-graphics" = {
|
||||
path = [ pkgs.bash ];
|
||||
description = "Disable AMD Card";
|
||||
after = [ "sys-kernel-debug.mount" ];
|
||||
before = [ "systemd-vconsole-setup.service" "display-manager.service" ];
|
||||
requires = [ "sys-kernel-debug.mount" "vgaswitcheroo.path" ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
ExecStart = "${pkgs.bash}/bin/sh -c 'echo -e \"IGD\\nOFF\" > /sys/kernel/debug/vgaswitcheroo/switch'";
|
||||
ExecStop = "${pkgs.bash}/bin/sh -c 'echo ON >/sys/kernel/debug/vgaswitcheroo/switch'";
|
||||
};
|
||||
};
|
||||
systemd.paths."vgaswitcheroo" = {
|
||||
pathConfig = {
|
||||
PathExists = "/sys/kernel/debug/vgaswitcheroo/switch";
|
||||
Unit = "amd-hybrid-graphics.service";
|
||||
};
|
||||
wantedBy = ["multi-user.target"];
|
||||
};
|
||||
};
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user