I just installed Debian 10 on my gpd pocket 2 and it is working great except I cannot get the screen to persistently rotate on login.

Currently, I am able to rotate the screen by selecting "GNOME on xorg" from the gear menu when I login, and then run xrandr --screen 0 -o right however this is going to get old fast.

I have tried a couple xorg solutions but have not had success. I created the following script based on https://github.com/joshskidmore/gpd-pocket-2-arch-guide#install-xorg-packages and https://unix.stackexchange.com/questions/103460/how-to-change-gnome-default-screen-rotation:

Section "Monitor"
  Identifier    "eDP1"
  Option        "Rotate"                 "right"

And I have installed in the following locations:

  • /etc/X11/xorg.conf (by editing the current "monitor" section)
  • /etc/X11/xorg.conf.d/ (I had to make this directory, then made “30-display.conf” with the above settings)
  • /usr/share/X11/xorg.conf.d (just added "30-display.conf" file)

And all result in a flickering on login. I see a black flash (similar to when I execute xrandr after login), then a square filled with static-grey for about 1s twice in a row, then it loads the screen in the "normal" / sideways orientation.

Even when I put xrandr --screen 0 -o right in ~/.profile, the same effect is observed. This does work when I put it into ~/.bashrc but it is after login and again, I would like to automate this configuration.

I have a feeling that Debian is trying to implement the configuration but something is conflicting. How should I proceed with this venture?

EDIT: Some new information

Determined my screen manager according to https://unix.stackexchange.com/a/20376/293647 and it is:


After reading the following link, I discovered this about GDM:


Changes will take effect on logout. This is necessary because GDM does not respect xorg.conf.

Which is probably why I am not accomplishing rotation with xorg. So, what's next?



gnome is still not oriented but this code from the above link orients grub!

sudo vim /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="fbcon=rotate:1 quiet"
sudo update-grub # a lot of guides are missing this step

I found a hacky solution but it requires freshly installing Debian. Let me explain.

In an effort to fix my screen, I updated my intel video driver.


What I did not anticipate was that this driver would block gnome from allowing me to make changes using settings -> display -> orientation and that is why I was looking for a code-based solution. As I mentioned in an edit above, the GPD Pocket 2 system with Debian 10 and GNOME uses GDM as a screen manager by default, so any xorg-based solution will fail.

So, the first step in a solution for this problem was re-installing Debian. This was possible for me because I was just in the process of making configurations with my Pocket 2, but I also recognize that this is not acceptable for all similar situations. To that end, I am not going to accept my answer and I will await a more thorough explanation and solution for permanently fixing the screen. But until then, perhaps consider the following hacky procedure.

1) Assuming that you have a fresh install, let's first fix grub. In terminal:

sudo vim /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="fbcon=rotate:1 quiet"
sudo update-grub                    # a lot of guides are missing this step

This will orient the system output on boot and your grub consoles (e.g., via function+alt+2 keybinding) but it does not fix your login screen. That remains a piece of this puzzle that I have no solution for, but onward.

2) Next, let's put together our hacky auto-screen orientation.

First, navigate settings -> display -> orientation and select an orientation of portrait left and resolution of 1200x1920.

If you got this far and can live with squinting, I suppose you are done. Your desktop environment should boot with these settings.

3) If you want to auto-load an improved orientation, here's what I did.

Next navigate Tweaks -> Startup Applications and select Terminal.

Finally, in your ~/.bashrc file, enter the following code wherever:

res=$(xrandr | grep \* | cut -d' ' -f4)
if [ "$res" != "600x960_60.00" ]; then
    xrandr --newmode "600x960_60.00" 47.25 600 640 696 792 960 963 973 996 -hsync +vsync
    # the above line informed from: https://superuser.com/a/716837/1078490
    # you may have to configure the line according to your cvt output
    xrandr --addmode eDP-1 "600x960_60.00"
    xrandr --output eDP-1 --mode "600x960_60.00"

Now when you login, terminal will launch then .bashrc will handle the resolution configuration automatically. Not ideal, as opening/closing the lid will not encounter this script and you will therefore need to open terminal again. But it will maintain resolution through suspend/wake cycles if you hold the power button for ~3s before closing the lid.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.