davidanthoff / Electron.jl

Julia wrapper for Electron
Other
85 stars 19 forks source link

GPU process isn't usable #104

Closed cnrrobertson closed 2 years ago

cnrrobertson commented 2 years ago

I stumbled on an error trying to use DataVoyager.jl today that led me here. When I try

using Electron
app = Application()

I get the error

[11034:0223/094707.505041:FATAL:gpu_data_manager_impl_private.cc(439)] GPU process isn't usable. Goodbye.

This error seems connected to an Electron issue here and here for Arch Linux users. I also found similar issues for OSX when sandboxing Electron restricts access to GPU processes.

Workaround: Following the recommendations in the above issues, I was able to avoid the error by changing https://github.com/davidanthoff/Electron.jl/blob/master/src/Electron.jl#L147 to

proc = open(`$electron_path $mainjs $main_pipe_name $sysnotify_pipe_name $secure_cookie_encoded --no-sandbox`, "w", stdout)

which adds the sandboxing command directly to the electron call.

After this adjustment, my DataVoyager code works without issue. I'm not familiar with Electron, so I'm not sure if there is a better fix than this, but wanted to share.

Paethon commented 2 years ago

Thanks! I had exactly the same problem! Your solution also solved it for me.

kbarros commented 2 years ago

I also have this problem (Ubuntu` Linux, 22.04 LTS).

Another way to get this working is to use

proc = open(`$electron_path $mainjs $main_pipe_name $sysnotify_pipe_name $secure_cookie_encoded --in-process-gpu`, "w", stdout)

Specifically, --in-process-gpu can work instead of --no-sandbox.

Here is more discussion from the SUSE folks.

It seems like the solution is to upgrade to the latest Electron.

kbarros commented 2 years ago

I filed an issue on ElectronBuilder (https://github.com/davidanthoff/ElectronBuilder/issues/4). It seems like the Electron version there needs to be bumped.