Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KMS Driver Does Not Allow for Custom Images #111

Open
kcseb opened this issue Apr 24, 2022 · 12 comments
Open

KMS Driver Does Not Allow for Custom Images #111

kcseb opened this issue Apr 24, 2022 · 12 comments
Labels
Bug Something isn't working Raspberry-Pi Issues related to only Raspberry-Pi OS devices

Comments

@kcseb
Copy link

kcseb commented Apr 24, 2022

Currently on my Raspberry Pi 3 B+ running the Stream Pi Client in console mode, using a custom theme that uses a background image, causes the entire frame buffer to halt, not updating at all. This is remedied by going into the server GUI and selecting a different theme for the client and saving.

Server Build: 1.0.0 EA 3
Client Build: 1.0.0 EA 3
Raspberry Pi: 3 B+ 2GB aarch64 (running 32-bit Raspbian Lite)

@rnayabed rnayabed added Bug Something isn't working Raspberry-Pi Issues related to only Raspberry-Pi OS devices labels Apr 26, 2022
@rnayabed
Copy link
Member

Can you once confirm the following things?

  1. Which KMS driver are you using? Fake KMS or Full KMS? If you are not sure send over contents of /boot/config.txt
  2. Can you send the exact theme with the stylesheet and image?
  3. Is this 1.0.0 EA+3? Can you once take a backup of the Stream-Pi folder from the home folder of your raspberrypi to store the old 1.0.0 ea+3 config, and then try out 2.0.0 snapshot latest and see if the problem still persists? You can then delete the new Stream-Pi folder and then restore the backed up 1.0.0 ea+3, and then resume using the older stable version.
  4. Please share a picture of expected vs real.

@kcseb
Copy link
Author

kcseb commented Apr 26, 2022

A bit more context. When I select my custom theme with an image, it will not actually update the interface at all, yet the underlying buttons still work fine.

  1. Full KMS, enabled via raspi-config.
  2. https://github.com/kcseb/streampi-utils (us.kcseb.miamisurprise)
  3. Yes, this is 1.0.0 EA+3 on both server and client. EDIT: I am currently writing the new mSD card for demoing 2.0.0 snapshot. Will return with results.
  4. Expected:
    img
    It is expected to display the image completely fine, with no issue.
    4a) Real: https://kcseb.digital/vid/20220426_172407.mp4 -- Video will show the below-described behaviour.
    In reality, when you update the theme for the client and save it, the client will not update the interface, but the functionality remains.

@rnayabed
Copy link
Member

The new snapshots weigh less than 50 mb storage.

Ill try troubleshooting and report back.

@kcseb
Copy link
Author

kcseb commented Apr 26, 2022

Installed 2.0.0 client (arm32 2.0.0-SNAPSHOT) using full KMS.
./run_console throws error "java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0"

Full output;

kcseb@raspberrypi:~/StreamPi2.0.0 $ ./run_console 
JavaFX launchApplication method: launchMode=LM_CLASS
Prism pipeline init order: es2 sw 
Using Double Precision Marlin Rasterizer
Using dirty region optimizations
Using system sized mask for primitives
Not forcing power of 2 sizes for textures
Using hardware CLAMP_TO_ZERO mode
Opting in for HiDPI pixel scaling
Prism pipeline name = com.sun.prism.es2.ES2Pipeline
Loading ES2 native library ... prism_es2_monocle
WARNING: java.lang.UnsatisfiedLinkError: /home/kcseb/StreamPi2.0.0/libprism_es2_monocle.so: libGLESv2.so.2: cannot open shared object file: No such file or directory
GraphicsPipeline.createPipeline failed for com.sun.prism.es2.ES2Pipeline
java.lang.UnsatisfiedLinkError: /home/kcseb/StreamPi2.0.0/libprism_es2_monocle.so: libGLESv2.so.2: cannot open shared object file: No such file or directory
        at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)
        at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:388)
        at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:232)
        at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:174)
        at java.base/jdk.internal.loader.NativeLibraries.findFromPaths(NativeLibraries.java:315)
        at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:287)
        at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2422)
        at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:818)
        at java.base/java.lang.System.loadLibrary(System.java:1989)
        at javafx.graphics@19-internal/com.sun.glass.utils.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:166)
        at javafx.graphics@19-internal/com.sun.glass.utils.NativeLibLoader.loadLibrary(NativeLibLoader.java:54)
        at javafx.graphics@19-internal/com.sun.prism.es2.ES2Pipeline.lambda$static$0(ES2Pipeline.java:63)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
        at javafx.graphics@19-internal/com.sun.prism.es2.ES2Pipeline.<clinit>(ES2Pipeline.java:52)
        at java.base/java.lang.Class.forName0(Native Method)
        at java.base/java.lang.Class.forName(Class.java:375)
        at javafx.graphics@19-internal/com.sun.prism.GraphicsPipeline.createPipeline(GraphicsPipeline.java:218)
        at javafx.graphics@19-internal/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:92)
        at javafx.graphics@19-internal/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:125)
        at java.base/java.lang.Thread.run(Thread.java:833)
*** Fallback to Prism SW pipeline
Prism pipeline name = com.sun.prism.sw.SWPipeline
Loaded /home/kcseb/StreamPi2.0.0/././libprism_sw.so from relative path
(X) Got class = class com.sun.prism.sw.SWPipeline
Initialized prism pipeline: com.sun.prism.sw.SWPipeline
JavaFX: using com.sun.javafx.tk.quantum.QuantumToolkit
Loaded /home/kcseb/StreamPi2.0.0/././libglass_monocle.so from relative path
Udev: Failed to write to /sys/class/input/mice/uevent
      Check that you have permission to access input devices
Udev: Failed to write to /sys/class/input/mouse2/uevent
      Check that you have permission to access input devices
Udev: Failed to write to /sys/class/input/mouse0/uevent
      Check that you have permission to access input devices
Udev: Failed to write to /sys/class/input/event8/uevent
      Check that you have permission to access input devices
Udev: Failed to write to /sys/class/input/js0/uevent
      Check that you have permission to access input devices
Udev: Failed to write to /sys/class/input/input10/uevent
      Check that you have permission to access input devices
Udev: Failed to write to /sys/class/input/input0/uevent
      Check that you have permission to access input devices
Udev: Failed to write to /sys/class/input/event0/uevent
      Check that you have permission to access input devices
Udev: Failed to write to /sys/class/input/input9/uevent
      Check that you have permission to access input devices
Udev: Failed to write to /sys/class/input/event7/uevent
      Check that you have permission to access input devices
requested number of screens, return 0
RenderJob.run: internal exception
java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0
        at java.base/java.util.Arrays$ArrayList.get(Arrays.java:4165)
        at java.base/java.util.Collections$UnmodifiableList.get(Collections.java:1347)
        at javafx.graphics@19-internal/com.sun.glass.ui.Screen.getMainScreen(Screen.java:59)
        at javafx.graphics@19-internal/com.sun.prism.sw.SWPipeline.getDefaultResourceFactory(SWPipeline.java:83)
        at javafx.graphics@19-internal/com.sun.prism.GraphicsPipeline.getDefaultResourceFactory(GraphicsPipeline.java:151)
        at javafx.graphics@19-internal/com.sun.javafx.tk.quantum.QuantumRenderer.lambda$createResourceFactory$2(QuantumRenderer.java:163)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
        at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
        at javafx.graphics@19-internal/com.sun.javafx.tk.RenderJob.run(RenderJob.java:58)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
        at javafx.graphics@19-internal/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:126)
        at java.base/java.lang.Thread.run(Thread.java:833)

@rnayabed
Copy link
Member

How did you install 2.0.0 snapshot? Did yoh just manually extract zip or did you use the install script?

@rnayabed
Copy link
Member

You should use the install script.

Run

curl -sSL https://install.stream-pi.com/client/raspberry-pi | bash -s -- -d https://github.com/stream-pi/client/releases/download/2.0.0-SNAPSHOT/stream-pi-client-linux-arm32-2.0.0-SNAPSHOT-executable.zip

@kcseb
Copy link
Author

kcseb commented Apr 26, 2022

Sure, giving the script a go. Didn't realise that the script covered the snapshot builds, too. That was my bad. Will return with further information.

@rnayabed
Copy link
Member

Honestly i dont think itll make much of a diff but sure try again

@kcseb
Copy link
Author

kcseb commented Apr 26, 2022

Okay, so the script worked immediately upon reboot. So that is now showing the client fine. As for the theme... I manually changed it to 2.0.0 within the XML, since the client wouldn't load it otherwise.

After doing so, I change the theme in the client settings. After saving, I am presented with a black screen.
Now, here's the weird part. I can still access settings by tapping where the settings button should be. This takes me to the normal settings menu, which is drawn without issue.

Changing back to a default theme, all is back to normal.

@rnayabed
Copy link
Member

rnayabed commented Apr 26, 2022

Can you once change to FAKE KMS and try again? you cannot do that with raspi-config. Open /boot/config.txt and change dtoverlay=vc4-kms-v3d to dtoverlay=vc4-fkms-v3d

@kcseb
Copy link
Author

kcseb commented Apr 26, 2022

Changing that just seems to kill the frame buffer... Upon reboot, this is all the pi does. It hangs here, no SSH access, nothing. I've given it about 5 minutes or so, and nothing recovers.
img

Changing the value back to the original resolves this issue.

@rnayabed
Copy link
Member

Thanks ill look more into this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Raspberry-Pi Issues related to only Raspberry-Pi OS devices
Projects
None yet
Development

No branches or pull requests

2 participants