Author Topic: Howto: Fix rotation and scaling in other (non-GPD prepared) Linux distributions  (Read 652 times)

quantum-bovril (OP)

  • Posts: 3
Hi all, first post. These fixes aren't perfect and could be improved by having the commands launch before the window manager or login starts, if someone smarter than me can do that. Please copy and paste these fixes onto forums where other people are asking if it works for you, help google find it.

Problems:
Screen is stuck sideways in Portrait mode and can't be fixed with desktop's rotational controls.
Incorrect scaling makes everything extremely small and difficult to use and read.

Fixing rotation
Open a terminal and enter:

xrandr -o right

Fixing scaling
It's worth trying your desktop's scaling setting first, but if it doesn't work (I'm using Elementary OS, scaling controls don't work), try this command:

xrandr --output eDP-1 --scale 0.5x0.5


(If the text and icons are too big, try 0.75x0.75 instead).

If that doesn't work, try with this device name instead:

xrandr --output eDP1 --scale 0.5x0.5


In the first command above, eDP-1 is the name of the display on my GPD Pocket 2, though I imagine this model name will change between different GPD devices and production runs. Under Ubuntu Mate, the model name was eDP1 instead. If the command doesn't work, you'll need to find the name of your display, so enter the following command:

xrandr --listmonitors

For an example, this is the output from my main desktop PC at home:
$ xrandr --listmonitors
Monitors: 1
 0: +*DVI-D-0 1920/598x1080/336+0+0  DVI-D-0

Here DVI-D-0 is the name of my monitor, so if I were changing scaling on my main PC at home it would be:

xrandr --output DVI-D-0 --scale 0.5x0.5

Obviously entering these commands all of the time would be irritating, so you want to make these run automatically. Your desktop should have a section for commands to run at startup, copy and paste these commands into there.

Drawbacks of my approach:
When screen locks or I logout, the welcome screen is back in Portrait. If you are going with this setup, I recommend doing so with a single user machine that is set to login automatically.
Switching resolutions from native to something else doesn't display properly, so I recommend avoiding anything like fullscreen games that run in another resolution.

If anyone more skilled out there can tell me how to apply these fixes before login, that should help matters - at least with the login welcome screen - so please write below.
« Last Edit: December 21, 2019, 05:38:12 am by quantum-bovril »

quantum-bovril (OP)

  • Posts: 3
Have fixed rotation during bootup sequence and with resolution switches. Still have problems with image not scaling up and/or being misplaced, so half the image is missing.

Anyway, to fix more rotation issues system-wide, open a terminal and enter:

sudo gedit /etc/default/grub

I've chosen gedit as the editor here, feel free to replace with anything else like mcedit, nano, etc.

look for this line:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

...between the quotes add fbcon=rotate:1 (you may need to delete splash).

now run:

sudo update-grub

Reset.

Will continue adding fixes as I find them.

quantum-bovril (OP)

  • Posts: 3
Hopefully moderators don't mind me posting into this, despite its age. I do not want to start a new thread, as this information should be all kept together. If there is a proper board way of making it all new, feel free to do that.

For a better fix to rotation, rather than the xrandr command above, you can specify rotation for the GPD's monitor in system config file. I'm using gedit for this command as it gives the least hassle and is easy to use, but use any editor you like, as long as it allows you to run it as root/sudo.

(not sure if this is necessary now, might be able to skip straight to the next command if gedit won't complain about the file not being there)
$ sudo touch /etc/X11/xorg.conf.d/30-monitor.conf

The important command:
$ sudo gedit /etc/X11/xorg.conf.d/30-monitor.conf

Now paste in the following text:
Section "Monitor"
    Identifier "eDP1"
    Option "Rotate" "right"
EndSection


Note that your monitor name may change between distros, eDP1 is the monitor name under Elementary, other distros may call it eDP-1. To double-check your monitor name, enter:

$ xrandr --listmonitors


A Kali Linux user also gives this tip for adding a middle-click option using the L and R mouse buttons at the same time:

$ sudo gedit /etc/X11/xorg.conf.d/50-trackpoint.conf

Enter this text:

Section "InputClass"
    Identifier "GPD trackpoint"
    MatchProduct "SINO WEALTH Gaming Keyboard"
    MatchIsPointer "on"
    Driver "libinput"
    Option "Emulate3Buttons" "True"
    Option "MiddleEmulation" "True"
EndSection


Any other useful fixes, please let me know.

 

Post a new topic