Logo Blog

Fix sound cutting off randomly (Nvidia GPU)

I had issues with my sound cutting off randomly, the only solution I found was locking the GPU memory frequency.

To see the available frequencies of your specific GPU run:

nvidia-smi --query-supported-clocks=memory
memory [MHz]
15001 MHz
14801 MHz
7001 MHz
810 MHz
405 MHz

You proably want to chose the highest one and then lock it with the next command. For my GPU I chose 15001 MHz.

nvidia-smi --lock-memory-clocks=15001

I hope this fixes the issue for you.

This however will not be persisted and would be lost when rebooting. To persist this change you can modify the systemd config:

systemctl edit nvidia-persistenced.service

And put the following lines after Anything between here and the comment below will become the contents of the drop-in file:

[Service]
ExecStartPost=/usr/bin/nvidia-smi --lock-memory-clocks=15001

Save the file, reload or enable the service:

systemctl enable nvidia-persistenced.service

To check if the change was persisted, reboot and run:

nvidia-smi -q -d CLOCK

Check if Clocks > Memory entry is set to the value you chose earlier (ignore the Max Clocks entry).

GPU 00000000:01:00.0
    Clocks
        Graphics                                       : 2640 MHz
        SM                                             : 2640 MHz
        Memory                                         : 15001 MHz