440.82 Overheating, switching, performance and offloading problems

Hi. I have asus zenbook pro 15 UX534FTC with i7-10510U and GeForce GTX 1650 with Max-Q and i run into several problems.
I tried several kernels/distros and everywhere behavior was the same.

$ glxinfo | grep “OpenGL renderer”
OpenGL renderer string: GeForce GTX 1650 with Max-Q Design/PCIe/SSE2
$ DRI_PRIME=1 glxinfo | grep “OpenGL renderer”
OpenGL renderer string: GeForce GTX 1650 with Max-Q Design/PCIe/SSE2

$ prime-select query
nvidia
  1. After
$ sudo nvidia-xconfig

appearing black screen after entering password during login and the only way to fix it delete /etc/X11/xorg.conf

$ sudo xrandr --listproviders
Providers: number : 2
Provider 0: id: 0x253 cap: 0x1, Source Output crtcs: 0 outputs: 0 associated providers: 1 name:NVIDIA-0
Provider 1: id: 0x45 cap: 0x6, Sink Output, Source Offload crtcs: 3 outputs: 3 associated providers: 1 name:modesetting

$ sudo xrandr --setprovideroffloadsink NVIDIA-0 modesetting
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 140 (RANDR)
Minor opcode of failed request: 34 (RRSetProviderOffloadSink)
Value in failed request: 0x253
Serial number of failed request: 16
Current serial number in output stream: 17

In nvidia-settings “X Server Display Configuration” section the are no settings and written “Prime Displays cannot be controlled by nvidia-settings and must be configured by an external RandR capable tool. The display is shown in the layout window above for informational purposes only”.


And in additional to it cpu temperature is always 55-60+ in idle (65-70 under minimal load) and i think this is because of nvidia because with integrated card turned on - temperature is 39-45 in idle (50-55 under minimal load). Also performance is very poor, simple scroll in browser is notable laggy especially in firefox mozilla. In chrome its better, but in mozzila its almost impossible to work.

In windows its all okay.

Please, help)
In attached file i just removed “gz” from the name, because there is no way to pass validation during upploading. “.gz” extension not in the list of allowed extensions to upload.
nvidia-bug-report.log (282.7 KB)

That notebook model needs extra fan control software. Please check if this one works:
https://github.com/dominiksalvet/asus-fan-control
The rest is normal, don’t use nvidia-xconfig, don’t have an xorg.conf, just use prime-select.

But why

$ sudo xrandr --setprovideroffloadsink NVIDIA-0 modesetting

return error?

And as i clearly understand its indicate that offloading there is not working. Its not seems like normal or i wrong?)
I cant use nvidia and intel card simultaneously.

Because you’re in prime output mode, meaning the nvidia gpu is used all the time.
Provider 0: Source Output NVIDIA-0

Can you please help me to setup offloading)
I added that xorg.conf

Section “ServerLayout”
Identifier “layout”
Screen 0 “iGPU”
Option “AllowNVIDIAGPUScreens”
EndSection

Section “Device”
Identifier “iGPU”
Driver “modesetting”
BusID “PCI:0:2:0”
EndSection

Section “Screen”
Identifier “iGPU”
Device “iGPU”
EndSection

Section “Device”
Identifier “nvidia”
Driver “nvidia”
BusID “PCI:2:0:0”
EndSection

And after that i can normally login into the system and xrandr then say:

$ xrandr --listproviders
Providers: number : 2
Provider 0: id: 0x1be cap: 0x9, Source Output, Sink Offload crtcs: 3 outputs: 3 associated providers: 0 name:modesetting
Provider 1: id: 0x198 cap: 0x0 crtcs: 0 outputs: 0 associated providers: 0 name:NVIDIA-G

$xrandr --setprovideroffloadsink NVIDIA-G0 modesetting
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 140 (RANDR)
Minor opcode of failed request: 34 (RRSetProviderOffloadSink)
Value in failed request: 0x198
Serial number of failed request: 16
Current serial number in output stream: 17

Almost the same error(

Offloading is correctly set up, just
xrandr --setprovideroffloadsink NVIDIA-G0 modesetting
doesn’t have to be used, that’s for mesa based offloading. With nvidia, just start applications on the nvidia gpu by prepending
__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia
to the application, e.g.
__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia glxgears
See: https://download.nvidia.com/XFree86/Linux-x86_64/440.64/README/primerenderoffload.html

Oh, thank you.
But

__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia glxgears

shows only ~60fps. When with only nvidia there was near 2-3k+ fps. I thought that with offloading i should get similar numbers.

It is locked to vsync.

__GL_SYNC_TO_VBLANK=0

turns it off. keep in mind, glxgears is not a benchmark.

Thank you! All works)

Unfortunately need to accept that issues is still remains( Temperatures are too high and its not a fan issues because they starting in time and working constantly.
When working only on intel driver and integrated video card its okay, but all is laggy and twitching, with nvidia - there are smooth picture but temperatures are near 60 degrees with minimal load.
And in nvtop is very strange picture:
Nvidia card is always loaded on 10-20 percents and when i starts activelly moving cursor on the screen load is increased to 60-80 percents!!
I think this is not appropriate behavior) Most of load genered from gala and Xorg processes.

This all about when /etc/X11/xorg.conf is deleted and loaded maybe some default config or something else. With xorg.conf which i showed above there are all looks like nvidia is not working at all, all laggy and twitching even when application is started with needed env variables to enable offloading.
In nvtop application appears (when started with env variables), but gpu load is always 0 percents and the whole load falls on cpu.

Sounds awful. Please create a new nvidia-bug-report.log with your offload config in place so that the desktop run on the intel.
Please post the output of
__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia glxinfo | grep vendor

❯ __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia glxinfo | grep vendor
server glx vendor string: NVIDIA Corporation
client glx vendor string: NVIDIA Corporation
OpenGL vendor string: NVIDIA Corporation

Removed “.gz” from name*
nvidia-bug-report.log (281.9 KB)

If you are playing game using DXVK (lutris or steam proton), ther eis any issue with vsync when using prime offloading.

You will have to use libstrangle to cap the fps to 60, however the screen tearing will remain until the issue is aknowledge and fixed.

Honestly i don’t playing games on linux. My common workload consists of phpstorm for backend and frontend development, and google chrome.

Looking at logs, the nvidia gpu and driver is working fine. Offloading is working, I can see phpstorm running on the nvidia gpu.
Since this is an Optimus notebook, nothing will ever work right if the intel gpu isn’t doing so since it controlles all outputs. Telling by your description, this doesn’t seem to be the case. Since this is a faily new intel cpu/gpu, you should first try if upgrading your kernel to 5.6 makes the desktop work right when using the intel gpu.

Addendum: please remove all i915 related kernel parameters, most of them are ignored anyway, they’re just cluttering the log.

Addendum 2: I still think there’s something wrong with the cooling system, the values in the log are horrible. You said, in Windows every thing was fine, did you check nvidia gpu temperatures when running something on it? e.g. use gpu-z.