无法强制 PRIME 同步 - 屏幕撕裂

无法强制 PRIME 同步 - 屏幕撕裂

就像标题所说的那样,我无法找到强制我的笔记本电脑使用 PRIME 同步的方法,而且据我所知,这很可能是我在观看视频时出现大量屏幕撕裂的原因。

我几乎尝试了所有我能找到的最新方法,但都不起作用。

我已确保 drm 文件配置正确:

(base) alex@alex:/etc/modprobe.d$ cat nvidia-drm.conf 
options nvidia-drm modeset=1

我尝试强制执行它,xrandr --output eDP-1-1 --set "PRIME Synchronization" 1但它仍然保持在 0。

我确保执行以下命令并重新启动:

(base) alex@alex:/etc/modprobe.d$ sudo update-initramfs -u
[sudo] password for alex: 
update-initramfs: Generating /boot/initrd.img-5.3.0-24-generic
I: The initramfs will attempt to resume from /dev/nvme0n1p4
I: (UUID=4ef37681-250c-4d75-954b-c8cf78fd5e65)
I: Set the RESUME variable to override this.

*当我尝试同样的事情但通过创建一个 zz-nvidia-modesetconf 文件时,就像我在一些帖子上读到的那样,update-initramfs 命令产生了很多错误。

经过所有这些,我仍然得到以下结果:

(base) alex@alex:/etc/modprobe.d$ sudo cat /sys/module/nvidia_drm/parameters/modeset
N

我有一台配备 GTX 1050 ti 卡的 Dell xps 9570,并且运行的是 Ubuntu 19.10。

这里还有一些有用的输出(我的显示器是 eDP-1-1):

base) alex@alex:/etc/modprobe.d$ xrandr --prop
Screen 0: minimum 8 x 8, current 2560 x 1440, maximum 32767 x 32767
eDP-1-1 connected primary 2560x1440+0+0 (normal left inverted right x axis y axis) 344mm x 194mm
    _MUTTER_PRESENTATION_OUTPUT: 0 
    EDID: 
        00ffffffffffff004d108d1400000000
        051c0104a52213780eef4fa95334bc25
        0d515400000001010101010101010101
        0101010101014dd000a0f0703e803020
        350058c2100000180000000000000000
        00000000000000000000000000fe0046
        4e564452804c51313536443100000000
        0002410328011200000b010a2020004c
    PRIME Synchronization: 0 
        supported: 0, 1
    scaling mode: Full aspect 
        supported: Full, Center, Full aspect
    max bpc: 12 
        range: (6, 12)
    Broadcast RGB: Automatic 
        supported: Automatic, Full, Limited 16:235
    link-status: Good 
        supported: Good, Bad
    CONNECTOR_ID: 86 
        supported: 86
    non-desktop: 0 
        range: (0, 1)
   3840x2160     60.00 +  59.98    59.97  
   3200x1800     59.96    59.94  
   2880x1620     59.96    59.97  
   2560x1600     59.99    59.97  
   2560x1440     59.99    59.99*   59.96    59.95  
   2048x1536     60.00  
   1920x1440     60.00  
   1856x1392     60.01  
   1792x1344     60.01  
   2048x1152     59.99    59.98    59.90    59.91  
   1920x1200     59.88    59.95  
   1920x1080     60.01    59.97    59.96    59.93  
   1600x1200     60.00  
   1680x1050     59.95    59.88  
   1600x1024     60.17  
   1400x1050     59.98  
   1600x900      59.99    59.94    59.95    59.82  
   1280x1024     60.02  
   1440x900      59.89  
   1400x900      59.96    59.88  
   1280x960      60.00  
   1440x810      60.00    59.97  
   1368x768      59.88    59.85  
   1360x768      59.80    59.96  
   1280x800      59.99    59.97    59.81    59.91  
   1152x864      60.00  
   1280x720      60.00    59.99    59.86    59.74  
   1024x768      60.04    60.00  
   960x720       60.00  
   928x696       60.05  
   896x672       60.01  
   1024x576      59.95    59.96    59.90    59.82  
   960x600       59.93    60.00  
   960x540       59.96    59.99    59.63    59.82  
   800x600       60.00    60.32    56.25  
   840x525       60.01    59.88  
   864x486       59.92    59.57  
   800x512       60.17  
   700x525       59.98  
   800x450       59.95    59.82  
   640x512       60.02  
   720x450       59.89  
   700x450       59.96    59.88  
   640x480       60.00    59.94  
   720x405       59.51    58.99  
   684x384       59.88    59.85  
   680x384       59.80    59.96  
   640x400       59.88    59.98  
   576x432       60.06  
   640x360       59.86    59.83    59.84    59.32  
   512x384       60.00  
   512x288       60.00    59.92  
   480x270       59.63    59.82  
   400x300       60.32    56.34  
   432x243       59.92    59.57  
   320x240       60.05  
   360x202       59.51    59.13  
   320x180       59.84    59.32  
DP-1-1 disconnected (normal left inverted right x axis y axis)
    PRIME Synchronization: 1 
        supported: 0, 1
    Content Protection: Undesired 
        supported: Undesired, Desired, Enabled
    max bpc: 12 
        range: (6, 12)
    Broadcast RGB: Automatic 
        supported: Automatic, Full, Limited 16:235
    audio: auto 
        supported: force-dvi, off, auto, on
    link-status: Good 
        supported: Good, Bad
    CONNECTOR_ID: 92 
        supported: 92
    non-desktop: 0 
        range: (0, 1)
DP-1-2 disconnected (normal left inverted right x axis y axis)
    PRIME Synchronization: 1 
        supported: 0, 1
    Content Protection: Undesired 
        supported: Undesired, Desired, Enabled
    max bpc: 12 
        range: (6, 12)
    Broadcast RGB: Automatic 
        supported: Automatic, Full, Limited 16:235
    audio: auto 
        supported: force-dvi, off, auto, on
    link-status: Good 
        supported: Good, Bad
    CONNECTOR_ID: 100 
        supported: 100
    non-desktop: 0 
        range: (0, 1)
DP-1-3 disconnected (normal left inverted right x axis y axis)
    PRIME Synchronization: 1 
        supported: 0, 1
    Content Protection: Undesired 
        supported: Undesired, Desired, Enabled
    max bpc: 12 
        range: (6, 12)
    Broadcast RGB: Automatic 
        supported: Automatic, Full, Limited 16:235
    audio: auto 
        supported: force-dvi, off, auto, on
    link-status: Good 
        supported: Good, Bad
    CONNECTOR_ID: 106 
        supported: 106
    non-desktop: 0 
        range: (0, 1)


(base) alex@alex:/etc/modprobe.d$ dmesg | grep drm
[    0.000000] Command line: BOOT_IMAGE=/vmlinuz-5.3.0-24-generic root=UUID=3aed6bfe-476b-4f03-a33a-8265acaf1a5a ro quiet splash acpi_rev_override=1 acpi_osi=Linux nouveau.modeset=0 pcie_aspm=force drm.vblankoffdelay=1 scsi_mod.use_blk_mq=1 nouveau.runpm=0 mem_sleep_default=deep pti=off spectre_v2=off l1tf=off nospec_store_bypass_disable no_stf_barrier vt.handoff=7
[    0.131737] Kernel command line: BOOT_IMAGE=/vmlinuz-5.3.0-24-generic root=UUID=3aed6bfe-476b-4f03-a33a-8265acaf1a5a ro quiet splash acpi_rev_override=1 acpi_osi=Linux nouveau.modeset=0 pcie_aspm=force drm.vblankoffdelay=1 scsi_mod.use_blk_mq=1 nouveau.runpm=0 mem_sleep_default=deep pti=off spectre_v2=off l1tf=off nospec_store_bypass_disable no_stf_barrier vt.handoff=7
[    3.004066] [drm] Incompatible option detected: enable_guc=3, GuC submission not supported!
[    3.004066] [drm] Switching to non-GuC submission mode!
[    3.004671] fb0: switching to inteldrmfb from EFI VGA
[    3.016968] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    3.016969] [drm] Driver supports precise vblank timestamp query.
[    3.024951] [drm] Finished loading DMC firmware i915/kbl_dmc_ver1_04.bin (v1.4)
[    3.096695] [drm] HuC: Loaded firmware i915/kbl_huc_ver02_00_1810.bin (version 2.0)
[    3.107310] [drm] GuC: Loaded firmware i915/kbl_guc_32.0.3.bin (version 32.0)
[    3.107444] [drm] CT: enabled
[    3.137213] [drm] Initialized i915 1.6.0 20190619 for 0000:00:02.0 on minor 0
[    3.376284] [drm] [nvidia-drm] [GPU ID 0x00000100] Loading driver
[    3.376286] [drm] Initialized nvidia-drm 0.0.0 20160202 for 0000:01:00.0 on minor 1
[    3.413727] fbcon: i915drmfb (fb0) is primary device
[    3.413802] i915 0000:00:02.0: fb0: i915drmfb frame buffer device


(base) alex@alex:/etc/modprobe.d$ nvidia-smi
Sat Dec  7 13:10:10 2019       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 435.21       Driver Version: 435.21       CUDA Version: 10.1     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 105...  Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   44C    P8    N/A /  N/A |    600MiB /  4042MiB |     31%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0      1520      G   /usr/lib/xorg/Xorg                            72MiB |
|    0      2495      G   /usr/lib/xorg/Xorg                           137MiB |
|    0      2768      G   /usr/bin/gnome-shell                         207MiB |
|    0      3410      G   ...quest-channel-token=2905873432716077065   133MiB |
+-----------------------------------------------------------------------------+

任何想法都非常感谢,谢谢!

答案1

此答案由@道格在里面对上述问题的评论

我在运行 Ubuntu 18.04 的配备 GTX 1050 Ti 的 Dell XPS 9570 上测试了此解决方案,并且有效。

  • sudo update-initramfs -u
  • /etc/default/grub通过运行进行修改sudo nano /etc/default/grub
    • 更改GRUB_CMDLINE_LINUX_DEFAULT=行以包含设置nvidia-drm.modeset=1
    • 如果该行是,GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"那么您将其更改为GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nvidia-drm.modeset=1"
  • sudo update-grub
  • 重启

如果您想在修改 grub 之前先尝试这一点,您可以在启动机器时从 grub 菜单中编辑启动选项。

相关内容