235 points · by kjhughes · 3y ago · 231 comments
I work at discord and specifically have been tracking this issue. We recently released support for AV1 hardware encoding for go live streams. However, the process of probing the GPU for what codecs it supports has triggered a latent nvidia driver bug. We are releasing a workaround some time today, and nvidia is releasing a driver update to address this issue as well.
Apologies for any inconvenience this has caused.
At least this has been the case last time I checked. And there is no way to disable the animation.
I think you can ask that question to Windows, instead of probing. Call MFTEnumEx API function with MFT_CATEGORY_VIDEO_ENCODER category, MFT_ENUM_FLAG_HARDWARE | MFT_ENUM_FLAG_TRANSCODE_ONLY flags, and MFVideoFormat_AV1 in the output video subtype.
https://learn.microsoft.com/en-us/windows/win32/api/mfapi/nf...
The function you linked to queries the registry, and that on its own can be invalid information. How does that info get there?
It ultimately reminds me of this article:
https://devblogs.microsoft.com/oldnewthing/20040211-00/?p=40...
Hardware codecs are complicated. See V4L2 Linux kernel API, it exposes hardware codecs without doing anything on top.
GPU vendors have higher chances of correctly using their hardware, compared to Discord developers.
> How does that info get there?
GPU driver package installs not just user/kernel mode halves of the driver, it also installs and registers these media foundation transforms. They are DLLs which wrap hardware codecs into higher-level API.
> reminds me of this article
The article is about Win95. It's now harder to ship broken Windows drivers. Windows checks for Microsoft's digital signature, and users expect drivers to be available on Windows update.
Is this related to a view port bug of Windows, and non-alignment?
It took me a few months of on-and-off searching, but I eventually found a comment on a message board where someone had experimented with things by closing different sets of applications and then trying to connect to a DayZ server. They finally figured out it was Discord that was causing the issue.
I don't know how people find it tolerable. It'd kill the battery of a Macbook that could handle 6-8 hours of actual work (this is pre-M1) or 10ish hours of playing Netflix or whatever, in 2 hours flat, fans whirring madly the whole time. WTF. And it wasn't just one of us, and it wasn't just Macs, anyone on a battery-powered device saw their battery life cut to a sliver of what it should be. To make matters worse, nearly every session saw at least one person's Discord simply crash and have to restart. What is this, the 1990s?
I was video-chatting in goddamn 2002 on a potato. Yeah the resolution was ass, but it's not like this is some totally new, hyper-advanced tech. It should have gotten far more power efficient! Look how great codecs are now! Video chat shouldn't burn my battery like I'm having it calculate digits of Pi in a hot loop on 20 threads plus a hundred graphics-chip threads.
Lastly, Discord has absolutely the worst software engineering behind it.
This cannot be any serious part of the reason, since literally playing 3D video games fullscreen at full resolution can use less power than Discord.
[EDIT] For that matter, any streaming video platform. They're ~all extremely battery-efficient even when pushing 4k.
The mobile app is sitting in my "notification jail" folder three pages deep too, where apps that abuse badge notifications are kept.
That being said I would love to have less memory allocation on my devices when effectively idle too.
Maybe it's the assumption that legitimate/good-will programs do not interact that causes this issue. It's ridiculous, and untrue. I don't really use Discord and I have a strong distaste for the kinds of social circles that it breeds, but it is a technically excellent product.
If someone wants to see an example of a triple-A game product that is built with this kind-of misunderstanding of the NT kernel and Windows operating system (and shell, and their own compiler toolchain... Oh my...), here lies a funny video: https://www.youtube.com/watch?v=b8xtw54-lCI
This feels like "dog bit me once, so now I will hate all the dogs".
Discord is a platform for comunities, and its your choice to choose amongst them. Many of such are of superb quality you cant find anywhere else. The key is in moderation.
Note that you can also use Discord just as a browser tab, dunno what the difference is with having a client as I've only ever used the browser version (and I bet the client is electron aka outdated browser under the hood anyway).
IMHO, mobile operating systems have gotten better than legacy desktop operating systems in a bunch of key areas. But of all the platforms, the web is the worst one. The web has tracking everywhere and often uses a lot of CPU, memory, battery, and bandwidth.
The alternative to using something like Discord on the web is not a well-optimized desktop app that is somehow more respectful w.r.t. tracking than the web version. Same goes for Slack, Zoom, etc. It will still use lots of CPU and memory, and now in addition to tracking you with the techniques available to it in the browser sandbox, it will gleefully list the processes running on your machine, rifle through your files, try to get itself to start up automatically on login, try to get it so that when you "close" it it's still running in the system tray, and generally just make itself at home.
Desktop apps written by devs who first learned to write desktop apps are better than web apps. Desktop apps written by web developers are like demons that have broken through the summoning circle. The browser sandbox doesn't protect you from fingerprinting techniques and the ensuing tracking, but it protects you from a whole lot of other stuff. Take away the sandbox and the shameless data vampires get anything they want.
I think you're correct that desktop operating systems are in sore need of a permissions model for non-free apps. It should be possible to build one, and then shame vendors into using it.
I bet iOS electron based apps are tracking significantly more than FF + uBlock. It's also why I strongly dislike Electron. It's basically Chrome without uBlock.
Negative. It's actually the other way around. A browser is more controllable, especially with extensions.
An application in a browser cannot do certificate pinning preventing you from inspecting SSL traffic. Nor can you have uBlock origin running for your Discord app.
If you think websites track you, why wouldn't the app made by the company that adds the tracking on your browser ignore tracking you with their app?
In 2023, what app experience is still impossible to do in the browser?
The only things I can come up with are apps requiring access to outside hardware or files. There are now several entirely unique ways in which a AAA gaming experience could be delivered to a client browser. If we can ship resident evil frames to a Chromebook at 30+fps, is there anything we can't do?
That's not even 100% true either [1]. For instance, you can flash Android devices from the browser. The example in [2] talks to an attached Arduino device.
One use case also used to be that you would use a browser tab for one discord account and the desktop app for another, but container tabs + browser profile switching made that less necessary. And then discord eventually added support for multiple accounts.
I think we are just 1 tiny browser API away from this one being solved too.
If we can agree on a way to capture the pointer device, I'm sure we could figure out a reasonable way to capture certain user-defined keys. The actual key that is subscribed to can be abstracted away by using some registration API. I think this would eliminate key logger concerns (you'd have to ask the user for every key on their keyboard) E.g.:
RequestGlobalHotkey('my-hotkey-id', 'Discord Push to Talk');
and then if the user presses it, we call something like OnGlobalHotkey(e) where the arg contains 'my-hotkey-id' and keypress state.
a) communication protocols that aren't encapsulated in http(s), websockets, or webrtc. There's good reasons for some of this, and it's not that limiting, since popular protocols tend to grow some of these encapsulations to circumvent lazy firewalls, but it sticks out to me. Additionally, a page/app can't run a server for other browsers to connect to, it's got to be intermediated with a separate server; it would be difficult to make an offline LAN multiplayer game work.
b) reliable non-interactive push messaging and/or background connectivity. Again, there's good reasons, and you wouldn't like every page/app to have this capability, but this capability enables good offline usability by fetching data when available and pushing user driven updates when available.
For example, Email should be offline capable, and it should have nearly all the messages that were available when last the device had connectivity, and it should let me compose new messages and replies and queue them until connectivity returns. Maybe it should even speak IMAP and SMTP, but JMAP is probably good enough and browser accessible. Same with other messaging systems, assuming they have queued messages and aren't online only.
Screen capture API has been a thing for a while now:
https://developer.mozilla.org/en-US/docs/Web/API/Screen_Capt...
It has a UX almost identical to discord with regard to screen/application capture experience.
The demo has infinite days, but it's a good idea to actually donate if you like the project :)
I've been using ripcord for half a year now, and my account hasn't been disabled so far. If they actually choose to terminate my account because I'm using a more efficient client, I'm going to be really upset.
¹(usually…)
Not that I'd argue for making one Factorio frame a unit of measurement, to be fair; I just don't think the remark was useless.
Currently my biggest annoyance is for some reason every time I start a game, it also tries to access my Camera. Some people online are saying that it is because my webcam has a mic... but why is it trying to access my mic when I launch a game and discord is just sitting in the background?!?
But at the same time I have a lot of friends and groups I game with on it, sometimes in voice chat. The convenience of it is really nice.
Not really sure why the overlay would be trying to access my webcam or my microphone either though. But I also never use it and not sure why its enabled.
Please use Discord for chat, but don't use it as your main platform, please! Rant over.
I know where you are coming from here, but that's not really on Discord, but on individual server management. The people who organise their Discord servers like that would probably have created a similar mess in ye olde forum times, or on Slack or whatever. Plus bigger servers tend to be subject to SPAM and scamming and counter-measures seem ad-hoc at times because native tools for handling that are a relatively recent addition.
And for all its faults (not open source, slow, privacy concerns, OP, etc.) Discord also has some things going for it. Lots of people are already on it so network effect is a thing here, it's relatively easy to pick up the basics off and there are no immediate paywalls (which makes it attractive to semi-public projects without a cash flow), a lot of basic and advanced features are there to use, and most of them work across a lot of platforms.
My biggest gripe with it (besides the aforementioned) is that its better new features like forum channels and stage channels are locked behind usage metrics and/or paywalls.
I use it for gaming, with voice chat. Works fine. The only downside is that your voice chat audio will output to whatever channel your browser audio is set to.
Edit: also push to talk wont work, but it will pickup the microphone audio while inside a game. Set the threshold high or use the mute button on the microphone.
So if you have a headset and want voice chat to go through that, make sure to set that to the default audio channel in your OS before you join the voice chat.
Inputs (microphone) have no such restrictions.
Other than that gotcha, its about 1000% better than running a huge bloated electron App.
The first chat sites on the web e.g. Bianca’s, Poolside, and Talker were built using more primitive versions of the same interface tools used by electron and while they didn’t have the functionality of video and audio chats, they also didn’t break your GPU driver.
I miss the Unix philosophy at times.
A big part of discord's target community is gaming/gamers. One of the features it provides is the ability to livestream the game you are playing and view streams of games others are playing.
Definitely not my area, but I wouldn't be surprised if streaming some game with an overlay would require 3d acceleration to not suck.
It reminds me of the age of Windows bloatware.
Trying to pile all the ingredients on a single piece of bread does not a good sandwich make. On the contrary, it leaves me with an impression that they have to rely on the brand recognition and snowball effect of previous products.
I would probably hold their software in higher regard if it wasn’t just one monolithic multi-tool. They don’t even have to push multiple apps, but could use a modular architecture at the app level with plug-ins to support non-core functionality.
Discord was started to solve a big problem: how to communicate with friends around the world while playing games online.[1]
It’s not too much of a stretch to see that they would see streaming as a logical part of their core functionality as a result.That said, maybe it’s not the app for you. I totally get why someone would want a single-purpose tool - that’s generally the way I go and I’m not crazy about discord personally having used it a lot, written bots for etc. It’s not reasonable to criticise them for making different decisions from the ones you would make when they are going for a goal that you don’t share.
But it's hard to split it much more finely, and two in one isn't going very hard into bloatware. And I like the integration between the two.
I would change a lot of things about discord but not so much that part.
It is not a good user or server owner experience to have to manage multiple applications depending on feature. You can turn off 3d acceleration, if I understand correctly.
Discord Snap has to block many unusual activities, but I still see these:
* attempt to `ptrace` processes all the time;
* using 99% CPU;
* to work Discord needs some non-standard interfaces to be connected;
* Discord tries to track which other programs you run by default and shares it.
* too frequently restarting desktop integration snap until the logs make machine non-functional (got 500GB.)
* blocking other programs using desktop integration for file dialogs: latency of several minutes, sometimes dialogs never appear.
Discord is as dodgy app as can be. Hope we will not find it is actually another distribution of spyware.
Since programs with so many bugs and crashes are frequently prone to security issues, I recommend to replace Discord with another app that allows push-to-talk.
I think HN may have solved one of my most annoying technology mysteries... Definitely taking discord out of automatic startup. Moving back to teamspeak or some other system is quickly becoming a thing for me. I used to run a TS3 server for years.
TS3 already had a lot of features like file uploads, rich text chat, avatars, and much more, and as far as I know TS5 is mostly a reskin using the existing technology of TS3.
You might not want it, but it's not like this is unexpected behaviour. Tracking the currently running game and sharing that information with your friends is an intentional, advertised feature.
xdotool search --name 'Discord.*— Mozilla Firefox' keydown F9
xdotool search --name 'Discord.*— Mozilla Firefox' keyup F9
I configured web Discord to use F9 as the push to talk button since it seemingly doesn't conflict with anything in Firefox, but you can then bind it to any key or mouse button on your global keyboard shortcut settings.According to some people on StackExchange (I didn't test myself) this doesn't work if you're using Discord on Chromium-based browsers, which seem to reject xdotool events unless the window is focused (which xdotool can do for you, but doesn't work for the PTT usecase). Of course, this doesn't work on Firefox when running native Wayland windows because xdotool is X-only, and ydotool doesn't work either because it emulates a virtual device which would mean you still need to focus the window.
If we could pare our use of Slack down to just text, it would be a great alternative - but until them I'm stuck using the official client.
If Mumble could do streaming/video and rich text support, I think people could be peeled off Discord a tad.
But I don't know what you're talking about regarding buggy. Discord runs pretty much perfectly for me, excepting one issue (it was either Discord or Corsair Wave) that was giving fuzzy audio with a particular virtual audio input.
For how complex the server/channel/DM/text chat/"voice channel" text chat schema is, I think it's a pretty impressive product.
The stand-alone server is small, and efficient. There are countless clients that will work with it. I've run it on Linux & FreeBSD systems.
Now you need a quad core 3GHz chip and 8GB RAM just to run a chat app reliably. Where did we go wrong?
Humans are lazy (efficient?) and will always gravitate to the easiest tool for the job. If “the job” is just to make a functional chat app, it becomes wildly efficient to simply wrap your web app in electron.
I’ve done it to an existing web app and it took less than a day to suddenly have “native” .dmg and .exe to distribute.
So when we yarn for the days of IRC, I think we should also yarn for the days when JavaScript was not the de facto language for everything which lowers the bar for development so incredibly low that you are ending up with truly garbage desktop apps that should be written in native windows SDK using C++.
I think the blame fully falls on the developers of such applications, not on the framework.
But it still surprises me that Discord of all seems to care so little about the resource footprint on their users devices. Considering that Discord is still mostly used for gaming you would expect that users want the communication app's system footprint to be absolutely minimal and without any negative impact on the actual game. Thats why I always loved teamspeak so much
You would think with all the apps that use Electron this is something that would be fixed (I don't know if the root cause is Electron itself or some bad practice that people who use it do often enough that I've mentally associated it with the framework) but I've seen this issue with every Electron app I've used for any period of time (except VSCode) for years.
I do feel that these apps these days, Discord included, eat a ton of resources, and that it feels like a regression.
Skype was great at first. Then Microsoft bought Skype and turned it into a shithole. Then Microsoft said that this product is trash and migrated everyone to use MSN. Thanks, Microsoft!
It used p-2-p over port 80 so it would always reach its destination no matter the firewall rules on your network, and it allowed file transfers up to 2GB(!) in size, in 2005(!).
Can present day Discord do that?
It used p-2-p over port 80 so it would always reach its destination no matter the firewall rules on your network, and it allowed file transfers up to 2GB(!) in size, in 2005(!).
There were no better alternatives at the time.
Isn't that for showing what game you're running as your status? If you turn that feature off it should stop doing that.
This is the one that got it removed from my machine. It runs just fine in the browser so I do that. The feature I lose are ones I don't want anyways.
There are Discord employees on the thread so I gotta ask.. what's the justification on this one?
Shit like this makes open sourcing the client a must for me
The client is written in javascript. It's not hard to go look at the source.
Open source is about giving back users control over their own computer
That's a Chrome/Chromium thing. Often, if I try to open the Nvidia control panel, it will not appear until I close Chrome. I've had something similar happen with rpcs3 (a ps3 emulator) - only with that, it wouldn't start compiling shaders until Chrome was closed. They continued just fine after reopening it.
"Discord is worse with the app".