You are not logged in.

#1 2020-10-19 13:43:47

icar
Member
From: Catalunya
Registered: 2020-07-31
Posts: 244

[Solved] discord_arch_electron hardware acceleration

Hello, I've been using https://aur.archlinux.org/packages/disc … _electron/ which makes Discord use the system's Electron.

I then wanted to force it to use hardware acceleration by passing these arguments to electron: 

electron --enable-accelerated-mjpeg-decode --enable-accelerated-video --ignore-gpu-blacklist --enable-native-gpu-memory-buffers --enable-gpu-rasterization

Do you know how would I achieve this? Is there any place I can specify electron to always use those flags? I've been searching for a while and I cannot find anything relevant.

Last edited by icar (2020-10-19 14:37:03)

Offline

#2 2020-10-19 13:50:58

Slithery
Forum Moderator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 4,753

Re: [Solved] discord_arch_electron hardware acceleration

Copy the relevant .desktop file from /usr/share/applications/ to ~/.local/share/applications/ and edit it accordingly.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2020-10-19 14:36:01

icar
Member
From: Catalunya
Registered: 2020-07-31
Posts: 244

Re: [Solved] discord_arch_electron hardware acceleration

Slithery wrote:

Copy the relevant .desktop file from /usr/share/applications/ to ~/.local/share/applications/ and edit it accordingly.

Hey, thanks for the reply.
Unfortunately, Discord is not using a .desktop file to launch Electron and this is why it gets tricky. This is the reason I wanted to ask if there's any file where I can create some default flags for Electron, the same way you can create ~/.config/chromium-flags.conf to make Chromium use those options every time it's executed.

Edit: Found it! /opt/discord/discord is a shell script. I can give the flags there.

Offline

#4 2021-11-22 00:18:26

sbritorodr
Member
Registered: 2021-11-22
Posts: 1

Re: [Solved] discord_arch_electron hardware acceleration

electron --enable-accelerated-mjpeg-decode --enable-accelerated-video --ignore-gpu-blacklist --enable-native-gpu-memory-buffers --enable-gpu-rasterization

I've added all these parameters to the script and still didn't work. Did you finally made the hardware acceleration working on discord?

Offline

#5 2021-11-22 01:30:05

icar
Member
From: Catalunya
Registered: 2020-07-31
Posts: 244

Re: [Solved] discord_arch_electron hardware acceleration

Yes, many months ago Electron launch file in /usr/bin was updated from a symlink to a shell script that reads from ~/.config/electron-flags.conf
Use the same ones you'd use for Chromium.

Offline

Board footer

Powered by FluxBB