Rotate display on Intel NUC


#1

Has anyone been able to rotate the XWindows display 90 degrees using BalenaOS running on an Intel NUC NUC6CAYH?

I tried installing Clear Linux directly on the NUC and I can rotate the display without any problems, so I know it’s possible.

But when I try it using BalenaOS, the xrandr command returns this error: “Error of failed request: BadMatch (invalid parameter attributes)”

Since it can work in Clear Linux but not in BalenaOS, I think I’m missing a video driver, or Xorg config setting somewhere?

I tried the answers from this post, but that did not work for me:

Has anyone been able to rotate the display recently? If yes, can you share your Dockerfile, etc?

Thank you.


Here are some things I’ve tried, and some log info…

# DISPLAY=:0 xrandr -o left
X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  140 (RANDR)
  Minor opcode of failed request:  2 (RRSetScreenConfig)
  Serial number of failed request:  14
  Current serial number in output stream:  14

# DISPLAY=:0 xrandr -q
xrandr: Failed to get size of gamma for output default
Screen 0: minimum 1920 x 1080, current 1920 x 1080, maximum 1920 x 1080
default connected 1920x1080+0+0 0mm x 0mm
   1920x1080      0.00*

# journalctl | egrep 'VGA|HDMI'
Dec 11 16:24:30 7eb66d1 kernel: pci 0000:00:02.0: vgaarb: setting as boot VGA device
Dec 11 16:24:30 7eb66d1 kernel: pci 0000:00:02.0: vgaarb: VGA device added: decodes=io+mem,owns=io+mem,locks=none
Dec 11 16:24:30 7eb66d1 kernel: fb0: EFI VGA frame buffer device
Dec 11 16:24:30 7eb66d1 kernel: fb: switching to inteldrmfb from EFI VGA
Dec 11 16:24:30 7eb66d1 kernel: [drm] Replacing VGA console driver
Dec 11 16:24:30 7eb66d1 kernel: i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=io+mem:owns=io+mem
Dec 11 16:24:30 7eb66d1 kernel: input: HDA Intel PCH HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:0e.0/sound/card0/input12
Dec 11 16:24:30 7eb66d1 kernel: input: HDA Intel PCH HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:0e.0/sound/card0/input13
Dec 11 16:24:30 7eb66d1 kernel: input: HDA Intel PCH HDMI/DP,pcm=8 as /devices/pci0000:00/0000:00:0e.0/sound/card0/input14
Dec 11 16:24:30 7eb66d1 kernel: input: HDA Intel PCH HDMI/DP,pcm=9 as /devices/pci0000:00/0000:00:0e.0/sound/card0/input15
Dec 11 16:24:30 7eb66d1 kernel: input: HDA Intel PCH HDMI/DP,pcm=10 as /devices/pci0000:00/0000:00:0e.0/sound/card0/input16

# egrep 'VGA|HDMI' /var/log/Xorg.0.log
[     7.870] (II) config/udev: Adding input device HDA Intel PCH HDMI/DP,pcm=3 (/dev/input/event10)
[     7.871] (II) config/udev: Adding input device HDA Intel PCH HDMI/DP,pcm=7 (/dev/input/event11)
[     7.871] (II) config/udev: Adding input device HDA Intel PCH HDMI/DP,pcm=8 (/dev/input/event12)
[     7.871] (II) config/udev: Adding input device HDA Intel PCH HDMI/DP,pcm=9 (/dev/input/event13)
[     7.872] (II) config/udev: Adding input device HDA Intel PCH HDMI/DP,pcm=10 (/dev/input/event14)

# lspci | egrep 'VGA|HDMI'
00:02.0 VGA compatible controller: Intel Corporation Device 5a85 (rev 0b)

#4

Hi there,
Are you running it in the Host OS or in the application container?


#5

I ran those commands in the application container.
The application container is also where I did the “startx”, which runs a simple electron application.


#6

That should be fine then. Did you enable rotation for your device in the xorg.conf file? See here as an example.


#7

Thank you for your help. No, I did not have the RandRRotation option. Based on that link, I added this section to my xorg.conf.d directory, but it is still not working:

Section "Device"
    Identifier  "Default Device"
    Driver  "i915"
    Option  "RandRRotation" "on"
EndSection

Xorg.0.log file says this:

[ 10069.838] (EE) Failed to load module "i915" (module does not exist, 0)

so it didn’t like my choice of driver. I tried it by omitting the Driver directive, which let XWindows start, but I still was not able to rotate the screen. The ‘fbdev’ driver works, but does not let me rotate the screen.

This is why I thought it I should use the i915 driver:

# lspci -k | grep -EA3 'VGA|3D|Display|HDMI'
00:02.0 VGA compatible controller: Intel Corporation Device 5a85 (rev 0b)
        Subsystem: Intel Corporation Device 2067
        Kernel driver in use: i915

# lsmod | grep video
video                  36864  1 i915
backlight              16384  2 video,i915

When I installed Clear Linux on the bare metal it used a radeon driver. But the radeon driver is not available in the BalenaOS installation either.

Is there more xorg.conf.d config files I’m missing, or am I using the wrong driver, or am I going down the wrong path? Do you have a small working example for the NUC?


#8

Hi @pzarfos, I don’t have the hardware to test, but it might be possible to just install the driver in your userspace. What docker base image is your project using, if you are using a debian base image, you might be able to add the Radeon driver by following https://wiki.debian.org/ATIProprietary#Drivers . On ubuntu base images it might be even easier. I think it mainly just depends on identifying what hardware you have and installing the correct driver.


#9

@shaunmulligan I am using
FROM resin/%%RESIN_MACHINE_NAME%%-node:8
which I believe translates to
FROM resin/intel-nuc-node:8


#11

Hi,

So video drivers and DRM are an interesting and confusing area.
You need to get the kernel right, the kernel module inserted, the userspace driver installed, and xorg configured right.

Looks like the kernel in balenaOS for the NUC image does not have the kernel side for radeon enabled.

root@73468e6:~# cat /proc/config.gz | gunzip | grep -i DRM_RA 
# CONFIG_DRM_RADEON is not set
root@73468e6:~# 

I’m not sure how the radeon driver was being used when you ran clear linux. Does the NUC have a tiny AMD GPU in it? I thought they all came with Intel HD graphics. If it has an AMD GPU, can you use the different display port that is connected to Intel HD graphics. And would it be possible for you to try clear linux using the i915 or fbdev driver and not the radeon driver?

We do have i915 and fbdev should work as well.

root@73468e6:~# cat /proc/config.gz | gunzip | grep -i DRM_i915
CONFIG_DRM_I915=m
...

It is a module. So you’ll have to insert the module before trying to run xorg in your application. That should explain why you faced [ 10069.838] (EE) Failed to load module "i915" (module does not exist, 0)

root@73468e6:~# find /lib | grep i915
/lib/modules/4.14.48-yocto-standard/kernel/drivers/gpu/drm/i915
/lib/modules/4.14.48-yocto-standard/kernel/drivers/gpu/drm/i915/i915.ko
root@73468e6:~# 

I’m not entirely sure why the fbdev driver doesn’t rotate. It should.
But perhaps the i915 driver is fine.

You’ll probably also need to install the userspace side of the driver.
i.e. xserver-xorg-video-intel
https://packages.debian.org/sid/xserver-xorg-video-intel

There is also the modesetting driver. That should work too.
In fact, that is the more modern one and worth a try.
Install the xserver-xorg-video-modesetting in your docker image. And use ‘modesetting’ in your xorg.conf.

Just to recap, you need to get the kernel right, the kernel module inserted, the userspace driver installed, and xorg configured right.

Various combinations
Kernel: Radeon missing. Don’t try

Kernel i915, compiled with module flag. insert module. install xserver-xorg-video-intel in userspace for the driver. and configure xorg with i915

Kernel i915, compiled with module flag. insert module. install xserver-xorg-video-modesetting in userspace for the driver. and configure xorg with “modesetting” driver

fbdev should work too…

I hope I have given you enough to go on and not confused you more.

Thanks
ZubairLK


#12

Thank you for that detailed explanation. I will try your suggestions and let you know what works.


#13

You were right… no radeon. When I installed Clear Linux, there were radeon and amd config files in the xorg.conf.d directory, and XWindows worked, but I’m not sure why it was there… just a red herring.

This is the actual video:
intel: Driver for Intel® Integrated Graphics Chipsets:
i810, i810-dc100, i810e, i815, i830M, 845G, 854, 852GM/855GM, 865G,
915G, E7221 (i915), 915GM, 945G, 945GM, 945GME, Pineview GM,
Pineview G, 965G, G35, 965Q, 946GZ, 965GM, 965GME/GLE, G33, Q35, Q33,
GM45, 4 Series, G45/G43, Q45/Q43, G41, B43, HD Graphics,
HD Graphics 2000, HD Graphics 3000, HD Graphics 2500,
HD Graphics 4000, HD Graphics P4000, HD Graphics 4600,
HD Graphics 5000, HD Graphics P4600/P4700, Iris™ Graphics 5100,
HD Graphics 4400, HD Graphics 4200, Iris™ Pro Graphics 5200

I took your advice and tried the modesetting driver. That got me a lot closer. The screen does not rotate yet, but xrandr seemed a little happier.

Also, I added these packages:
xserver-xorg-video-intel
xserver-xorg-video-modesetting

Side note, these drivers did not work: intel, i915, fbdev. (this seems surprising to me, since it is an intel video, and i915 is loaded in the kernel module)

% lsmod | grep video
video                  36864  1 i915
backlight              16384  2 video,i915

So with the modesetting driver, I used this for my 10-screen.conf file:

Section "Monitor"
    Identifier    "Monitor0"
EndSection
Section "Device"
    Identifier    "Device0"
    Driver        "modesetting"
    Option        "RandRRotation" "on"
EndSection
Section "Screen"
    Identifier    "Screen0"  
    Device        "Device0"
    Monitor       "Monitor0"
    DefaultDepth  24 
    SubSection "Display"
        Depth     24
        Modes     "1920x1080_60.00"
    EndSubSection
EndSection

And then xrandr -q gets me actual output instead of errors like before:

% DISPLAY=:0 xrandr -q
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 8192 x 8192
DisplayPort-0 connected 1920x1080+0+0 480mm x 270mm
   1920x1080     60.00*+  50.00    59.94    60.05
   1920x1080i    60.00    50.00    59.94
   1680x1050     59.88
   1400x1050     59.95
   1600x900      60.00
   1280x1024     75.02    60.02
   1440x900      59.90
   1280x800      59.91
   1152x864      75.00
   1280x720      60.00    50.00    59.94
   1024x768      75.03    60.00
   800x600       75.00    60.32
   720x576       50.00
   720x480       60.00    59.94
   640x480       75.00    60.00    59.94
   720x400       70.08
DisplayPort-1 disconnected

However, I still cannot rotate the display. :frowning:

% DISPLAY=:0 xrandr -o left
X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  140 (RANDR)
  Minor opcode of failed request:  2 (RRSetScreenConfig)
  Serial number of failed request:  14
  Current serial number in output stream:  14

Can you give me any more suggestions?

Thank you.


#22

Hi,

At least one step forward.
Lets try to focus on the modesetting driver and try to get more debug info as to why this isn’t working. Searching on Google for that message returned too many things.

Can you check dmesg and xorg logs for any extra hints. And possibly start xorg with a debug flag to output more debugging info.

Also, there is a way to rotate via xorg.conf.
Something like.

 Option "Rotate" "CCW"

Have you tried that?

Regards
ZubairLK


#24

also, can you try running the application container privileged and see if that helps


#26

Still no success rotating the display.

I tried your suggestions:

  • it is a single container, so I think that means it is running privileged.
  • Option “Rotate” “CCW” # did not work :frowning:
  • Option “Rotate” “left” # did not work either
  • Option “AIGLX” “off” # I turned this off because logs said it would not load

Here are some parts of dmesg that seemed relevant:
[ 3.981574] [drm] Memory usable by graphics device = 4096M
[ 3.981580] checking generic (80000000 7f0000) vs hw (80000000 10000000)
[ 3.981581] fb: switching to inteldrmfb from EFI VGA
[ 3.981614] Console: switching to colour dummy device 80x25
[ 3.982571] usbcore: registered new interface driver cdc_acm
[ 3.982575] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[ 3.987528] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
[ 3.988437] [drm] Replacing VGA console driver
[ 3.988801] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 3.988803] [drm] Driver supports precise vblank timestamp query.
[ 3.988926] i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=io+mem:owns=io+mem
[ 3.990767] i915 0000:00:02.0: Direct firmware load for i915/bxt_dmc_ver1_07.bin failed with error -2
[ 3.990773] i915 0000:00:02.0: Failed to load DMC firmware [https://01.org/linuxgraphics/downloads/firmware], disabling runtime power management.

[ 4.043866] [drm] Initialized i915 1.6.0 20170818 for 0000:00:02.0 on minor 0
[ 4.052398] ACPI: Video Device [GFX0] (multi-head: yes rom: no post: no)
[ 4.061263] input: Video Bus as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/input/input8
[ 4.118983] r8169 0000:03:00.0 enp3s0: renamed from eth0
[ 4.151687] snd_hda_intel 0000:00:0e.0: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[ 4.154889] fbcon: inteldrmfb (fb0) is primary device
[ 4.179789] snd_hda_codec_realtek hdaudioC0D0: autoconfig for ALC283: line_outs=2 (0x1b/0x21/0x0/0x0/0x0) type:hp
[ 4.179792] snd_hda_codec_realtek hdaudioC0D0: speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[ 4.179794] snd_hda_codec_realtek hdaudioC0D0: hp_outs=0 (0x0/0x0/0x0/0x0/0x0)
[ 4.179795] snd_hda_codec_realtek hdaudioC0D0: mono: mono_out=0x0
[ 4.179797] snd_hda_codec_realtek hdaudioC0D0: dig-out=0x1e/0x0
[ 4.179799] snd_hda_codec_realtek hdaudioC0D0: inputs:
[ 4.179801] snd_hda_codec_realtek hdaudioC0D0: Mic=0x19
[ 4.179803] snd_hda_codec_realtek hdaudioC0D0: Internal Mic=0x12
[ 4.251878] Console: switching to colour frame buffer device 240x67
[ 4.280791] i915 0000:00:02.0: fb0: inteldrmfb frame buffer device
[ 4.329820] Bluetooth: hci0: Intel Bluetooth firmware patch completed and activated
[ 4.671412] EXT4-fs (sda3): mounted filesystem with ordered data mode. Opts: (null)
[ 5.727348] [drm] RC6 on

Here are some parts of /var/log/Xorg.0.log that seemed relevant:
[ 4863.210] (II) modesetting(0): RandR 1.2 enabled, ignore the following RandR disabled message.
[ 4863.211] (==) modesetting(0): DPMS enabled
[ 4863.211] (WW) modesetting(0): Option “RandRRotation” is not used
[ 4863.297] (–) RandR disabled

Its weird that the log says “ignore the following RandR disabled message” and then “RandR disabled”. It does not say why. I could ignore it if xrandr worked.

The full logs are here: its a big ask, but if you could scan through them to see if you see anything wrong, I would appreciate your help.
The full dmesg is here: https://pastebin.com/mcbTk3Ye
The full /var/log/Xorg.0.log is here: https://pastebin.com/PkbqrXVV

Alternately, this is my first Balena project, so I’m not married to my Dockerfile and base repo. Maybe I have gone way off track. If anybody has a working example of an Intel NUC that you can rotate the display, I’m all ears. (or eyes in this case)

Thanks!


#32

hey @pzarfos , it looks like we need to investigate a bit more on this issue and probably try create a demo project on how to use X11 on balenaOS, so one of our team is gonna look into that over the coming days.


#34

Actually I started with your resin-electronjs repo on github. Then i added xrandr to the apt-get. And then in start.sh i added the commands:
sleep 3
xrandr -o left


#35

Hi @pzarfos,
I’m not sure this will be of much help, but I thought it wouldn’t hurt either:

  • You have added “Option “RandRRotation” “on”” to your xorg.conf file, yet the xorg.log reads “modesetting(0): Option “RandRRotation” is not used”. I’ve found some web posts that suggest this may be relevant, specially the following post where a Nvidia support agent says that "[RandRRotation is not used] because Canonical patches X to unconditionally disable rotation".
    https://devtalk.nvidia.com/default/topic/999654/linux/randr-rotation-doesn-t-work/
    I realise your chipset is not Nvidia, but they imply it was a Xorg issue rather than a chipset issue, so probably common to all chipsets.
  • In that same post, someone added a comment “The three Ubuntu-Bugs are marked as resolved by now. The issue however persists.” but they may have been using a Ubuntu release that did not include the patches. If you can, just for the purpose of testing screen rotation, I would suggest changing your Dockerfile base image to something like “FROM amd64/ubuntu:18.10” (or even 19.04), and see if the log messages still insist on “Option “RandRRotation” is not used”. I guess at least we would be ruling out a known-and-fixed Xorg bug.
  • Also I would recommend adding the --verbose option to the xrandr command to see if it gives us any more clues, and maybe the --output option as well.
  • Being a single container app, it’s most likely privileged as you said, but you could double check it in the auto generated docker-compose.yml file.

Regards,
Paulo


#40

Hi @pzarfos , I managed to rotate X11 output in the past on an UP squared device, which is also Intel based, running balena-electronJS.

What I did was creating a xinit config file and made sure in my Dockerfile that it gets copied in as /root/.xinitrc :

#!/usr/bin/env bash

 # Rotate screen 180°
xrandr -o inverted
# Start Electron
exec /usr/src/app/node_modules/electron/dist/electron /usr/src/app/ --enable-logging

then I had my start script (the bash script defined as CMD in my Dockerfile) executing startx

Hope it helps!


#42

Success! The /root/.xinitrc method worked!

The key points were:

  • Use a ubuntu image instead of just the base image
  • Install ubuntu using non-interactive mode, so it does not prompt for a keyboard
  • Rotate the display and start electronJS from .xinitrc
  • I seem to recall that .xinitrc has to be an executable script
  • Updated electronJS version to latest version in package.json

This is my /root/.xinitrc file:

#!/usr/bin/env bash
xrandr -o left
URL_LAUNCHER_WIDTH=1080 URL_LAUNCHER_HEIGHT=1920 exec /usr/src/app/node_modules/electron/dist/electron /usr/src/app/ --enable-logging

I had to explicitly set the width and height for electronJS.

This is the update I made to the “dependencies” section of my package.json file:

"dependencies": {
  "electron": "~4.0.1",
  "electron-rebuild": "^1.8.2",
  "lockfile": "^1.0.4"
},

This is my Dockerfile:

FROM resin/%%RESIN_MACHINE_NAME%%-ubuntu-node

# Install other apt deps
# Run the install in non-interactive mode
RUN apt-get update && \
  DEBIAN_FRONTEND=noninteractive \
  apt-get install -y --no-install-recommends \
  apt-utils \
  clang \
  xserver-xorg-core \
  xserver-xorg-input-all \
  xserver-xorg-video-fbdev \
  xorg \
  libxcb-image0 \
  ### Removed libxcb-util0 for ubuntu build
  ###libxcb-util0 \
  xdg-utils \
  libdbus-1-dev \
  libgtk2.0-dev \
  libnotify-dev \
  libgnome-keyring-dev \
  libgconf2-dev \
  libasound2-dev \
  libcap-dev \
  libcups2-dev \
  libxtst-dev \
  libxss1 \
  libnss3-dev \
  libsmbclient \
  libssh-4 \
  fbset \
  libexpat-dev \
  && rm -rf /var/lib/apt/lists/*

RUN echo "#!/bin/bash" > /etc/X11/xinit/xserverrc \
  && echo "" >> /etc/X11/xinit/xserverrc \
  && echo 'exec /usr/bin/X -s 0 dpms -nocursor -nolisten tcp "$@"' >> /etc/X11/xinit/xserverrc

# Move to app dir
WORKDIR /usr/src/app

# Move package.json to filesystem
COPY ./app/package.json ./

# Install npm modules for the application
RUN JOBS=MAX npm install --unsafe-perm --production && npm cache clean --force && \
  rm -rf /tmp/* && node_modules/.bin/electron-rebuild

# Move app to filesystem
COPY ./app ./

# Use .xinitrc to rotate the display and start electronJS
COPY ./xinitrc /root/.xinitrc
RUN chmod 755 /root/.xinitrc

## uncomment if you want systemd
ENV INITSYSTEM on

# Start app
CMD ["bash", "startx"]

I had to run startx from my Dockerfile.template, because when I ran it from another script without arguments, startx tried to run an xterm window, which failed. I would rather do the startx in a start.sh bash script, like the original examples, because it adjusts the shared memory and would run just the electronJS.

What was your startx command in your bash script?


#43

@pzarfos, I’ve found that @curcuz had written an answer to your question about a month ago, but sadly it never reached the forums because of a sync problem in our support app. Here’s his answer:

This would be the Dockerfile.template:

FROM resin/%%RESIN_MACHINE_NAME%%-node:10

# Install other apt deps
RUN apt-get update && apt-get install -y --no-install-recommends \
apt-utils \
clang \
xserver-xorg-core \
xserver-xorg-input-all \
xserver-xorg-video-fbdev \
xorg \
libxcb-image0 \
libxcb-util0 \
xdg-utils \
libdbus-1-dev \
libgtk2.0-dev \
libnotify-dev \
libgnome-keyring-dev \
libgconf2-dev \
libasound2-dev \
libcap-dev \
libcups2-dev \
libxtst-dev \
libxss1 \
libnss3-dev \
libsmbclient \
libssh-4 \
fbset \
libexpat-dev && rm -rf /var/lib/apt/lists/*

# Configure X window server
RUN echo "#!/bin/bash" > /etc/X11/xinit/xserverrc \
&& echo "" >> /etc/X11/xinit/xserverrc \
&& echo 'exec /usr/bin/X -s 0 dpms -nocursor -nolisten tcp "$@"' >> /etc/X11/xinit/xserverrc
COPY ./xinitrc /root/.xinitrc
COPY ./40-libinput.conf /usr/share/X11/xorg.conf.d/40-libinput.conf

# Move to app dir
WORKDIR /usr/src/app

# Move package.json to filesystem
COPY ./app/package.json ./

# Install npm modules for the application
RUN JOBS=MAX npm install --unsafe-perm --production && npm cache clean --force && \
rm -rf /tmp/* && node_modules/.bin/electron-rebuild

# Move app to filesystem
COPY ./app ./

## uncomment if you want systemd
ENV INITSYSTEM on

# Start app
CMD ["bash", "/usr/src/app/start.sh"]

This would be the start.sh script:

#!/usr/bin/env bash

# By default docker gives us 64MB of shared memory size but to display heavy
# pages we need more.
umount /dev/shm && mount -t tmpfs shm /dev/shm

# Remove any lockfiles leftover by a hard reset or shutdown
rm /tmp/.X0-lock &>/dev/null || true
rm /tmp/resin/resin-updates.lock &>/dev/null || true

# Start app
startx

This would be the xinitrc file:

#!/usr/bin/env bash

# Rotate screen 180°
xrandr -o inverted
exec /usr/src/app/node_modules/electron/dist/electron /usr/src/app/ --enable-logging

And this would be the 40-libinput.conf file:

Section "InputClass"
Identifier "libinput pointer catchall"
MatchIsPointer "on"
Option "CalibrationMatrix" "-1 0 1 0 -1 1 0 0 1"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection

Section "InputClass"
Identifier "libinput keyboard catchall"
MatchIsKeyboard "on"
Option "CalibrationMatrix" "-1 0 1 0 -1 1 0 0 1"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection

Section "InputClass"
Identifier "libinput touchpad catchall"
MatchIsTouchpad "on"
Option "CalibrationMatrix" "-1 0 1 0 -1 1 0 0 1"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection

Section "InputClass"
Identifier "libinput touchscreen catchall"
MatchIsTouchscreen "on"
Option "CalibrationMatrix" "-1 0 1 0 -1 1 0 0 1"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection

Section "InputClass"
Identifier "libinput tablet catchall"
MatchIsTablet "on"
Option "CalibrationMatrix" "-1 0 1 0 -1 1 0 0 1"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection

#46

@pzarfos

Just a quick note, but we have just released a blog post showing how to run an x11 desktop manager on the Pi or on other devices that would fit with what you were trying to do.

You can check it here: https://github.com/balena-io-playground/x11-window-manager

Cheers