Picroft fresh boot - only two skills load


#1

Hi,

I recently tried setting up Picroft with the stable image (version 18.8.2).
However, I’m having a problem with the skills not loading which is very similar to this previous thread:

However, the suggested fix (deleting the .skills-repo) is not working. There’s a few slight differences:
0. The volume and pairing skills show up in :skills (and work!) but nothing else.

  1. This is from a completely fresh boot (using mycroft-wipe) [version = 18.8.2].
  2. I was able to install/update the default skills with msm, but it didn’t help.
  3. I had this problem with the unstable version as well.

Oddly, after deleting .skills-repo, I did have one difference, which is that the debug log shows root - ERROR - ‘skill-hello-world’. I’m not sure what to make of that, though.

Here is the skills log: https://pastebin.com/fkn45im8

Thanks.


#2

Also, I forgot to mention that I noticed a lot of calls to mycroft.client.ws.remove in the logs. Is there any way that could be related? I think they all happened when I tried to use the :skills command (they appeared as errors below the debug screen for some reason).


#3

Hi @jmaibach

When you said you deleted the .skills-repo, was that the directory located at:
/opt/mycroft/skills ?

When running mycroft-msm update what does the output say?


#4

Hi @gez-mycroft,

Yep, it was /opt/mycroft/skills/.skills-repo. I removed it and ran mycroft-start debug.

When I run msm, it currently gives the “Info - Nothing new for *” for every skill listed. Before, it did download/install a number of default skills (which I presume is normal), but it just had to download “requirements.txt” for some of the skills (not sure why they would be installed without requirements.txt?).


#5

I just realised that you said you are running version 18.8.2, I think I misread this as 18.8.12 as that is the latest version.

To get all the latest goodness can you run

sudo mycroft-use stable
sudo apt update
sudo apt upgrade

If the skills still aren’t registering after that, we can try forcing the system to redownload all skills and see if that resolves it.


#6

I tried updating and re-ran everything, but it didn’t help. How do I force the system to redownload skills? Delete the /opt/mycroft/skills directory?

Also, I forgot to mention before that home/pi/.mycroft/skills only contains the volume, pairing, and padatious skills. Should it contain folders for every skill?
Also, I’m not sure if this is related, but the website home.mycroft.ai seems not able to get the list of installed skills under the “Configure your skills” page.

Thanks.


#7

Deleting the contents of the skills directory is probably the easiest way to force a full download.

First an obligatory warning
Anytime you run “rm -Rf” the “-R” means you are deleting ‘recursively’ so it will delete all subfolders, and the “-f” means that it won’t warn you about any protected files. So always be very careful when running this command to ensure you are deleting the right thing. eg you don’t want to accidentally hit enter early and delete everything in your root directory /

With that warning in mind you can delete all the skills by running:
sudo rm -Rf /opt/mycroft/skills/*

Then to download all the default skills run:
mycroft-msm default

If that doesn’t work, let us know what the output of this final command is. It should download all skills from github, then have a bunch of these messages:

INFO - Installing requirements.txt for mycroft-date-time
INFO - Successfully installed mycroft-alarm

#8

I just had another thought about your .skills-repo directory. Can you run:
ls -l /opt/mycroft/.skills-repo
Each file/folder should be owned by mycroft and will say mycroft twice, all the way down the list like this:
drwxr-xr-x 2 mycroft mycroft 4096 Jan 25 13:49 auto-volume

Also running:
cat /opt/mycroft/.skills-repo/DEFAULT-SKILLS.picroft
should provide a list of about 20 skills that install by default if it detects that you’re running the Picroft image.


#9

I tried clearing the skills directory and it didn’t seem to help. The output of msm seemed normal; it downloaded / installed every skill without any issues.

Running ls -l on the .skills-repo showed oddly that the owner/group is pi and not mycroft.
There are a few files (e.g. test-requirements.txt and mycroft.svg) with -rw-r–r-- instead of drwxr-xr-x but I presume that is normal.

I’m not sure how to change the owner/group, however. Running sudo chown mycroft:mycroft .skills-repo gives “invalid user: mycroft:mycroft”.

Lastly, the DEFAULT-SKILLS file seems to list all the expected skills, although fallback-aiml is commented out.

Thanks.


#10

I thing @gez-mycroft mybe are wrong - on picroft the user would be pi both in /opt/mycroft/skills nnd /opt/mycroft/.skills-repo

What model of RaspberryPi are you using ? maybe that is the problem…

What I do when I reflash a pi is something lige this:
Boot and login with ssh pi@picroft

Ctrl+C to exit startupscript

update entiere system by sudo apt-get update and sudo apt-get upgrade and then sudo reboot.

after boot login by ssh and follow the setup guide and get to the cli and pair. Then some more reboots as picroft will temt to opdate mycroft to latest version. If I am not patient Ill sk him what version, and he vill tell nnd ask if he should update :slight_smile:

It weorks for me every time, so why it dosnt for you only reasons I can think of

  • is bad internet connection

  • bad flashing of the sdcard

  • bad sdcard

  • old or to small Raspberry pi whit to little memmory.


#12

I believe I am working on a Raspberry Pi 3 Model B V1.2.

I’ve tried this on two different SD cards, and tried reflashing the image. Neither seems to help.

I do have a weak internet connection, however, and sometimes this causes the client to stall (when messagebus fails to make a connection a few times, the client becomes unresponsive for some reason), but I have managed to pair and try out the Volume skill a number of times. Also, I have a Mark 1 which is working fine on the same internet connection.

Thanks.


#13

Sorry I was wrong about the file owner, it should be pi.

Is it still the same two skills that are working? Pairing and volume?

Can you try to invoke some others like “Hey Mycroft, what time is it?” then post the voice and skills logs in a pastebin?


#14

Yep, it is always the pairing and volume skills that work.

As for the logs, I ran the client with new logs:

skills log: https://pastebin.com/npnRZJXK
voice log: https://pastebin.com/rTUwLfnb

Just to note, I had a few unrelated errors that show up as well. In particular,

  1. there were some issues establishing a messagebus connection;
  2. for some reason I had to reinstall pulseaudio (it was showing up as not installed), which is why the volume skill has a processing error at one point.

For reference, I tried the volume, time, and joke skills.

Thanks.


#15

Hey thanks for the logs, it looks like you’ve also got a problem with ALSA on your machine. When the volume skill tries to import the ALSA mixer, it fails with this error:
VolumeSkill - ERROR - Couldn't allocate mixer, ALSAAudioError('Unable to find mixer control Master,0 [default]',)

This may be blocking the other skills from loading.

Can you run: start-mycroft.sh audiotest -l
and post the list of devices back here.

Then run: amixer
and post the full output.

Also see if you are able to run alsamixer - it should give you screen that looks like this.


#16

The “Unable to find mixer control Master” is a known issue with the stretch RPI rasbian, as it does not have a Master but a PCM. I believe this brach fixes that part, but needs testing;

However that is not the issue as it only prevents you from setting the volume.

The issue is I believe that the messagebus falls on it’s knees and therefor the other services including the skills service are halted before all downloads are ready.

I see some ALSA invalid sample rate stuff, so perhaps you should have a look at this thread;


#17

Sorry, I think the mixer allocation issue and the “Invalid sample rate” were from before I installed/reinstalled pulseaudio. I tried clearing the logs and re-doing everything (after resolving the pulseaudio and connection issues) and the logs don’t seem to have that. Mea culpa, I should have just done that in the first place.

New logs
skills: https://pastebin.com/9u4uN6h0
voice: https://pastebin.com/rZp4yMvG

I am still having an issue with amixer, which at startup says “Unable to find simple control ‘PCM’,0” . Additionally, amixer does for some reason still say it is using Master:

Simple mixer control 'Master',0
  Capabilities: pvolume pswitch pswitch-joined
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 65536
  Mono:
  Front Left: Playback 1 [0%] [on]
  Front Right: Playback 1 [0%] [on]
Simple mixer control 'Capture',0
  Capabilities: cvolume cvolume-joined cswitch cswitch-joined
  Capture channels: Mono
  Limits: Capture 0 - 65536
  Mono: Capture 26281 [40%] [on]

As for the audiotest, I could only capture the following output (there were a number of ALSA lib errors, which fortunately seem to show up in the logs):

Index	Device Name
 2:	 USB PnP Sound Device: Audio (hw:1, 0)
 5:	 default

Input device: Default device @ sample rate: 16000 Hz
Playback commandline: aplay -Dhw:0,0 WAV_FILE

Lastly, I am able to run alsamixer fine. Interestingly, it gives me three options for sound cards: PulseAudio, bcm2835 ALSA, and USB PnP Sound Device. I’m not sure what’s up with that. The default is PulseAudio, but I could have sworn I was using bcm2835 ALSA before. It also lists item as Master when I thought it said PCM before (this might just reflect my lack of understanding of the display).

Thanks.


#18

Thanks @j1nx that certainly looks connected, I’ll see if we can get that update to skill-volume validated and pushed out.

@jmaibach - I’m assuming the soundtest didn’t allow you to record a sample and play it back?

Let’s try a few things in order of how easy they are and see if it is working after each.

  1. Switch sound card in alsamixer
    In alsamixer, hit F6 to select sound card and choose the USB PnP device. This will set it as your default card in ALSA which should cause everything else to use it as default.
    Rerun the ./start-mycroft.sh soundtest -l and see if it lets you record.

  2. Setting your default device via mycroft.conf
    Follow these instructions regarding USB devices
    Worth a reboot after this to ensure the new configuration is adopted.

  3. Editing your ALSA config
    nano ~/.asoundrc
    This is likely empty as it usually doesn’t exist. We’re creating a user level config to override the system level, thus if it creates any problems or just doesn’t work, we can simply delete it.
    Then is you want the USB device as both input and output you’d put the following in the file:

pcm.!default { 
    type asym playback.pcm { type plug slave.pcm “hw:1” }
    capture.pcm { type plug slave.pcm “hw:1” }
    }
  1. Changing your pulse settings
    I don’t think this will work, but if none of the above does it’s worth trying the Pulse troubleshooting steps here

#19

@gez-mycroft Sorry, I meant to mention that the sound test worked fine.


#20

Yeah right, that changes things…

Are you using the stable or unstable build at the moment?
Unstable is from 2018-12-17 whilst the stable build will be labelled 2018-09-12.

I’ve been hearing more trouble with the unstable build recently so if you are running that one, I’d try downloading the stable image and see if that resolves the problem.

If you’re already using stable, you could still try number 3 in the post above, but I wouldn’t bother with the others.

As J1nx said, there is also an update to the volume skill coming that may solve all this too. It does still need to go through testing, as we don’t want to create more issues than we solve. I will let you know when that should be coming out to devices, which should download automatically.


#21

The image I flashed was of the stable build. However, I just tried running mycroft-use stable to check; it said I’m already on stable, but threw an error message as well:
cat: /etc/apt/sources.list.d/repo.mycroft.ai.list: No such file or directory
Hopefully that is incidental.

I created the .asoundrc file, but unfortunately it doesn’t seem to solve the problem. After rebooting, the error “Unable to find simple control ‘PCM’,0” is still there, and still only the two skills load.

Is there a way I could disable the volume skill altogether and see if the other skills will load? I imagine that simply deactivating it from the console is insufficient.