Rotating the Mark II touchscreen display

A year ago, I set up a Mark II dev kit. The sleep/clock skill shows the graphics upside down in the default orientation that the Pi drives the touchscreen. I say “upside down” because in my mind, the volume buttons and LEDs are pretty obviously a “top” or at least not a “bottom” of the display. None of the suggestions from reddit or other threads here at that time worked. I put my whole kit in a box and it languished there for a year due to my moving residence.

Now I just wiped the whole thing with a fresh from-scratch image dated 2021-12-13. The “get mycroft” page at Mark II - Mycroft AI still lists one of the suggestions, namely adding a “rotation=UD” to a plasma configuration file deep in the bowels of /usr land, which contrary to the name, really is not intended to be edited by end-users.

Even after a full reboot, this is still ineffective.

(1) What’s the actual effective way to get the display inverted?

(2) Why isn’t this read by some easier part of the Mycroft system from the /boot partition or ~mycroft/, or on the account console, or as a skill available to flip it on the fly?

This doesn’t seem like the kind of thing that NOBODY has addressed in the past two years.

Hey there,

Great to hear it’s back out of the box!

I just tried the rotation config and it’s not applying for me either :frowning: so I’ll need to look into that

With the display on your Mark II, the larger bezel edge should be at the bottom - is that the case?
If it is and the display is upside down then something is definitely going wrong and we haven’t seen that before.

It should also be settable in /etc/xdg/kdeglobals which would be a better place to point than the directory currently in the docs.

In the past we had a button in the pull-down menu to rotate the screen but it’s been removed for the moment as it seemed pretty obsolete for most devices. Generally you have the mics on top, and turning the device on its side or upside down is going to impact how well the mics receive audio.

I take it you’re using a custom case?

I am making a custom case. I didn’t order the lasercut case kit, and in fact the lasercut patterns weren’t finalized when I got my devkit. The arrangement of the devkit elements are as obvious as possible, using the screw mounts and short DVI ribbon cable as intended by the touchscreen maker. I could use a longer DVI ribbon twisted like a mobius but it would be ridiculous to ignore the tighter packing.

The microphones are on the same side of the Mycroft Mk II audio board as the LEDs, right?

I can find no documentation on the kdeglobals which mention orientation. Let me know when you have a setting that you’ve tested and know works, and put that on the main Get Started page too.

So far:

Adding rotation=UD to [Globals] in /usr/share/plasma/look-and-feel/org.mycroft.mark2/contents/defaults does not work.

Adding rotation=UD to [Globals] in /etc/xdg/kdeglobals does not work.

Adding display_rotate=2 and lcd_rotate=2 to /boot/config.txt does not work. [Rotate the touchscreen display? [SOLVED] - Raspberry Pi Forums]

Adding video=DSI-1:800x480@60,rotate=90 to the end of the kernel options in /boot/cmdline.txt does not work. [Update LCD display instructions by JamesH65 · Pull Request #1355 · raspberrypi/documentation · GitHub]

As buttons to rotate were disabled, Rotation needs to be set on the following file manually and the containment package recompiled: mycroft-gui-mark-2/org.kde.mycroft.mark2.js at master · MycroftAI/mycroft-gui-mark-2 · GitHub, you could try changing it on a compiled image it should be in “/usr/share/plasma/look-and-feel/org.mycroft.mark2/contents/plasmoidsetupscripts/org.kde.mycroft.mark2.js” but once you do that you might need to clear out previous configs from /home/$USER/.configs

1 Like

Thanks for the reply, AIIX.

Figuring out how to compile some obscure javascript tree is just too much pain for something so obvious. I’ll let someone smarter or more invested get around to it. Guess whoever is designing the official cases just gave up and kept the touch screen separate from the Pi because they were banging their head on the same wall. Not sure why people are removing features instead of adding them, but I suppose if we still had rotate UI config support Mycroft would release in 2026.

Yeah it’s very much about priorities. We want to get a quality base experience out with the first release, then add the extra features.

The current screen orientation is the default for that display. We did have it rotated 180 degrees for a while but I can’t remember why we rotated it back again.

To compile it you can run the following:

git clone
mkdir mycroft-gui-mark-2/build
cd mycroft-gui-mark-2/build
cmake ..
cmake --build .

This either needs to be done directly on a Pi like the Mark II, or in an emulated environment so it builds for the right architecture. It takes longer doing it on the Mark II, but for a once off - it’s much simpler.

There are other prereqs before cmake. I can install cmake itself, but get errors using it.

Could not find a package configuration file provided by "ECM"

What other packages do you need? It seems all the public web pages about Mycroft development that I see only cover skills.

I found the mycroft-gui dev pages. The mycroft-gui/ does not even have a Pi/Picroft as a standard build environment, which again seems shortsighted. The manual choice says I need cmake extra-cmake-modules kio kio-extras plasma-framework qt5-websockets qt5-webview qt5-declarative qt5-multimedia qt5-quickcontrols2 qt5-webengine qt5-base but then the Pi’s apt cannot find any of the qt5- packages.

Raspberry PI OS does not provide QT packages, its their distribution issue feel free to go open a bug report there if you want to build on it. Alternatively can use a different distribution which provides Qt5 packages out of the box for the raspberry pi 4 like Ubuntu 20.04+ (any latest version) or Manjaro.

Alternatively you can look at the OpenVoiceOS project which is still under development that is building images for the RPI4 OpenVoiceOS - A bare minimal (production type of) OS based on Buildroot - #334 by j1nx , development images are posted on its matrix channel and it does also support rotation directly from the drop down menu.

AIIX, this was not just vanilla Raspbian, this was a fully functioning up-to-date Mycroft distro image, running Mycroft GUI and all. There’s whatever runtimes for kde and kirigami on this device. It was my expectation (from gez’s suggestion above) that whatever -dev packages you need to build the Mycroft GUI should be available on the Mycroft distro, and whatever dependencies there might be should be reachable by the apt sources list, whether it’s from an upstream Raspberry-ready distro or by the Mycroft development team.

Hey there, it’s been a while since I’ve actually compiled these on a Mark II.

The OS image distributed for the Mark II isn’t intended to be a complete development platform for custom enclosures. There’s simply no need for most people to compile the GUI framework packages.

It would require some testing to see what extra packages you need. Probably:

  • qtdeclarative5-dev
  • plasma-workspace-dev
  • gettext

They should all be available in the existing apt repo’s though.