Force a Flatpak app off XWayland so it stops looking blurry
Symptom and blur mechanism (XWayland rendered at 1x then bitmap-scaled) are real, and the fix works, but the stated cause is factually wrong for exactly the apps named. I pulled the live Flathub manifests: com.spotify.Client, com.visualstudio.code, com.google.Chrome, org.signal.Signal and md.obsidian.Obsidian all already declare --socket=wayland (Chrome declares both x11 and wayland, and the others wayland + fallback-x11). So the Wayland socket IS present in the sandbox, and the claimed 'Failed to connect to Wayland display' failure from setting the Ozone hint alone will not happen on these apps. The operative fix is the Ozone hint, not the socket grant. Two smaller gaps: the desktop-entry copy path is only right for system-wide installs (a --user install exports to ~/.local/share/flatpak/exports/share/applications), and --nosocket=fallback-x11 will break apps whose Wayland backend is flaky with no way back. flatpak override --show / --reset / info --show-permissions are all valid.
Revoking x11/fallback-x11 is the step that bites: apps with incomplete Wayland support lose global hotkeys, tray icons, or screen sharing, and some (older Electron builds) will not start at all. Add --nosocket=x11 only after the app is verified working on Wayland, and be ready to flatpak override --user --reset <app>.
Symptom
Flatpak Electron/Chromium apps (Spotify, Signal, Obsidian, VS Code, Slack) look soft and fuzzy next to native apps on a fractionally scaled monitor, and text edges look smeared. hyprctl clients shows xwayland: 1 for those windows while everything else is 0. If I set ELECTRON_OZONE_PLATFORM_HINT=auto the app instead refuses to start with Failed to connect to Wayland display: No such file or directory.
Cause
On a fractionally scaled output, an app running through XWayland is rendered at 1x and upscaled as a bitmap, which is the blur. The reason these apps land on XWayland is almost never a missing socket, since current Flathub manifests for Spotify, Signal, Obsidian, VS Code and Chrome all grant --socket=wayland. It is that Electron/Chromium still default to the X11 ozone backend unless told otherwise, and --socket=fallback-x11 then hands them an X11 socket to fall back onto. The 'Failed to connect to Wayland display' case only applies to the minority of manifests that genuinely grant x11/fallback-x11 only. There, the hint must be paired with a socket grant.
Fix
Check what the app actually holds before changing anything:
flatpak info --show-permissions com.spotify.Client
If --socket=wayland is already listed (it is for Spotify, Signal, Obsidian, VS Code and Chrome today), the only change needed is the backend hint:
flatpak override --user --env=ELECTRON_OZONE_PLATFORM_HINT=auto com.spotify.Client
Only if the wayland socket is genuinely absent from --show-permissions, add it too:
flatpak override --user --socket=wayland <app-id>
For Chromium-based Flatpaks that ignore the Electron variable, pass the Ozone flags:
flatpak run com.google.Chrome --ozone-platform-hint=auto --enable-features=WaylandWindowDecorations
To make the flags stick for the launcher, copy the exported desktop entry (from /var/lib/flatpak/exports/share/applications/ for a system install, or ~/.local/share/flatpak/exports/share/applications/ for a --user install) into ~/.local/share/applications/, append the flags to Exec=, then update-desktop-database ~/.local/share/applications.
Verify with hyprctl clients | grep -A2 xwayland (want xwayland: 0). Only revoke X11 (flatpak override --user --nosocket=x11 --nosocket=fallback-x11 <app-id>) once the app is confirmed working natively, and keep flatpak override --user --reset <app-id> in mind as the undo.
Verify
Restart the app, then hyprctl clients | grep -A15 'class: <app>' shows xwayland: 0, and the window is crisp at your fractional scale.