Search Unity

Headless build: "Shader is not supported on this GPU"

Discussion in 'Editor & General Support' started by louis030195, Jan 27, 2021.

  1. louis030195

    louis030195

    Joined:
    Feb 3, 2018
    Posts:
    14
    Hi,

    My project is completely stuck by this error for days, I have scroll the whole internet without answer.
    My problem: I have an almost naked scene, just 2-3 scripts and stuff, I build headless instance using

    Code (CSharp):
    1.  
    2. private static void Build(BuildTarget buildTarget, string filePath, bool worker = false)
    3. {
    4.     // Can't do more than low stripping, otherwise it breaks Protobuf (need to tweak link.xml)
    5.     PlayerSettings.SetManagedStrippingLevel(BuildTargetGroup.Standalone, ManagedStrippingLevel.Low);
    6.     BuildOptions options = 0;
    7.     var scenes = new[] {"Assets/Scenes/MainScene.unity"};
    8.     if (worker) {
    9.         options = UnityEditor.BuildOptions.EnableHeadlessMode;
    10.         scenes = new[] {"Assets/Scenes/Worker.unity"};
    11.     }
    12.     var buildPlayerOptions = new BuildPlayerOptions
    13.     {
    14.         scenes = scenes,
    15.         locationPathName = filePath,
    16.         target = buildTarget,
    17.         options = options
    18.     };
    19.     var buildSummary = BuildPipeline.BuildPlayer(buildPlayerOptions).summary;
    20.     Console.WriteLine($"Build summary: {buildSummary}")
    21. }
    22.  
    23. [MenuItem("HiveGum/Build Linux worker %#w")]
    24. public static void BuildLinuxDevWorker ()
    25. {
    26.     Build(BuildTarget.StandaloneLinux64, "builds/hg_worker", true);
    27. }
    28.  
    I run my headless instance with

    Also tried

    I've put all graphics to minimum and removed all included shaders, I checked I don't use any material in my scene.

    Any idea of the problem ?
    Thanks !
     
  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    Why is your project "completely stuck" over this? Don't let your project get halted over some log message OCD.

    For example, this is from my own server logfiles (Unity 2018.2.21). I just ignore it. Works fine.

    Code (csharp):
    1.  
    2. (Filename: ./Runtime/Export/Debug.bindings.h Line: 43)
    3.  
    4. Broadside Server Version: 0.8.18
    5.  
    6. (Filename: ./Runtime/Export/Debug.bindings.h Line: 43)
    7.  
    8. Loading GamePlay scene
    9.  
    10. (Filename: ./Runtime/Export/Debug.bindings.h Line: 43)
    11.  
    12. WARNING: Shader Unsupported: 'Hidden/PostProcessing/DepthOfField' - Pass 'CoC Calculation' has no vertex shader
    13. WARNING: Shader Unsupported: 'Hidden/PostProcessing/DepthOfField' - Pass 'CoC Calculation' has no vertex shader
    14. ERROR: Shader Shader is not supported on this GPU (none of subshaders/fallbacks are suitable)WARNING: Shader Unsupported: 'Hidden/PostProcessing/DepthOfField' - Setting to default shader.
    15. WARNING: Shader Unsupported: 'Hidden/PostProcessing/Debug/Waveform' - Pass '' has no vertex shader
    16. ERROR: Shader Shader is not supported on this GPU (none of subshaders/fallbacks are suitable)WARNING: Shader Unsupported: 'Hidden/PostProcessing/Debug/Waveform' - Setting to default shader.
    17. WARNING: Shader Unsupported: 'Hidden/PostProcessing/MultiScaleVO' - Pass '' has no vertex shader
    18. ERROR: Shader Shader is not supported on this GPU (none of subshaders/fallbacks are suitable)WARNING: Shader Unsupported: 'Hidden/PostProcessing/MultiScaleVO' - Setting to default shader.
    19. WARNING: Shader Unsupported: 'Hidden/PostProcessing/Debug/Vectorscope' - Pass '' has no vertex shader
    20. ERROR: Shader Shader is not supported on this GPU (none of subshaders/fallbacks are suitable)WARNING: Shader Unsupported: 'Hidden/PostProcessing/Debug/Vectorscope' - Setting to default shader.
    21. WARNING: Shader Unsupported: 'Hidden/PostProcessing/Debug/LightMeter' - Pass '' has no vertex shader
    22. ERROR: Shader Shader is not supported on this GPU (none of subshaders/fallbacks are suitable)WARNING: Shader Unsupported: 'Hidden/PostProcessing/Debug/LightMeter' - Setting to default shader.
    23. WARNING: Shader Unsupported: 'Hidden/PostProcessing/FinalPass' - Pass '' has no vertex shader
    24. WARNING: Shader Unsupported: 'Hidden/PostProcessing/Debug/Histogram' - Pass '' has no vertex shader
    25. ERROR: Shader Shader is not supported on this GPU (none of subshaders/fallbacks are suitable)WARNING: Shader Unsupported: 'Hidden/PostProcessing/Debug/Histogram' - Setting to default shader.
    26. WARNING: Shader Unsupported: 'Hidden/PostProcessing/ScreenSpaceReflections' - Pass '' has no vertex shader
    27. ERROR: Shader Shader is not supported on this GPU (none of subshaders/fallbacks are suitable)WARNING: Shader Unsupported: 'Hidden/PostProcessing/ScreenSpaceReflections' - Setting to default shader.
    28. Failed setting thread niceness (priority) to 0 due to EACCES (errno 13) violation. Lowering niceness (raising priority) requires CAP_SYS_NICE or superuser.
    29.  
    30. (Filename:  Line: 127)
    31.  
    32. Unloading 6 Unused Serialized files (Serialized files now loaded: 0)
    33. UnloadTime: 1.243000 ms
    34. WARNING: Shader Unsupported: 'World Political Map/Unlit Single Color Frontiers Geo' - Pass '' has no vertex shader
    35. WARNING: Shader Unsupported: 'World Political Map/Unlit Single Color Frontiers Alpha Geo' - Pass '' has no vertex shader
    36.  
    37. Unloading 57 unused Assets to reduce memory usage. Loaded Objects now: 27588.
    38.  
    39.  
     
    Last edited: Jan 27, 2021
  3. louis030195

    louis030195

    Joined:
    Feb 3, 2018
    Posts:
    14
    thanks, I thought it was crashing because the instance crashed after that, but it was my code in fact :)
     
  4. DJ_Design

    DJ_Design

    Joined:
    Mar 14, 2013
    Posts:
    124
    Ignoring a problem does not hide the problem. It's more than OCD as shown above.. it costs people time trying to resolve an issue that is on UNITY for allowing to exist.
    This is a bug and has been well known for a long time, and it needs to be fixed ASAP.
    Headless servers should not be deploying with lights, shaders, textures.. so on don't make it about OCD..
     
  5. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    Yeah I'd agree it is a bug, and Unity should fix it, but the total impact is just some unnecessary log messages, which is hardly "ASAP" territory. As far as including lights, textures, etc, in your headless server build, that is caused by you including them. That's not Unity's fault. Unity is just including exactly what you told it to include.
     
    dappertech likes this.
  6. DJ_Design

    DJ_Design

    Joined:
    Mar 14, 2013
    Posts:
    124
    What places it in ASAP territory is basically anyone who knows anything about networking has complained of this for years and it's still not fixed- to the extent there have been discussions of bribes, gofundme's for the team responsible to fix it.. it's just bordering on absurd imagine if every time you launched in play mode to debug there were hundreds of log clogging it you could not turn off.. as far as it being my problem because I'm including things like textures, lights and so on that's how games are made I should not have to strip them out of my project to build a server friend.
     
  7. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    Sorry, I've worked in big company engineering departments for the past 15 years. Just because a bug is old, doesn't mean its priority gets raised. Can you post a link to the bug you filed with Unity? I'm curious what the status is, whether it has been closed or not, etc.

    Yeah I know. Stripping them was your idea:
     
    dappertech and DJ_Design like this.
  8. DJ_Design

    DJ_Design

    Joined:
    Mar 14, 2013
    Posts:
    124
    15 years and you think a headless build running without lights and shaders is my idea?
    I don't have a link, if you care you'll search for it.
    Either way this isn't me expecting someone to stumble on this and fix it, it's a frustration that many have experienced with nothing done about it.
    A headless build does not need shaders period point blank end of story this is not a special request.
    @Joe-Censored
     
  9. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    I did search, and didn't find it, hence I asked. If a bug report hasn't been filed, then the reason it hasn't been fixed is obvious.
     
  10. DJ_Design

    DJ_Design

    Joined:
    Mar 14, 2013
    Posts:
    124
    I see you around the forums recommending third-party assets but I have yet to see you point out a flaw unity needs to correct by popular demand.
    You would probably say well, that's because there are no flaws or they would be reported- Some flaws are so well known and notorious those that know of them know the developers know, and such time passes it's not going to be fixed suddenly overnight. It's not a game-breaking situation no, they have higher priorities clearly.. this is not last year issue or 2 years ago even..

    https://issuetracker.unity3d.com/is...ader-produce-errors-when-run-in-headless-mode
     
  11. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    Eh, then you haven't gone through enough of my posts :p I think I've been plenty critical of Unity when I think it is warranted.

    I saw that one, but it doesn't look like the exact issue. Plus it says it is fixed. I don't think the shader errors logged are fixed, but I haven't checked in more recent builds.
     
    hippocoder likes this.
  12. DJ_Design

    DJ_Design

    Joined:
    Mar 14, 2013
    Posts:
    124

    To be clear I haven't "gone through" any of your posts. I will come across an issue and see at least in this category you are one of the first to chime in with a third-party asset that supposedly works.. great, not helping the root cause.

    You saw that one and thought, it's related but not exact so I'll post I never saw anything? Alright, we're done here.
    The point stands just because an issue is not in the front page of search results or even visible at all does not mean it has not been posted and ignored/moved/removed.
     
    Last edited: Aug 23, 2021
  13. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    You should be talking to unity not each other.
     
  14. restush96

    restush96

    Joined:
    May 28, 2019
    Posts:
    137
  15. Mochnant

    Mochnant

    Joined:
    Apr 23, 2015
    Posts:
    7
    For what it is worth, I did contact Unity about these errors but they insisted they were known and "by design" and they would not file a bug nor fix them.
     
  16. Sarudan

    Sarudan

    Joined:
    May 21, 2011
    Posts:
    65
    That's a pretty naive comment. Unity isn't to know if you are using shaders to perform GPU related server-side work. Shaders aren't solely for rendering - a lot of computation can be performed extremely efficiently using the GPU.

    How about creating a minimal Shader Variants file that gets set during a server build?
     
    dappertech and StormMuller like this.
  17. naishtech

    naishtech

    Joined:
    Sep 21, 2018
    Posts:
    20
    Good to see a solution rather than an argument - could you expand on this?
     
  18. Migmac

    Migmac

    Joined:
    Dec 26, 2018
    Posts:
    1
    ./
    headlessStartName
    | grep -v Shader
     
    Sightwalker likes this.
  19. JonasSchnettker

    JonasSchnettker

    Joined:
    Nov 3, 2022
    Posts:
    4
    ./
    headlessStartName
    | grep -v Shader

    What does it do? I also want to get rid of all Shader WARNINGS and ERRORS when deploying Servers. it is bad practice to ignore them, also annoying, when you need to look out for the 'real' ERRORS
     
  20. theCJarmy7

    theCJarmy7

    Joined:
    Mar 21, 2020
    Posts:
    1
    Anyone have a solution for this? I'd like to suppress these errors somehow, they just clutter up my log files.
     
  21. DJ_Design

    DJ_Design

    Joined:
    Mar 14, 2013
    Posts:
    124
    That sounds an awful lot like a special request rather the intended default behaviour. Thinking otherwise would indeed be quite naive of the current userbase of unity.
     
  22. ArtemPavlovskyi

    ArtemPavlovskyi

    Joined:
    Apr 10, 2021
    Posts:
    7
    Guys, I use this
    2>&1 | tee > (grep -E -v "^ERROR: Shader|^WARNING: Shader") > ./Logs/Engine.txt
    to prevent those annoying logs running a headless server build
    • 2>&1 : Redirects both standard output (stdout) and standard error (stderr) to the tee command
    • tee > (grep -E -v "^ERROR: Shader|^WARNING: Shader" > ./Logs/Engine.txt) : Uses process substitution to apply the grep filter to the output before it is written to both the console and the "Engine.txt" file.
    • "^ERROR: Shader|^WARNING: Shader" : Matches lines that start with "ERROR: Shader" or "WARNING: Shader" using the ^ anchor.
    Hope this helps
     
    Last edited: Dec 6, 2023
  23. snipshotmedia

    snipshotmedia

    Joined:
    Nov 13, 2023
    Posts:
    10
    Only problem is my dedicated server is not actually starting because of these issues.