Email or username:

Password:

Forgot your password?
Hector Martin

Today I learned that YouTube is deliberately crippling Firefox on Asahi Linux. It will give you lowered video resolutions. If you just replace "aarch64" with "x86_64" in the UA, suddenly you get 4K and everything.

They literally have a test for "is ARM", and if so, they consider your system has garbage performance and cripple the available formats/codecs. I checked the code.

Logic: Quality 1080 by default. If your machine has 2 or fewer cores, quality 480. If anything ARM, quality 240. Yes, Google thinks all ARM machines are 5 times worse than Intel machines, even if you have 20 cores or something.

Why does this not affect Chromium? Because chromium on aarch64 pretends to be x86_64

Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36

🤦‍♂️​🤦‍♂️​🤦‍♂️​🤦‍♂️​🤦‍♂️​

Welp, guess I'm shipping a user agent override for Firefox on Fedora to pretend to be x86.

94 comments
Lucy Llewellyn 🏳️‍⚧️

@marcan That's arbitary nonsense. Why are web services like this? Just let the client or user decide, dammit!

Florens Verschelde

@lucyllewy @marcan Looks like they were trying to target Android and/or all mobile operating systems, and figured that ARM means mobile, and nobody on a small screen needs 4K (and few have the CPU capacity to handle 4K).

With all the usual limits of UA and platform sniffing as a proxy for device and software capabilities (false positives/negatives + heuristic gets out of date).

Florens Verschelde

@lucyllewy @marcan And that’s usually not arbitrary nonsense, but attempts to deal with real bugs that came up in testing and user feedback.

First_Thunder

@marcan ehhhhhh. I thought they were merely crippling Adblock users, but arm users… uncool. Gonna use my user agent changer…

abadidea

@marcan that sounds like a thing that was set ten years ago and never updated; I’d bet a dollar no one currently on the team even realizes this is happening

Hector Martin

@0xabad1dea Yup, already shouting at my Google friends to file a bug.

abadidea

@marcan @hnapel even if you didn't, it's kinda hard to be this neck deep in technical stuff and not have a single google friend online :)

ROTOPE~1 :yell:

@0xabad1dea @marcan @hnapel the trick is to have one in the "doing stuff" division, not the "mergers and acquisitions and killing products" division.

NEO//LIX 🔊

@0xabad1dea @marcan Hanlon's Razor: "Never attribute to malice that which is adequately explained by stupidity." :D

Patrick Morris Miller

@neo Sufficiently advanced stupidity is indistinguishable from malice.

Julian Fietkau

@marcan Wasn't it Google that was going to phase out user agent strings altogether? I guess that's not going too smoothly.

zdnet.com/article/google-to-ph

funbaker #AssangeIsNotGuilty

@julian Why would they? They are trying to write client detection into the DNS of the internet. @marcan

Peter Bindels

@funbaker @julian @marcan No point in keeping an insecure system when you can create a secure one. Stop using user-agent strings that are often faked and instead use unfakeable attestations.

To prevent people like @marcan and myself from getting things to work properly, as you see here.

Proxfox Virtual Environment 🦊

@julian @marcan i'm still annoyed at them for blocking Leanback (youtube.com/tv) for anyone who doesn't have a smart TV user agent

Psykus

@tay So you can still use it by spoofing user-agent? Will have to try that.

Peter Bindels

@marcan User-agents are the biggest lies on the planet. Because of stuff like this.

Lona Theartlav

@marcan Huh. I just checked, and MacOS does also report Intel. So... yeah.

Raul

@marcan I remember reading recently that Youtube was crippling Firefox, and that wasn't even platform-dependent, so the shoddiness is not just for Arm:
tomshardware.com/news/youtube-

JimmyChezPants

@raulinbonn @marcan

As it was with Twitter and Reddit, so shall it be with Youtube.

#PeerTube

Glitch
@raulinbonn @marcan That reporting was wrong.

It was people with adblockers, but the adblock code didn't catch everything related to the player for a short while. There's a short snippet that on normal playing delays the video for a few seconds to inject the ads. The filter lists caught the general ad script, but not the delay code.

Now of course, statistically speaking, a poorly configured adblocker will be more likely to affect Firefox users than Chrome users, but it wasn't specifically targeting Firefox users.
@raulinbonn @marcan That reporting was wrong.

It was people with adblockers, but the adblock code didn't catch everything related to the player for a short while. There's a short snippet that on normal playing delays the video for a few seconds to inject the ads. The filter lists caught the general ad script, but not the delay code.
Raqbit

@marcan It surprises me that Firefox puts the correct architecture in the User Agent. Didn't we start freezing that a while ago? Does it report Wayland instead of X11 also?

Edit: I assume it might have to do with sites wanting to auto-detect the right executable for downloads.

Reina

@Raqbit @marcan It says X11 on my Lenovo work laptop despite using Wayland. Firefox also runs in native Wayland and not XWayland

Hector Martin

I believe this only triggers on *software* decoding, which is why it particularly affects us (and not, say, macOS which has hardware decoding).

First_Thunder

@marcan kinda makes sense then. Cause they’d count it would be a crappy cheaptastic Chromebook accessing the website

Natasha Nox 🇺🇦🇵🇸

@marcan Oh, I thought Asahi already achieved hardware acceleration? Or is it just browsers that ain't yet utilizing it? 🤔

Raqbit

@Natanox @marcan Asahi has Hardware 3D acceleration, but I believe it doesn't have hardware video decoding/encoding acceleration yet.

Eileen Yoon

@marcan Grr. Newer vids are in AV1 though. They ship dav1d in Safari for AVIF but not video decode I believe (i.e. VideoToolbox doesn't fallback to sw decode). trac.ffmpeg.org/ticket/10642

Hector Martin

Filed a bug because Firefox already reports bullshit architectures on Windows and macOS, and there is zero reason to report the real arch on Linux.

bugzilla.mozilla.org/show_bug.

Julian (they/he) :v_enby:

@marcan Perhaps the core bug is that browsers report architecture at all.

Michael Kohne

@http418 @marcan Yea, honestly I'm coming to the conclusion that they shouldn't report much of anything - most stuff is just being misused.

fwcd

@http418 @marcan There are valid usecases for it, such as offering the right download button for users... but given that this seems to be mostly abused, I would agree there. Browsers on macOS already identify as MacIntel, so it's not like the UA string is particularly reliable anyway.

Christopher Isene

@marcan Everything sniffing the user agent string is bound to fail as anyone can enter anything, optional.

Océane

@marcan OMG thank you! That's also an issue with OpenBSD, it would report the actual architecture (amd64 OpenBSD) despite using Chameleon!

lesto

@marcan so basically we should remove the CPU report completely, as it is always faked xD

gudenau

@marcan Dang, there are so many misbehaving websites in that JS file.

Igigog

@marcan to be honest, "sites make stupid assumptions about architectures, so every browser in the world reports false architecture" is probably the stupidest thing I've read in a while. Every part of it is so human it's not even funny.

_L4NyrlfL1I0

@Igigog @marcan Given that this issue is about the User-Agent string, it seems pretty par for the course to me. I'm pretty sure every component of the UA string has been used in stupid assumptions made by sites by now.

Mudkip

@marcan Safari on iPad and Apple Silicon Macs all says it is Intel.

sarah 🦦

@marcan because only low powered phones run on arm right

Ivan, the Language Mangler 🦀

@marcan Are they maybe assuming that aarch64 is mobile only? In that case, it _might_ make sense somehow.

Dmitry Tantsur

@marcan YouTube product management is dangerously detached from the reality. This whole "guessing the resolution" thing is absolute nonsense. "Yes, downgrade my video to unwatchable because I've just had a 2 seconds interruption of the internet" - said absolutely nobody ever.

If you find any contact, explain to them that 99.9% of their users will never want anything below 720p (and even that only on very slow connections).

Ayke van Laethem

@creepy_owlet @marcan it really depends! Watching video essays is fine on 144p as it's basically a podcast, and I specifically set YouTube to use a low resolution when I'm on mobile to reduce data consumption.

On the other hand, when watching a presentation it's kinda important to be able to read the slides, which usually needs 720p at least.

Dmitry Tantsur

@ayke @marcan yep, I have no problem with having a setting, I have a huge problem with the tendency of large corporations to force their uninformed guesses on users (see also: most recommendation engines).

Gnome!

@creepy_owlet that's quite a sweeping statement, and I believe Youtube have fixed it recently (at least on mobile) with default video resolution on wifi and mobile data. I personally use 360/480p on mobile data to limit data usage.

Dmitry Tantsur

@GnomedDev yes, it's a sweeping statement, and it's true. Admit it: the vast, VAST majority of users don't turn on YouTube to observe fingernail large pixels on their HD or even better (even on mobile) screens. I have nothing against an option to do that for those who need it for some reason. It's a terrible default behavior.

Andrew Cook :hokkaido:

@marcan This screams to me like being some sort of decade old hack that was intended to fix performance on an old ARM device. As evil as Google may be, I find it hard to believe that this would be intentional.

UT3UMS 🇺🇦

@marcan
everyday reminder why should I never return from Invidious :)

nanaya

@marcan oh, is this why I keep getting 480p^W 360p on android firefox's youtube 😐

...or maybe something else

Echo 🦊

@marcan Yup, that is always google, first it was lagging the video player for firefox users, now this

Yvan DS 🗺️ :ferris: :go:

@marcan Is this for YouTube only that chrome reports x86 ? Or does it do that on all websites.

Because that would mean that any website relying on this to suggest the download of anything for a certain arch would land by default in the wrong page / tab / whatever in that page.

Seems like an idiotic approach to rely on arch to define codec support / performance / etc...

Leon Bambrick

@marcan ^^ google is always playing "games" like this.

Nick Craver

@secretgeek @marcan It's kinda funny when you consider Chromebooks exist though

Hector Martin

@Nick_Craver @secretgeek Those run *Chrome* which we've already established pretends to be x86.

keyshooter :revblobfoxgooglymlem: :bocchi_anxious:
@marcan you should send this to the attorney doing the "chrome is a monopoly" investigation, they will probably find it very interesting
Sobex

@marcan Question, what happens if no arch is specified, or something exotic (such as ppc, sparc, mips, "Apple Silicon", RISC-V) ?

Hector Martin

@Sobex Nothing. It *specifically* checks for ARM or Android and cripples itself in that case. It doesn't check for anything else.

Sobex

@marcan Why not push for the entire removal of the architecture in Firefox user agent then ?

sxpert
@marcan sounds like dumb code in the same vein as "check if ad blocker is active"
leah & asm & forth, oh my!

@marcan i've encountered this with aarch64 in other forms - various websites (which should know better) will point blank refuse to serve you anything but their mobile site unless you tell Firefox to pretend it's an x86 machine. that seems to be the logic - anything arm must be a phone, whatever it says to the contrary

Western Infidels

@marcan It strikes me (an inexpert outsider) as super-crude to make decisions like this on the basis of user agent strings. Wouldn't it make more sense to adjust defaults to match the actual client performance? The video player has a lot of "stats for nerds" available once a video starts playing.

mimi89999

@marcan What about websites that host software and provide the default download binary based on the arch from the UA?

spyke

@marcan There are probably hundreds of millions of Smart TVs and Android TV boxes having like 8 little ARM cores and not great performance. But yeah, this heuristics is outdated.

Martin Rocket

@marcan wild guess: They are using this to prevent mobile browsers from trying to play videos in software but they are explicitly excluding Chrome OS as it typically runs on laptop hardware that should be able to play the needed codecs.

mrkcee

@marcan how to test or replicate this? I seem to get the correct resolution based on the when using Firefox.

Peter Bindels

@marcan

Mozilla/5.0 (X11; CrOS aarch64 10452.96.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36

I'm counting 1.5 truth and 6.5 lies there. (counting chrome as a half-truth)

一般通过菜比病毒学家(不干正事版)

@marcan That is ridiculous because if it was designed to sniff a TV, why will they decide to take the low resolution edition on the big screen? Wouldn't it be worse in this case?

teddy

@marcan what happens if you report arm64 as the architecture?

Jon Koops 🇪🇺

@marcan Honestly, user agents have outlived their usefulness, all vendors should just agree to use the same one and never change it.

DELETED

@marcan Thats one of many reasons why I dont use youtube. Its communist un garbage.

Samantha
@marcan @isaacmarovitz reads more like compatibility reasons over privacy, particularly the last comment.
Pete Orrall

@marcan It was recently reported that Google is crippling Youtube performance on Firefox.

Ren 🐧

@marcan this is sounding more and more like the guy who did this just forgot Firefox exists on ARM outside of the Android app

elly
@marcan Holy shit. No wonder I couldn't get hardware decoding to work in Firefox on mainline aarch64, but worked just fine in Chromium (even as flatpak!)
them#tic

@marcan Too bad they don't have an option to get 480p but with a decent bitrate.

Eckes :mastodon:

@marcan I guess that’s not about the CPU but the quality of drivers for hardware decoding

Charles U. Farley

@marcan Google disabled U2F based on user agent for a long time as well.

Go Up