Thank you, Mike. Really appreciate it!
I ran into some problems that I will have to continue working on tomorrow. When I updated my firmware to 1.0.9 my screen did not flip back as I had expected so I couldn’t run through the process from scratch. Because of this, I decided to flash the SD card with the new 1.0.9 OS image so I could document the process on a fresh system. As of now, I can flip the screen 180 degrees following the same process but the touchscreen does not flip. Further investigation is needed to determine what changed between OS images (or if I screwed up) and how it can be corrected.
Thanks Mike. I’m surprised they have not supported the flip.
No it was my screw up. Rusty brain coming off a long vacation!
I got it working and will publish it later tonight. I’m going to put it in the How-to section.
Tom Geary | Founder & Creative Director | School of Thought
544 60th Street, Oakland, CA, 94609
C 415.596.4154 D 415.685.4475
Brand Strategy | Campaigns | Videos | Sites | Event Activations
EDIT: Has anyone done a 90 degree rotation?
If so can you share a photo of what the UI looks like after rotation (i.e. in portrait mode) ?
I’m considering doing this, but would definitely appreciate seeing how it looks.
After typing in line 8 I get the following error: cannot create regular file ‘40-libinput.conf.orig’ : Permission denied.
Any ideas on what I should do?
Welcome @mbro23 ! To fix that try adding the sudo command in front, like this:
sudo cp 40-libinput.conf 40-libinput.conf.orig
I was going to but have been too lazy. I switched to a 21" monitor and find it’s really too big for me. I was hoping by switching rotation 90 degrees it would mean less scrolling.
Thanks @nathanskidmore - I had a friend stop by and he worked through it for me with your guidance. Very much appreciated!
any Pictures? Sounds like a good idea.
did it not? (I am not running the Onefinity Controller, I would assume vertical display orientation would save some scrolling)
Do you have the native resolution of the monitor being used by the Controller?
1920x1080 for the standard 10" monitor.
what I meant, is, does the Controller honour the native resolution of @Dr-Al 's 21" monitor, by setting the resolution correctly?
(the resolution of this monitor may differ from 10" monitor).
@Dr-Al, also what is the native resolution of your 21" monitor?
I haven’t rotated it yet because I need to make a new mount for it when I do. The resolution is 1920x1080, the same as the 10" monitor. I have a homemade control panel that was sitting side by side with the 10" monitor but the 21" now sits on top of it to get it a little further away from the 1F. The other reason I haven’t rotated it yet is that I’m not sure if going from 1920 wide to 1080 if I’ll now have to scroll sideways. If it was just a case of turning the monitor I would have done it before now.
I believe so. You can test it by turning the controller on first and then turning on the monitor. That defaults to 640x480 I think so you’ll see if the width of the Controller page resizes or if you need to scroll sideways too.
I’m working all weekend long so I’m going to get a chance until mid week. I would assume it’ll work the same as the 10" monitor.
If anyone wants to flip only 90 degrees to portrait, this site may help you understand how to update the touch coordinates.
#SSH into the onefinity, using IP shown in upper left of onefinity controller UI. #The -l parameter lets you choose your username. ssh -l bbmc IP.ADDRESS.OF.ONEFINITY #enter password here when prompted, likely "onefinity" #mount the folder sudo mount -o remount,rw /boot #enter password here when prompted, likely "onefinity" #Make a backup of the config.txt file sudo cp /boot/config.txt /boot/config.txt.orig #Edit the original config file using nano text editor sudo nano /boot/config.txt #Add the following line to the bottom of the file and save it. display_rotate=2 #In nano editor press ctrl-o then Enter to save. Ctrl-x to quit. #mount another folder, change to the right directory sudo mount -o remount,ro /boot cd /usr/share/X11/xorg.conf.d #Make a backup of the 40-libinput.conf file, then edit with nano editor sudo cp 40-libinput.conf 40-libinput.conf.orig sudo nano 40-libinput.conf #Locate the section with Identifier “libinput touchscreen catchall”, then add the following line to the section below the line Driver “libinput” and save it Option "TransformationMatrix" "-1 0 1 0 -1 1 0 0 1" #Note the spaces between the numerals and that there is no space between “-“ and “1” #In nano editor press ctrl-o then Enter to save. Ctrl-x to quit. #Reboot your onefinity controller to see the changes sudo reboot
this is a frequently asked question. This forum does not yet have a complete User’s FAQ, but the answer to this question was answered
- here (and here, here, here, here, … )
using Portrait Orientation is something that I’d like to try out too, thus my question. I have a Onefinity Controller here but yet I didn’t try the Controller out. I just have the OS image mounted.
Display and Touch Device are in fact two different devices.
The line in
/boot/config.txt for rotating the display 90° clockwise would be:
and for rotating 90° counterclockwise (=270°) would be:
For rotation of the Touch input device, in
/usr/share/X11/xorg.conf.d/40-libinput.conf, in the InputClass Section matching ‘touchscreen’, for rotating clockwise 90° the line would be:
Option "TransformationMatrix" "0 -1 1 1 0 0 0 0 1"
or for rotating counterclockwise 90° (=270°) would be:
Option "TransformationMatrix" "0 1 0 -1 0 1 0 0 1"
These settings make rotation permanent, after reboot you can see the result.
Of course on an unixoid operating system you can change things at runtime, and this would not make permanent changes. You could try out rotation of Touch Input Device at X runtime with the following command:
xinput set-prop $TOUCH_XID 'Coordinate Transformation Matrix' 0 -1 1 1 0 0 0 0 1
where you must have identified your TOUCH_XID using
and provide it with
TOUCH_XID= . Unfortunately I cannot know which XID your touch display has, as it is different on every system and with every Touch Display Model, but I could help if you show me the output of
Note that this command rotates only Touch Input Device, not display, which can be confusing, after the command the pointer would not be where you touch with your finger, but 90° away. To align it with display again and to finally have rotated both, you can then rotate Display at X runtime too, 90° clockwise with the command:
xrandr -o right
and 90° counterclockwise:
xrandr -o left
and put it back to normal:
xrandr -o normal