@sbeve72: Sorry for the wall of text, but I wanted to clarify these points for everyone.
Regarding Krisp, sadly, I don't think it will ever work with this package. The discord_krisp module checks if the discord binary is signed by Discord (likely for licensing reasons). In the case of this package (using the system's electron), what ends up being verified is the electron binary, which is of course not signed by Discord.
The only way to workaround to this issue is to patch the discord_krisp module to bypass that signature check. Putting aside that I don't currently know any way to automate such patching, it's also a file that isn't packaged but dynamically downloaded by Discord in the user's home directory. Patching this file would therefore require some ugly hacks, like doing the patch in the launch wrapper script. But if we do that, what happens on the first launch when the module isn't yet downloaded, or later when Discord downloads an upgraded version? The result would be that Krisp would randomly stop to work until Discord is restarted (and the file patched again). That's unpredictable behavior.
--
Regarding crashes when watching a stream, the cause seems to be an incompatibility between the Discord H264 module (which is an already compiled native module) and the V8/nodejs version embedded by electron17+. Downgrading to electron16 fixes the issue. However, I want to avoid adding a dependency to another AUR package, unless absolutely necessary. That's why the package was updated to electron19 despite it breaking streams. A medium-term goal is also to be able to use a supported version of electron that still receives security updates (that's in the package description: "Discord [...] using the system provided electron for increased security…"). Downgrading to electron16 goes against this.
If you want to downgrade to electron16, changing the variable _electron=electron19
to _electron=electron16
in the PKGBUILD should be enough.
As an additional note, it looks like Discord has started some work to upgrade electron in their official build. This will hopefully come with fixes that make native modules compatible with newer electron versions.
--
I will update the pinned comment to summarize known issues and possible workarounds.
Pinned Comments
Zoddo commented on 2022-09-15 17:54 (UTC) (edited on 2023-03-31 17:24 (UTC) by Zoddo)
Starting with 0.0.26-1 (2023-03-31):
Starting with 0.0.20-1 (2022-09-15):
$XDG_CONFIG_HOME/discord-flags.conf
: this works likeelectron-flags.conf
, you can set in this file the command line flags you want to pass to electron when running Discord (there are some useful flags in the wiki, especially if you are experiencing lag in the Discord UI).FAQ
Discord requires an update, but this package isn't yet updated
Check the wiki.
The Discord UI is lagging
Try to add the flags recommended in the wiki in
$XDG_CONFIG_HOME/discord-flags.conf
.Krisp not working
This is an issue that will likely never be fixed for this package. The Krisp module checks if Discord binaries are signed by Discord, which is not the case with this package.
See this comment and this GitHub issue for more details and possibles workarounds.