Anki window appearance is broken on certain linux window managers.

djakab314's Avatar


10 May, 2020 01:06 PM

I have recently upgraded to 2.1.23, (I know that there are newer versions but they break half of my addons) and the anki window started looking completely broken with the i3 window manager. I have attached some example screenshots. The issues also persist if I turn off all addons or if I upgrade to 2.1.26. The interesting thing is that anki looks fine if I run it with gnome, gnome is good at forcing its will onto everything under the sun. Can this be some sort of qt/gtk issue? I tried switching the themes but It had no effect at all on anki.

  1. Support Staff 1 Posted by Damien Elmes on 11 May, 2020 08:54 AM

    Damien Elmes's Avatar

    Did you adjust the user interface size in the preferences screen to something other than 100%? If so, please try changing it back.

  2. 2 Posted by djakab314 on 11 May, 2020 10:06 AM

    djakab314's Avatar

    No, that's still at 100%, I didn't touch it. I even tried removing my anki folder from .local and the problem still wasn't fixed, so it's not an issue with my settings. However, meanwhile I tried anki 2.1.23 on another computer I have, also using i3 and mostly the same environment in general, and it worked fine. The problem is probably with the environment I'm running anki in, but I have no idea how to figure out what exactly is causing it.

  3. Support Staff 3 Posted by Damien Elmes on 11 May, 2020 10:15 AM

    Damien Elmes's Avatar

    I'm afraid I don't know what would be causing it - maybe the Qt theme, or some environmental variable perhaps.

  4. 4 Posted by otakutyrant on 12 May, 2020 08:19 AM

    otakutyrant's Avatar

    I encountered this break too! I didn't touch anything but just upgrading my arch linux system including Anki. Then suddenly the appearance broke as djakab314. Below is my current version. By the way I use i3 too.

    Version 2.1.26 (arch-linux-2.1.26-1)
    Python 3.8.2 Qt 5.14.2 PyQt 5.14.2

    I tried to downgrade Anki, but it complained that I cannot open my collection again:

    Anki was unable to open your collection file. If problems persist after restarting your computer, please use the Open Backup button in the profile manager.
    Debug info:
    Traceback (most recent call last):
      File "/usr/share/anki/aqt/", line 340, in loadCollection
        return self._loadCollection()
      File "/usr/share/anki/aqt/", line 365, in _loadCollection
        self.col = Collection(cpath, log=True)
      File "/usr/share/anki/anki/", line 40, in Collection
        col = _Collection(db, server, log)
      File "/usr/share/anki/anki/", line 68, in __init__
      File "/usr/share/anki/anki/", line 144, in load
        self.conf = json.loads(self.conf)
      File "/usr/lib/python3.8/json/", line 357, in loads
        return _default_decoder.decode(s)
      File "/usr/lib/python3.8/json/", line 337, in decode
        obj, end = self.raw_decode(s, idx=_w(s, 0).end())
      File "/usr/lib/python3.8/json/", line 355, in raw_decode
        raise JSONDecodeError("Expecting value", s, err.value) from None
    json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
  5. 5 Posted by otakutyrant on 12 May, 2020 08:36 AM

    otakutyrant's Avatar

    I upgraded Anki from 2.1.23-1 to 2.1.26-1 at [2020-05-11T23:44:59+0800], and I opened Anki and discovered this break at 2020-05-12 15:00:00 thereabouts.

    I tried to downgraded Anki from 2.1.26-1 to 2.1.23-1, but the break still exists! Then Downgraded to 2.1.15-1, the UI become normal but then I cannot open any backups produced after 2020-05-07. I cannot endure this loss of recent days.

  6. 6 Posted by djakab314 on 12 May, 2020 10:10 AM

    djakab314's Avatar

    For me, it looks like the problem disappeared after I installed kde, even though I don't actually use kde. Maybe it installed something that makes qt behave properly, I have no idea.

  7. Support Staff 7 Posted by Damien Elmes on 12 May, 2020 10:28 AM

    Damien Elmes's Avatar

    Regarding the error, please see the top of

  8. 8 Posted by otakutyrant on 12 May, 2020 10:42 AM

    otakutyrant's Avatar

    I find a temporary solution: downgrade to 2.1.15, use any backup that work, then forcefully sycn from the web.

    It seems that I have to freeze the version forever.

  9. 9 Posted by otakutyrant on 12 May, 2020 10:52 AM

    otakutyrant's Avatar

    @Damien Elmes You are takling about a situation that someone upgrade to the latest version and cannot open a collection that comes from the older version. But my question is that I downgraded to 2.1.15 and cannot open any collection that comes from the newer version and there is not such a "Downgrade & Quit" button too while the current version is 2.1.15. However, I have opened the older backup and forcefully sycn from the web successfully. Now, no probem but the broken UI in the latest version that make I have to freeze the version in 2.1.15.

  10. 10 Posted by addons_zz on 12 May, 2020 04:30 PM

    addons_zz's Avatar

    @dae did Qt or something else changed version since version 2.1.15?

    @otakutyrant, can you look into and try changing a few things like: (one at a time)

    2. ANKI_WEBSCALE=1.1
    4. ANKI_WEBSCALE=0.9
    5. echo auto > %APPDATA%\Anki2\gldriver
    6. echo angle > %APPDATA%\Anki2\gldriver
    7. echo software > %APPDATA%\Anki2\gldriver
  11. Support Staff 11 Posted by Damien Elmes on 13 May, 2020 08:11 AM

    Damien Elmes's Avatar

    otaku: no, I am not - please read the warning again.

    addons: yes, Qt was updated to 5.14.

  12. 12 Posted by otakutyrant on 13 May, 2020 08:28 AM

    otakutyrant's Avatar

    `ANKI_NOHIGHDPI=1` makes UI normal.

    `ANKI_WEBSCALE=0.5` makes some fonts smaller, but menu are still broken. See the attached file.

    my gldriver default value is auto, and `angle` or ` software` seems does not fix the broken UI.

  13. 13 Posted by otakutyrant on 13 May, 2020 08:29 AM

    otakutyrant's Avatar

    @Damien Elmes Oh, I mistook the warning.

  14. 14 Posted by addons_zz on 13 May, 2020 08:31 PM

    addons_zz's Avatar

    ANKI_NOHIGHDPI=1 makes UI normal.

    By normal you mean it fixed the problem?

  15. 15 Posted by otakutyrant on 14 May, 2020 03:33 AM

    otakutyrant's Avatar



  16. 16 Posted by addons_zz on 14 May, 2020 03:30 PM

    addons_zz's Avatar

    @otakutyrant Then, you could report this to QT as a bug on QT High DPI support on your Linux Distribution:

  17. 17 Posted by otakutyrant on 14 May, 2020 05:40 PM

    otakutyrant's Avatar

    For those who have the same problem as me, here is the bug report:

  18. Support Staff 18 Posted by Damien Elmes on 14 May, 2020 11:47 PM

    Damien Elmes's Avatar

    While well intentioned, I'm afraid I don't think the Qt developers will be able to do anything with that report. For it to be a useful report, the issue needs to be reproduced outside of Anki, preferably with one of the Qt sample apps.

    addons_zz: I don't think we can expect the typical user to be able to do that, so unless you feel like digging into this yourself, I think pointing users to the Qt issue tracker is just going to irritate the Qt folks.

  19. 19 Posted by jrkes on 16 May, 2020 01:54 AM

    jrkes's Avatar

    Arch user here too. Launching anki from the terminal with:


    fixes the problem. I made an alias to use for the time being.

Comments are closed, but you can start a new discussion.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac