Bug? Unexpected re-display of previous card

Sometimes when I complete a card, its front side unexpectedly displays again even though Anki has internally advanced to another card (as evidenced by the audio that I hear and the “show answer” behavior). So it’s basically a display glitch.

This odd behavior has been happening occasionally and unpredictably, maybe around 5% of the time, since I upgraded to 2.1.66. Any ideas?

Note, I found a way to update the display (to show the correct card), by double-clicking on the card.

Anki 2.1.66 (70506aeb) Python 3.9.15 Qt 6.5.2 PyQt 6.5.2
Platform: Windows-10-10.0.22621
Flags: frz=True ao=False sv=3
Add-ons, last update check: 2023-10-04 22:09:30


===Add-ons (active)===
(add-on provided name [Add-on folder, installed at, version, is config changed])


===IDs of active AnkiWeb add-ons===


===Add-ons (inactive)===
(add-on provided name [Add-on folder, installed at, version, is config changed])
'' ['brett', 0, 'None', '']
HyperTTS - Add speech to your flashcards ['111623432', 2023-08-30T21:32, 'None', mod]
Language Tools - Learn Foreign Languages with Anki ['771677663', 2023-07-01T18:38, 'None', mod]
1 Like

Try to change a video driver in Anki settings.

I’ve encountered this issue for several times too. However I haven’t use Anki these days so I’m not sure whether it’s fixed in newer version.

This may help:

The next release will have an option to change the video driver in the preferences.

1 Like

Thanks @abdo, I tried the troubleshooting steps suggested by @dae in that other thread and based on very limited testing, the first option (opengl) looks promising. Here is the startup text.

C:\Users\brett>set QSG_INFO=1 C:\Users\brett>cd C:\Users\brett\AppData\Local\Programs\Anki C:\Users\brett\AppData\Local\Programs\Anki>anki C:\Users\brett\AppData\Local\Programs\Anki>Anki starting... Initial setup... Running with temporary Qt5 compatibility shims. Run with DISABLE_QT5_COMPAT=1 to confirm compatibility with Qt6. Preparing to run... Starting main loop... Qt debug: FLIP_* swapchain supported = true, ALLOW_TEARING supported = true Qt debug: Default swap effect: FLIP_DISCARD Qt debug: Adapter 0: 'AMD Radeon(TM) Graphics' (vendor 0x1002 device 0x164C flags 0x0) Qt debug: using this adapter Qt debug: Adapter 1: 'Microsoft Basic Render Driver' (vendor 0x1414 device 0x8C flags 0x2) Qt debug: rhi texture atlas dimensions: 512x512 Qt debug: rhi texture atlas dimensions: 512x512 Qt debug: rhi texture atlas dimensions: 512x512
(then I closed Anki before running more commands)

C:\Users\brett\AppData\Local\Programs\Anki>set QSG_RHI_BACKEND=opengl C:\Users\brett\AppData\Local\Programs\Anki>anki C:\Users\brett\AppData\Local\Programs\Anki>Anki starting... Initial setup... Running with temporary Qt5 compatibility shims. Run with DISABLE_QT5_COMPAT=1 to confirm compatibility with Qt6. Preparing to run... Starting main loop... Qt debug: Created OpenGL context QSurfaceFormat(version 4.6, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 32, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8, samples 0, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 1, colorSpace QColorSpace(), profile QSurfaceFormat::CompatibilityProfile) Qt debug: OpenGL VENDOR: ATI Technologies Inc. RENDERER: AMD Radeon(TM) Graphics VERSION: 4.6.0 Compatibility Profile Context 22.20.12.220707 Qt debug: rhi texture atlas dimensions: 512x512 Qt debug: rhi texture atlas dimensions: 512x512 Qt debug: rhi texture atlas dimensions: 512x512

Then I studied 30 cards without any problems. It looks promising. I will try it some more tomorrow. Thanks!

1 Like

Edit: After 2+ months struggling with this problem, I reverted to the QT5 version. It was the only way to make it go away AND retain the performance of previous versions of Anki.

QT6 + OpenGL rendering simply does not work properly with my RTX 3060 which is surprising considering it’s not an antiquated or integrated GPU and the drivers are kept up to date for other reasons.

QT6 + Software rendering is not good enough because I start seeing confusing button delays in that mode.

With more testing, I find that the “opengl” setting competely fixes the problem, and it also corrects another issue (that I just noticed today) of cards displaying incorrectly in the browser.

Aside from awaiting the next version, how can I make sure my Anki always uses “opengl”? I think there might be a configuration file or registry setting where I can specify this. Thanks!

Once configured in the preferences, it will keep using what you’ve chosen.

I haven’t found the video driver option in the preferences, and @abdo implied that it won’t be available until the next release. Can you please clarify where to find it? Thanks!

You can add it to a batch file. An example is shown here: Text Size - Anki Manual

1 Like

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