Closed Bug 1779753 Opened 2 years ago Closed 1 year ago

incorrect fullscreen scaling of webgl content on linux nvidia

Categories

(Core :: Graphics: CanvasWebGL, defect)

Firefox 102
defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: avemilia, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(6 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0

Steps to reproduce:

Linux, X11, Nvidia blob 515.57, two 4k monitors.

  1. Go to the demo page https://danilw.github.io/GLSL-howto/minimal_webgl_glsl/test_requestFullscreen.html (source code of the demo: https://github.com/danilw/GLSL-howto/blob/12d617c9ac24a01600dcd69a2977bc3b75d8bb3a/minimal_webgl_glsl/test_requestFullscreen.html#L204)
  2. Press Fullscreen.
  3. Observe only 1/4 of the content (bottom left) to be depicted on the whole viewport of the monitor. See attached screenshot. The size is reported to be 1920x1080 (see browser console), but the actual size of the monitor is 3840x2160.

Actual results:

The fullscreen mode is working incorrectly. I only see 1/4 of actual content, scaled onto the whole monitor.

Expected results:

The fullscreen mode to work as expected: scale 100% of the content onto the whole monitor.

Attached file about_support

about:support dump from a new profile

Output of the browser console (open page - press "Fullscreen" - press Esc):

This page is in Quirks Mode. Page layout may be impacted. For Standards Mode use “<!DOCTYPE html>”. test_requestFullscreen.html
continue with webgl2 test_requestFullscreen.html:257:29
Initializing Shader Program: <undefined>, <undefined> ...shader successfully created. test_requestFullscreen.html:184:29
canvas size 1920 1080 test_requestFullscreen.html:217:29
canvas size 800 600 test_requestFullscreen.html:217:29

Okay, I tested it a bit more, and I can't even get a consistent behavior. Sometimes I get the screenshot above, and sometimes I get "version 2" (see next attachment). To get version 2, I press Fullscreen - Esc for a few times. Sometimes I cannot get version 1 for a while.

On my main firefox profile, I can consistently reproduce version 1. But as it turns out, on a clean profile I can almost always produce only version 2, I get version 1 with a rare occasion (and probably after triggering version 1 in my main profile).

But version 2 also seems incorrect, although somewhat less incorrect.

version 2

If I open the browser window in clean profile on my second monitor, which is also 4k, but in portrait mode, I get version 3 (find attached).

version 3

The Bugbug bot thinks this bug should belong to the 'Core::Graphics: CanvasWebGL' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Graphics: CanvasWebGL
Product: Firefox → Core
Attached image correct.png

How it should supposedly look, taken by another person on full hd screen.

The severity field is not set for this bug.
:aosmond, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(aosmond)

I can confirm the same issue for Firefox 104.0.2 under Linux Mint 20.2, with NVIDIA 470.141 proprietary driver. I see both versions :avemila described; one version that doesn't rescale the content when going to full screen and another version that does but then fails to do so when leaving full screen.

The user that brought this issue to my attention has reproduced it in Firefox 102, 103, and 104 on Windows 8, 10, and 11 [1].

I do not see the issue on two other computers running Linux Mint but with Intel integrated graphics.

I've put together a simple test case, which I've attached.

[1] https://github.com/mpetroff/pannellum/issues/1118

Blocks: gfx-triage

Matthew, were you able to reproduce on Windows?

Flags: needinfo?(mozilla)
Summary: incorrect fullscreen scaling of webgl content → incorrect fullscreen scaling of webgl content on linux nvidia

I'll attempt to reproduce this on AMD on Linux Wayland.

Flags: needinfo?(ahale)

Tried both the link in comment #0 and the attachment in comment #10 on NVIDIA 535 on Ubuntu 23.04, unsuccessfully, but I don't have specifically a 4K monitor to hook up and test at this desk, tested on 1920x1080x360hz and 2560x1600x60hz monitors.

Is this issue still happening?

I wonder if this is related to displayport MST (3840x2160 monitors tend to report as 4 1920x1080 monitors in a specific configuration, and the desktop compositor and GPU display hardware have to deal with the consequences, so if something maximized to 1920x1080 and turned off the other 3 'displays' it might stretch the one to 3840x2160). Seems very hardware specific if so.

Flags: needinfo?(ahale)

I don't run Windows, so I wasn't able to reproduce the issue there, but a user of a library I develop reported an issue on Windows that appeared to me to be the same as the issue in this bug.

I'm now running NVIDIA 535 on Linux Mint 21.2 and no longer see the issue with v117. However, if I run an AppImage for v104 [1] with a fresh profile, I can reliably reproduce the issue. Moving to newer AppImages, I see the issue under v105 but not v106 or v107. At least to the extent that I could reproduce the issue, it appears to have been fixed.

The issue wasn't 4k or DisplayPort related, since I'm using a 1920x1080 monitor over DVI.

[1] https://github.com/srevinsaju/Firefox-Appimage/releases/tag/firefox-v104.0.r20220829141339

Flags: needinfo?(mozilla)
Status: UNCONFIRMED → RESOLVED
Closed: 1 year ago
Resolution: --- → WORKSFORME
Flags: needinfo?(aosmond)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: