open-duelyst / duelyst

Duelyst is a digital collectible card game and turn-based strategy hybrid, developed by Counterplay Games.
Creative Commons Zero v1.0 Universal
3.61k stars 555 forks source link

[P0] Missing WebGL hardware acceleration on some Linux systems e.g. Steam Deck #248

Closed LiamDawe closed 1 year ago

LiamDawe commented 1 year ago

When trying to launch it on Steam Deck when added to Steam, and selecting the compatibility layer to use the Steam Linux Runtime container the game will launch fine but it gives an error about the video card not being supported.

Is there a way to skip this error? As it will likely run on it, most things do just fine.

Ps. I needed to use the Steam Linux Runtime compatibility option (since it's a Native game), as it uses a dependency not included by default (libgconf) on the Steam Deck OS.

willroberts commented 1 year ago

Unfortunately I don't have a Steam Deck to test this out. Can you share any screenshots or error messages?

LiamDawe commented 1 year ago

Oh yeah I suppose that would have helped woops. Screenshot_20230111_144104

willroberts commented 1 year ago

That helps, thanks! Looks like the code in question is right here: https://github.com/open-duelyst/duelyst/blob/1c138df/app/application.coffee#L3857L3892

willroberts commented 1 year ago

Out of curiosity, are you able to play in browser at https://staging.duelyst.org ?

LiamDawe commented 1 year ago

That helps, thanks! Looks like the code in question is right here: https://github.com/open-duelyst/duelyst/blob/1c138df/app/application.coffee#L3857L3892

Hah yeah was hunting for it and just found it before your comment.

Out of curiosity, are you able to play in browser at https://staging.duelyst.org ?

With Chrome in Gaming Mode on Steam Deck it does run yes. Obviously the aspect ratio is a bit off right now, quick basic test.

IMG_3356

(Sorry for camera not screenshot, Steam Deck doesn't seem to allow Chrome screenshots to upload to grab it)

marwanhilmi commented 1 year ago

You should be able to play in the browser with similar performance. The error means WebGL is not working / supported. It is possible that Linux + Electron is not correctly enabling WebGL support. There used to be some special flags required for Electron to specify GPU whitelist.

marwanhilmi commented 1 year ago

Try adding these flags when starting up: --enable-accelerated-mjpeg-decode --enable-accelerated-video --ignore-gpu-blacklist --enable-native-gpu-memory-buffers --enable-gpu-rasterization

Similar issues:

leios commented 1 year ago

I had this issue on my Arch install and using these flags solved it for me.

TinDeve commented 1 year ago

Try adding these flags when starting up: --enable-accelerated-mjpeg-decode --enable-accelerated-video --ignore-gpu-blacklist --enable-native-gpu-memory-buffers --enable-gpu-rasterization

Similar issues:

Confirmed, runs on the Deck with the flags above.

willroberts commented 1 year ago

Thanks @marwanhilmi! I'll see if I can get these flags into the Linux build so this "just works" out of the box.

willroberts commented 1 year ago

Here's the new release with the hardware acceleration flags added to the Electron build: https://github.com/open-duelyst/duelyst/releases/tag/1.97.11

Let us know if you run into any additional issues!