Software-only rendering on Linux

1,868 views
Skip to first unread message

Igor Bukanov

unread,
Sep 14, 2023, 8:05:45 AM9/14/23
to Chromium-dev
Hi!

What is the proper way to always use software rendering with no hardware acceleration on Linux? It is preferable to have runtime flags for that, but a build-time option is also OK.

I tried to add to the command line:

    --use-gl=angle --use-angle=swiftshader-webgl --use-vulkan=swiftshader

But on a Linux VM without GPU I still gets errors in the log with Chromium 117 build :

[154:154:0914/135640.575152:ERROR:angle_platform_impl.cc(44)] Display.cpp:1038 (initialize): ANGLE Display::initialize error 0: Internal Vulkan error (-3): Initialization
 of an object could not be completed for implementation-specific reasons, in ../../third_party/angle/src/libANGLE/renderer/vulkan/RendererVk.cpp, initialize:1728.

ERR: Display.cpp:1038 (initialize): ANGLE Display::initialize error 0: Internal Vulkan error (-3): Initialization of an object could not be completed for implementation-s
pecific reasons, in ../../third_party/angle/src/libANGLE/renderer/vulkan/RendererVk.cpp, initialize:1728.
[154:154:0914/135640.575274:ERROR:gl_display.cc(520)] EGL Driver message (Critical) eglInitialize: Internal Vulkan error (-3): Initialization of an object could not be co
mpleted for implementation-specific reasons, in ../../third_party/angle/src/libANGLE/renderer/vulkan/RendererVk.cpp, initialize:1728.
[154:154:0914/135640.575322:ERROR:gl_display.cc(795)] eglInitialize SwANGLE failed with error EGL_NOT_INITIALIZED
[154:154:0914/135640.575365:ERROR:gl_display.cc(829)] Initialization of all EGL display types failed.
[154:154:0914/135640.575424:ERROR:gl_ozone_egl.cc(26)] GLDisplayEGL::Initialize failed.
[154:154:0914/135640.575711:ERROR:angle_platform_impl.cc(44)] Display.cpp:1038 (initialize): ANGLE Display::initialize error 0: Internal Vulkan error (-3): Initialization
 of an object could not be completed for implementation-specific reasons, in ../../third_party/angle/src/libANGLE/renderer/vulkan/RendererVk.cpp, initialize:1728.
ERR: Display.cpp:1038 (initialize): ANGLE Display::initialize error 0: Internal Vulkan error (-3): Initialization of an object could not be completed for implementation-s
pecific reasons, in ../../third_party/angle/src/libANGLE/renderer/vulkan/RendererVk.cpp, initialize:1728.
[154:154:0914/135640.575766:ERROR:gl_display.cc(520)] EGL Driver message (Critical) eglInitialize: Internal Vulkan error (-3): Initialization of an object could not be co
mpleted for implementation-specific reasons, in ../../third_party/angle/src/libANGLE/renderer/vulkan/RendererVk.cpp, initialize:1728.
[154:154:0914/135640.575807:ERROR:gl_display.cc(795)] eglInitialize SwANGLE failed with error EGL_NOT_INITIALIZED
[154:154:0914/135640.575844:ERROR:gl_display.cc(829)] Initialization of all EGL display types failed.
[154:154:0914/135640.575885:ERROR:gl_ozone_egl.cc(26)] GLDisplayEGL::Initialize failed.
[154:154:0914/135640.577160:ERROR:viz_main_impl.cc(196)] Exiting GPU process due to errors during initialization

ERR: Display.cpp:1038 (initialize): ANGLE Display::initialize error 0: Internal Vulkan error (-3): Initialization of an object could not be completed for implementation-specific reasons, in ../../third_party/angle/src/libANGLE/renderer/vulkan/RendererVk.cpp, initialize:1728.


If I replace one the command line --use-vulkan=swiftshader with --disable-features=Vulkan, then I got roughly the same errors:

[193:193:0914/140231.803202:ERROR:angle_platform_impl.cc(44)] Display.cpp:1038 (initialize): ANGLE Display::initialize error 0: Internal Vulkan error (-3): Initialization of an object could not be completed for implementation-specific reasons, in ../../third_party/angle/src/libANGLE/renderer/vulkan/RendererVk.cpp, initialize:1728.
ERR: Display.cpp:1038 (initialize): ANGLE Display::initialize error 0: Internal Vulkan error (-3): Initialization of an object could not be completed for implementation-specific reasons, in ../../third_party/angle/src/libANGLE/renderer/vulkan/RendererVk.cpp, initialize:1728.
[193:193:0914/140231.803312:ERROR:gl_display.cc(520)] EGL Driver message (Critical) eglInitialize: Internal Vulkan error (-3): Initialization of an object could not be completed for implementation-specific reasons, in ../../third_party/angle/src/libANGLE/renderer/vulkan/RendererVk.cpp, initialize:1728.
[193:193:0914/140231.803366:ERROR:gl_display.cc(795)] eglInitialize SwANGLE failed with error EGL_NOT_INITIALIZED
[193:193:0914/140231.803424:ERROR:gl_display.cc(829)] Initialization of all EGL display types failed.
[193:193:0914/140231.803473:ERROR:gl_ozone_egl.cc(26)] GLDisplayEGL::Initialize failed.
[193:193:0914/140231.803786:ERROR:angle_platform_impl.cc(44)] Display.cpp:1038 (initialize): ANGLE Display::initialize error 0: Internal Vulkan error (-3): Initialization of an object could not be completed for implementation-specific reasons, in ../../third_party/angle/src/libANGLE/renderer/vulkan/RendererVk.cpp, initialize:1728.
ERR: Display.cpp:1038 (initialize): ANGLE Display::initialize error 0: Internal Vulkan error (-3): Initialization of an object could not be completed for implementation-specific reasons, in ../../third_party/angle/src/libANGLE/renderer/vulkan/RendererVk.cpp, initialize:1728.
[193:193:0914/140231.803844:ERROR:gl_display.cc(520)] EGL Driver message (Critical) eglInitialize: Internal Vulkan error (-3): Initialization of an object could not be completed for implementation-specific reasons, in ../../third_party/angle/src/libANGLE/renderer/vulkan/RendererVk.cpp, initialize:1728.
[193:193:0914/140231.803887:ERROR:gl_display.cc(795)] eglInitialize SwANGLE failed with error EGL_NOT_INITIALIZED
[193:193:0914/140231.803937:ERROR:gl_display.cc(829)] Initialization of all EGL display types failed.
[193:193:0914/140231.803977:ERROR:gl_ozone_egl.cc(26)] GLDisplayEGL::Initialize failed.
[193:193:0914/140231.805200:ERROR:viz_main_impl.cc(196)] Exiting GPU process due to errors during initialization
[88:208:0914/140231.814839:WARNING:property.cc(144)] DaemonVersion: GetAndBlock: failed.
[212:212:0914/140231.857711:ERROR:angle_platform_impl.cc(44)] Display.cpp:1038 (initialize): ANGLE Display::initialize error 0: Internal Vulkan error (-3): Initialization of an object could not be completed for implementation-specific reasons, in ../../third_party/angle/src/libANGLE/renderer/vulkan/RendererVk.cpp, initialize:1728.
ERR: Display.cpp:1038 (initialize): ANGLE Display::initialize error 0: Internal Vulkan error (-3): Initialization of an object could not be completed for implementation-specific reasons, in ../../third_party/angle/src/libANGLE/renderer/vulkan/RendererVk.cpp, initialize:1728.
[212:212:0914/140231.857834:ERROR:gl_display.cc(520)] EGL Driver message (Critical) eglInitialize: Internal Vulkan error (-3): Initialization of an object could not be completed for implementation-specific reasons, in ../../third_party/angle/src/libANGLE/renderer/vulkan/RendererVk.cpp, initialize:1728.
[212:212:0914/140231.857905:ERROR:gl_display.cc(795)] eglInitialize SwANGLE failed with error EGL_NOT_INITIALIZED
[212:212:0914/140231.857961:ERROR:gl_display.cc(829)] Initialization of all EGL display types failed.
[212:212:0914/140231.858007:ERROR:gl_ozone_egl.cc(26)] GLDisplayEGL::Initialize failed.
[212:212:0914/140231.858393:ERROR:angle_platform_impl.cc(44)] Display.cpp:1038 (initialize): ANGLE Display::initialize error 0: Internal Vulkan error (-3): Initialization
 of an object could not be completed for implementation-specific reasons, in ../../third_party/angle/src/libANGLE/renderer/vulkan/RendererVk.cpp, initialize:1728.
ERR: Display.cpp:1038 (initialize): ANGLE Display::initialize error 0: Internal Vulkan error (-3): Initialization of an object could not be completed for implementation-s
pecific reasons, in ../../third_party/angle/src/libANGLE/renderer/vulkan/RendererVk.cpp, initialize:1728.
[212:212:0914/140231.858471:ERROR:gl_display.cc(520)] EGL Driver message (Critical) eglInitialize: Internal Vulkan error (-3): Initialization of an object could not be co
mpleted for implementation-specific reasons, in ../../third_party/angle/src/libANGLE/renderer/vulkan/RendererVk.cpp, initialize:1728.
[212:212:0914/140231.858532:ERROR:gl_display.cc(795)] eglInitialize SwANGLE failed with error EGL_NOT_INITIALIZED
[212:212:0914/140231.858571:ERROR:gl_display.cc(829)] Initialization of all EGL display types failed.
[212:212:0914/140231.858621:ERROR:gl_ozone_egl.cc(26)] GLDisplayEGL::Initialize failed.
[212:212:0914/140231.860064:ERROR:viz_main_impl.cc(196)] Exiting GPU process due to errors during initialization
[88:88:0914/140232.221201:INFO:CONSOLE(0)] "Error with Permissions-Policy header: Origin trial controlled feature not enabled: 'interest-cohort'.", source:  (0)
[88:88:0914/140232.339986:INFO:CONSOLE(0)] "[DOM] Input elements should have autocomplete attributes (suggested: "current-password"): (More info: https://goo.gl/9p2vKq) %
o", source: https://lwn.net/ (0)

Sop what is the trick this day to force software rendering without attempting to initialise non-existing GPU?

Regards, Igor

Stephen White

unread,
Sep 14, 2023, 9:19:54 AM9/14/23
to ibuk...@zscaler.com, Chromium-dev
The easiest way is --disable-gpu.

Stephen
> --
> --
> Chromium Developers mailing list: chromi...@chromium.org
> View archives, change email options, or unsubscribe:
> http://groups.google.com/a/chromium.org/group/chromium-dev
> ---
> You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
> To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/b10b3063-3ed3-4cac-bda3-fe10901387c5n%40chromium.org.

Igor Bukanov

unread,
Sep 14, 2023, 9:33:18 AM9/14/23
to Stephen White, Chromium-dev
Hi,

with just `--disable-gpu` I got:

[494:494:0914/152900.125962:ERROR:angle_platform_impl.cc(44)]
Display.cpp:1038 (initialize): ANGLE Display::initialize error 0:
Internal Vulkan error (-3): Initialization
of an object could not be completed for implementation-specific
reasons, in ../../third_party/angle/src/libANGLE/renderer/vulkan/RendererVk.cpp,
initialize:1728.
ERR: Display.cpp:1038 (initialize): ANGLE Display::initialize error 0:
Internal Vulkan error (-3): Initialization of an object could not be
completed for implementation-s
pecific reasons, in
../../third_party/angle/src/libANGLE/renderer/vulkan/RendererVk.cpp,
initialize:1728.
[494:494:0914/152900.184538:ERROR:gl_display.cc(520)] EGL Driver
message (Critical) eglInitialize: Internal Vulkan error (-3):
Initialization of an object could not be completed for
implementation-specific reasons, in
../../third_party/angle/src/libANGLE/renderer/vulkan/RendererVk.cpp,
initialize:1728.
[494:494:0914/152900.184633:ERROR:gl_display.cc(795)] eglInitialize
SwANGLE failed with error EGL_NOT_INITIALIZED
[494:494:0914/152900.184776:ERROR:gl_display.cc(829)] Initialization
of all EGL display types failed.
[494:494:0914/152900.184858:ERROR:gl_ozone_egl.cc(26)]
GLDisplayEGL::Initialize failed.
[494:494:0914/152900.185552:ERROR:angle_platform_impl.cc(44)]
Display.cpp:1038 (initialize): ANGLE Display::initialize error 0:
Internal Vulkan error (-3): Initialization of an object could not be
completed for implementation-specific reasons, in
../../third_party/angle/src/libANGLE/renderer/vulkan/RendererVk.cpp,
initialize:1728.
ERR: Display.cpp:1038 (initialize): ANGLE Display::initialize error 0:
Internal Vulkan error (-3): Initialization of an object could not be
completed for implementation-s
pecific reasons, in
../../third_party/angle/src/libANGLE/renderer/vulkan/RendererVk.cpp,
initialize:1728.
[494:494:0914/152900.185745:ERROR:gl_display.cc(520)] EGL Driver
message (Critical) eglInitialize: Internal Vulkan error (-3):
Initialization of an object could not be co
mpleted for implementation-specific reasons, in
../../third_party/angle/src/libANGLE/renderer/vulkan/RendererVk.cpp,
initialize:1728.
[494:494:0914/152900.185822:ERROR:gl_display.cc(795)] eglInitialize
SwANGLE failed with error EGL_NOT_INITIALIZED
[494:494:0914/152900.185888:ERROR:gl_display.cc(829)] Initialization
of all EGL display types failed.
[494:494:0914/152900.185952:ERROR:gl_ozone_egl.cc(26)]
GLDisplayEGL::Initialize failed.
[494:494:0914/152900.208584:ERROR:viz_main_impl.cc(196)] Exiting GPU
process due to errors during initialization

...

[550:550:0914/152900.421245:ERROR:angle_platform_impl.cc(44)]
Display.cpp:1038 (initialize): ANGLE Display::initialize error 0:
Internal Vulkan error (-3): Initialization of an object could not be
completed for implementation-specific reasons, in
../../third_party/angle/src/libANGLE/renderer/vulkan/RendererVk.cpp,
initialize:1728.
ERR: Display.cpp:1038 (initialize): ANGLE Display::initialize error 0:
Internal Vulkan error (-3): Initialization of an object could not be
completed for implementation-specific reasons, in
../../third_party/angle/src/libANGLE/renderer/vulkan/RendererVk.cpp,
initialize:1728.
[550:550:0914/152900.421397:ERROR:gl_display.cc(520)] EGL Driver
message (Critical) eglInitialize: Internal Vulkan error (-3):
Initialization of an object could not be completed for
implementation-specific reasons, in
../../third_party/angle/src/libANGLE/renderer/vulkan/RendererVk.cpp,
initialize:1728.
[550:550:0914/152900.421448:ERROR:gl_display.cc(795)] eglInitialize
SwANGLE failed with error EGL_NOT_INITIALIZED
[550:550:0914/152900.421490:ERROR:gl_display.cc(829)] Initialization
of all EGL display types failed.
[550:550:0914/152900.421526:ERROR:gl_ozone_egl.cc(26)]
GLDisplayEGL::Initialize failed.
[550:550:0914/152900.421947:ERROR:angle_platform_impl.cc(44)]
Display.cpp:1038 (initialize): ANGLE Display::initialize error 0:
Internal Vulkan error (-3): Initialization of an object could not be
completed for implementation-specific reasons, in
../../third_party/angle/src/libANGLE/renderer/vulkan/RendererVk.cpp,
initialize:1728.
ERR: Display.cpp:1038 (initialize): ANGLE Display::initialize error 0:
Internal Vulkan error (-3): Initialization of an object could not be
completed for implementation-specific reasons, in
../../third_party/angle/src/libANGLE/renderer/vulkan/RendererVk.cpp,
initialize:1728.
[550:550:0914/152900.422010:ERROR:gl_display.cc(520)] EGL Driver
message (Critical) eglInitialize: Internal Vulkan error (-3):
Initialization of an object could not be completed for
implementation-specific reasons, in
../../third_party/angle/src/libANGLE/renderer/vulkan/RendererVk.cpp,
initialize:1728.
[550:550:0914/152900.422052:ERROR:gl_display.cc(795)] eglInitialize
SwANGLE failed with error EGL_NOT_INITIALIZED
[550:550:0914/152900.422089:ERROR:gl_display.cc(829)] Initialization
of all EGL display types failed.
[550:550:0914/152900.422125:ERROR:gl_ozone_egl.cc(26)]
GLDisplayEGL::Initialize failed.
[550:550:0914/152900.432636:ERROR:viz_main_impl.cc(196)] Exiting GPU
process due to errors during initialization

So it seems like --disable-gpu made things worse. It not only does not
prevent the GPU process from starting, but tries to start it at least
twice

Mike Frysinger

unread,
Sep 14, 2023, 10:27:34 AM9/14/23
to ibuk...@zscaler.com, Chromium-dev
there's a long standing bug on Linux you might be hitting -- try `unset DISPLAY` before running Chrome
-mike

--

Igor Bukanov

unread,
Sep 14, 2023, 11:00:41 AM9/14/23
to Mike Frysinger, Chromium-dev
This is not about headless, it is about avoiding useless attempts to
initialise non-existing hardware components when running Chromium in
the remote desktop in a virtual machine in a cloud.

Igor Bukanov

unread,
Sep 14, 2023, 11:01:10 AM9/14/23
to Vasiliy Telezhnikov, vap...@chromium.org, Chromium-dev
It was with Chromium 117 build with default build flags. It seems the
only way to prevent Chromium from attempting to start GPU on Linux is
to compile it with the following GN flags:

enable_vulkan = false
angle_enable_vulkan = false
angle_use_vulkan_display = false

With such biold --diable-gpu works as expected with no attempts to
start GPU and there is no more errors about initialisation of graphic.

Without this flags something triggers Vulkan initialisation and GPU
process startup no matter what kind of flags are passed to Chromium.

Is it a bug?

On Thu, Sep 14, 2023 at 4:40 PM Vasiliy Telezhnikov
<vas...@chromium.org> wrote:
>
> "--disable-gpu" should prevent chrome from using real gpu, but it still will initialize swiftshader. That seems to be what happens in your logs, though I'm surprised it failed. Is it a stable chrome or local build?
>
> To prevent using swiftshader you also need "--disable-software-rasterizer".
> Note, that this will not prevent the gpu process from starting as normally display compositor runs in a gpu process.
>
> - Vasiliy
>> To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAAbOScke8eobJXXZVPxo5sFmqbtPDSfs4rDuD07YsK8fx11QFw%40mail.gmail.com.

Vasiliy Telezhnikov

unread,
Sep 14, 2023, 6:51:08 PM9/14/23
to vap...@chromium.org, ibuk...@zscaler.com, Chromium-dev
"--disable-gpu" should prevent chrome from using real gpu, but it still will initialize swiftshader. That seems to be what happens in your logs, though I'm surprised it failed. Is it a stable chrome or local build?

To prevent using swiftshader you also need "--disable-software-rasterizer". 
Note, that this will not prevent the gpu process from starting as normally display compositor runs in a gpu process.

- Vasiliy

On Thu, Sep 14, 2023 at 10:26 AM Mike Frysinger <vap...@chromium.org> wrote:
Reply all
Reply to author
Forward
0 new messages