Skip to content

Instantly share code, notes, and snippets.

@zerwes
Forked from hallettj/fractional-scaling-mutter.md
Last active November 17, 2025 21:02
Show Gist options
  • Select an option

  • Save zerwes/52b407b2e881b61d53b0dc8e8e978a9d to your computer and use it in GitHub Desktop.

Select an option

Save zerwes/52b407b2e881b61d53b0dc8e8e978a9d to your computer and use it in GitHub Desktop.
How I set up fractional scaling in Gnome

Fractional Scaling

With a bigger display 2x scaling might be too big. I'm trying out experimental support for fractional scaling in Gnome. To opt out again it is necessary to undo this experimental features setting:

$ gsettings set org.gnome.mutter experimental-features "['scale-monitor-framebuffer']"

In addition to fractional scaling that setting allows different scaling factors per monitor!

The only issue I'm seeing so far is that apps running with XWayland look fuzzy. That includes web browsers. But! Firefox and Chrome both have opt-in support for Wayland which fixes the problem.

debian trixie original state (w/ nvidia drivers)

± echo $XDG_SESSION_TYPE 
x11
± gsettings get org.gnome.mutter experimental-features 
['scale-monitor-framebuffer', 'xwayland-native-scaling']

Firefox

For Firefox Wayland support set this environment variable:

$ MOZ_ENABLE_WAYLAND=1 firefox

There is a "Window Protocol" entry in about:support to confirm that the setting is active. But it's also very obviously less fuzzy.

I added ~/.config/profile.d/80-firefox to my dot-xmonad files to set that environment variable on login if Wayland is running.

Chrome

For Chrome Wayland support launch Chrome with this flag:

$ google-chrome --ozone-platform-hint=auto

Making this permanent requires editing launchers AFAICT.

  • I edited ~/.local/share/applications/chrome-cinhimbnkkaeohfgghhklpknlkffjgod-Default.desktop to set the flag for the Youtube Music launcher.
  • I copied /usr/share/applications/google-chrome.desktop to ~/.local/share/applications/ and modified line 108 to set the flag.

The Arch version of Chrome is specially configured to read flags from a config file. Some day...

Obsidian, Signal

Electron apps are configured to use Wayland similarly to Chrome:

--enable-features=UseOzonePlatform --ozone-platform=wayland

Once again Arch has support for a special configuration file, ~/.config/electron-flags, but Debian does not. At least I think that is Arch specific - it might just be that some Electron apps read that file, and some don't

So once again I made an override for the launcher. I read a helpful post on where Flatpak puts launcher files. I copied /var/lib/flatpak/exports/share/applications/md.obsidian.Obsidian.desktop to ~/.local/share/applications/, and I modified the Exec line to add the above flags.

Signal is also installed through Flatpak, so I made a similar launcher override.

Discord

Discord is another Electron app, so I made another launcher override. This time I copied /usr/share/applications/discord.desktop to ~/.local/share/applications/.

Slack

I tried to make a launcher override for Slack the same way as for Obsidian and Signal, but the app fails to start. I get this error:

❮ flatpak run --branch=stable --arch=x86_64 --command=slack --file-forwarding com.slack.Slack @@u --enable-features=
UseOzonePlatform --ozone-platform=wayland @@
Initializing local storage instance
(electron) Sending uncompressed crash reports is deprecated and will be removed in a future version of Electron. Set
 { compress: true } to opt-in to the new behavior. Crash reports will be uploaded gzipped, which most crash reportin
g servers support.
[2:0707/133637.389912:ERROR:wayland_connection.cc(209)] Failed to connect to Wayland display
[2:0707/133637.389945:ERROR:ozone_platform_wayland.cc(226)] Failed to initialize Wayland platform
[2:0707/133637.389949:ERROR:env.cc(225)] The platform failed to initialize.  Exiting.
[0707/133637.390209:ERROR:scoped_ptrace_attach.cc(27)] ptrace: Operation not permitted (1)

Maybe this will work after a future Slack update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment