I am attempting to run an AvaloniaUI application on a version of Debian(Buster) on an ASUS TinkerBoard. The display I am using is a 7 inch 1920x1080p touchscreen display.

The application runs in a portrait-like mode(i.e. it runs at 1080x1920), so I have been attempting to rotate the display to so that the application can run as such.

Using xrandr to rotate the display has given me very little success. When I execute:

xrandr --output HDMI-1 --rotate left


xrandr --output HDMI-1 --rotate right

It blanks the screen briefly but has no effect. I am able to invert the screen using the same command, however that doesn't exactly help the issue. I also tried altering the resolution using xrandr and various other commands I had found but have been unsuccessful as of yet.

I have also attempted to add:

echo 1 > /sys/class/graphics/fbcon/rotate

To the /etc/rc.local script. When using 'echo 3', this will actually cause the commands which run on screen at boot to be rotated successfully. However, upon booting into the OS, the display is no longer rotated and is back to being 'landscape' (i.e. 1920x1080). Trying to run it as a shell script or as a service has also been unsuccessful.

I can't seem to find much information online on how else to rotate the display other than the basic 'xrandr' commands. I apologise for my poor explanation, as I am still relatively new to Linux.

Here's the output of:


Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 8192 x 8192
HDMI-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 255mm x 255mm

   1920x1080     60.00*+
   1024x600      60.04 +
   1600x900      60.00
   1440x810      59.98
   1360x768      59.80
   1280x720      60.00
   1152x648      60.01
   1024x576      59.97
   800x450       60.05

A xrandr command which does what I expect would be:

xrandr --output HDMI-1 --rotate inverted

This successfully inverts the screen.

  • fbcon ("con" is for "console") is not used by your graphical interface, so that's to be expected. Dec 3, 2021 at 11:57
  • do dmesg or journalctl -xe contain any errors after you've tried to use xrandr? Can you add the full output listing of xrandr (without any arguments) to your quesiton? Dec 3, 2021 at 11:58
  • Also add an xrandr command that does what you expect, and perhaps the ouput of running xrandr without any arguments. Dec 3, 2021 at 12:29
  • Thanks for clearing up why fbcon wasn't working for the display. I've added the requested information. Dec 3, 2021 at 12:35
  • To answer your question regarding dmesg and journalctl -xe, a couple errors are shown for the former, most notably [ 11.775483] [drm:dw_hdmi_rockchip_set_property] ERROR failed to set rockchip hdmi connector property Dec 3, 2021 at 12:39

1 Answer 1


I found the solution to this issue. I was able to edit the file within /etc/X11/xorg.conf.d/ (mine was called "20-modesetting.conf", but I'm not sure everyone's will be). Within the 'Screen' subsection I added an option for 1080x1920:

Section "Screen"
Identifier "Default Screen"
SubSection "Display"
    Depth 24
    Modes "1920x1080" "1280x1024" "1024x768" "800x600" "1080x1920"

Then below this section I added an additional section 'Monitor' like so:

Section "Monitor"
    Identifier "HDMI-1"
    Option "PreferredMode" "1080x1920"
    Option "DPMS" "false"
    Option "Rotate" "left"

This forces the desktop to boot in 1080x1920 resolution, while the Rotate option rotates the screen.

Both of these options are required to correctly rotate the screen in portrait mode.

The identifier will be specific to what your input is named, mine was "HDMI-1".

  • I should note that this will not rotate the touchscreen on the device as well, however that wasn't the content of this particular question. Dec 6, 2021 at 10:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .