You are not logged in.
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
Copy the relevant .desktop file from /usr/share/applications/ to ~/.local/share/applications/ and edit it accordingly.
Offline
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
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
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