如何处理 NVIDIA 上的 Gentoo 撕裂问题?

如何处理 NVIDIA 上的 Gentoo 撕裂问题?

为什么 Linux 中会出现视频撕裂这样的问题?为什么撕裂首先是一个问题,以及为什么通常建议的常用“技巧”(例如“禁用合成”,GLXVBlank true)通常不起作用。

这个问题比较具体,但对于许多用户来说仍然足够笼统:How do you deal with Tearing on Gentoo, using an NVIDIA based Graphics Card?

我所说的“处理”是指你如何删除它,使用一些通过纯粹的蛮力实现的非常具体的设置,或者你如何至少最小化影响?

我尝试过专有和免费驱动程序、不同版本、不同内核、不同 X 配置和驱动程序选项。我还没有尝试不同的窗口管理器,因为我根本没有时间去摆弄它。

与其重新发明轮子,也许有人已经知道了一个好的设置,可以在我们等待 Wayland 获得更多牵引力的同时最大限度地减少这些不利影响。正如 kirill-a 在另一个问题中建议的那样:“因此,屏幕撕裂问题可以通过尝试不同的驱动程序并配置它们来解决。”

窗口管理器、驱动程序、内核(请提及至关重要的特定内核选项)、X 配置和媒体播放器的哪种组合会给我带来最佳结果?

答案1

我在 Arch 中与 NVidia 经历了很多撕裂。我尝试了中的建议这个答案到您链接的问题。为我彻底消除了它。

这是使用最新的专有 NVidia 驱动程序。从那以后,我在 Mate (marco) 和 LXDE (openbox) 中都没有看到任何明显的撕裂。

(如果您想了解有关我的系统/设置的更多详细信息,请告诉我)

答案2

我无法提供您在评论中请求的信息,所以这里是:

硬件

$ sudo lshw -C system
bedroom-gentoo            
    description: Desktop Computer
    product: M68M-S2P ()
    vendor: Gigabyte Technology Co., Ltd.
    width: 64 bits
    capabilities: smbios-2.4 dmi-2.4 vsyscall32
    configuration: boot=normal chassis=desktop uuid=31433646-3635-3539-3430-3543FFFFFFFF 

$ sudo lshw -C video
  *-display               
       description: VGA compatible controller
       product: GF116 [GeForce GTX 550 Ti]
       vendor: NVIDIA Corporation
       physical id: 0
       bus info: pci@0000:02:00.0
       version: a1
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
       configuration: driver=nvidia latency=0
       resources: irq:26 memory:f8000000-f9ffffff memory:d0000000-d7ffffff memory:dc000000-dfffffff ioport:ac00(size=128) memory:fa000000-fa07ffff

$ sudo lshw -C memory
  *-firmware              
       description: BIOS
       vendor: Award Software International, Inc.
       physical id: 0
       version: FC
       date: 08/25/2010
       size: 128KiB
       capacity: 960KiB
       capabilities: pci pnp apm upgrade shadowing cdboot bootselect socketedrom edd int13floppy360 int13floppy1200 int13floppy720 int13floppy2880 int5printscreen int9keyboard int14serial int17printer int10video acpi usb ls120boot zipboot biosbootspecification
  *-cache:0
       description: L1 cache
       physical id: 8
       slot: Internal Cache
       size: 128KiB
       capacity: 128KiB
       capabilities: synchronous internal write-back
  *-cache:1
       description: L2 cache
       physical id: a
       slot: External Cache
       size: 1MiB
       capacity: 1MiB
       capabilities: synchronous internal write-back
  *-cache
       description: L1 cache
       physical id: 4
       slot: Internal Cache
       size: 128KiB
       capacity: 128KiB
       capabilities: synchronous internal write-back
  *-memory:0
       description: System Memory
       physical id: 1f
       slot: System board or motherboard
       size: 4GiB
     *-bank:0
          description: DIMM 800 MHz (1.2 ns)
          physical id: 0
          slot: A0
          size: 2GiB
          width: 64 bits
          clock: 800MHz (1.2ns)
     *-bank:1
          description: DIMM 800 MHz (1.2 ns)
          physical id: 1
          slot: A1
          size: 2GiB
          width: 64 bits
          clock: 800MHz (1.2ns)

软件和驱动程序

$ eix nvidia-drivers
[I] x11-drivers/nvidia-drivers
     Available versions:  [M]96.43.23^msd [M]173.14.39^msd [M]173.14.39-r1^msd[1] 304.125^msd 331.113^msd 340.76^msd 343.36^msd 346.72^msd (~)346.82^msd 349.16^msd (~)352.21^msd {+X acpi custom-cflags gtk gtk2 gtk3 kernel3-13 kernel3-14 +kernel3-17 multilib pax_kernel (+)tools uvm KERNEL="FreeBSD linux"}
     Installed versions:  352.21^msd(03:35:53 PM 06/21/2015)(X acpi gtk2 gtk3 multilib tools -pax_kernel -uvm KERNEL="linux -FreeBSD")
     Homepage:            http://www.nvidia.com/
     Description:         NVIDIA Accelerated Graphics Driver

$ eix gentoo-sources
[?] sys-kernel/gentoo-sources
     Available versions:  
     (3.4.106) ~3.4.106^bs
     (3.4.107) ~3.4.107^bs
     (3.4.9999) **3.4.9999^bs
     (3.10.77) 3.10.77^bs
     (3.10.79) ~3.10.79^bs
     (3.10.80) ~3.10.80^bs
     (3.10.81) ~3.10.81^bs
     (3.12.44) 3.12.44^bs
     (3.12.9999) **3.12.9999^bs
     (3.14.41) 3.14.41^bs
     (3.14.42) ~3.14.42^bs
     (3.14.43) ~3.14.43^bs
     (3.14.44) ~3.14.44^bs
     (3.14.45) ~3.14.45^bs
     (3.18.16) 3.18.16^bs
     (3.19.8) ~3.19.8^bs
     (4.0.4) ~4.0.4^bs
     (4.0.5) 4.0.5^bs
     (4.0.6) ~4.0.6^bs
     (4.1.0) ~4.1.0^bs
       {build deblob experimental symlink}
     Installed versions:  3.17.7(3.17.7)^bs(10:31:35 AM 01/23/2015)(-build -deblob -experimental -symlink) 4.0.5(4.0.5)^bs(09:21:14 AM 07/19/2015)(-build -deblob -experimental -symlink)
     Homepage:            http://dev.gentoo.org/~mpagano/genpatches
     Description:         Full sources including the Gentoo patchset for the 4.1 kernel tree

$ eix qt-meta
* dev-qt/qt-meta
     Available versions:  (4) 4.8.5
       {+dbus examples kde openvg +qt3support +webkit}
     Homepage:            https://www.qt.io/
     Description:         Cross-platform application development framework (metapackage)

$ eix kde-meta
[I] kde-base/kde-meta
     Available versions:  (4) 4.14.3
       {accessibility aqua kdepim minimal nls sdk}
     Installed versions:  4.14.3(4)(11:31:06 PM 02/01/2015)(nls -accessibility -aqua -kdepim -minimal -sdk)
     Homepage:            http://www.kde.org/
     Description:         KDE - merge this to pull in all split kde-base/* packages

$ eix vlc
[I] media-libs/phonon-vlc
     Available versions:  0.7.2 ~0.8.2 **9999 {debug +qt4 qt5}
     Installed versions:  0.7.2(02:16:52 AM 07/20/2015)(qt4 -debug -qt5)
     Homepage:            https://projects.kde.org/projects/kdesupport/phonon/phonon-vlc
     Description:         Phonon VLC backend

[I] media-video/vlc
     Available versions:  2.1.5-r1(0/5-7) **2.1.9999(0/5-7) ~2.2.0(0/5-8) ~2.2.1(0/5-8) **2.2.9999(0/5-8) **9999(0/5-8) {+X a52 aalib alsa altivec atmo +audioqueue avahi +avcodec +avformat bidi bluray cdda cddb chromaprint dbus dc1394 debug dirac directfb directx dts dvb +dvbpsi dvd dxva2 egl +encode faad fdk +ffmpeg flac fluidsynth fontconfig +gcrypt gme gnome gnutls growl httpd ieee1394 ios-vout jack jpeg kate kde libass libav libcaca libnotify (+)libsamplerate libtar libtiger linsys lirc live lua +macosx +macosx-audio (+)macosx-dialog-provider (+)macosx-eyetv (+)macosx-qtkit (+)macosx-quartztext +macosx-vout matroska media-library modplug mp3 mpeg mtp musepack ncurses neon ogg omxil opencv opengl optimisememory opus png (+)postproc projectm pulseaudio +qt4 qt5 rdp rtsp run-as-root samba schroedinger sdl sdl-image sftp shout sid skins speex svg +swscale taglib test theora tremor truetype twolame udev upnp v4l vaapi vcdx vdpau vlm vnc vorbis vpx wma-fixed x264 x265 +xcb xml xv zeroconf zvbi CPU_FLAGS_X86="mmx sse" ELIBC="glibc"}
     Installed versions:  2.1.5-r1(02:03:10 AM 07/20/2015)(X a52 aalib alsa avcodec avformat bidi cdda cddb dbus dts dvbpsi dvd encode ffmpeg flac fluidsynth fontconfig gcrypt httpd ieee1394 jack kate kde libcaca libnotify lirc lua modplug mp3 mpeg musepack ncurses ogg opengl png postproc pulseaudio qt4 sdl speex svg swscale taglib theora truetype udev vorbis x264 xcb xml xv -altivec -atmo -audioqueue -avahi -bluray -chromaprint -dc1394 -debug -dirac -directfb -directx -dvb -dxva2 -egl -faad -fdk -gme -gnome -gnutls -growl -ios-vout -libass -libav -libsamplerate -libtar -libtiger -linsys -live -macosx -macosx-audio -macosx-dialog-provider -macosx-eyetv -macosx-qtkit -macosx-quartztext -macosx-vout -matroska -media-library -mtp -neon -omxil -opencv -optimisememory -opus -projectm -rdp -rtsp -run-as-root -samba -schroedinger -sdl-image -sftp -shout -sid -skins -test -tremor -twolame -upnp -v4l -vaapi -vcdx -vdpau -vlm -vnc -wma-fixed -zvbi CPU_FLAGS_X86="mmx sse" ELIBC="glibc")
     Homepage:            http://www.videolan.org/vlc/
     Description:         VLC media player - Video player and streamer

请注意,我的内核源代码不再位于树中。我尝试保留构建系统所用的内核(个人喜好),并genkernel-next与以下conf文件一起使用:

$ cat /etc/genkernel.conf
\# Configuration file for genkernel

# This file is sourced by genkernel at startup and determines which options
# we will be using to compile our kernel.  The order of precidence is simple,
# with the internal settings being least important, configuration file
# settings next, and command line options being most important.

# =========Common Command Line Option Defaults=========

# Should we install to $BOOTDIR?  Default is "no" because genkernel is used in
# catalyst and stage building.
INSTALL="yes"

# Run 'make oldconfig' before compiling this kernel?
OLDCONFIG="yes"

# Run 'make menuconfig' before compiling this kernel?
MENUCONFIG="yes"

# Run 'make nconfig' (ncurses 'menuconfig') before compiling this kernel?
NCONFIG="no"

# Note, that two previous lines are mutual exclusive (logically), while
# MENUCONFIG has a higher priority if both them is enabled.

# Run 'make clean' before compilation?
# If set to NO, implies MRPROPER WILL NOT be run
# Also, if clean is NO, it won't copy over any configuration
# file, it will use what's there.
CLEAN="yes"

# Run 'make mrproper' before configuration/compilation?
MRPROPER="yes"

# Override the arch detection?
#ARCH_OVERRIDE="x86"

# Mount BOOTDIR automatically if it isn't mounted?
MOUNTBOOT="yes"

# Make symlinks in BOOTDIR automatically?
#SYMLINK="no"

# Save the new configuration in /etc/kernels upon
# successfull compilation
SAVE_CONFIG="yes"

# Use Color output in Genkernel?
USECOLOR="yes"

# Clear build cache dir
CLEAR_CACHE_DIR="yes"

# Clear all tmp files and caches after genkernel has run
POSTCLEAR="1"

# Genkernel uses an independent configuration for MAKEOPTS, and does not source
# /etc/make.conf . You can override the default setting by uncommenting and
# tweaking the following line. Default setting is set up by
# ${GK_SHARE}/${ARCH_OVERRIDE}/config.sh . The recommended value for -j
# argument is: <number of processors>*<number of cores per processor>+1
MAKEOPTS="-j5"

# Add in LVM support from static binaries if they exist on the system, or
# compile static LVM binaries if static ones do not exist.
#LVM="no"

# Add in Luks support. Needs sys-fs/cryptsetup with -dynamic installed.
#LUKS="no"

# Add in GnuPG support
#GPG="no"

# Add DMRAID support.
#DMRAID="no"

# Include (or suppresses the inclusion of) busybox in the initrd or initramfs.
# If included, busybox is rebuilt if the cached copy is out of date.
BUSYBOX="yes"

# Use udev instead of mdev as the default device manager for the initramfs.
# If you use systemd and perhaps lvm, you _must_ keep this turned on.
UDEV="yes"

# Includes mdadm/mdmon binaries in initramfs.
# Without sys-fs/mdadm[static] installed, this will build a static mdadm.
#MDADM="no"

# Specify a custom mdadm.conf.
# By default the ramdisk will be built *without* an mdadm.conf and will auto-detect
# arrays during bootup.  Usually, this should not be needed.
#MDADM_CONFIG="/etc/mdadm.conf"

# Add Multipath support.
#MULTIPATH="no"

# Add iSCSI support.
#ISCSI="no"

# Add e2fsprogs support.
E2FSPROGS="yes"

# Enable copying of firmware into initramfs
#FIRMWARE="no"
# Specify directory to pull from
#FIRMWARE_DIR="/lib/firmware"
# Specify specific firmware files to include. This overrides FIRMWARE_DIR
#FIRMWARE_FILES=""

# Add new kernel to grub?
BOOTLOADER="grub2"

# Enable splashutils in early space (initrd). Default is "no".
#SPLASH="yes"

# Use this splash theme. If commented out - the "default" name theme is used.
# Also, SPLASH="yes" needs to be enabled for this one to one work.
# This supersedes the "SPLASH_THEME" option of /etc/conf.d/splash (in early space).
#SPLASH_THEME="gentoo"

# Installs, or not, plymouth into the initramfs. If "splash" will be
# passed at boot, plymouth will be activated.
PLYMOUTH="yes"

# Embeds the given plymouth theme into the initramfs.
PLYMOUTH_THEME="solar"

# =========Keymap Settings=========
#
# Force keymap selection at boot
#DOKEYMAPAUTO="yes"


# Disables keymap selection support
#KEYMAP="0"


# =========Low Level Compile Settings=========
#
# GNU Make to use for kernel.  See also the --kernel-make command line option.
#KERNEL_MAKE="make"

# Compiler to use for the kernel (e.g. distcc).  See also the --kernel-cc
# command line option.
#KERNEL_CC="gcc"

# Assembler to use for the kernel.  See also the --kernel-as command line
# option.
#KERNEL_AS="as"

# Linker to use for the kernel.  See also the --kernel-ld command line option.
#KERNEL_LD="ld"

# GNU Make to use for the utilities.  See also the --utils-make command line
# option.
#UTILS_MAKE="make"

# Compiler to use for the utilities (e.g. distcc).  See also the --utils-cc
# command line option.
#UTILS_CC="gcc"

# Assembler to use for the utilities.  See also the --utils-as command line
# option.
#UTILS_AS="as"

# Linker to use for the utilities.  See also the --utils-ld command line
# option.
#UTILS_LD="ld"

# =========GENKERNEL LOCATION CONFIGURATION============
# Variables:
#   %%ARCH%%  - Final determined architecture
#   %%CACHE%% - Final determined cache location

# Set genkernel's temporary work directory.  Default is /var/tmp/genkernel
#TMPDIR="/var/tmp/genkernel"

# Set the boot directory, default is /boot
#BOOTDIR="/boot"

# Default share directory location
GK_SHARE="${GK_SHARE:-/usr/share/genkernel}"

# Location of the default cache
CACHE_DIR="/var/cache/genkernel"
# Location of DISTDIR, where our source tarballs are stored
DISTDIR="/var/lib/genkernel/src"
# Log output file
LOGFILE="/var/log/genkernel.log"
# Debug Level
LOGLEVEL=5

# =========COMPILED UTILS CONFIGURATION============
#
# Default location of kernel source
DEFAULT_KERNEL_SOURCE="/usr/src/linux"
# Default kernel config (only use to override using
# arch/%%ARCH%%/kernel-config-${VER}.${PAT} !)
#DEFAULT_KERNEL_CONFIG="${GK_SHARE}/arch/%%ARCH%%/kernel-config"

# Specifies a user created busybox config
#BUSYBOX_CONFIG="/path/to/file"
#BUSYBOX_APPLETS="[ ash sh mount uname echo cut cat"

# NOTE: Since genkernel 3.4.41 the version of
#   busybox, lvm, mdadm, .. have been moved to
#   /usr/share/genkernel/defaults/software.sh in order to
#   reduce the merging you have to do during etc-update.
#   You can still override these settings in here.


# =========MISC KERNEL CONFIGURATION============
#
# Tag the kernel and ramdisk with a name:
# If not defined the option defaults to
# 'genkernel'
#KNAME="genkernel"


# This option is only valid if kerncache is
# defined. If there is a valid kerncache no checks
# will be made against a kernel source tree
#KERNEL_SOURCES="0"


# Build a static (monolithic kernel)
#BUILD_STATIC="1"


# Make and install kernelz image (PowerPC)
#GENZIMAGE="1"


# File to output a .tar.bz2'd kernel contents
# of /lib/modules/ and the kernel config
# NOTE: This is created before the callbacks
# are run!
#KERNCACHE="/path/to/file"


# Prefix to kernel module destination, modules
# will be installed in <prefix>/lib/modules
# (.conf equivalent of --module-prefix=<dir>)
#INSTALL_MOD_PATH=""


# =========MISC INITRD CONFIGURATION============
#
# Copy all kernel modules to the ramdisk
#ALLRAMDISKMODULES="1"


# Don't copy any modules to the ramdisk
#RAMDISKMODULES="0"


# File to output a .tar.bz2'd kernel and ramdisk:
# No modules outside of the ramdisk will be
# included...
#MINKERNPACKAGE="/path/to/file.bz2"


# File to output a .tar.bz2'd modules after the
# callbacks have run
#MODULESPACKAGE="/path/to/file.bz2"


# Directory structure to include in the initramfs,
# only available on >=2.6 kernels
#INITRAMFS_OVERLAY=""


# Build the generated initramfs into the kernel instead of
# keeping it as a separate file
#INTEGRATED_INITRAMFS="1"


# Compress generated initramfs
#COMPRESS_INITRD="yes"
# Types of compression: best, xz, lzma, bzip2, gzip, lzop, fastest
# "best" selects the best available compression method
# "fastest" selects the fastest available compression method
#COMPRESS_INITRD_TYPE="best"


# Create a self-contained env in the initramfs
#NETBOOT="1"


# =========MISC BOOT CONFIGURATION============
#
# Specify a default for real_root=
#REAL_ROOT="/dev/one/two/gentoo"

使用专有驱动vlc程序nvidia和不使用nouveau驱动程序时,我没有看到多张 DVD 出现撕裂现象 - 例如《绝命毒师》和《遗落战境》的所有季节,以及《神秘博士》的 Hulu 订阅等 Chromium Stable 中的内容。我还禁用了板载显卡,转而使用所列显卡的 AGP 版本。三年来,除了一些硬盘升级和更换无线网卡之外,我没有做过任何重大的事情

相关内容