Discord extremely laggy on arch linux

Comments

39 comments

  • Wereii

    I dug around (strace, ld_preload override of some functions, devtools).

    For me this freezing occurs only when actively calling/talking, from my findings discord is trying to change it's tray icon to microphone but something fails, strace shows a lot of repeated directory

    `/tmp/.org.chromium.Chromium.xxxxxx`

    lookups that fail, except for one temp dir where there is a discordx_x.png where the x are numbers that are constantly incremented (the temp dir is constantly created and deleted too).

    Additionally a lot of GTK icon theme polling, a lot of file stat calls into locations where icon cache could be located.

    Not to mention that during the call, there is hundreds of temp dirs (`/tmp/.org.chromium.Chromium.xxxxxx`) created and deleted (used a ld_preload with mkdtemp patched to inject logging).

    Though the icon never changes to anything except the discord logo (or with badge), the microphone logo never appears, not even muted so I am guessing discord is constantly trying to display it eventually grinding itself to halt.

    3
  • ThomasG

    OK, one random data point concerning the tray icon direction:

    Today I disabled "Desktop Notifications" and "Unread Message Badge" under "Notifications" in the settings, and it was the first time that Discord lasted a ~6 hour session without grinding to a halt.

    Not really enough to come to a final conclusion, but that's the way I will run it for now, and see what happens.

    0
  • carsten.burgard

    Okay wow, with the latest update of discord pulled in, the issue got a hell of a lot worse. Now, the GUI not only freezes during calls, but basically always, regardless of what you're doing, randomly.

    I've switched to use the webapp for now because the main app is simply unusable.

    0
  • aleksa12432

    From the Arch wiki https://wiki.archlinux.org/title/Discord 

    Launching discord with:

    discord --ignore-gpu-blocklist --disable-features=UseOzonePlatform --enable-features=VaapiVideoDecoder --use-gl=desktop --enable-gpu-rasterization --enable-zero-copy --no-sandbox

    fixes the problems. Apparently it wasn't hardware accelerated. 

    0
  • Wereii

    My problem is not caused by discord not being accelerated, it works nicely (I can even see it in nvtop so it's using GPU properly).

    My problem happens exactly only if I am calling and the longer I call the worse it gets.

    I have actually fixed my problem, it has to do something with tray icon changing when calling (I noticed that `dbus-monitor --session` was spiting out same lines over and over again, something to do with ayatana icons, whenever I opened my mic/started talking -> discord is trying to change the tray icon to open mic) so I went into

    `~/.config/discord/<last version>/modules/discord_desktop_core`

    unpacked the core.asar into `core` directory then there should be app/systemTray.js where I added fast return into setTrayIcon function (the package.json with core directory has to be edited too). If someone experiences the same problems when calling just ping me here I will describe it better, though I asked on reddit in multiple subs and noone seems to have this problem so

    My calls stopped gradually freezing the UI and my /tmp/ is not polluted with leftover /tmp/.org.chromium.Chromium.XXXXX directories that always contains just single image and that of discord logo.

    EDIT: I have just noticed that Arch wiki contains a fix for the "unresponsive during long calls", didn't notice it first time

    1
  • blogorg

    Hey all, I've been having this issue since I swapped to Fedora a few months ago (on Fedora 34 atm). What I noticed was that it's when you have the mic unmuted, particularly when you usually have Voice Activity on.

    0
  • Shika Blyat

    I wrote up a small thing about Wereii's fix, which worked for me, in case it's of use to someone:

    https://gist.github.com/Shika-B/fc15c63d66716347df8627c0d42959b5

    Thanks Wereii btw :D

     

    0
  • C L O N E

    just launch discord like this: 

    discord --ignore-gpu-blocklist --disable-features=UseOzonePlatform --enable-features=VaapiVideoDecoder --use-gl=desktop --enable-gpu-rasterization --enable-zero-copy

    source: https://wiki.archlinux.org/title/Discord#Lagging_when_scrolling_through_your_guilds

     

     

    0

Please sign in to leave a comment.