The HiDPI Scaling Issue
When running Ubuntu on modern laptops with high-resolution (HiDPI) screens, or when connecting to 4K external monitors, the GNOME display manager attempts to intelligently adjust the scaling factor (e.g., jumping from 100% to 200%) so that text and icons do not appear microscopically small. However, this automatic detection is notoriously finicky. If you frequently disconnect and reconnect a monitor, or if you use a KVM switch, Ubuntu will sometimes panic and automatically apply a massive scaling factor, rendering your desktop comically large and practically unusable until you manually fix it.
Enforcing a Static Scale
To stop Ubuntu from attempting to guess your preferred scaling every time the display hardware changes, you can use the terminal to enforce a strict, static scaling factor that ignores GNOME’s automatic detection routines.
Open a terminal window (Ctrl+Alt+T). You will use the gsettings command to directly write the configuration. To force the scaling to remain at standard 100% (a scale factor of 1), type the following command exactly as written: gsettings set org.gnome.desktop.interface text-scaling-factor 1.0 and press Enter. If you specifically need 200% scaling and want to lock it there so it never drops back to 100%, change the 1.0 to 2.0. To go a step further and disable the experimental fractional scaling daemon that often causes these glitches, open the Settings app, navigate to Displays, and ensure the Fractional Scaling toggle is firmly set to Off. Your display scaling will now remain static regardless of what monitors you plug in.