You are not logged in.

#1 2018-03-14 09:56:57

tmb
Member
Registered: 2018-03-14
Posts: 9

[SOLVED] nvidia-all graphic applications perodically lag except games

Hello,
I am using Arch with gnome on my desktop computer, but I have troubles with almost all graphic applications.
The best example is glxgears, where the gears lag periodically every 1.5 seconds for just a very short moment bevore the move on. The same appears in videos (only the video, not the sound) and even the movement of the cursor in vim shows this periodically lag.
However, in games (using steam) everything is ok.

My graphic card is: NVIDIA Corporation GP106 [GeForce GTX 1060 6GB Rev. 2]

The driver installation was done according to the wiki, including the installation of
the necessary packages and the configuartion in 20-nvidia.conf as well as the configuration of the hook to renew mkinitcpio in pacman.d.

The according nvidia packages installed are:
lib32-nvidia-utils 390.25-1
nvidia 390.25-16
nvidia-settings 390.25-1
nvidia-utils 390.25-2
opencl-nvidia 390.25-2

I would be greateful for any suggestions
Tobias

Last edited by tmb (2018-03-28 12:12:51)

Offline

#2 2018-03-14 11:33:41

Ropid
Member
Registered: 2015-03-09
Posts: 423

Re: [SOLVED] nvidia-all graphic applications perodically lag except games

I don't use Gnome right now. In the past it sometimes had similar problems in certain versions. Maybe that the case again right now?

Perhaps this is a problem in gnome-shell? The explanation for games running fine would be that gnome-shell (or its "mutter" part) has detection for fullscreen windows and disables redirection for those.

What did you configure in your own Xorg config file? Maybe try removing the option "ForceFullCompositionPipeline" if you use it.

There version 390.25 of the drivers has problems. The performance of Chromium is for example terrible. Maybe your problem is related. If you want to try 387.34, I could write down the exact steps on how to get a working version on the current Arch kernel.

Offline

#3 2018-03-14 12:10:33

tmb
Member
Registered: 2018-03-14
Posts: 9

Re: [SOLVED] nvidia-all graphic applications perodically lag except games

Ropid wrote:

What did you configure in your own Xorg config file?

The file /etc/xorg.conf.d/20-nivida.conf was created by $ nividia-xconfig and has the following content:

# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings:  version 390.25  (builduser@anthraxx)  Thu Feb  8 13:45:56 CET 2018

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 390.25  (buildmeister@swio-display-x86-rhel47-03)  Wed Jan 24 20:46:04 PST 2018

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

Section "Files"
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"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "LG Electronics 24GM77"
    HorizSync       30.0 - 135.0
    VertRefresh     56.0 - 120.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GTX 1060 6GB"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "DFP-1"
    Option         "metamodes" "1920x1080_60 +0+0"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

The option  "ForceFullCompositionPipeline" does not seem to be set.

Ropid wrote:

  If you want to try 387.34, I could write down the exact steps on how to get a working version on the current Arch kernel.

That would be nice if you could do that for me.

Regards
Tobias

Offline

#4 2018-03-14 14:44:30

Ropid
Member
Registered: 2015-03-09
Posts: 423

Re: [SOLVED] nvidia-all graphic applications perodically lag except games

The Xorg config file you use is not needed. Things should also work fine without it. The file is basically just the results of the automatic detection in the Xorg server. The file could cause problems in the future if something changes after package updates or a hardware change.

About how to get 387.34 to work on current Arch:

You first remove the package with the nvidia kernel module for the kernel you are using. For example, if you currently use the normal "linux" kernel and the package "nvidia" for a kernel module, you do this:

sudo pacman -Rs nvidia

The following command line will download and install the 387.34 nvidia Arch packages (you can select and copy this whole multi-line thing as one thing and paste it into a terminal window and it should run):

sudo pacman -U \
https://archive.archlinux.org/repos/2018/01/09/extra/os/x86_64/nvidia-utils-387.34-5-x86_64.pkg.tar.xz \
https://archive.archlinux.org/repos/2018/01/09/extra/os/x86_64/opencl-nvidia-387.34-5-x86_64.pkg.tar.xz \
https://archive.archlinux.org/repos/2018/01/09/extra/os/x86_64/nvidia-settings-387.34-1-x86_64.pkg.tar.xz \
https://archive.archlinux.org/repos/2018/01/09/extra/os/x86_64/libxnvctrl-387.34-1-x86_64.pkg.tar.xz \
https://archive.archlinux.org/repos/2018/01/09/multilib/os/x86_64/lib32-nvidia-utils-387.34-1-x86_64.pkg.tar.xz \
https://archive.archlinux.org/repos/2018/01/09/multilib/os/x86_64/lib32-opencl-nvidia-387.34-1-x86_64.pkg.tar.xz

You now need to build a new kernel module that works for the current kernels. You first need a tool "asp" to get the source for the Arch nvidia package:

sudo pacman -S asp

Get the source for the "nvidia" kernel module package (this will create a sub-folder named "nvidia" in the location where you currently are):

asp checkout nvidia

Go into the "trunk" sub-folder:

cd nvidia/trunk/

Change to the old source for 387.34:

git checkout 888e0bdffc98e543383079a3181b1784971ae934

When you now list the contents of the folder, you should see this:

$ ls
fix-abi.patch  PKGBUILD

If you look into the "PKGBUILD" file, you should see this:

$ head PKGBUILD
# $Id: PKGBUILD 315339 2018-01-23 22:56:58Z heftig $
# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Thomas Baechler <thomas@archlinux.org>

pkgbase=nvidia
pkgname=(nvidia nvidia-dkms)
pkgver=387.34
_extramodules=extramodules-4.14-ARCH
pkgrel=21

Here's the source for a tweaked PKGBUILD:

http://ix.io/WYB

This tweaked file is supposed to build an "nvidia-dkms" package. It needs the following file saved as "4.15-387.34.patch" to work:

http://ix.io/WYC

The following two commands should download those two files:

curl -o 4.15-387.34.patch http://ix.io/WYC
curl -o PKGBUILD http://ix.io/WYB

You need the "...-headers" package for your kernel. If your current kernel is for example "linux", this would be "linux-headers":

sudo pacman -S linux-headers

You can now build and install the nvidia kernel module package:

makepkg -Ccsrfi

This will use that tweaked PKGBUILD from earlier. It will build a package named "nvidia-dkms". The things that will be installed will be "nvidia-dkms" and another package named "dkms". Running just "makepkg -i" will probably also work, that "makepkg -Ccsrfi" is just to make sure.

This whole work should survive through all future 4.15 kernel package updates. The kernel module will work for any kernel that you have installed as long as you have the "...-headers" package for the different kernel installed. If you for example also have "linux-lts" installed as a second kernel, you would have to make sure to also have a package named "linux-lts-headers" installed.

If you want to keep using 387.34 for a while, you should block pacman from updating these packages. You do this by adding the following line to your "/etc/pacman.conf" somewhere after the "[options]" line:

IgnorePkg = nvidia-utils lib32-nvidia-utils opencl-nvidia lib32-opencl-nvidia nvidia-settings libxnvctrl nvidia-dkms

Offline

#5 2018-03-19 21:18:00

tmb
Member
Registered: 2018-03-14
Posts: 9

Re: [SOLVED] nvidia-all graphic applications perodically lag except games

I have tried it out, but without succes! I am now back using the latest version 390.42 with the same problem.

Thanks anyway smile

But as pointed out, the problem ONLY occurs if the application is NOT running in full-screen mode. That's why I can deal with it at the moment but I hope for future updates of either gnome-shell or nvidia.

Offline

#6 2018-03-28 12:12:25

tmb
Member
Registered: 2018-03-14
Posts: 9

Re: [SOLVED] nvidia-all graphic applications perodically lag except games

After the latest update, everything works fine. I can't tell if it was the latest GNOME update or the NVIDIA driver update.

Gnome Version is now: Version 3.28.0
NVIDIA: nvidia 390.42-6

[SOLVED]

Offline

Board footer

Powered by FluxBB