Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#72626 - [nvidia] OpenGL based rendering is prefering CPU/Applications not utilizing hardware.

Attached to Project: Arch Linux
Opened by Chad (LogoiLab) - Wednesday, 03 November 2021, 21:32 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Tuesday, 16 November 2021, 06:22 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Sven-Hendrik Haase (Svenstaro)
Architecture x86_64
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Description:

OpenGL based applications/games refuse to use hardware acceleration, instead prefer CPU rendering. Bug is not present on Vulkan based applications/games.

Additional info:
* package version: nvidia-495.44-3
* No log entries are generated

Steps to reproduce:
1. Install GTX 960
2. Install package and requirements.
3. Reboot
4. Launch any OpenGL based application.
5. Note poor performance and CPU usage.
6. Not lack of GPU utilization.
This task depends upon

Closed by  Sven-Hendrik Haase (Svenstaro)
Tuesday, 16 November 2021, 06:22 GMT
Reason for closing:  Upstream
Additional comments about closing:  I think this might be an upstream driver problem as there's nothing here to indicate a packaging problem and it Vulkan works just fine for me so I can neither reproduce nor look at any external resources to hint at the packaging problem. I suggest contacting NVIDIA about this.
Comment by Chad (LogoiLab) - Wednesday, 03 November 2021, 22:09 GMT
Got an error out of a Java OpenGL based application:

GLFW error 65543: GLX: Failed to create context: GLXBadFBConfig.
Comment by Eduardo (ecruz) - Thursday, 04 November 2021, 02:29 GMT
I'm affected. I updated all my packages after 1 month of not using the computer and now a wine game using DXVK is running with 3 fps, while before it ran with 100 fps. I cannot pinpoint the culprit to be the nvidia package since I updated so many packages.

In my case even DXVK (Vulkan) seems to be affected.

NVIDIA RTX 2060 card.
Comment by Chad (LogoiLab) - Thursday, 04 November 2021, 02:32 GMT
The issue was fixed by installing the testing version of the package from the testing repo: nvidia-495.44-4

Give that a try for now I assume someone just did a dumb and it will be good in a day or two.
Comment by Eduardo (ecruz) - Thursday, 04 November 2021, 02:43 GMT
I installed nvidia 495.44-4 from testing and rebooted. Now the game won't even start, I get a wine message box titled "Fatal Error" with the message "No suitable display adapter found.".
Comment by Iyan (iyanmv) - Friday, 05 November 2021, 12:45 GMT
I don't know if related, but after upgrading to 495.44, kwin always crashes on startup (I'm using X11, Wayland session does not even start now). I have to manually go to the compositor settings page, force renable to get the system bask to work as usual. I also had some random crashes. All these issues went away downgrading to 470.74.

I attach a log from journalctl -p err showing the kwin crash at startup, in case is useful.
Comment by Sven-Hendrik Haase (Svenstaro) - Friday, 05 November 2021, 19:49 GMT
Can you guys post the output of nvidia-smi?
Comment by Eduardo (ecruz) - Saturday, 06 November 2021, 03:02 GMT
This is my output with the game running at 3 fps with 495.44-3.
Comment by Sven-Hendrik Haase (Svenstaro) - Saturday, 06 November 2021, 03:56 GMT
Just making sure: You have lib32-nvidia-utils installed?
Comment by Eduardo (ecruz) - Saturday, 06 November 2021, 04:02 GMT
Yes I had it already, lib32-nvidia-utils-495.44-1
Comment by Sven-Hendrik Haase (Svenstaro) - Saturday, 06 November 2021, 04:46 GMT
Is your GPU set to some powersaving mode? Can you check nvidia-settings?
Comment by Eduardo (ecruz) - Saturday, 06 November 2021, 04:58 GMT
Here are some screenshots of my nvidia-settings
Comment by Sven-Hendrik Haase (Svenstaro) - Saturday, 06 November 2021, 05:08 GMT
Does it do anything if you force it to performance mode? I really got no idea what might be wrong here at this point though speaking from a packaging perspective. Everything appears to be good from what I can see here. I got a 2080 Ti so my settings look very similar to yours all things considered.
Comment by Eduardo (ecruz) - Saturday, 06 November 2021, 13:19 GMT
I tried setting preferred mode to "Prefer Maximum Performance", with no change.
I have now downgraded to these packages:

nvidia-470.74-7-x86_64.pkg.tar.zst
nvidia-dkms-470.74-1-x86_64.pkg.tar.zst
lib32-nvidia-utils-470.74-1-x86_64.pkg.tar.zst
libxnvctrl-470.74-1-x86_64.pkg.tar.zst
nvidia-settings-470.74-1-x86_64.pkg.tar.zst
nvidia-utils-470.74-1-x86_64.pkg.tar.zst

These are all and only packages that I have downgraded. After a reboot game runs smoothly with no further action needed. So I can now confirm it is really some kind of problem with the nvidia packages. Maybe not a packaging issue, but an upstream bug?

I have prime laptop configuration, if that's relevant.
Comment by Sven-Hendrik Haase (Svenstaro) - Saturday, 06 November 2021, 16:22 GMT
Can you confirm that while a game is running, it's actually ran on the Nvidia GPU at all? Perhaps it's using the integrated GPU instead. This is really my only guess at this point.
Comment by Iyan (iyanmv) - Saturday, 06 November 2021, 16:27 GMT
Driver 495.44 if full of bugs. This is clearly Nvidia's problem and not an Arch issue. We can only wait and try the driver when there is a new release. I can reproduce my issue with Plasma in a different device running a different distro.
Comment by Sven-Hendrik Haase (Svenstaro) - Saturday, 06 November 2021, 18:00 GMT
Thanks for that confirmation! I'm inclined to close this issue then as upstream. It's not great but I don't see anything we can do here from our side.
Comment by Chad (LogoiLab) - Saturday, 06 November 2021, 18:08 GMT
Just as a reminder. The nvidia-495.44-4 version from testing resolved the issue for me. Also note three minor revision releases within a couple hours of each other on mainline which is indicative of a packaging issue.
Comment by Sven-Hendrik Haase (Svenstaro) - Saturday, 06 November 2021, 18:31 GMT
> Also note three minor revision releases within a couple hours of each other on mainline which is indicative of a packaging issue.

It's not as you can clearly see from the commit messages: https://github.com/archlinux/svntogit-packages/commits/packages/nvidia/trunk

Those were all kernel module rebuilds for each respective kernel. 495.44-4 is for kernel 5.15, both being in testing. It's definitely worth a shot, though.
Comment by Chad (LogoiLab) - Saturday, 06 November 2021, 19:05 GMT
I got mine to function properly by utilizing an older config I had laying around. It appears the .drirc file in the home directory fixes this issue. I have also attached my .nvidia-settings-rc This combination works properly. And I'm not sure why.

Edit: did the usual delete and reboot. .drirc seems to not have any affect. What did work was nuking my configs and putting the old ones back though.
Comment by Iyan (iyanmv) - Sunday, 07 November 2021, 20:39 GMT
Chad: are you also using the kernel 5.15.1 from testing? Maybe this driver does not work well with 5.14? I use the nvidia-dkms, so all those changes in pkgrel are only related to rebuilds for newer kernel versions. I guess I will give it a try when 5.15.1 goes into [core]. For now, I stay with 470.74.
Comment by vyacheslav (galdralag) - Tuesday, 09 November 2021, 20:38 GMT
Nvidia optimus laptop:
Wine applications using prime-run (from package nvidia-prime) also not working.
Downgrading to nvidia 470.74 solves problem.
Comment by Eduardo (ecruz) - Saturday, 13 November 2021, 02:26 GMT
Today I updated all the packages, including the new linux 5.15.2.arch1-1 kernel, and reverted my nvidia downgrade, so I'm back to nvidia 495.44-3.
I also installed optimus-manager-qt from AUR and set it to "Hybrid mode". To my understanding that should have been the default even before installing optimus-manager, so I don't know if this was relevant.
After doing this, the game now runs fine! I don't know if it is because of optimus-manager or because of all the updates.
Comment by Iyan (iyanmv) - Saturday, 13 November 2021, 14:49 GMT
Still same issue for with 5.15.2 + nvidia 495. I'm using nvidia-470xx from AUR until a new release from Nvidia.
Comment by Eduardo (ecruz) - Sunday, 14 November 2021, 11:10 GMT
I'm having the issue again! I don't know what triggered it back.... Now even selecting Nvidia card only in optimus-manager still makes the game with 3 fps.
Comment by Sven-Hendrik Haase (Svenstaro) - Monday, 15 November 2021, 09:55 GMT
I still have nothing in this bug report that is indicative of a packaging problem. I'm inclined to close it as it's no use to track this downstream for a binary blob package.

Loading...