if this also does not work this sounds like a bug, effectively the option only edits /boot/uboot/config.txt so as a workaround you can just edit the file by hand and add start_x=1 to it …
for a quick test and as basic example you can try my picamera-streaming-demo snap:
source is at:
IIRC the CSI camera is directly accessible via /dev/vchiq (or friends), that should be fully accessible through the opengl interface, but if in doubt, also add the camera one.
Hello
After changing the config.txt, I do see /dev/vchiq
But after installing picamera-streaming-demo, the demon errors out at start, see below
Jan 9 06:34:14 localhost picamera-streaming-demo.pistream[11117]: mmal: mmal_vc_component_create: failed to create component ‘vc.ril.camera’ (1:ENOMEM)
Jan 9 06:34:14 localhost picamera-streaming-demo.pistream[11117]: mmal: mmal_component_create_core: could not create component ‘vc.ril.camera’ (1)
Jan 9 06:34:14 localhost picamera-streaming-demo.pistream[11117]: Traceback (most recent call last):
Jan 9 06:34:14 localhost picamera-streaming-demo.pistream[11117]: File “/snap/picamera-streaming-demo/1/lib/python3.5/site-packages/picamera/camera.py”, line 456, in _init_camera
Jan 9 06:34:14 localhost picamera-streaming-demo.pistream[11117]: self._camera = mo.MMALCamera()
Jan 9 06:34:14 localhost picamera-streaming-demo.pistream[11117]: File “/snap/picamera-streaming-demo/1/lib/python3.5/site-packages/picamera/mmalobj.py”, line 2279, in init
Jan 9 06:34:14 localhost picamera-streaming-demo.pistream[11117]: super(MMALCamera, self).init()
Jan 9 06:34:14 localhost picamera-streaming-demo.pistream[11117]: File “/snap/picamera-streaming-demo/1/lib/python3.5/site-packages/picamera/mmalobj.py”, line 633, in init
Jan 9 06:34:14 localhost picamera-streaming-demo.pistream[11117]: prefix=“Failed to create MMAL component %s” % self.component_type)
Jan 9 06:34:14 localhost picamera-streaming-demo.pistream[11117]: File “/snap/picamera-streaming-demo/1/lib/python3.5/site-packages/picamera/exc.py”, line 184, in mmal_check
Jan 9 06:34:14 localhost picamera-streaming-demo.pistream[11117]: raise PiCameraMMALError(status, prefix)
Jan 9 06:34:14 localhost picamera-streaming-demo.pistream[11117]: picamera.exc.PiCameraMMALError: Failed to create MMAL component b’vc.ril.camera’: Out of memory
Jan 9 06:34:14 localhost picamera-streaming-demo.pistream[11117]: During handling of the above exception, another exception occurred:
Jan 9 06:34:14 localhost picamera-streaming-demo.pistream[11117]: Traceback (most recent call last):
Jan 9 06:34:14 localhost picamera-streaming-demo.pistream[11117]: File “/snap/picamera-streaming-demo/1/bin/pistream”, line 82, in
Jan 9 06:34:14 localhost picamera-streaming-demo.pistream[11117]: with picamera.PiCamera(resolution=‘1280x720’, framerate=24) as camera:
Jan 9 06:34:14 localhost picamera-streaming-demo.pistream[11117]: File “/snap/picamera-streaming-demo/1/lib/python3.5/site-packages/picamera/camera.py”, line 431, in init
Jan 9 06:34:14 localhost picamera-streaming-demo.pistream[11117]: self._init_camera(camera_num, stereo_mode, stereo_decimate)
Jan 9 06:34:14 localhost picamera-streaming-demo.pistream[11117]: File “/snap/picamera-streaming-demo/1/lib/python3.5/site-packages/picamera/camera.py”, line 460, in _init_camera
Jan 9 06:34:14 localhost picamera-streaming-demo.pistream[11117]: "Camera is not enabled. Try running ‘sudo raspi-config’ "
Jan 9 06:34:14 localhost picamera-streaming-demo.pistream[11117]: picamera.exc.PiCameraError: Camera is not enabled. Try running ‘sudo raspi-config’ and ensure that the camera has been enabled.
Jan 9 06:34:14 localhost systemd[1]: snap.picamera-streaming-demo.pistream.service: Main process exited, code=exited, status=1/FAILURE
Jan 9 06:34:14 localhost systemd[1]: snap.picamera-streaming-demo.pistream.service: Unit entered failed state.
Jan 9 06:34:14 localhost systemd[1]: snap.picamera-streaming-demo.pistream.service: Failed with result ‘exit-code’.
Jan 9 06:34:14 localhost systemd[1]: snap.picamera-streaming-demo.pistream.service: Service hold-off time over, scheduling restart.
Jan 9 06:34:14 localhost systemd[1]: Stopped Service for snap application picamera-streaming-demo.pistream.
Jan 9 06:34:14 localhost systemd[1]: Started Service for snap application picamera-streaming-demo.pistream.
FYI there is also a permissions error at the start of the demon
Jan 10 04:58:16 localhost systemd[1]: Started Service for snap application picamera-streaming-demo.pistream.
Jan 10 04:58:17 localhost kernel: [47663.875817] audit: type=1400 audit(1578632297.683:14138): apparmor=“DENIED” operation=“open” profile=“snap.picamera-streaming-demo.pistream” name="/proc/15351/mounts" pid=15351 comm=“python3” requested_mask=“r” denied_mask=“r” fsuid=0 ouid=0
to make the denial go away, check with snap connections picamera-streaming-demo if you did not forget to connect all the interfaces, connect them using the snap connect picamera-streaming-demo:<interface name>
though the syslog output looks like the camera is either not a CSI camera or start_x is not set correctly since it still claims that it is not enabled/found …
OK
I think I will start over and use the image the link you provided is using ubuntu-core-18-armhf+raspi3.img.xz.
I started with ubuntu-core-16-armhf+raspi3.img.xz, then added core18 snap.
And sense the camera works with Raspian the hardware should be ok.
If got it to work, i set my config.txt to:
disable_splash=1
start_debug=1
start_x=1
I was then able to see the cursor on top of the screen blinking during boot ( probability load software ).
After install of picamera-streaming-demo, it worked.
i did some more research today, seemingly the underscore is the issue here:
ogra@pi4:~$ grep start_x /boot/uboot/config.txt
ogra@pi4:~$ snap set system pi-config.start_x=1
error: cannot perform the following tasks:
- Run configure hook of "core" snap (invalid option name: "start_x")
ogra@pi4:~$ snap set system pi-config.start-x=1
ogra@pi4:~$ grep start_x /boot/uboot/config.txt
start_x=1
ogra@pi4:~$
obviously using a dash works fine …
additionally start_debug=1 should not be needed at all and AFAIK our images default to disable_splash=1, not sure how you had it unset in your image …