Significantly LOWER performance when using exclusive fullscreen

When testing fullscreen windowed mode vs exclusive fullscreen mode the performance of an OpenGL application is approximately 50% lower when using exclusive fullscreen mode compared to fullscreen windowed mode. Both CPU and GPU usage are lower when using exclusive fullscreen mode. Vsync is disabled (and the framerate is observed to be higher than the monitor refresh rate in both modes).

jetson_clocks and no jetson_clocks are tested and there is no difference.

An example of Minecraft with the Sodium peformance mod is given.
Exclusive fullscreen mode (low performance):

Fullscreen windowed mode is forced by specifying a terminal window to render “always on top”.

This is in direct contrast to what I normally see on other drivers where exclusive fullscreen mode has equal or higher performance.

Hi,
Please check if it is possible to replicate the issue on Orin Nano developer kit. It yes, please share the setup so that we can reproduce it first and check further.

This was tested on the orin nano developer kit.

If you want to test Minecraft java you will need to own the game first.
The easiest way to install would be through Prism Launcher which you can install with the pi-apps software store GitHub - Botspot/pi-apps: Raspberry Pi App Store for Open Source Projects

Minecraft 1.19.4 was tested with the latest fabric modloader and the latest version of sodium installed. These can be easily installed in Prism Launcher itself. The fps counter that you observe is a modified version of mangohud. It is not necessary to read the performance but was used for convenience. You can quickly open and close the F3 menu in game to read the fps.

It gets much worse. I initially use the SD Image based installation method with my devkit. My devkit had older firmware on it from the factory (which I believe was dated 2023-02-17). To solve as second issue Nvidia Jetson Orin shows 6.3GB of RAM - #22 by theofficialgman I flashed over my device using SDKManager. This gave me firmware dated 2023-03-19 and solved the ram issue (now at 7.2GB).

HOWEVER, the performance is now in the worse state regardless of what I do (both exclusive fullscreen and windowed are bad at ~125FPS). So it looks to me like this latest firmware has a serious bug in it and the previous one was bugged partially.

Please upload the 2023-02-17 firmware here and provide instructions for a manual flash so that I may flash it back to my devkit. I do not have any way of returning to it now.

@DaneLLL Any updates? Still experiencing this issue on a freshly flashed jetson orin devkit. Exclusive fullscreen has performance nearly 1/2 that of fullscreen windowed as show in the pictures in the first post.

Hi,
This may be similar to
Rendering issue with GBM/KMS/DRI on Jetson AGX Orin devkit

We are investigating the issue. Will update once there is further finding.

@DaneLLL the issue appears to stem from the driver having a bugged flip mode (refer to the FPS, blit/flipped, and VK/OpenGL from graphics api visual indicator in the top left). In OpenGL, that manifests as worse performance. In Vulkan, that manifests as graphics bugs (looks similar to tearing but not really tearing). The blit mode does not have this issue (so non-fullscreen).

Likely related to Vulkan corruption when using Dolphin Emulator on r35.3.1

Below are link to videos showing Vulkan and GL fullscreen and non-fullscreen. Nvidia forum was unable to properly host multiple videos when I tried.

@DaneLLL Can you provide any update on the bugged FLIP mode causing massive performance regressions? You say the “similar” bug which does not appear to have anything to do with this has been fixed. I would like for your engineers to veryify this issue as resolved or not.

See Significantly LOWER performance when using exclusive fullscreen - #4 by theofficialgman for reproduction steps

Hi,

Is it possible to share step-by-step method so that we can follow the steps to set up and try? We would need some time to check the README and try. It would be great if there is step-by-step guidance.

bug still present in L4T 35.4.1

@DaneLLL You can test in minecraft java’s demo mode if you don’t own the game.

# install nvidia-settings
sudo apt install nvidia-settings

you can use the “Nvidia X Server Settings” app to “Enable Graphics API Visual Indicator” so you can see blit/flip as well as FPS in “X Screen 0/OpenGL Settings”. You can also deselect “Allow Flipping” to force BLIT mode in fullscreen. We will use that to test BLIT/FLIP when fullscreen.

# installs pi-apps
wget -qO- https://raw.githubusercontent.com/Botspot/pi-apps/master/install | bash
# install Prism Launcher from pi-apps
~/pi-apps/manage install "Minecraft Java Prism Launcher"

prism launcher is now installed. open it from your applications list. select your language and java 17 from the dialogs that popup. once you are in the main window, select “Add Instance” and create a minecraft instance (latest version 1.20.1 works fine with default settings). Run the instance by double clicking on it and then create a single player new world. Enter the world and press F11 to fullscren then press ESC and select “options/video settings” then drag the bar under maximum framerate to the right so it says unlimited. Disable Vsync with the button on the left.

Now all you do is wait for FPS to stablize in a few seconds and then you can play with enabling/disabling “Allow flipping” in nvidia settings which will allow or not allow FLIP in fullscreen mode. Performance will be significantly lower in flip mode (nearly 50%)

Hi,
Please check if it is possible to reproduce the issue by running either sample in

/usr/src/nvidia/graphics_demos/

This would help us investigate further to identify the issue. Please help , thanks.

None of your demos support fullscreen out of the box and all of them prevent your graphics api visual indicator from showing. So they are literally no help here.

I have provided a testcase above with the best selling videogame of all time. Surely that is not too niche for someone in the office to own and test.

Issue confirmed still present in Jetpack 6.0

Still an issue in Jetpack 6.0 Production Release (R36.3.0)

Hi,
Can you clarify if the issue is specific to using the Minecraft Java Prism Launcher? If our reference samples work without hitting the issue, it may be an issue in application level. You may check this.

@DaneLLL I already responded that I cannot use your samples in a previous comment. None of your samples support fullscreen out of the box. Please provide samples with fullscreen X11 usage Significantly LOWER performance when using exclusive fullscreen - #13 by theofficialgman

Hi,
For full screen rendering we have NvEglRenderer in jetson_multimedia_api. Please check the source code and give it a try.

The issue occurs with nearly every application though to varying degrees.
For a benchmark that easily shows the issue you can use gravitymark https://gravitymark.tellusim.com/

On Jetson Orin Nano with the following settings:
API: OpenGL
Render: Default
Antialiasing: Off
Show: FPS Sensors Info
Mode: Fullscreen
Resolution: Default (set to 1920x1080 in GNOME settings)
Device: Default
Asteroids: 1000
LOD Bias: Default

after executing the gravitymark run file, you can close the window and execute the following command to use the same settings in the gravitymark bin folder

./GravityMark.arm64 -temporal 0 -fullscreen 1 -screen 0 -fps 1 -info 1 -sensors 1 -benchmark 1 -gl -asteroids 1000

With “Allow Flipping” ENABLED in nvidia settings (the default, which shows FLIP with the graphics API visual indicator) the benchmark score is: 9762; 58.4 FPS

With “Allow Flipping” DISABLED in nvidia settings (which shows BLIT with the graphics API visual indicator) the benchmark score is: 11641; 69.7 FPS

This is a 19% difference. In Minecraft Java with Sodium in the original test case a 61% difference is observed.

In both cases VSYNC is OFF of course (which is the default for gravitymark).

Such proprietary device specific apis are of no use for generic applications for the linux desktop. Please see the above comment and have your developers reproduce.