1

I have Debian 10 installed on my laptop and I manually installed xorg, i3wm and compton just after Debian. I had some serious tearing issues I solved by installing the nVidia proprietary drivers and tweaking some options in the xorg.conf file:

/usr/share/X11/xorg.conf.d/10-nvidia.conf    
    # nvidia-settings: X configuration file generated by nvidia-settings
    # nvidia-settings:  version 390.116

    Section "ServerLayout"
        Identifier     "Layout0"
        Screen      0  "Screen0" 0 0
        InputDevice    "Keyboard0" "CoreKeyboard"
        InputDevice    "Mouse0" "CorePointer"
        Option         "Xinerama" "0"
    EndSection

    Section "Files"
    EndSection

    Section "Module"
        Load           "dbe"
        Load           "extmod"
        Load           "type1"
        Load           "freetype"
        Load           "glx"
    EndSection

    Section "InputDevice"
        # generated from default
        Identifier     "Mouse0"
        Driver         "mouse"
        Option         "Protocol" "auto"
        Option         "Device" "/dev/psaux"
        Option         "Emulate3Buttons" "no"
        Option         "ZAxisMapping" "4 5"
    EndSection

    Section "InputDevice"
        # generated from default
        Identifier     "Keyboard0"
        Driver         "kbd"
    EndSection

    Section "Monitor"
        # HorizSync source: edid, VertRefresh source: edid
        Identifier     "Monitor0"
        VendorName     "Unknown"
        ModelName      "FUS P19-3P"
        HorizSync       30.0 - 82.0
        VertRefresh     56.0 - 76.0
        Option         "DPMS"
    EndSection

    Section "Device"
        Identifier     "Device0"
        Driver         "nvidia"
        VendorName     "NVIDIA Corporation"
        BusID          "PCI:1:0:0"
        BoardName      "GeForce GTX 670M"
        Option         "NoLogo" "1"
        Option         "MigrationHeuristic" "greedy"
        Option         "AccelMethod" "sna"
        Option         "TearFree"    "true"
        Option "RenderAccel" "True"
        Option "AddARGBGLXVisuals" "True"
        Option "OnDemandVBlankInterrupts" "True"
        Option "InitialPixmapPlacement" "2"
        Option "BackingStore" "True"
        Option "DamageEvents" "True"
        Option "UseEvents" "False"
        Option "Coolbits" "1"
        Option "DisableGLXRootCliping" "True"
        Option "TripleBuffer" "true"
        Option "Coolbits" "24"
        Option "PixmapCacheSize" "300000"
        Option "GlyphCache" "1"

    EndSection

    Section "Screen"
        Identifier     "Screen0"
        Device         "Device0"
        Monitor        "Monitor0"
        DefaultDepth    24
        Option         "Stereo" "0"
        Option         "metamodes" "HDMI-0: nvidia-auto-select +0+0 {ForceCompositionPipeline=On, ForceFullCompositionPipeline=On}"
        Option         "SLI" "Off"
        Option         "MultiGPU" "Off"
        Option         "BaseMosaic" "off"
        SubSection     "Display"
            Depth       24
        EndSubSection
    EndSection

and in the compton.conf file:

~/.config/compton.conf
# basic configuration
backend = "glx";
vsync = "opengl-swc";
paint-on-overlay = true
glx-no-stencil = true

glx-copy-from-front = true;
glx-swap-method = 2;
xrender-sync = true;
xrender-sync-fence = true;

# transparancy settings for i3
opacity-rule = [
    "0:_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'",
    "100:class_g = 'Firefox-esr' && !_NET_WM_STATE@:32a",
    "0:_NET_WM_STATE@[0]:32a *= '_NET_WM_STATE_HIDDEN'",
    "0:_NET_WM_STATE@[1]:32a *= '_NET_WM_STATE_HIDDEN'",
    "0:_NET_WM_STATE@[2]:32a *= '_NET_WM_STATE_HIDDEN'",
    "0:_NET_WM_STATE@[3]:32a *= '_NET_WM_STATE_HIDDEN'",
    "0:_NET_WM_STATE@[4]:32a *= '_NET_WM_STATE_HIDDEN'",
    "92:class_g = 'st-256color' && !_NET_WM_STATE@:32a",
    "0:_NET_WM_STATE@[0]:32a *= '_NET_WM_STATE_HIDDEN'",
    "0:_NET_WM_STATE@[1]:32a *= '_NET_WM_STATE_HIDDEN'",
    "0:_NET_WM_STATE@[2]:32a *= '_NET_WM_STATE_HIDDEN'",
    "0:_NET_WM_STATE@[3]:32a *= '_NET_WM_STATE_HIDDEN'",
    "0:_NET_WM_STATE@[4]:32a *= '_NET_WM_STATE_HIDDEN'"
];

and invoking compton with exec --no-startup-id compton --config ~/.config/compton.conf -CGb --backend glx --paint-on-overlay --vsync opengl-swc

from the i3wm config file.

I also attach the output of lspci

00:00.0 Host bridge: Intel Corporation 3rd Gen Core processor DRAM Controller (rev 09)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor PCI Express Root Port (rev 09)
00:14.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller (rev 04)
00:16.0 Communication controller: Intel Corporation 7 Series/C216 Chipset Family MEI Controller #1 (rev 04)
00:1a.0 USB controller: Intel Corporation 7 Series/C216 Chipset Family USB Enhanced Host Controller #2 (rev 04)
00:1b.0 Audio device: Intel Corporation 7 Series/C216 Chipset Family High Definition Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 7 Series/C216 Chipset Family PCI Express Root Port 1 (rev c4)
00:1c.1 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 2 (rev c4)
00:1c.3 PCI bridge: Intel Corporation 7 Series/C216 Chipset Family PCI Express Root Port 4 (rev c4)
00:1c.4 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 5 (rev c4)
00:1d.0 USB controller: Intel Corporation 7 Series/C216 Chipset Family USB Enhanced Host Controller #1 (rev 04)
00:1f.0 ISA bridge: Intel Corporation HM77 Express Chipset LPC Controller (rev 04)
00:1f.2 SATA controller: Intel Corporation 7 Series Chipset Family 6-port SATA Controller [AHCI mode] (rev 04)
00:1f.3 SMBus: Intel Corporation 7 Series/C216 Chipset Family SMBus Controller (rev 04)
01:00.0 VGA compatible controller: NVIDIA Corporation GF114M [GeForce GTX 670M] (rev a1)
01:00.1 Audio device: NVIDIA Corporation GF114 HDMI Audio Controller (rev a1)
03:00.0 Network controller: Intel Corporation Centrino Wireless-N 105 (rev c4)
04:00.0 Ethernet controller: Qualcomm Atheros AR8151 v2.0 Gigabit Ethernet (rev c0)

The problems apparently disappeared, even though if I test my monitor with a test found on this website I see from time to time (approximately each 10 seconds) the UFO going back for a tiny bit of space and then go forward again...

I tried to investigate the issue and I found out that some users complained also about high CPU usage of xorg. I normally do not have high CPU usage (while I'm writing this question each of my 8-core CPU stays below 7%, but if I start resizing the box back and forth, the CPU usage rises up to 70/80%), but if I try to move a floating window in i3, the CPU usage starts rising to 50/60% for some cores (all these results were inspected by using htop) and the culprits are both xorg and compton (and sometimes also the window I move).

So the question is: why does this happen? Could this be related to the issues I see on the screen? Isn't the screen be redrawn by the GPU and, if it's the case, why does this have so much impact on the CPU usage? Is there a way to solve this issue which could contribute in causing the little screen artifacts I see?

Thanks in advance.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.