Do you have the logs from the device ?
Are you sure chromium is listening on port 9222 in the container ?
You can check with netstat -ltn in the container.
If you’re on the same network as the device, you can try to directly open http://<device-ip> in a browser.
Can you connect toper 9222 from within the device? If that works, then we know there is something wrong with how that port is getting exposed, and dig further on that. Otherwise, it’d indicate a problem in how Chrome is being ran
root@3126d7f:~# ping 0.0.0.0:9222
PING 0.0.0.0:9222 (0.0.0.0): 56 data bytes
64 bytes from 127.0.0.1: seq=0 ttl=64 time=0.321 ms
64 bytes from 127.0.0.1: seq=1 ttl=64 time=0.247 ms
64 bytes from 127.0.0.1: seq=2 ttl=64 time=0.258 ms
64 bytes from 127.0.0.1: seq=3 ttl=64 time=0.274 ms
Is there a chance you can share the app code with us, so we can inspect it and see if there is something going on? I’m particularly interested in the container than runs Chrome, and the docker-compose.yml definition
Hello, you can’t ping a port.
To check if it works you’d need to run telnet 0.0.0.0 9222.
I guess it works as it listens on :::9222. (I don’t know why it doesn’t listen on 127.0.0.1:9222 though).
You should see in chromium logs something like
DevTools listening on ws://127.0.0.1:9222/devtools/browser/xxxxxxxxxxxxxxxxxx
Last night I tried to get my Fin into a representative state to test this for you, using your site (and some test login details that Daniel gave me) and a TV with the same resolution you are using. Initially I could see that there was lag, especially when opening the site initially. I used the Chromium menu’s to open task manager, and saw that the GPU process was maxing out the CPU. I believe that’s because the options --enable-gpu-rasterization --force-gpu-rasterization are causing the screen to render on the GPU, but hardware acceleration isn’t enabled (or enabled but not working) for the CM3. This results in a high CPU load. To test this theory I disabled those flags and ran the site again, and found it to be much more performant. There was still some lag, but this is quite a large screen to be driven by a Cortex-A53 CPU with only 1Gb of memory - and I found the site to be very usable.
For now I think the next thing to try (before we continue trying to get Chromium DevTools working) is to use the site with the GPU disabled. You can do this by setting the following in an environment variable on the KIOSK service, set FLAGS to --disable-dev-shm-usage --user-data-dir=/usr/src/app/settings --window-position=0,0 which effectively removes the flags trying to enable the GPU use.
For context: the GPU flags are there to try and make running YouTube videos and WebGL content performant. For displaying web content on balenaDash which does not have video or WebGL, they are not needed and seem to cause higher CPU load.
Please let me know how this testing goes, and I’ll leave my Fin set up for your application in case I can help further.
Phil
You can set the value to zero, but I believe the minimum is actually 16, which the OS will default to. I’ve just run your site again, and it worked fine with this setting. I didn’t notice any improvement, but it makes sense to minimise the amount of memory allocated to the GPU in your case.
I’ll close this support thread (as long as you are happy) but keep looking into the Chrome DevTools in case you do need them, and because it will potentially benefit others. If you have any more questions or issues, you can still reply here and the thread will re-open.