You are not logged in.

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

gnox
Member
Registered: 2013-05-18
Posts: 49

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
Y

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"
EndSection

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

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

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

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

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

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.

Offline

Board footer

Powered by FluxBB