[BUG] NVIDIA v495.29.05 driver spamming dbus-enabled applications with invalid messages

@dzy201415 @ionen @Tatsh FYI: Gentoo incorporated the binary patch with =x11-drivers/nvidia-drivers-495.44-r2 (latest ~amd64)

nvidia-fake-powerd does the job, thank you allā€¦but I assume the spamming of the dbus is still going on in the background which I am not very happy about it. What a strange/silly bug and even stranger to still be present after so many revisions of the driver.
(Running Endeavour OS with 495.44 drivers on a 5950x)

Driver version 495.46 seems to have fixed this issue for me. Can anyone confirm?

A reliable way to check is with dbus-monitor --system (as root), will see something like potentially ~10000 dbus powerd request per second when using OpenGL if the issue still exists.

And unfortunately, this still happens with 495.46. As far as I can tell, 495.46 is just adding support for additional cards and didnā€™t really change anything (its Changelog is mentioning the changes from previous versions ā€“ Iā€™d imagine a bigger release is coming up).

Unless using wayland/GBM, for now I personally recommend to just use 470 production branch (470.93 was newly released and still isnā€™t affected) rather than elaborate workarounds if used distro allows it. But fake-powerd or the binary patch (applies as-is for .46 too) still works (latter still to be done with caution).

2 Likes

You are right, I was running dbus-monitor --system without root and didnā€™t had that spam. With root I can see it as well. Bummer.

It is time for NVIDIA officials to speak up, donā€™t you think ?.. I cannot understand that such a huge flaw is left unfixed for three consecutive releases (and two releases and over one month and a half after I reported this bug).

2 Likes

I can confirm 495.46 spams /var/log/messages with the dbus-daemon messages and causes the kwin_x11 process to be pegged at 100% CPU, whereas 470.74 solves the problem (no messages and kwin_x11 behaves fine).

Iā€™m on Slackware64-current (so no systemd here).

I did not try the ā€œnvidia-fake-powerdā€ solution, as itā€™s easy enough to just revert to the 470 series driver.

Hi, Iā€™m trying your solution, but Iā€™m getting this error on Ubuntu 20.04LTS:

systemctl status nvidia-fake-powerd.service
ā— nvidia-fake-powerd.service - NVIDIA fake powerd service
     Loaded: loaded (/etc/systemd/system/nvidia-fake-powerd.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Thu 2021-12-16 10:11:50 CET; 10s ago
    Process: 375891 ExecStart=/usr/bin/dbus-test-tool black-hole --system --name=nvidia.powerd.server (code=exited, status=217/USER)
   Main PID: 375891 (code=exited, status=217/USER)

pro 16 10:11:50 PC-3090 systemd[1]: Starting NVIDIA fake powerd service...
pro 16 10:11:50 PC-3090 systemd[375891]: nvidia-fake-powerd.service: Failed to determine user credentials: No such process
pro 16 10:11:50 PC-3090 systemd[375891]: nvidia-fake-powerd.service: Failed at step USER spawning /usr/bin/dbus-test-tool: No such process
pro 16 10:11:50 PC-3090 systemd[1]: nvidia-fake-powerd.service: Main process exited, code=exited, status=217/USER
pro 16 10:11:50 PC-3090 systemd[1]: nvidia-fake-powerd.service: Failed with result 'exit-code'.
pro 16 10:11:50 PC-3090 systemd[1]: Failed to start NVIDIA fake powerd service.

Would you know whatā€™s going on? Thanks

There are a couple of issues with Ubuntu that will require some tweaks to the deployment. First, the dbus-test-tool isnā€™t installed by default. For that youā€™ll need to apt install dbus-tests. Next, the system account for dbus is named messagebus. Youā€™ll need to rename the user in both files. The following changes allow it to start within my 20.04 LTS test VM:

/etc/dbus-1/system.d/nvidia-fake-powerd.conf

<!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="messagebus">
                <allow own="nvidia.powerd.server"/>
        </policy>
        <policy context="default">
                <allow send_destination="nvidia.powerd.server"/>
                <allow receive_sender="nvidia.powerd.server"/>
        </policy>
</busconfig>

/etc/systemd/system/nvidia-fake-powerd.service

[Unit]
Description=NVIDIA fake powerd service

[Service]
Type=dbus
BusName=nvidia.powerd.server
ExecStart=/usr/bin/dbus-test-tool black-hole --system --name=nvidia.powerd.server
User=messagebus
Group=messagebus
LimitNPROC=2
ProtectHome=true
ProtectSystem=full

[Install]
WantedBy=default.target
Alias=dbus-nvidia.fake-powerd.service

And of course:

systemctl daemon-reload
systemctl restart nvidia-fake-powerd.service
systemctl status nvidia-fake-powerd.service
3 Likes

Great, thanksā€¦ the user was the problem, I didnā€™t know the name :)

But weird thing is that even after I did config with wrong username, after reboot, the messages didnā€™t appear anymore. Even though the service nvidia-fake-powerd failed to start.
Weird.

The nvidia-fake-powerd didnā€™t solved the issue for me.

Iā€™m on Garuda.

@user97930 That makes sense because it takes time for the dbus message queue to fill up if there is no valid destination to route these messages.

@qumaciel Did you follow the instructions to enable and start the service on boot? Did you also reboot to clear the dbus queue? If the service starts correctly without any errors (systemctl status nvidia-fake-powerd.service), then run dbus-monitor --system as the root user and inspect for errors or post a sample of the output here.

This also fixes an issue with a laggy external display/100% CPU under Xorg when the internal panel is disabled on an NVIDIA-based laptop.

Thanks for the AUR package, it fixed it for me.
In my case it was mostly Google Chrome and KDE spamming the journal with these messages. They didnā€™t explicitly mention nvidia-powerd as the destination - just ā€œ1:29ā€ or similar, but they stopped as soon as I started the nvidia-fake-powerd service.

This also worked for 495.46.

Just a note for other to remember to use one or the other. If you use the AUR, do not manually do this file creation.
I used this method, provided by user16974, and it worked perfectly. Thank you.

1 Like

for nixos, this seems to work to prevent journal spamming atleast: 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 Ā· GitHub

1 Like

How is this reported in October of last year but not even acknowledged? Just noticed dbus-daemon keeps taking up 2.4GB and itā€™s all Nvidia messages.

Report about this on Arch Linux tracker - FS#72903 : [nvidia] dbus spamming

This bug is fixed in the next series, the 510.xx beta changelog mentions it:

  • Fixed a bug which caused OpenGL and Vulkan applications to generate excessive traffic over dbus while attempting to communicate with nvidia-powerd, even though nvidia-powerd was not running.

https://www.nvidia.com/Download/driverResults.aspx/184911/en-us

2 Likes

For me it is not. I disabled the fake service, installed the driver, rebooted and 20 hours later the dbus queue was full and the dbus process consuming over 300mb. Re-enabled the fake service and the full queue spam stopped immediately.