You are not logged in.

#1 2019-08-10 23:27:33

Registered: 2013-05-18
Posts: 53

Prime Sync between dGPU Nvidia and iGPU Amd

HI, I got one amd laptop GA502 that have these two gpus

~inxi -G
Graphics:  Device-1: NVIDIA TU116M [GeForce GTX 1660 Mobile] driver: nvidia v: 430.40 
           Device-2: Advanced Micro Devices [AMD/ATI] Picasso driver: amdgpu v: kernel 
           Display: tty server: X.Org 1.20.5 driver: amdgpu resolution: 1920x1080~120Hz 
           OpenGL: renderer: AMD RAVEN (DRM 3.32.0 5.2.8-1-ck-zen LLVM 8.0.1) v: 4.5 Mesa 19.1.4 

I managed to configure nvidia-xrun, but I cannot make the modeset sync to work to get rid of the tearing.

When the nvidia_drm module loads, it correctly sets the modeset flag to "Y"

$cat /sys/module/nvidia_drm/parameters/modeset

But looking at the journal logs I see this:

[drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[drm] No driver support for vblank timestamp query.

And in the .local/share/xorg/Xorg.1.log appears this line when the new xserver runs:

randr: falling back to unsynchronized pixmap sharing

When I run glxgears or any game there is no sync between nvidia and amd gpu's even if i reduce the fps in game to 60 or 120 it is noticeable the tearing.

If I do a xrandr --verbose I can see that Prime Sync is enabled only for the HDMI output and available for the eDP but not set:

eDP-1-0 connected 1920x1080+0+0 (0x46) normal (normal left inverted right x axis y axis) 344mm x 194mm
	PRIME Synchronization: 0 
		supported: 0, 1
HDMI-A-1-0 disconnected (normal left inverted right x axis y axis)
	PRIME Synchronization: 1 
		supported: 0, 1

I tried with "$xrandr --output eDP-1-0 --set "PRIME Synchronization" 1 " but there's no effect. 

This is my /etc/X11/nvidia-xorg.conf

Section "Files"
  ModulePath "/usr/lib/nvidia"
  ModulePath "/usr/lib32/nvidia"
  ModulePath "/usr/lib32/nvidia/xorg/modules"
  ModulePath "/usr/lib32/xorg/modules"
  ModulePath "/usr/lib64/nvidia/xorg/modules"
  ModulePath "/usr/lib64/xorg/modules"

Section "ServerLayout"
  Identifier "layout"
  Screen 0 "nvidia"
  Inactive "amdgpu"

Section "Device"
  Identifier "nvidia"
  Driver "nvidia"
  BusID "PCI:1:0:0"

Section "Screen"
  Identifier "nvidia"
  Device "nvidia"
  Monitor "Monitor0"
  Option "AllowEmptyInitialConfiguration" "True"
  Option "Coolbits" "28"
  Option "TripleBuffer" "true"

Section "Device"
  Identifier "amdgpu"
  Driver "modesetting"

Section "Screen"
  Identifier "amd"  
  Device "amdgpu"

Any advise what else can I test?, or maybe is not yet possible for this type of laptop configuration that is new and there is something to be develop on amdgpu/modeset/nvidia drivers.


#2 2020-01-03 20:34:36

From: Россия
Registered: 2014-07-18
Posts: 6

Re: Prime Sync between dGPU Nvidia and iGPU Amd


I've been looking for a solution of just the same problem and encountered this post. After hours of research, I also found this, which didn't exist at the time you wrote this: … oken_VSync
The last paragraph in this section as of writing says that screen tearing with PRIME is expected with kernel 5.4. It also links to the discussion of this regression:
Is your kernel version 5.4?


Board footer

Powered by FluxBB