I also have a similar `No access to /dev/mem` error with my user service (managed using `systemctl --user` command).
My current workaround is to add the service below.
~/.config/systemd/user/delay.service:And add the following lines.
~/.config/systemd/user/my_service_requires_dev_mem.service:Note `sleep 10` is not enough for my case.
I've not tested yet but using `.timer` might be a better solution.
I agree with this but have no idea about which service or target my service should depends on.That suggest that at the time your service starts the /dev/gpio* device nodes do not exist. If that is the case running ti as root likely won't help.
Try to find which service or target creates them and add that to your service as a dependency.
My current workaround is to add the service below.
~/.config/systemd/user/delay.service:
Code:
[Unit]Description=delay[Service]Type=oneshotExecStart=/bin/sleep 20[Install]WantedBy=default.target
~/.config/systemd/user/my_service_requires_dev_mem.service:
Code:
[Unit]After=delay.service
I've not tested yet but using `.timer` might be a better solution.
Statistics: Posted by c3_x_pop — Sun Nov 24, 2024 9:05 am