Scaling issue in virtualization

If you’ve ever come across a moment where your icons are too small or too big for your screen’s size than you my friend have a scaling issue. This is majorly seen with Linux based operating systems as they have yet to figure out a permanent solution for that. This is a common issue in the world of virtualization where you run an operating system on VirtualBox and find out that the visuals are too blurry. Well you don’t have to fiddle with display settings anymore as you’ll be learning to fix this issue once and for all. But before going straight to the solution allow me to briefly explain what scaling is. If you’re aware of the concept please feel free to skip to the next paragraph.


So what is scaling?

Scaling can be understood as the management of an icon’s size with respect to the number of pixels that are used to represent it. Lets say a 1cm1cm icon is designed for a 720p display now if we increase the screen’s resolution to 1080p then the icon’s size will decrease to lets say 0.5cm0.5cm. On a 480p display it might even go up to 1.5cm1.5cm. By now the icon’s size is too small or too big to be of any use and overall provides a frustrating experience. In an ideal environment the icon’s size should remain 1cm*1cm no matter what screen size it is being displayed upon. There’s another case of this issue where the icon’s size remains constant but the number of pixels used to represent it have changed making it blurry. The images below provides a pictorial representation of this issue.

Perfectly sized but blurry
Perfectly sized but too blurry
Crisp but too small
Crisp but too small


Now there are two solutions for this issue but there success depends on a case by case basis. Depending on the system’s specifics, any of these can work for you however I urge you to try the first solution before moving ahead due to its ease of use.


First Solution

The first way to solve this is to utilize fractional scaling from the terminal. The steps are as follows:

1. Fire up your terminal: This can be done via simply searching for it.

2. Find out the name of your display: This following command will provide you the name of your display which will be used further. For now let call it <display_name>. The command is xrandr –query

Xrandr Output

3. Use fractional scaling: The following command will set your desired fractional scaling. xrandr –output –scale x. The term value depends upon your case, it is a fractional number which has a default value of 1. In case you’d like the display elements to be smaller try increasing the value else (for e.g. xrandr –output –scale 1.5×1.5) if you’d like the display elements to be bigger than try decreasing the value (for e.g. xrandr –output –scale 0.5×0.5)

This solution would work on most systems however in case of virtualization on VirtualBox this could potentially induce an input lag or creating abnormalities with your mouse movement. If you experience such an issue then your only option is to try the second solution but before that first reverse the change with the following command: xrandr –output –scale 1×1


Second Solution

In order for this solution to work you’ve got to ditch VirtualBox as it forces you to use its software based fractional scaling. The next best alternative (and much better than VirtualBox) is VMware. So you’ve got to either port your entire OS to VMware or start new which shouldn’t be much of an issue for security enthusiasts such as pentesters and ethical hackers.


The next step makes use of the only desktop environment which is able to handle fractional scaling perfectly and that is KDE. If you are using some other desktop environment then your only option is to switch to it. I have provided the ways for some of the distros to ease the process such as kali and parrot os however in case I’ve missed your Linux distro please refer google for the steps.


Once you’re on your new and shiny KDE environment, the next step is pretty painless. Just follow the arrow heads and you’ll be on your merry way. System Settings —> Display and Monitor —> Display Configuration —> Global Scale. Now you’ll have to try moving the slider and decide which display setting looks the best to you. Also you might have to go the extra step of restarting your system after every change but trust me it’ll be worth it. The after effect of this method is shown below.

The display elements are too small
The display elements are too small
The display elements are perfectly sized
The display elements are perfectly sized

I hope this solution works for you but if it doesn’t or if there’s any step that you’re stuck at, please comment down below and I’ll try my best to take you out of it.