Solved [Ubuntu] EACCESS Permission Issue
-
Hello,
Good day/night. I have installed EXT-Screen and EXT-Pir via gateway and receiving an error upon starting magic mirror "Error Detected. Try to solve it with ‘npm run rebuild’. I see the timer still and it does turn off the display, however never wakes with PIR sensor.
I have EXT-Alert with debug enabled, this is the only info visible via magicmirror. I have many modules including googleassistant, detector, weather,background, all without issue only issue with EXT-Pir.
Via terminal screen in gateway, I see [ERROR] [PIR] [CORE] Error: EACCES: permission denied, open ‘/sys/class/gpio/export’ listed. I tried both automated install via gateway and manual through procedure on wiki.Any pointers are greatly appreciated.
-
can you try this:
sudo usermod -a -G gpio pi
Note:
pi
is the username of your account, change it if neededand restart MM²
Tell me if better ?
Note2: I have remove it from installer, If needed i will add it again
-
Hello @bugsounet
My output is: usermod: group ‘gpio’ does not exist
I forgot to mention, I am running Ubuntu 22.04.2 LTS on a pi 4. I did have to add the functionality of gpio using the official Ubuntu writeups (completed without issue). My apologies for not mentioning OS version, as most users are probaby using Raspberry Pi OS.
-
I don’t know, I never test with it (on a pi)
but I develop withUbuntu 23.04
on my desktop -
Hello @bugsounet,
Your question gave me a clue on what to investigate. Turns out, adding the user to “dialout” group in ubuntu is essentially same as “gpio” in raspberry pi os. I ran these commands:
sudo apt install rpi.gpio-common sudo adduser "${USER}" dialout sudo reboot
and all worked well. Timer works, screen shuts off as expected, turns on as expected. Maybe this is what I get for being the 1% of people doing this via ubuntu on a pi!
-
Perfect So!
I don’t know this ubuntu packageI will pin it for other users
-
bugsounet
-
bugsounet