2026-01-09, 09:57 PM
FInally , after many trials and errors with Chat GPT ( Tried Perplexity and found it useless at least for this issue), this is a resume of steps taken, I hope they are valid to others as I can't replicate by myself all the things we ( GPT and me) did with success until get the service working again.
None of the solutions in this thread worked for me; I also have Maiana running and it was a fresh install, so no idea why this happens; what it's true is that now works and survives restarts:
What we did + copy/paste steps:
Context:
On RPi5/OpenPlotter, openplotter-i2c-read.service was failing because Adafruit Blinka was importing "lgpio" , but the system only had the compiled "_lgpio" module. We installed the proper lgpio Python wrapper (with the API Blinka expects) and then adjusted the systemd service to run in a writable runtime directory so lgpioncan create its notify files. After that, the service stayed running and survived reboot.
0) Check the error (optional)
1) Confirm what’s installed (you’ll usually see only _lgpio )
2) Install the PyPI lgpio wrapper system-wide (this is the key step) This forces installing the wrapper into /usr/local/... even if Debian says “already installed”.
3) Verify
imports and exposes the API Blinka needs
Run from a writable directory (important):
Expected:
4) Fix systemd service working directory (so lgpio can create its notify files)
Edit the service:
Use this [Service] block (adjust only if your system differs):
Reload + restart:
5) Confirm it’s stable (and survives reboot)
Expected: Active: active (running)
and NRestarts=0
Reboot test:
After reboot:
Hope it helps someone... (desperate as I was)
Have a good weekend!
None of the solutions in this thread worked for me; I also have Maiana running and it was a fresh install, so no idea why this happens; what it's true is that now works and survives restarts:
What we did + copy/paste steps:
Context:
On RPi5/OpenPlotter, openplotter-i2c-read.service was failing because Adafruit Blinka was importing "lgpio" , but the system only had the compiled "_lgpio" module. We installed the proper lgpio Python wrapper (with the API Blinka expects) and then adjusted the systemd service to run in a writable runtime directory so lgpioncan create its notify files. After that, the service stayed running and survived reboot.
0) Check the error (optional)
Code:
sudo systemctl status openplotter-i2c-read.service --no-pager -l
journalctl -u openplotter-i2c-read.service -n 80 --no-pager1) Confirm what’s installed (you’ll usually see only _lgpio )
Code:
python3 -c "import pkgutil; print([m.name for m in pkgutil.iter_modules() if 'lgpio' in m.name])"
python3 -c "import _lgpio; print(_lgpio.__file__)"2) Install the PyPI lgpio wrapper system-wide (this is the key step) This forces installing the wrapper into /usr/local/... even if Debian says “already installed”.
Code:
sudo apt install -y python3-pip
sudo python3 -m pip install --break-system-packages --upgrade --ignore-installed lgpio3) Verify
Code:
lgpioRun from a writable directory (important):
Code:
cd /tmp
python3 -c "import lgpio; print(lgpio.__file__); print('gpiochip_open?', hasattr(lgpio,'gpiochip_open'))"Code:
gpiochip_open? True4) Fix systemd service working directory (so lgpio can create its notify files)
Edit the service:
Code:
sudo nano /etc/systemd/system/openplotter-i2c-read.serviceUse this [Service] block (adjust only if your system differs):
Code:
[Service]
Environment=OPrescue=0
WorkingDirectory=/run/openplotter-i2c
RuntimeDirectory=openplotter-i2c
RuntimeDirectoryMode=0700
EnvironmentFile=/boot/firmware/config.txt
ExecStart=/usr/bin/openplotter-i2c-read $OPrescue
User=pi
Restart=always
RestartSec=3Reload + restart:
Code:
sudo systemctl daemon-reload
sudo systemctl restart openplotter-i2c-read.service5) Confirm it’s stable (and survives reboot)
Code:
sudo systemctl status openplotter-i2c-read.service --no-pager -l
systemctl show -p NRestarts --value openplotter-i2c-read.serviceand NRestarts=0
Reboot test:
Code:
sudo rebootAfter reboot:
Code:
sudo systemctl status openplotter-i2c-read.service --no-pager -lHope it helps someone... (desperate as I was)

Have a good weekend!

