What I am trying to do is be able to rotate my screen without losing scaling. I can do this well from gnome-settings display menu but I am trying to do this in a script so I am looking for a cli solution.
I looked into how gnome does this and what I noticed is that xrandr entries for the orientation of the display changes to reflect the screen orientation. Doing this over cli, xrandr --output $DISPLAY --rotate inverted
, gets me half way there. The piece that is missing is that the scaling of the screen is not reflected within xrandr, which leads me to believe that gnome has some internal way for setting the scaling of the windows to be displayed.
Scaling the screens through xrandr, xrandr --output eDP-1 --scale 0.5x0.5
, is sub-optimal because not only does it sometimes lead to issues when I connect and disconnect monitors, it is also blurry as it is essently upscales from a lower resolution.
From what I have noticed, using xrandr to rotate the screen resets scaling within gnome control center to 100% and changing that back to what it was before (200 %) solves the problem.
So now I have been trying to find a cli solution for the scale option within the displays page of gnome-control-center. What does it change?
I tried watching for changes in dconf,dconf watch /
and journalctl,journalctl -f
, but to no avail. when I change screen scaling through gnome, nothing happens in dconf but in journalctl, it seems something about /usr/lib/gdmx-session and modeset along with some default values that don't seem to change when I change scaling are spat out .
Mar 02 00:40:47 aa /usr/lib/gdm-x-session[1563]: (II) modeset(0): EDID vendor "MEI", prod id 38562
Mar 02 00:40:47 aa /usr/lib/gdm-x-session[1563]: (II) modeset(0): EDID quirk: Use maximum size instead of detailed timing sizes.
Mar 02 00:40:47 aa /usr/lib/gdm-x-session[1563]: (II) modeset(0): Using hsync ranges from config file
Mar 02 00:40:47 aa /usr/lib/gdm-x-session[1563]: (II) modeset(0): Using vrefresh ranges from config file
Mar 02 00:40:47 aa /usr/lib/gdm-x-session[1563]: (II) modeset(0): Printing DDC gathered Modelines:
Mar 02 00:40:47 aa /usr/lib/gdm-x-session[1563]: (II) modeset(0): Modeline "3000x2000"x0.0 416.00 3000 3008 3016 3360 2000 2008 2016 2064 +hsync +vsync (123.8 kHz eP)
Mar 02 00:40:47 aa /usr/lib/gdm-x-session[1563]: (--) modeset(0): HDMI max TMDS frequency 300000KHz
0 Answers