Mycroft-gui on my Mark-II - first light

@guhl I might have an idea how to apply the volume settings over i2c only if the ada_fruit is present. Could you please be so kind to let me know the output of the command;

i2cdetect -y 1

You should get a bit of table output like below;

@j1nx

   0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- 4b -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

The 4b is the ada_fruit.
I thought we discussed that already but maybe I was mistaken.

Have fun - Guhl

@guhl Ah, right indeed. Didn’t realize it completely.

Thanks! Hope it works what I have in mind.

I have been trying to get this accomplished on a RPi3 B+, and ran across this thread.

@guhl your link to your wiki does not seem to be working. Is there another somewhere?

@ builderjer the server is back online.
The hoster told me that there is a hardware-problem with the reset unit. I hope it stays online now.
I do not have this anywhere else because the server has a very high availability.
But if you want to mirror it somewhere, feel free to do so.

Have fun - Guhl

1 Like

So I almost have mycroft-gui up and going on a stock Raspberry Pi OS Lite image. I did a modification to the dev_setup.sh which did a few thing to allow this to compile on a RPi3 B+. My fork is here with the changes.

Anyway, I installed a basic X server
apt install xorg

Added this to my ~/.profile

source ~/.profile_mycroft

# Start the Mycroft backend
mycroft-start all &

startx mycroft-gui-app $* -- :0 vt$XDG_VTNR 

Everything worked…ish
Mycroft core starts, X starts, and it tries to start the gui.

First it give me the error, in a QT window, module "org.kde.kirigami" not found

Installed with apt install kirigami2-dev and ran again.

This time it gives me the error
module 'org.kde.kirigami' version2.11 is not installed

Any ideas?

By the way @guhl , I started this before I found this thread, therefore did not follow your wiki, but maybe you could shed some light on this.

Well @builderjer

first of all the problem with the kirigami version is the reason why I did this finally on ubuntu server and not on some raspbian version. If you look at my Wiki and read the entries that are indicated with (abandoned) on the mycroft_mark-2_gui wiki site then you can follow my various attempts to get the GUI running on raspbian based releases.
The development of mycroft-gui is done one kde neon and it uses rather new versions of the KDE libraries which were not available on any raspbian version and trying to compile all that from the sources has been a intense journey.

Second: If you read the mycroft-gui-mark-2_sys page you will also see that there are two different version of the mycroft-gui one is the KDE plasma nano based app and the other one is a QT5 standalone application that does not need x-server or anything else. (see the section “Alternative: Run mycroft-gui QT5 app”)

On the RP3 the KDE plasma nano based version seems to be too resource intense and I was not satisfied so I used the alternative to run the mycroft-gui QT5 application directly on eglfs without any X. I did have issues with that to get the screen rotation correctly working so i did fork mycroft-gui to GitHub - guhl/mycroft-gui: The Graphical User Interface used by the Mycroft Mark II and more - you should not use that because I did not updated it from upstream in a while but you might want to have a look on the commit screen rotation fix

Currently I am actually running my mark-2 on a RP4 using the Ubuntu Server 20.04 as a basis and using the KDE plasma nano version. It is running OK on that platform.

If you stick to the RP3 and want the GUI then I would suggest that you use Ubuntu Server 20.04 as a basis and use the mycroft-gui QT5 application on eglfs.
I might do a new guide for that but I am rather busy atm so if you want to try this then follow the original guide and skip installing anything in the Plasma Nano section that has something todo with KDE or nano or sddm

Sorry that there is no ready made installation instruction atm.

Have fun - Guhl

Thank you for your help and reply. I don’t really want a pre-built img, I really enjoy looking at code and doing it myself. I thought that I was running the qt5 version, but I will look more closely at that.

You were running the QT5 version but there is no need for startx with that, you can also run it on eglfs.
If you have a look at the mymycroftgui.service on my page it is basically:
Set the Environment variable QT_QPA_PLATFORM=eglfs and then run the GUI application.

@builderjer
I did an updated version of the guide specifically for the setup Mycroft-Gui QT5 standalone application using eglfs on Ubuntu Server 20.04. → mycroft-gui-mark-2_20.04_standalone
I did run this complete procedure using an RP4 but it should work exactly the same for RP3.

The GUI rotation does not work correctly because the guide uses the standard repository without my patch and the way how @AIIX implemented the screen rotation does not rotate and scale correctly. I will implement my patch for this again on the current code-base and do a pull request. Maybe it is considered this time.

Have fun - Guhl

1 Like

@builderjer
I did a new fix for the screen rotation based on the current source (and a pull request) and added a section ‘Screen rotation fix’ to the guide

@guhl I am just starting on your new guide, as I work most of the day. So far, so good. I’ll let you know. Thank you for your work.

@guhl And I have a GUI !!!

Now, on to the next issue. I seem to be having permission issues with creating /ramdisk/mycroft

Any ideas? Did I miss a step?

I just disabled the ipc-path in mycroft.conf and everything booted great!! I have a GUI and all of the skills seem to be working.

Now my issue is sound. I am trying to use HDMI sound through a TV, but so far to no avail. Maybe a pulseaudio setting?

Thank you very much @guhl . Your work is GREATLY appreciated!!

@guhl you are awesome!! I followed your guide, and everything is working!! The only thing is changing aplay to paplay in mycroft.conf did not work. Set it back to aplay, and I have sound. Next issue, volume control. Maybe it’s the tv I’m using, but telling mycroft to set the volume does not work. Mycroft acknowledges the change, but does not actually effect the volume.

@builderjer - Thanks for the feedback!

I can not really help you with the HDMI sound because I do not own any HDMI devices with speakers. But I try to shine some light on it.
The volume control in the Mark-2 hardware is done via the Adafruit Amplifier that is connected to the Respeaker Mic Array which is connected to the PI via USB and is basically a USB sound device.
And some Mark-2 related skill (I am not totally sure which atm) changes the way how the volume control works. It basically uses the i2c control of the Adafruit Amplifier (using the command i2cset) to change the volume instead of regular alsa or pulseaudio volume control.
So if your hardware is not a Mark-2 (it does not have the Respeaker Mic Array plus the Adafruit Amplifier) which I assume, otherwise you would not want to output sound to HDMI, then be sure that you do not use mycroft_mark_2 as the platform in the enclosure setting in mycroft.conf and also do not have a mark2 related skill in the priority_skills.
I am not exactly sure what you should use as enclosure, probably picroft.

And another thing: that sound works when you are using aplay instead of paplay means that you are using alsa as the sound system and not pulseaudio. It might not be necessary to switch to pulseaudio (and I also can not give you a step by step guide on how to do that on your hardware) but pulseaudio has some addition features like for example ducking the sound that are handy on a device like this.
But probably the user @j1nx would be a very good person to help you with the sound and enclosure topics.

@guhl I will try removing the mark-2 stuff and go from there. Thanks again for the great guide!! By the way, on a Pi3 B+ that is running, it seems to be relatively responsive, at least for the most part