390.25 nvidia-modeset Freed GPU/Allocated GPU

I receive this message constantly through dmesg. This began after updating to 390.25 and now spams my logs. It typically only shows after loading chromium or something that is more GPU bound. So, is this normal occurence, why now showing but not before? I am running PRIME so why is it freeing/allocating when I am solely NVIDIA driver?

[   15.437043] nvidia-modeset: Freed GPU:0 (GPU-b909bbcf-2700-dce3-c390-11d51818c438) @ PCI:0000:01:00.0
[   17.054789] nvidia-modeset: Allocated GPU:0 (GPU-b909bbcf-2700-dce3-c390-11d51818c438) @ PCI:0000:01:00.0

It prints those messages every time the nvidia-modeset driver sets up or tears down a GPU. If you weren’t seeing them as much before, it’s probably because something else in the system was keeping the GPU initialized.

The driver uninitializes the GPU when there are no clients in order to make it possible to unload the driver. If you don’t need to do that, then you can use nvidia-persistenced to keep the GPU initialized all the time.

aplattner, I think there’s a little more to this, it’s a bit of a log spill. Previously, the driver would behave like you said but now it’s printing the Allocated/Freed message whenever something uses the gpu. Just start chrome:

[ 2873.798005] nvidia-modeset: Allocated GPU:0 (GPU-914efa6a-c839-2f7e-0f43-6fc46e48b89a) @ PCI:0000:07:00.0
[ 2873.798335] nvidia-modeset: Freed GPU:0 (GPU-914efa6a-c839-2f7e-0f43-6fc46e48b89a) @ PCI:0000:07:00.0

Note that chrome is just started and still running. The Freed message comes instantly after the Allocated message. Nothing to worry about but a bit of an annoyance while looking for other messages in dmesg.

It still shows up just the same even with nvidia-persistenced enabled. I have tested with and without.

$ sudo systemctl status nvidia-persistenced
● nvidia-persistenced.service - NVIDIA Persistence Daemon
   Loaded: loaded (/usr/lib/systemd/system/nvidia-persistenced.service; enabled; vendor preset: disabled)
   Active: active (running) since Thu 2018-03-01 17:10:01 JST; 1min 36s ago
  Process: 601 ExecStart=/usr/bin/nvidia-persistenced --user nvidia-persistenced (code=exited, status=0/SUCCESS)
 Main PID: 609 (nvidia-persiste)
    Tasks: 1 (limit: 4915)
   CGroup: /system.slice/nvidia-persistenced.service
           └─609 /usr/bin/nvidia-persistenced --user nvidia-persistenced

Mar 01 17:10:01 xmg nvidia-persistenced[609]: Started (609)
Mar 01 17:10:01 xmg systemd[1]: Starting NVIDIA Persistence Daemon...
Mar 01 17:10:01 xmg systemd[1]: Started NVIDIA Persistence Daemon.

Mar 01 17:11:24 xmg kernel: nvidia-modeset: Allocated GPU:0 (GPU-b909bbcf-2700-dce3-c390-11d51818c438) @ PCI:0000:01:00.0
Mar 01 17:11:24 xmg kernel: nvidia-modeset: Freed GPU:0 (GPU-b909bbcf-2700-dce3-c390-11d51818c438) @ PCI:0000:01:00.0

That does seem weird. Could you please run nvidia-bug-report.sh and attach the resulting log to your post?

Updated with file attachment.
nvidia-bug-report.log.gz (111 KB)
nvidia-bug-report.log (383 KB)

Scanning kernel log files for NVIDIA kernel messages:

  journalctl -b -0:
Mar 03 11:24:03 xmg kernel: Command line: BOOT_IMAGE=/boot/vmlinuz-4.15-x86_64 root=UUID=cda697d2-be1f-4109-93bc-7462bd231fb9 rw acpi_osi= fsck.mode=force fsck.repair=yes net.ifnames=0 biosdevname=0 nvidia-drm.modeset=1 i915.modeset=1 hpet=disable clocksource=tsc tsc=reliable usbcore.autosuspend=-1 intel_idle.max_cstate=1 processor.max_cstate=1 nowatchdog rd.udev.log-priority=3
Mar 03 11:24:03 xmg kernel: Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.15-x86_64 root=UUID=cda697d2-be1f-4109-93bc-7462bd231fb9 rw acpi_osi= fsck.mode=force fsck.repair=yes net.ifnames=0 biosdevname=0 nvidia-drm.modeset=1 i915.modeset=1 hpet=disable clocksource=tsc tsc=reliable usbcore.autosuspend=-1 intel_idle.max_cstate=1 processor.max_cstate=1 nowatchdog rd.udev.log-priority=3
Mar 03 11:24:03 xmg kernel: nvidia-nvlink: Nvlink Core is being initialized, major device number 243
Mar 03 11:24:03 xmg kernel: NVRM: loading NVIDIA UNIX x86_64 Kernel Module  390.25  Wed Jan 24 20:02:43 PST 2018 (using threaded interrupts)
Mar 03 11:24:03 xmg kernel: nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  390.25  Wed Jan 24 19:29:37 PST 2018
Mar 03 11:24:03 xmg kernel: nvidia-uvm: Loaded the UVM driver in 8 mode, major device number 242
Mar 03 11:24:03 xmg kernel: [drm] [nvidia-drm] [GPU ID 0x00000100] Loading driver
Mar 03 11:24:03 xmg kernel: nvidia-modeset: Allocated GPU:0 (GPU-b909bbcf-2700-dce3-c390-11d51818c438) @ PCI:0000:01:00.0
Mar 03 11:24:03 xmg kernel: nvidia-modeset: Freed GPU:0 (GPU-b909bbcf-2700-dce3-c390-11d51818c438) @ PCI:0000:01:00.0
Mar 03 11:24:03 xmg kernel: [drm] Initialized nvidia-drm 0.0.0 20160202 for 0000:01:00.0 on minor 1
Mar 03 11:24:05 xmg nvidia-persistenced[639]: Started (639)
Mar 03 11:24:05 xmg kernel: nvidia-modeset: Allocated GPU:0 (GPU-b909bbcf-2700-dce3-c390-11d51818c438) @ PCI:0000:01:00.0
Mar 03 11:24:05 xmg kernel: nvidia-modeset: Freed GPU:0 (GPU-b909bbcf-2700-dce3-c390-11d51818c438) @ PCI:0000:01:00.0
Mar 03 11:24:05 xmg kernel: nvidia-modeset: Allocated GPU:0 (GPU-b909bbcf-2700-dce3-c390-11d51818c438) @ PCI:0000:01:00.0
Mar 03 11:24:05 xmg kernel: nvidia-modeset: Freed GPU:0 (GPU-b909bbcf-2700-dce3-c390-11d51818c438) @ PCI:0000:01:00.0
Mar 03 11:24:05 xmg kernel: nvidia-modeset: Allocated GPU:0 (GPU-b909bbcf-2700-dce3-c390-11d51818c438) @ PCI:0000:01:00.0
Mar 03 11:24:05 xmg kernel: nvidia-modeset: Freed GPU:0 (GPU-b909bbcf-2700-dce3-c390-11d51818c438) @ PCI:0000:01:00.0
Mar 03 11:24:06 xmg kernel: nvidia-modeset: Allocated GPU:0 (GPU-b909bbcf-2700-dce3-c390-11d51818c438) @ PCI:0000:01:00.0
Mar 03 11:24:06 xmg kernel: nvidia-modeset: Freed GPU:0 (GPU-b909bbcf-2700-dce3-c390-11d51818c438) @ PCI:0000:01:00.0
Mar 03 11:24:07 xmg kernel: nvidia-modeset: Allocated GPU:0 (GPU-b909bbcf-2700-dce3-c390-11d51818c438) @ PCI:0000:01:00.0
Mar 03 11:24:07 xmg kernel: nvidia-modeset: Freed GPU:0 (GPU-b909bbcf-2700-dce3-c390-11d51818c438) @ PCI:0000:01:00.0
Mar 03 11:24:11 xmg kernel: nvidia-modeset: Allocated GPU:0 (GPU-b909bbcf-2700-dce3-c390-11d51818c438) @ PCI:0000:01:00.0
Mar 03 11:24:11 xmg kernel: nvidia-modeset: Freed GPU:0 (GPU-b909bbcf-2700-dce3-c390-11d51818c438) @ PCI:0000:01:00.0
Mar 03 11:28:22 xmg kernel: nvidia-modeset: Allocated GPU:0 (GPU-b909bbcf-2700-dce3-c390-11d51818c438) @ PCI:0000:01:00.0
Mar 03 11:28:22 xmg kernel: nvidia-modeset: Freed GPU:0 (GPU-b909bbcf-2700-dce3-c390-11d51818c438) @ PCI:0000:01:00.0
Mar 03 11:28:48 xmg sudo[2401]:     ryan : TTY=pts/2 ; PWD=/home/ryan ; USER=root ; COMMAND=/usr/bin/nvidia-bug-report.sh

I have the exact same problem while running Chrome (Version 65.0.3325.181 (Official Build) (64-bit)
) after upgrading from 384.90.

On top of that, the GPU seems to be running much hotter than before. Simply loading whatever in a new tab in Chrome makes the GPU temp jump from 45°C to 55°C. This is really annoying.

Running Antergos (Arch Linux based). Note that I also upgraded Chrome at the same time, so it could also be a change in Chrome. Not sure if it’s related yet.
Driver: 390.48
GeForce GTX 670MX (2 GPU SLI)

I downgraded from 390.48 to 387.34 and I don’t experience the problem anymore.

My GPU doesn’t go above 50°C whenever I open a tab in Chrome, or just switch workspace in i3.

Edit: nevermind, the allocate/deallocate is still happening and showing in system logs…

I just wish we knew a bit more about what’s going on behind the scenes. It’s already frustrating enough to have to use a binary proprietary driver.

Why does nVidia drivers get worse as time goes by? :(

Still, keep up the good work. I can’t fathom how complex this piece of software must be to develop.
nvidia-bug-report.log.gz (355 KB)

Can you attach your bug report so it’s available?

Thanks for reminding me. I’ve attached my bug report above.

I can also confirm that the latest drivers make my GPU much hotter than it used to compared to 387.34. (I have no compositor active, I use i3 window manager only, and Chrome, and Force [Full] Composition Pipeline are always off.