niri icon indicating copy to clipboard operation
niri copied to clipboard

Resolution not recognized on youtube

Open cvanelteren opened this issue 1 month ago • 5 comments

Not sure if this is the correct forum to ask this question. Since using niri wm I am getting this weird issue that youtube does not default to the screen resolution. I don´t recall this being a thing under my previous wm -- hyprland. Could be a setting that needs configures wlr-randr detects the correct resolution.

cvanelteren avatar Nov 16 '25 03:11 cvanelteren

Do you mean the YouTube player defaulting to something such as 720p on a 1080p screen..?

Sempyos avatar Nov 16 '25 04:11 Sempyos

@Sempyos exactly

cvanelteren avatar Nov 16 '25 04:11 cvanelteren

I'm decently sure this is just normal YouTube behavior, I've almost always had it default to 720p regardless of how new the device is

Sempyos avatar Nov 16 '25 04:11 Sempyos

well for me it is defaulting to 320p -- and I cannot recall having this issue on sway or hyprland

cvanelteren avatar Nov 16 '25 04:11 cvanelteren

This is odd, because trying on sway and KDE from my experience still has YouTube (when set to auto) pick 360p as the preferred optimal resolution

This could just be YouTube defaults to a lower resolution to save bandwidth or such

Sempyos avatar Nov 16 '25 06:11 Sempyos

I think this may be related to whatever heuristics YouTube uses to determine which quality it selects. My browser is firefox, and in my case I've noticed that when the youtube quality is set to auto and the window is moved off screen, after a small period of time the quality starts being reduced one resolution at a time.

I've noticed when right clicking the video and enabling the "stats for nerds" overlay, almost all frames are dropped when the window is off screen, presumably because of niri aggressively throttling rendering of off-screen windows.

I believe the youtube heuristic sees these dropped frames and decides that the machine is too slow to decode the current quality, and so reduces the quality to optimize for what it thinks will be a smoother experience.

I think this in turn influences the resolution that youtube will initially select when it sees that it had to downgrade the resolution multiple times for previous videos.

This is all speculative on my part of course, but I haven't had this occur on either sway or hyprland when I used either of those wms.

aloop avatar Nov 22 '25 00:11 aloop

Right now I solved it with a plugin. The description by @aloop may be correct but and I concur that it happens to me on niri but haven't noticed it on hyprland or sway but I haven´t use those in the last couple of months.

cvanelteren avatar Nov 22 '25 01:11 cvanelteren

@cvanelteren can we close this..?

Sempyos avatar Nov 23 '25 19:11 Sempyos

Sure we can close it. I still suspect there is something funny happening with niri but the work around for using s plugging is fine for now.

cvanelteren avatar Nov 23 '25 21:11 cvanelteren