Solution for freezing when revealing cards

I’ve been experiencing issues similar to those described in the following topics:

  • Sporadic Freezing When Revealing Card with Image
  • Next Anki Card Not Displaying

The problems began after I upgraded my GPU from an AMD model to an NVIDIA GeForce RTX 4060Ti. I encountered no such issues with the AMD GPU. However, after the switch to NVIDIA, these problems started. I searched through various forums, including here, for a solution and tried everything suggested. Changing the ‘video driver’ in the Settings to anything other than Direct3D can solve the issue but results in slower performance when adding or editing cards. So, I switched back to Direct3D and use Anki Desktop exclusively for adding or editing, while using AnkiMobile for studying.

However, after adjusting the settings in the NVIDIA Control Panel for a game (and out of curiosity, setting it as the global setting instead of just for the game), I noticed that the problems with Anki disappeared when I reopened it later. Therefore, I believe that adjusting these settings solved the problem.

After experimenting with various adjustments, I finally discovered that setting the ‘Power management mode’ to ‘Prefer maximum performance’ (without it necessarily being a global setting) is the solution. This adjustment keeps the GPU clock running at its maximum speed constantly while Anki is in use, which, I suppose, consequently solves the problem.

3 Likes

Thank you for posting!

[Adding links for tracing]

2 Likes

Thank you for sharing this method. It does seem to reduce the frequency of the delay occurring but I have not tested much. If I found anything noteworthy, I will post it here.

1 Like

I’ve been experimenting with the NVIDIA application to monitor performance stats while using Anki Desktop and created this graph to visualise the data.

The graph shows numerous sudden spikes where the frame rate sharply increases when flipping a card or going to next card, followed by moments where it appears to drop to zero. I’m not an expert, but I’m curious about what these patterns might indicate. Could these peaks be causing performance issues, such as monitor freezing or frame tearing?

Rendering is handled by the web/graphics toolkit Anki is built on, so this is not something we have control over I’m afraid.

Thank you for the clarification. I’ve come across information suggesting that this issue might be related to Chromium-based technologies. As you said, it appears that this problem is not exclusive to Anki but affects Chromium-based browsers too. For instance, I had to switch the ANGLE graphics backend in edge://flags from ‘default’ to ‘OpenGL’ to fix image tearing while playing videos. So, it seems those of us using NVIDIA might have to wait for a bug fix patiently. In the meantime, setting the option to ‘Prefer maximum performance’ seems to be the best workaround available.

I think we need to find a way to reproduce the problem, so we can report the bug. I also believe that it is caused by NVIDIA driver and Chromium. Although many applications based on Electron do not have this problem.

P.S. Does Ankimobile use WebKit? because I never experience weird delay on iOS. If it is, this might be specific to Chromium?

Yes, AnkiMobile uses Safari’s rendering engine, as all iOS apps have to.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.