I now switched to Wayland (more precisely, the swaywm). There seem some issues of TeXmacs under Wayland:
I don’t know why: TeXmacs seems to ignore the environment variable
QT_QPA_PLATFORM. In particular, if I disable XWayland, I can no longer run TeXmacs directly, even after setting
export QT_QPA_PLATFORM=wayland. A workaround: run
texmacs -platform wayland.
I enabled the global scaling in swaywm (so that I do not have to set HiDPI for every app). It seems to me that the TeXmacs rendering is then blurry (the menu is however sharp, after setting