22

I have the maximal resolution set on my display, but when I enable fractional scaling in the display settings of Ubuntu (version 22.04) Google Chrome becomes blurred regardless whether I started the browser with --force-device-scale-factor=1.0 and regardless whether I use a fractional scaling value or an integer one. And not only text is blurred but everything in the application.

I can even see the changes immediately after I reapply the display settings. No need to restart the browser for that. The same happens with Firefox, but fonts in other non browser based applications look fine. So it affects only browsers (or all non native applications) for some reason.

Is there a way to fix this for fractional scaling?

No fractional scaling enter image description here

Fractional scaling enter image description here

Vic
  • 717

10 Answers10

27

You should be able to solve this issue for Firefox by forcing it to use Wayland:

$ MOZ_ENABLE_WAYLAND=1 firefox

For Chromium following might work:

$ chromium --enable-features=UseOzonePlatform --ozone-platform=wayland
peter
  • 371
  • 3
  • 3
13

I found a workaround which is not ideal but achieves the same effect as 125% fractional scaling, without making browser text blurred.

Instead of enabling fractional scaling, go to settings => accessibility and enable large texts.

Nmath
  • 12,664
Badan
  • 239
8

I'm new to Linux, so been finding this website useful recently.

I just went back to 100% scaling and followed osemec's method. I am on the Framework Laptop, 2256x1504 13.5" screen. I was using 175% scaling but the blurriness of Firefox started to bother me.

  • switched to 100% scaling

  • changed cursor size to medium in the accessibility options, within settings

  • in appearance settings: set desktop icon size to large, and set dock icon size to 64 (maxed out)

  • ran the command suggested by osemec; a factor of 1.5 fit my liking:

    gsettings set org.gnome.desktop.interface text-scaling-factor 1.5
    

Seems to be working good for now! I will see how I like it over the next few days. The only thing I noticed that is a bit out of the ordinary is the 3 window buttons (top right corner) for minimize, maximize, and close, are very small. However, this isn't much of an issue for me at this point because I use keyboard shortcuts to do these things. I also adjust website zoom level via ctrl+ or ctrl- on each website in Firefox as I visit. Firefox seems to "remember" my previous zoom setting independently for each website, so websites continue to look how I want them after the initial visit and adjustment. I did this kinda often anyway on Firefox, so this is nothing new for me.

Thanks for the tips!

Pablo Bianchi
  • 17,371
7

Fix the blurry text rendering of Chrome on 4K High DPI displays with fractional scaling enabled on Ubuntu using the following steps:

  1. Open Google Chrome
  2. Navigate to chrome://flags
  3. Change the "Preferred Ozone Platform" from 'default' to 'wayland' from the dropdown menu
  4. Relaunch Chrome

Works on Ubuntu 23.10 running Wayland with fractional scaling enabled on a 4K multi-monitor setup

5

Note: It's not specifically a browser's problem. Rather, a universal problem except for the system apps.

Enabling Wayland fixed it somewhat in my case.

Open terminal and write

$ sudo nano /etc/gdm3/custom.conf

In the editor find #WaylandEnable=false, uncomment it by deleting the #.

Set WaylandEnable=true and save the file.

Reboot your device. Or reboot GDM3 writing in terminal

$ sudo systemctl restart gdm3
Shajid
  • 76
  • 2
  • 5
3

I solved it contraversially to other answers:

  1. set the display scale to 200% (not fractional!)
  2. set the font scale to 85% by runnind this command: gsettings set org.gnome.desktop.interface text-scaling-factor 0.85

That produced normal size text in both browser-based and old-style system applications like Krusader.

Mike
  • 131
2

I solved this problem (on my 4k monitor 31.5") by keeping it 100% scaling, but increasing the system font to 30% using the command (adjust the factor for your needs, the effect is visible immediately):

gsettings set org.gnome.desktop.interface text-scaling-factor 1.3

Also in the Settings under Appearance I changed the icon size to 48.

osemec
  • 121
1

Installing a recent NVIDIA driver solved this issue for me (Ubuntu 22.04). Enabling Wayland under chrome://flags solved the blurriness but incurred poor performance on graphics-intensive sites like Google Maps.

Mark Leone
  • 11
  • 1
0

Switching from Weyland to Xorg (x11) in Ubuntu 24.04 also helped me. There was a problem with the built-in display in an Asus laptop with 2880x1800 resolution when I set the scale to 150%. To change, while logged in, click the settings icon at the bottom right and select "Ubuntu Xorg"

0

To solve the blurry issues across all Electron/Chromium based apps, I added export ELECTRON_OZONE_PLATFORM_HINT=auto to my ~/.profile.

(I got this snippet from from https://github.com/microsoft/vscode/issues/207033#issuecomment-2104720712)

mjumbewu
  • 151