Disabling splash screen causes black screen on some devices (Unity 6000.0.0f1)

Earlier this week I deployed a webgl test of my project with the latest Unity 6 Preview (6000.0.0f1)
I noticed it worked well on my devices, but for some reason my colleague had a black screen on his phone
Since I work remotely this was not easy to debug without his phone, and I spent all week on this pretty much

Now I managed to isolate the issue, which seems to be caused by the splash screen changes in 6000.0.0f1
An empty scene with splash screen enabled works, but splash screen disabled can cause black screen
Here are some devices I tested at a nearby phone store, seems to happen mostly on lower end devices

:black_large_square: Redmi 12
:black_large_square: Redmi 13C
:white_check_mark: Redmi Note 13
:white_check_mark: Xiaomi 14
:white_check_mark: Realme 11
:black_large_square: Vivo Y18
:black_large_square: Oppo A38
:white_check_mark: Oppo Reno 11
:white_check_mark: Oppo Pad Air
:white_check_mark: iPhone 13
:white_check_mark: Galaxy S23
:white_check_mark: Galaxy A15
:white_check_mark: Galaxy Tab S9

:black_large_square:Huawei Nova 5T (TNEdition)

You can test by yourself on the links below, let me know if you get black screen on your devices thanks

No splash screen:
https://storage.googleapis.com/assets-fygito-dev/demo-unity/u6nosplash/index.html

With splash screen:
https://storage.googleapis.com/assets-fygito-dev/demo-unity/u6splash/index.html

Hi. I get a black screen on the link without a splash screen (with splash screen is fine). My device Huawei Nova 5T

1 Like

Thanks for confirmation, I added Nova 5T to the list

How odd…and frustrating. I’ll see if I can track down an offending device.

@Lemovision Can you file a bug for this, too, if you haven’t already?

Thanks for having a look! yep I did report a bug as well in the editor
It was quite odd and frustrating indeed as there was no related error in the browser console either

Also if that helps to debug you can try on TestGrid.io, which is how I tested also since I didn’t have the device
On that site they have a free trial of 2mn per session, and I found their Galaxy Tab A8 has the issue
(This device link when signed in: https://public.testgrid.io/devicecloud/device-connect/295)

I can confirm this issue is still present with Unity 6000.0.25f1 and with the Redmi Note 8 Pro

Yes, the underlying issue hasn’t been figured out yet but we’re still aware of the issue. Sorry it’s taking a long time, getting access to the problematic GPUs has been difficult.

probably unity is trying to access some stuff on the GPU “too fast” and the GPU is not ready.

the splash screen would had prevented the bug because it provides a buffer where the GPU may get ready.

could be a GPU hardware bug reporting the hardware is ready to the stuff is supposed to do but is not ready in reality

adding a custom splash screen fixes the issue?

FYI, one of our super awesome QA developers found a device in his stash that repos the problem, so I’m iterating with him on the problem, and we have something that seems to be keeping that problematic GPU from going black. Fingers crossed.

1 Like

Alright thanks for the news update @brendanduncan_u3d

I’m still trying to get to the bottom of the issue. What I thought was previously working, turned out to be false.

From what I can tell, the issue seems to be resolved for 6.0 and 6.1, but is an issue in 2022.3. I’m testing with a Galaxy Tab A8 (Mali G52 GPU). All the problem devices have a similar GPU.

It was mentioned in a previous post the problem was still present in 6000.0.25f1, but I found that not to be the case, so I’m a bit baffled by that. I am also still stumped by what is triggering it on 2022. Certainly a GPU / driver issue, but trying to find what triggers has been difficult.

I’ve also observed this on my Samsung Note 10+, in Unity 6.
I’m building with Unity 6000.0.26 (previously 6000.0.16 - same issue).
Version: OpenGL ES 3.0 (WebGL 2.0 (OpenGL ES 3.0 Chromium))

I can however provide additional context, in that the 3D scene is performing all the correct draw calls and the frame buffer looks correct. Additionally, the application logs all the correct steps, loads addressables, and is interactable. Feels like there’s an overlay or something that doesn’t get dismissed, or the canvas itself fails to render the buffer.

I used SpectorJS to view draw calls.
(Below is a screenshot of my test project with SpectorJS - the actual application renders black, but Spector can see the draw calls)

In my case, I’m using Unity within a React app

export default function Home() {

    const platform = "Build";
    const basePath: string = `/test/`;

    var SPECTOR = require("spectorjs");

    var spector = new SPECTOR.Spector();
    spector.displayUI();

    // Unity context and access
    const { unityProvider, isLoaded, loadingProgression, sendMessage, addEventListener, removeEventListener, UNSAFE__unityInstance } =
        useUnityContext({
            loaderUrl: basePath + `${platform}.loader.js`,
            dataUrl: basePath + `${platform}.data.unityweb`,
            frameworkUrl: basePath + `${platform}.framework.js.unityweb`,
            codeUrl: basePath + `${platform}.wasm.unityweb`,
            companyName: "--",
            productName: "--",
            productVersion: "0.1",
            webglContextAttributes: {
                preserveDrawingBuffer: true,
                alpha: false,depth:true, antialias:false,
            },
        });
    
  return (
      <main className="h-screen w-screen overflow-none max-w-full">
          <Unity className="absolute size-full pointer-events-auto"
                 unityProvider={unityProvider}
                 id={"unity_primary_canvas"} {...BlockContextMenu} />
      </main>
  );
}

There are no errors in the logs.

I finally got a device locally to repo the problem. What I found is that there appears to be what looks like a driver or ANGLE bug with the Mali GPUs, where the alpha clear pass at the end is clearing all of the channels, not just the alpha channel. It only does that when the alpha clear is done on a framebuffer texture, and with some other condition(s) that I haven’t figured out yet.

I found a work around that appears to be working, at least with my local tests. I’m prepping PRs for it now, and hope to get that out soon.

1 Like

If you want to try an unsupported, unofficial, use at your own risk work-around, you could try this little jspre plugin script that will disable the alpha clear call, theoretically getting past the clear call that is going bad on the Mali GPUs.

The Discussions attachments are picky, so I had to add a .txt extension. Copy the file to Assets/plugins/WebGL/fix_black_screen.jspre.

fix_black_screen.jspre.txt (1.3 KB)

Amazing, that fixes it for me! I’m still prototyping, so I’ll keep that hacky work-around in so we can test on mobile until a formal fix is released. Thanks!

1 Like

Okay glad you seemed to have figured it out, thanks!
I’ll try as well later when the official fix is on

Using unity 6000.0.21,
The problem is while we still disabled the show splash screen option, there is still few options below,
A placeholder Static image
Background colour,

And the problem is background colour option should only be available when user put static image otherwise it should be disabled which unity isn’t doing. As a result though I disabled my splash screen unity still show that black background for few seconds first and then load my scene. To make sure if that black was causing by my phone or unity settings I change the background colour to white and it shows up in android build,
The thing is when I disabled my splash screen there should be no other option there whereas there is still a background colour option which shows every time I run my game in my phone. Irritating.

The fix should be in 2022.3.55f1, 6000.0.31f1, and 6000.1.0a8.

1 Like

@IrtezaRmassud you can file an issue for the things you would like to see, and we can take a look into any improvements

1 Like