Question about high-dpi display problems

Can someone help me understand the following:

How does android (when it’s based on linux) use high dpi perfectly with variable refresh rates but full-blown linux distro’s still struggle with the same?