Page MenuHome

Optix render kernels constantly reloading on Linux
Closed, ResolvedPublic


System Information
Operating system: Ubuntu 19.10
Graphics card: 2x2080ti (v440.44, CUDA 10.2)

Blender Version
Broken: 2.81a Linux
Worked: 2.81a Windows

Switching between Cycles and any other render mode, then back to Cycles (GPU), triggers a lengthy reload of render kernels (several minutes)

Works fine on Windows 10

Exact steps for others to reproduce the error

Using a computer with an RTX GPU

  1. Switch to Cycles (GPU) mode with OptiX enabled in settings
  2. Switch back to Solid
  3. Switch back to Cycles

... and so on

Note that the render kernels are re-loaded in each time and that it takes a long time (more than one minute each time)

Based on the default startup or an attached .blend file (as simple as possible).

Event Timeline

When I disable OptiX in settings, the problem goes away

Germano Cavalcante (mano-wii) changed the task status from Needs Triage to Needs Information from User.Tue, Jan 14, 2:18 PM

@Christopher Burns (christopher.burns), can you update the description and add the steps to reproduce the problem (including: enable OptiX)?

I don't have an Nvidia card to test.

@Patrick Mours (pmoursnv), is this something you can confirm?

From what I could understand, the steps to reproduce the problem are:

  • enable OptiX.
  • with the engine cycles, switch between rendered and any other render mode.
  • note this triggers a lengthy reload of render kernels.

I don't know if this is a known limitation.

Render kernels being reloaded when switching settings is normal, this happens with all APIs. The OptiX kernels are cached though, to avoid that taking a long time: On Windows in %LOCALAPPDATA%\NVIDIA\OptixCache, on Linux in /var/tmp/OptixCache_$USER.
Make sure this is the case. If not, try overriding the cache path with an environment variable called OPTIX_CACHE_PATH.

@Patrick Mours (pmoursnv) I do see a 40MB cache7.db file in /var/tmp/OptixCache_chris, but the problem persists

Germano Cavalcante (mano-wii) changed the task status from Needs Information from User to Needs Triage.Tue, Jan 14, 9:42 PM
Brecht Van Lommel (brecht) renamed this task from Render kernels constantly reloading, taking a long time to Optix render kernels constantly reloading on Linux.Sat, Jan 18, 5:39 PM

You can run Blender with --debug-cycles which should print a bunch of OptiX debug info to the console and contain information about whether caching was succesfull or not.

W0120 08:39:19.912971 26901 device_optix.cpp:242] Failed to search the cache. file is not a database
Statement is SELECT size, value FROM cache_info INNER JOIN cache_data ON cache_info.key=cache_data.key WHERE cache_info.key='ptx-7258589-> > key0777dac09f5fa2654d1e18a439740e29-sm_75-rtc1-drv440.44' LIMIT 1;
I0120 08:39:19.912991 26901 device_optix.cpp:245] Cache miss for key: ptx-7258589-key0777dac09f5fa2654d1e18a439740e29-sm_75-rtc1-drv440.44
W0120 08:40:32.332262 26901 device_optix.cpp:242] Could not query the database size: file is not a database

Deleting the cache.db file seems to have resolved the issue. I'm running multiple blender versions (2.81, 2.82, 2.83), if that matters

Patrick Mours (pmoursnv) closed this task as Resolved.Mon, Jan 20, 5:54 PM
Patrick Mours (pmoursnv) claimed this task.

It's generally good practice to delete the cache when updating drivers. Your cache got corrupted for some reason (could have been a driver update that changed the format, or just an incomplete write because an OptiX app crashed, ...). Either way, this is not a Blender bug, but rather related to how caching works in OptiX itself.
Glad to hear it is resolved now, so closing this. Let me know if you run into issues again in the future.

Blender should just delete the cache if it's corrupt or unreadable for any reason

Maybe I should have clarified this before: The cache is not created by Blender. It is created an managed by OptiX (for all OptiX applications).
Blender doesn't now if it is corrupt or not (which by itself is an unlikely event, you just got really unfortunate here). There being a cache is opaque and hidden behind the OptiX API. Blender cannot and should not do anything about it.