Electron apps are blurry in multi-monitor setups depending on virtual layout of monitors
Affected version
OS | Arch 6.5.6-zen2-1-zen (Oct 11, 2023) |
gnome-shell version | 45.0 |
display server protocol | Wayland |
extensions disabled? | yes |
Bug summary
Given one monitor with fractional scaling enabled and another monitor without scaling enabled, electron apps are blurry at launch depending on the virtual layout of the monitors.
In particular, I have two monitors: a 4K monitor with fractional scaling enabled ("Monitor S") and a 1080p monitor without any scaling enabled ("Monitor NS"). When Monitor S is position to the left of or above Monitor NS using Gnome display settings, then electron apps are crisp when launched and everything is great.
However, when Monitor S is positioned to the right of or below Monitor NS, then Electron apps are initially blurry when launched even when the appropriate flag is set (--ozone-platform-hint=auto
). This can be fixed by either reloading the window within electron or changing the virtual layout of the monitors.
tl;dr
Good layouts Bad layouts
-- -- -- -- NS --
-- S NS NS S --
-- NS -- -- -- --
Steps to reproduce
To produce blurry text (and then fix it):
- Arrange monitors into a "bad" layout using Gnome's display settings (e.g., no-scaling monitor left of fractional scaling monitor).
- Launch an electron app with flag
--ozone-platform-hint=auto
(tested with VSCode and Obsidian). [Text is blurry.] - [Optional] Rearrange the monitors to a "bad" layout using Gnome's display settings. [Text remains blurry.]
- Rearrange the monitors to a "good" layout using Gnome's display settings. [Text is now crisp!]
- Undo the rearrangements using Gnome's display settings. [Text remains crisp!]
Alternatively, this can be temporarily fixed by reloading the electron app. (In VSCode, launch the command palette and type "reload window"; in Obsidian, use ctrl-r.)
To produce crisp text:
- Arrange monitors into a "good" layout Gnome's display settings (e.g., no-scaling monitor right of fractional scaling monitor).
- Launch an electron app with flag
--ozone-platform-hint=auto
(tested with VSCode and Obsidian). [Text is crisp!]
What happened
Electron app blurry despite appropriate flag set.
What did you expect to happen
Electron app should be crisp.
Relevant logs, screenshots, screencasts etc.
n/a