mynix: work around secondary gpu reset
Signed-off-by: Myned <dev@bjork.tech>
This commit is contained in:
parent
1346b1ca63
commit
cdf117daa2
2 changed files with 11 additions and 82 deletions
|
@ -1,4 +1,4 @@
|
||||||
{
|
{config, ...}: {
|
||||||
imports = [
|
imports = [
|
||||||
./disko.nix
|
./disko.nix
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
@ -22,7 +22,7 @@
|
||||||
intel = true;
|
intel = true;
|
||||||
node = "pci_0000_03_00_0";
|
node = "pci_0000_03_00_0";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
|
@ -46,85 +46,14 @@
|
||||||
# `- \`_`"'-
|
# `- \`_`"'-
|
||||||
#// services.logind.powerKey = "ignore"; # Disable power button
|
#// services.logind.powerKey = "ignore"; # Disable power button
|
||||||
|
|
||||||
# Mount external drives on boot
|
home-manager.users.${config.custom.username} = {
|
||||||
fileSystems = {
|
# Prevent secondary GPU reset from crashing window manager
|
||||||
"/mnt/gayme" = {
|
wayland.windowManager.hyprland.settings = {
|
||||||
device = "/dev/disk/by-label/gayme";
|
monitor = [
|
||||||
options = [
|
"HDMI-A-1, disable"
|
||||||
"noatime"
|
"HDMI-A-2, disable"
|
||||||
"nofail"
|
"HDMI-A-3, disable"
|
||||||
"users"
|
|
||||||
"exec"
|
|
||||||
"x-gvfs-show"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
"/mnt/gaymer" = {
|
|
||||||
device = "/dev/disk/by-label/gaymer";
|
|
||||||
options = [
|
|
||||||
"noatime"
|
|
||||||
"nofail"
|
|
||||||
"users"
|
|
||||||
"exec"
|
|
||||||
"x-gvfs-show"
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Set mount directory permissions
|
|
||||||
#?? TYPE PATH MODE USER GROUP AGE ARGUMENT
|
|
||||||
systemd.tmpfiles.rules = [
|
|
||||||
"z /mnt/gayme 0755 myned users"
|
|
||||||
"z /mnt/gaymer 0755 myned users"
|
|
||||||
];
|
|
||||||
|
|
||||||
# BUG: "manual" profile is the same as "auto" with kernel 6.10
|
|
||||||
# TODO: Remove when Linux 6.12 is released
|
|
||||||
# https://gitlab.freedesktop.org/agd5f/linux/-/commit/ec1aab7816b06c32f42935e34ce3a3040c778afb
|
|
||||||
# Work around performance issues with AMD power scaling
|
|
||||||
# https://wiki.archlinux.org/title/AMDGPU#Screen_artifacts_and_frequency_problem
|
|
||||||
# https://wiki.archlinux.org/title/AMDGPU#Power_profiles
|
|
||||||
#!! cardX must match the correct gpu
|
|
||||||
#?? lspci
|
|
||||||
#?? ls -l /dev/dri/by-path/*-card
|
|
||||||
#?? grep '*' /sys/class/drm/card*/device/pp_power_profile_mode
|
|
||||||
services.udev.extraRules = ''
|
|
||||||
SUBSYSTEM=="drm", KERNEL=="card1", DRIVERS=="amdgpu", ATTR{device/power_dpm_force_performance_level}="manual", ATTR{device/pp_power_profile_mode}="1"
|
|
||||||
'';
|
|
||||||
|
|
||||||
# https://github.com/Zygo/bees
|
|
||||||
# Deduplicate entire filesystem
|
|
||||||
#?? Optimal for ~1TB total disk space
|
|
||||||
# https://github.com/Zygo/bees/blob/master/docs/config.md#hash-table-sizing
|
|
||||||
# services.beesd.filesystems.root = {
|
|
||||||
# spec = "/";
|
|
||||||
# verbosity = "err";
|
|
||||||
# extraOptions = [ "--loadavg-target" "5" ]; # Reduce threads on ~5% total processor load
|
|
||||||
# };
|
|
||||||
|
|
||||||
# Periodically upload current wallpaper to remote server
|
|
||||||
# systemd.user = {
|
|
||||||
# services."wallpaper" = {
|
|
||||||
# path = with pkgs; [
|
|
||||||
# openssh
|
|
||||||
# rsync
|
|
||||||
# tailscale
|
|
||||||
# variety
|
|
||||||
# ];
|
|
||||||
|
|
||||||
# #!! Hostname dependent
|
|
||||||
# script = ''
|
|
||||||
# rsync --chown caddy:caddy "$(variety --current)" root@myne:/srv/static/wallpaper.png
|
|
||||||
# '';
|
|
||||||
# };
|
|
||||||
|
|
||||||
# timers."wallpaper" = {
|
|
||||||
# wantedBy = [ "timers.target" ];
|
|
||||||
|
|
||||||
# timerConfig = {
|
|
||||||
# OnBootSec = "1m";
|
|
||||||
# OnUnitActiveSec = "1m";
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@ in {
|
||||||
|
|
||||||
# https://wiki.hyprland.org/Configuring/Monitors
|
# https://wiki.hyprland.org/Configuring/Monitors
|
||||||
#?? monitor = NAME, RESOLUTION, POSITION, SCALE
|
#?? monitor = NAME, RESOLUTION, POSITION, SCALE
|
||||||
monitor = [
|
monitor = mkBefore [
|
||||||
", highrr, auto, ${toString config.custom.scale}"
|
", highrr, auto, ${toString config.custom.scale}"
|
||||||
|
|
||||||
# HACK: Ensure the fallback output has a sane resolution
|
# HACK: Ensure the fallback output has a sane resolution
|
||||||
|
@ -79,7 +79,7 @@ in {
|
||||||
# HACK: Launch hidden GTK windows to reduce startup time
|
# HACK: Launch hidden GTK windows to reduce startup time
|
||||||
"[workspace special:hidden silent] ${loupe}"
|
"[workspace special:hidden silent] ${loupe}"
|
||||||
"[workspace special:hidden silent] ${nautilus}"
|
"[workspace special:hidden silent] ${nautilus}"
|
||||||
]
|
]
|
||||||
++ optionals config.custom.wallpaper [
|
++ optionals config.custom.wallpaper [
|
||||||
"wallpaper"
|
"wallpaper"
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in a new issue