Last active
January 13, 2022 14:29
-
-
Save afreakk/1df21c564be3250579b8ed27dda10ad7 to your computer and use it in GitHub Desktop.
workaround for nvidia dbus errors for nix https://forums.developer.nvidia.com/t/bug-nvidia-v495-29-05-driver-spamming-dbus-enabled-applications-with-invalid-messages/192892/36
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ config, pkgs, ... }: | |
let | |
busName = "nvidia.powerd.server"; | |
userName = "messagebus"; | |
nvidiaBlackHole = pkgs.writeTextFile { | |
name = "nvidiaBlackHole"; | |
destination = "/etc/dbus-1/system.d/nvidia-fake-powerd.conf"; | |
text = '' | |
<!DOCTYPE busconfig PUBLIC | |
"-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN" | |
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"> | |
<busconfig> | |
<policy user="${userName}"> | |
<allow own="${busName}"/> | |
</policy> | |
<policy context="default"> | |
<allow send_destination="${busName}"/> | |
<allow receive_sender="${busName}"/> | |
</policy> | |
</busconfig> | |
'';}; | |
in | |
{ | |
services.dbus.packages = [nvidiaBlackHole]; | |
systemd.services.nvidiaBlackHole = { | |
wantedBy = [ "default.target" ]; | |
aliases = ["dbus-nvidia.fake-powerd.service"]; | |
serviceConfig = { | |
Type = "dbus"; | |
BusName = busName; | |
ExecStart = "${pkgs.dbus}/bin/dbus-test-tool black-hole --system --name=${busName}"; | |
User = userName; | |
Group = userName; | |
LimitNPROC=2; | |
ProtectHome=true; | |
ProtectSystem="full"; | |
}; | |
}; | |
} |
@danyeet did you reboot after activating ?
I had to reboot after activating for the service to eat up the dbus spam.
But cool to know coming soon NixOS/nixpkgs#154660
Yup when I run dbus-montior it still gets bombarded with messages.
@danyeet
Ah, yeah, I dont think this service was supposed to fix that.
Only keep it from spamming journald with errors.
I also get spam from sudo dbus-monitor --system
Ah I see - well I misunderstood the assignment haha.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
That doesn't seem to fix it for me - that said the new beta driver should be merged soon.