Volumio x86 Touch Display Portrait to Landscape

Hi Guys,

I’m running the latest Volumio x86 with a 1920x480 touch screen. I’ve also installed Contemporary Advanced v1.0.6 plugin.

When booting up, the screen resolution is detected and it places the image in portrait mode. The touch screen is calibrated and works fine. I rotated the screen using command “sudo xrandr -d :0 -o right” and placing it in file “/etc/X11/Xsession.d/45custom_xrandr-settings” to rotate the screen every time the device boots up. There is no config.txt or userconfig.txtx under the x86 version.

Once the rotation happens, the touch thinks the screen is still in portrait mode and obviously the touch is screwed.

Is there a way to also rotate the touch to follow the screen rotation? Should I use a different command or location to rotate the screen?

Thanks

You also need to use the “xinput set-prop” command to rotate touchscreen input.
Google it, never tried it myself.
This might give you some ideas: Script to rotate the screen and touch devices on modern Linux desktops. Great for convertible laptops. · GitHub

Thanks for the info. I looked and run the script but with volumio x86 the “sudo xrandr” command gives the error “Can’t open display”. Can this be overcome?

Also, xinput is not installed. When I try to install it with “sudo apt-get install xinput” I get “Unable to locate package xinput”

Any ideas?

I got the xinput installed which helped me figure out that my touch screen is not detected by volumio…it seems.

What was detected was the wireless mouse which moves with the touch. This works well when the screen is in portrait mode but not well when the screen is rotated.

Would it be easier to rotate the mouse instead of the touch? It would have the same effect for my allowing me to control volumio from the screen.

“my touchscreen” is not very informative :wink:
Without more info, nobody will be able to help:

  • supply a log
  • tell us which touch screen (brand/model) it is

The screen is a Widecoco 1920x480 8.8" touch screen, very common on ali.

Just to recap, the touch screen is detected and works well with touch control when in portrait mode. When I rotate with the command ‘sudo xrandr -d :0 -o right’ the touch control is not rotated. When a mouse is connected the mouse works properly in portrait and landscape.

I have tried the command suggested ‘sudo xinput set-prop’ and I get the error “Unabale to connect to X server”. This very similar to command Sudo Xrandr which gives the dreaded “Can’t open Display”.

Are these errors specific to the x86 version of Volumio? Any ideas how to get touch to rotate as well?

Thanks

log, log, log

xrandr does not know about touch and does nothing for your touch screen input. Touch input is a different device, for which xinput must be used, calibration might be needed as well.
Touch “rotation” is not supported out-of-the box on x86, you are the first in 7 years to ask for that. Perhap someone with an RPi has done this.
I could only point you in the right direction, unfortunately you are on your own here unless someone else from the community has xinput experience.
And they would need a log, don’t know why you are so reluctant to provide one,

Sorry, I’m not, I just don’t know what logs are needed. Also, could you provide the location of these logs?

Thanks

https://volumio.github.io/docs/User_Manual/Sending_logs_for_troubleshooting.html

1 Like

Attached is the link to the logs. The logs are with the screen in portrait mode and touch working fine.

http://logs.volumio.org/volumio/cDSg2uK.html

1 Like

I got it working. To recap for future users having this issue.

It was a combination of two previous posts from smarter volumio users than myself:

What I had to do:

  • in putty run one command at the time:
    sudo apt update
    sudo apt install xrander xinput
    sudo DISPLAY=:0 xinput list

The last command will output a bunch of pointer and keyboard entries. Find the pointer entry that represents your touch screen. Sometimes is hard to detect which one is the actual entry responsible for the touch. One way to detect it is to connect your display with a power only USB cable, take a snapshot of the output, connect the display with a power and data USB cable and compare the outputs. If you get more than one pointer entry try them all until it works in the following steps. In my case the pointer/touch was “wch.cn USB2IIC_CTP_CONTROL”. You’ll have to substitute this with yours in the commands below

  • in putty run the following:
    sudo nano /etc/X11/Xsession.d/45custom_xrandr-settings

In the file that opens insert:

export DISPLAY=:0
xrandr -d :0 -o left
xinput set-prop ‘wch.cn USB2IIC_CTP_CONTROL’ ‘Coordinate Transformation Matrix’ 0 -1 1 1 0 0 0 0 1

Press Ctrl+o, enter, Ctrl+x and reboot. The screen and touch should rotate left. There are options for right and invert as well. You’ll have to adjust based on your needs and you’ll find the values in the second link above. Keep in mind to rotate the screen and touch in the same direction.

Hopefully this will help future Volumio x86 users.

2 Likes

@dromichet cheers!

Congrats!!

I am using the latest version 3.0 X86. I have a problem with rotating the screen to the wide-angle version. only vertical works well. I have an 8.8 inch 1920x480. The following instruction does not work. I’ve tried everything. Please help.

When I wrote: