Discord: Difference between revisions

Frontear (talk | contribs)
improve the troubleshooting format
DoggoBit (talk | contribs)
No edit summary
 
(2 intermediate revisions by 2 users not shown)
Line 2: Line 2:


== Installation ==
== Installation ==
{{Unfree}}
{{tip/unfree}}


=== Official Clients ===
=== Official Clients ===
Line 79: Line 79:
== Troubleshooting ==
== Troubleshooting ==


=== Screensharing on Wayland ===
=== Screen sharing on Wayland ===
Discord's screen sharing capabilities have been broken for [https://support.discord.com/hc/en-us/community/posts/360047644231-Native-Wayland-Support?page=2#comments 5 years with no official fix]. The most consistent fix involves using the web version of Discord alongside a browser that supports screen sharing in Wayland, like [[Firefox]]. Alternatively, you can use an [[Discord#Unofficial Clients|unofficial client]] like ''Webcord'' or ''Vesktop'', both of which have fixed this issue in their own ways.
Since December 2024, Discord Canary supports screen sharing on Wayland. Alternatively, you can use the web version on a browser that supports screen sharing on Wayland, or an [[Discord#Unofficial Clients|unofficial client]] like ''Webcord'' or ''Vesktop'', both of which have fixed this issue in their own ways.
{{Note|Remember to configure an [https://wiki.archlinux.org/title/XDG_Desktop_Portal#List_of_backends_and_interfaces XDG Desktop Portal] with screen cast capabilities!}}
{{Note|Remember to configure an [https://wiki.archlinux.org/title/XDG_Desktop_Portal#List_of_backends_and_interfaces XDG Desktop Portal] with screen cast capabilities!}}


Line 105: Line 105:
=== Krisp noise suppression ===
=== Krisp noise suppression ===
The Krisp noise suppression option will not work on NixOS because the Discord binary is patched before installation, and there is a DRM-style integrity check in the Krisp binary which prevents Krisp from working if the Discord binary is modified. See https://github.com/NixOS/nixpkgs/issues/195512 for details.
The Krisp noise suppression option will not work on NixOS because the Discord binary is patched before installation, and there is a DRM-style integrity check in the Krisp binary which prevents Krisp from working if the Discord binary is modified. See https://github.com/NixOS/nixpkgs/issues/195512 for details.
==== Python Script Workaround ====
{{Warning|The usage of such modifications goes against Discord's [https://discord.com/terms Terms of Service] and  Krisp's [https://krisp.ai/terms-of-use/ Terms of Use] and can result in your Discord account being terminated and/or being banned from using Krisp's services!}}
One way to enable Krisp noise suppression is by patching the <code>discord_krisp.node</code> binary to bypass its DRM verification. Below is a Nix configuration that creates a Python script that patches the binary by modifying specific bytes to bypass the license check: <syntaxhighlight lang="nixos">{ pkgs, ... }:
let
  krisp-patcher =
    pkgs.writers.writePython3Bin "krisp-patcher"
      {
        libraries = with pkgs.python3Packages; [
          capstone
          pyelftools
        ];
        flakeIgnore = [
          "E501" # line too long (82 > 79 characters)
          "F403" # 'from module import *' used; unable to detect undefined names
          "F405" # name may be undefined, or defined from star imports: module
        ];
      }
      (
        builtins.readFile (
          pkgs.fetchurl {
            url = "https://pastebin.com/raw/8tQDsMVd";
            sha256 = "sha256-IdXv0MfRG1/1pAAwHLS2+1NESFEz2uXrbSdvU9OvdJ8=";
          }
        )
      );
in
{
  environment.systemPackages = [
    krisp-patcher
  ];
}
</syntaxhighlight>
{{Note|As of version 0.0.76, the script works. But, future versions of Discord may break the script. Therefore, you should not rely on this script for long-term use. For the latest updates and more details, follow https://github.com/NixOS/nixpkgs/issues/195512.}}
After adding this to your Nix configuration and rebuilding, make sure Discord is completely closed, and then run:
<pre>$ krisp-patcher ~/.config/discord/0.0.76/modules/discord_krisp/discord_krisp.node</pre>
Once you restart Discord and join a VC, you should see a sound wave icon to the left of the hangup icon.


=== Text-to-Speech ===
=== Text-to-Speech ===