Fix UI scale bug - Electron apps too small

I recently had a problem with fractional scaling so I messed up some settings and cannot find how to return Electron based applications from small to normal size:

VS Code:

Chromium:

Spotify:

Seems that after I rescale my main monitor from 125% to 100% (default) everything goes back to normal. However, I don’t know how can I keep 125% scaling without these apps to become tiny.

Edit: Seems that enabling org.gnome.mutter experimental-features ['scale-monitor-framebuffer', 'xwayland-native-scaling'] messes with the scaling of Electron based apps. However, disabling 'xwayland-native-scaling'fixes the scaling issue but makes the text in these apps blurry.

The solution is to disable 'xwayland-native-scaling'. The dconf experimental features entry should look just like this:

org.gnome.mutter experimental-features ['scale-monitor-framebuffer']

Then, in order to fix the blurriness of Electron based apps, you must run them natively in Wayland.

For the Chromium case:

  1. Go to chrome://flags/
  2. Search for the option Preferred Ozone platform
  3. Change it from Default to Wayland.

For the VS Code case:

  1. Open with a text editor the file /usr/share/applications/code.desktop if you’re using the RPM installation, otherwise, just open the .desktop entry for your VS Code installation.
  2. Add the flags --enable-features=UseOzonePlatform --ozone-platform=wayland to the Exec line. In my case it looks like this:
Exec=code --enable-features=UseOzonePlatform --ozone-platform=wayland
  1. There’s a bug with the headerbar when you split the Window to the sides using Super+Left or Super+Right. So you must go to VS Code Settings using Ctrl+Shift+P and searching for User Settings (Menu). Then, search for Title Bar Style and change it to custom

For the Spotify case, just repeat step two from the VS Code case. The flags are the important step here.