duelyst icon indicating copy to clipboard operation
duelyst copied to clipboard

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

Open LiamDawe opened this issue 1 year ago • 10 comments

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.

LiamDawe avatar Jan 11 '23 12:01 LiamDawe

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

willroberts avatar Jan 11 '23 14:01 willroberts

Oh yeah I suppose that would have helped woops. Screenshot_20230111_144104

LiamDawe avatar Jan 11 '23 14:01 LiamDawe

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 avatar Jan 11 '23 14:01 willroberts

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

willroberts avatar Jan 11 '23 14:01 willroberts

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)

LiamDawe avatar Jan 11 '23 14:01 LiamDawe

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 avatar Jan 11 '23 15:01 marwanhilmi

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:

  • https://stackoverflow.com/questions/70619124/electron-linux-video-hardware-acceleration
  • https://www.reddit.com/r/linux/comments/p2ivtq/updated_guide_on_how_to_get_hardware_acceleration/
  • https://thecodersblog.com/hardware-acceleration-in-linux-with-chrome/

marwanhilmi avatar Jan 11 '23 15:01 marwanhilmi

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

leios avatar Jan 11 '23 19:01 leios

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:

  • https://stackoverflow.com/questions/70619124/electron-linux-video-hardware-acceleration
  • https://www.reddit.com/r/linux/comments/p2ivtq/updated_guide_on_how_to_get_hardware_acceleration/
  • https://thecodersblog.com/hardware-acceleration-in-linux-with-chrome/

Confirmed, runs on the Deck with the flags above.

TinDeve avatar Jan 12 '23 08:01 TinDeve

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

willroberts avatar Jan 12 '23 20:01 willroberts

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!

willroberts avatar Jan 14 '23 17:01 willroberts