Screen Tearing on Alienware Notebook

Screen resolution, 3D Acceleration, nVidia, ATI
Forum rules
Before you post please read this
User avatar
RandomX
Level 1
Level 1
Posts: 19
Joined: Sat Jan 07, 2012 6:57 am
Location: Rome
Contact:

Screen Tearing on Alienware Notebook

Postby RandomX » Fri Oct 20, 2017 6:40 am

Hi to all. I just installed linux mint cinnamon but after installed nvidia drivers i got a terrible screen tearing.. i tried some workaround that i found on the forum like editing xorg.conf but nothing..
What i also can do? I post some outputs.. hope that can be helpfull:

Code: Select all

randomx@Alienware ~ $ sudo dpkg -l nvidia-*
[sudo] password di randomx:
Voluto=U (non noto)/I (installato)/R (rimosso)/P (rimosso totale)/H (in attesa)
| Stato=Non/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(nessuno)/R (reinstallazione richiesta) (Stato,Err: maiuscolo=grave)
||/ Nome           Versione     Architettura Descrizione
+++-==============-============-============-=================================
ii  nvidia-387     387.12-0ubun amd64        NVIDIA binary driver - version 38
un  nvidia-common  <nessuna>    <nessuna>    (nessuna descrizione disponibile)
un  nvidia-driver- <nessuna>    <nessuna>    (nessuna descrizione disponibile)
un  nvidia-libopen <nessuna>    <nessuna>    (nessuna descrizione disponibile)
un  nvidia-libopen <nessuna>    <nessuna>    (nessuna descrizione disponibile)
un  nvidia-opencl- <nessuna>    <nessuna>    (nessuna descrizione disponibile)
ii  nvidia-opencl- 387.12-0ubun amd64        NVIDIA OpenCL ICD
un  nvidia-persist <nessuna>    <nessuna>    (nessuna descrizione disponibile)
ii  nvidia-prime   0.8.2linuxmi amd64        Tools to enable NVIDIA's Prime
ii  nvidia-setting 384.90-0ubun amd64        Tool for configuring the NVIDIA g
un  nvidia-setting <nessuna>    <nessuna>    (nessuna descrizione disponibile)
un  nvidia-smi     <nessuna>    <nessuna>    (nessuna descrizione disponibile)


Code: Select all

randomx@Alienware ~ $ cat /etc/X11/xorg.conf
Section "ServerLayout"
    Identifier "layout"
    Screen 0 "nvidia"
    Inactive "intel"
EndSection

Section "Device"
    Identifier "intel"
    Driver "modesetting"
    BusID "PCI:0@0:2:0"
    Option "AccelMethod" "None"
EndSection

Section "Screen"
    Identifier "intel"
    Device "intel"
EndSection

Section "Device"
    Identifier "nvidia"
    Driver "nvidia"
    BusID "PCI:1@0:0:0"
    Option "ConstrainCursor" "off"
EndSection

Section "Screen"
    Identifier "nvidia"
    Device "nvidia"
    Option "AllowEmptyInitialConfiguration" "on"
    Option "IgnoreDisplayDevices" "CRT"
EndSection


Code: Select all

randomx@Alienware ~ $ cat /etc/modprobe.d/nvidia-graphics-drivers.conf
# This file was installed by nvidia-387
# Do not edit this file manually

blacklist nouveau
blacklist lbm-nouveau
blacklist nvidia-current
blacklist nvidia-173
blacklist nvidia-96
blacklist nvidia-current-updates
blacklist nvidia-173-updates
blacklist nvidia-96-updates
blacklist nvidia-387-updates
alias nvidia nvidia_387
alias nvidia-uvm nvidia_387_uvm
alias nvidia-modeset nvidia_387_modeset
alias nvidia-drm nvidia_387_drm
alias nouveau off
alias lbm-nouveau off

options nvidia_387_drm modeset=0


Thank you for your advice :)
Wars come and go, but my soldiers stay eternal

User avatar
catweazel
Level 11
Level 11
Posts: 3514
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Screen Tearing on Alienware Notebook

Postby catweazel » Fri Oct 20, 2017 6:46 am

Check nVidia settings for an option titled Force Full Composition Pipeline and turn it on. If you don't find the option then post the output of inxi -Fxz. Note that F in -Fxz is an upper case F.
If your problem is fixed, please mark your thread as [SOLVED] by editing the title of the first message in the thread.

User avatar
RandomX
Level 1
Level 1
Posts: 19
Joined: Sat Jan 07, 2012 6:57 am
Location: Rome
Contact:

Re: Screen Tearing on Alienware Notebook

Postby RandomX » Fri Oct 20, 2017 1:55 pm

catweazel wrote:Check nVidia settings for an option titled Force Full Composition Pipeline and turn it on. If you don't find the option then post the output of inxi -Fxz. Note that F in -Fxz is an upper case F.


Don't have Force Full Composition Pipeline option on x server display configuration.. PRIME Display type hasn't advanced options.. maybe it could be a problem? (In attachements some screens)
Here is my inxi -Fxz output:

Code: Select all

randomx@Alienware ~ $ inxi -Fxz
System:    Host: Alienware Kernel: 4.8.0-53-generic x86_64 (64 bit gcc: 5.4.0)
           Desktop: Cinnamon 3.4.3 (Gtk 3.18.9-1ubuntu3.3)
           Distro: Linux Mint 18.2 Sonya
Machine:   System: Alienware product: Alienware 17 R4 v: 1.1.9
           Mobo: Alienware model: Alienware 17 R4 v: A00
           Bios: Alienware v: 1.1.9 date: 07/05/2017
CPU:       Quad core Intel Core i7-6700HQ (-HT-MCP-) cache: 6144 KB
           flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 20736
           clock speeds: max: 3500 MHz 1: 799 MHz 2: 799 MHz 3: 799 MHz
           4: 799 MHz 5: 800 MHz 6: 799 MHz 7: 799 MHz 8: 2204 MHz
Graphics:  Card-1: Intel Skylake Integrated Graphics bus-ID: 00:02.0
           Card-2: NVIDIA Device 1c20 bus-ID: 01:00.0
           Display Server: X.Org 1.18.4 driver: nvidia
           Resolution: 1920x1080@60.00hz
           GLX Renderer: GeForce GTX 1060/PCIe/SSE2
           GLX Version: 4.6.0 NVIDIA 387.12 Direct Rendering: Yes
Audio:     Card Intel Sunrise Point-H HD Audio
           driver: snd_hda_intel bus-ID: 00:1f.3
           Sound: Advanced Linux Sound Architecture v: k4.8.0-53-generic
Network:   Card-1: Qualcomm Atheros Killer E2400 Gigabit Ethernet Controller
           driver: alx port: d000 bus-ID: 3c:00.0
           IF: enp60s0 state: up speed: 100 Mbps duplex: full mac: <filter>
           Card-2: Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter
           driver: ath10k_pci bus-ID: 3d:00.0
           IF: wlp61s0 state: up mac: <filter>
           Card-3: Atheros usb-ID: 001-005
           IF: null-if-id state: N/A speed: N/A duplex: N/A mac: N/A
Drives:    HDD Total Size: 1128.2GB (2.3% used)
           ID-1: /dev/sda model: SanDisk_X400_M.2 size: 128.0GB
           ID-2: /dev/sdb model: HGST_HTS721010A9 size: 1000.2GB
Partition: ID-1: / size: 40G used: 18G (46%) fs: ext4 dev: /dev/sdb3
           ID-2: swap-1 size: 8.00GB used: 0.00GB (0%) fs: swap dev: /dev/sdb4
RAID:      No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors:   System Temperatures: cpu: 49.0C mobo: N/A gpu: 0.0:49C
           Fan Speeds (in rpm): cpu: N/A
Info:      Processes: 255 Uptime: 1 min Memory: 1258.5/7854.2MB
           Init: systemd runlevel: 5 Gcc sys: 5.4.0
           Client: Shell (bash 4.3.481) inxi: 2.2.35
Wars come and go, but my soldiers stay eternal

User avatar
catweazel
Level 11
Level 11
Posts: 3514
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Screen Tearing on Alienware Notebook

Postby catweazel » Fri Oct 20, 2017 5:38 pm

Ok, we'll fix your tearing issue the long way.

1) Rename the xorg.conf that you've created so it doesn't get loaded any more

2) In the X Server Display Configuration tab of NVIDIA Settings, click 'Save to X Configuration File' and save it into /etc/X11/xorg.conf

3) Start a terminal and issue the command sudo nano -w /etc/X11/xorg.conf

4) Use the cursor keys to find an option that looks similar to this:

Code: Select all

Option         "metamodes" "DVI-D-0: nvidia-auto-select +0+0"

Yours will be different at DVI-D-0 because you're using a notebook. If you can't find it, post the contents of xorg.conf so I can look at it.

5) Change the line so that it reads:

Code: Select all

Option         "metamodes" "DVI-D-0: nvidia-auto-select +0+0 { ForceFullCompositionPipeline = On }"

What you're doing here is adding { ForceFullCompositionPipeline = On } before the very last quote. Don't forget that DVI-D-0 is for my video card, not yours.

6) Locate the Device section and add these lines:

Code: Select all

Option         "RegistryDwords" "PowerMizerEnable=0x1; PerfLevelSrc=0x2222; PowerMizerDefaultAC=0x1"
Option         "UseEvents" "True"
Option         "TripleBuffer" "True"
Option         "OnDemandVBlankInterrupts" "True"


To save the changes, ctrl-o [enter], ctrl-x then reboot.

That should be it. Now, sometimes an update will kill your custom xorg.conf so copy it and rename the copy so you can recover it if that ever happens.

The commands will force the card into full power mode at all times. If your machine starts to get too hot then remove this line and reboot:

Code: Select all

Option         "RegistryDwords" "PowerMizerEnable=0x1; PerfLevelSrc=0x2222; PowerMizerDefaultAC=0x1"

Removing that line will force the card into adaptive power management mode. Your nVidia settings window will always show adaptive mode, irrespective of that setting, btw. It's a bug that NVIDIA have known about for years but never bothered to fix.
If your problem is fixed, please mark your thread as [SOLVED] by editing the title of the first message in the thread.

User avatar
RandomX
Level 1
Level 1
Posts: 19
Joined: Sat Jan 07, 2012 6:57 am
Location: Rome
Contact:

Re: Screen Tearing on Alienware Notebook

Postby RandomX » Sat Oct 21, 2017 8:16 am

I failed to save xorg.conf from nvidia-settings, I also tried to run it as superuser but this is the output:

Code: Select all

randomx@Alienware $ sudo nvidia-settings
** Message: PRIME: Requires offloading
** Message: PRIME: is it supported? yes
Package xorg-server was not found in the pkg-config search path.
Perhaps you should add the directory containing `xorg-server.pc'
to the PKG_CONFIG_PATH environment variable
No package 'xorg-server' found

ERROR: Unable to find a display device for screen 0!


ERROR: Failed to add X screen 0 to X config.


ERROR: Failed to add X screens to X config.


What can i do?
Wars come and go, but my soldiers stay eternal

User avatar
catweazel
Level 11
Level 11
Posts: 3514
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Screen Tearing on Alienware Notebook

Postby catweazel » Sat Oct 21, 2017 8:36 am

You need to use gksudo in Cinnamon and MATE to start a gui application as root. In KDE it's kdesudo. However the error message indicates deeper problems. Please post the output of this command:

Code: Select all

nvidia-smi

You might also want to go into Update Manager, select View > Linux kernels and install a 4.11 kernel.
If your problem is fixed, please mark your thread as [SOLVED] by editing the title of the first message in the thread.

User avatar
RandomX
Level 1
Level 1
Posts: 19
Joined: Sat Jan 07, 2012 6:57 am
Location: Rome
Contact:

Re: Screen Tearing on Alienware Notebook

Postby RandomX » Sat Oct 21, 2017 8:57 am

catweazel wrote:You need to use gksudo in Cinnamon and MATE to start a gui application as root. In KDE it's kdesudo. However the error message indicates deeper problems. Please post the output of this command:

Code: Select all

nvidia-smi

You might also want to go into Update Manager, select View > Linux kernels and install a 4.11 kernel.

Ops.. thank you gotta same error with gksudo.. Here's output of the command:

Code: Select all

randomx@Alienware ~ $ nvidia-smi
Sat Oct 21 14:54:54 2017       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 387.12                 Driver Version: 387.12                    |
|-------------------------------+----------------------+----------------------+
| 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 1060    Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   52C    P0    29W /  N/A |    197MiB /  6072MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0      1209      G   /usr/lib/xorg/Xorg                           154MiB |
|    0      1999      G   cinnamon                                      40MiB |
+-----------------------------------------------------------------------------+


Now i will update the kernel.
Wars come and go, but my soldiers stay eternal

Citizen229
Level 5
Level 5
Posts: 674
Joined: Fri Nov 04, 2016 12:09 pm
Location: NW Ohio

Re: Screen Tearing on Alienware Notebook

Postby Citizen229 » Sat Oct 21, 2017 9:22 am

for desktops the recommended driver is usually the 375 drivers from the driver manager. I dont know about a 1060 on a laptop, if those drivers follow suite for best overall functionality.
Folding@home Project
Team Linux Mint-76140
PM for info on how you can help. Or visit https://forums.linuxmint.com/viewtopic.php?f=58&t=243792
More GPU's needed!

User avatar
RandomX
Level 1
Level 1
Posts: 19
Joined: Sat Jan 07, 2012 6:57 am
Location: Rome
Contact:

Re: Screen Tearing on Alienware Notebook

Postby RandomX » Sat Oct 21, 2017 9:29 am

Citizen229 wrote:for desktops the recommended driver is usually the 375 drivers from the driver manager. I dont know about a 1060 on a laptop, if those drivers follow suite for best overall functionality.


I thought that tearing was a bug of 375 version so i updated the drivers.. I will install the 375 then.. hoping that i can save xorg.conf with these

@edit: now with 375 version i don't have PRIME Display option but only X Screen 0 (doesn't have advanced configuration) and same problem, can't save the new xorg.conf from nvidia-settings.
Kernel now is updated 4.11
Wars come and go, but my soldiers stay eternal

Citizen229
Level 5
Level 5
Posts: 674
Joined: Fri Nov 04, 2016 12:09 pm
Location: NW Ohio

Re: Screen Tearing on Alienware Notebook

Postby Citizen229 » Sat Oct 21, 2017 9:41 am

Are you opening the config file as root?

Edit: nevermind. Thought you were trying to manipulate the file itself and not the GUI
Folding@home Project
Team Linux Mint-76140
PM for info on how you can help. Or visit https://forums.linuxmint.com/viewtopic.php?f=58&t=243792
More GPU's needed!

User avatar
RandomX
Level 1
Level 1
Posts: 19
Joined: Sat Jan 07, 2012 6:57 am
Location: Rome
Contact:

Re: Screen Tearing on Alienware Notebook

Postby RandomX » Sun Nov 12, 2017 7:22 am

Up.. :oops: :cry:
Wars come and go, but my soldiers stay eternal

Laurent85
Level 13
Level 13
Posts: 4849
Joined: Tue May 26, 2015 10:11 am

Re: Screen Tearing on Alienware Notebook

Postby Laurent85 » Sun Nov 12, 2017 7:41 am

Installing xorg version 1.19.3 should help but is currently not supported by LM, I can guide you if you want to try it out.
Image

User avatar
RandomX
Level 1
Level 1
Posts: 19
Joined: Sat Jan 07, 2012 6:57 am
Location: Rome
Contact:

Re: Screen Tearing on Alienware Notebook

Postby RandomX » Mon Nov 20, 2017 5:02 am

Laurent85 wrote:Installing xorg version 1.19.3 should help but is currently not supported by LM, I can guide you if you want to try it out.

If it is possible and you think that solve the tearing problem..
I solved the problem about xorg configuration
Package xorg-server was not found in the pkg-config search path.
file installing xserver-xorg-dev package, now i got this message when i try to save my xorg config on nvidia settings:

Code: Select all

** Message: PRIME: Requires offloading
** Message: PRIME: is it supported? yes

WARNING:  Unable to find CorePointer in X configuration; attempting to add new CorePointer section.


WARNING:  The CorePointer device was not specified explicitly in the layout; using the first mouse device.



WARNING:  Unable to find CoreKeyboard in X configuration; attempting to add new CoreKeyboard section.


WARNING:  The CoreKeyboard device was not specified explicitly in the layout; using the first keyboard device.



ERROR: Unable to find a display device for screen 0!


ERROR: Failed to add X screen 0 to X config.


ERROR: Failed to add X screens to X config.
Wars come and go, but my soldiers stay eternal

Laurent85
Level 13
Level 13
Posts: 4849
Joined: Tue May 26, 2015 10:11 am

Re: Screen Tearing on Alienware Notebook

Postby Laurent85 » Mon Nov 20, 2017 7:48 am

Xorg version 1.19.3 supports Nvidia kernel mode setting feature and fixes some tearing issues. Packages are available in official repositories.
Before going further provide installed xorg & nvidia packages:

Code: Select all

apt search ~invidia-
apt search ~ixserver-
sudo prime-supported
prime-select query
Image

User avatar
RandomX
Level 1
Level 1
Posts: 19
Joined: Sat Jan 07, 2012 6:57 am
Location: Rome
Contact:

Re: Screen Tearing on Alienware Notebook

Postby RandomX » Mon Nov 20, 2017 9:10 am

Here's the output of your commands.. and now what i have to do?

Code: Select all

randomx@Alienware ~ $ apt search ~invidia-
i   nvidia-375                      - Transitional package for nvidia-384       
i A nvidia-384                      - NVIDIA binary driver - version 384.98     
i   nvidia-opencl-icd-375           - Transitional package for nvidia-opencl-icd
i A nvidia-opencl-icd-384           - NVIDIA OpenCL ICD                         
i   nvidia-prime                    - Tools to enable NVIDIA's Prime           
i   nvidia-settings                 - Tool for configuring the NVIDIA graphics d

Code: Select all

randomx@Alienware ~ $ apt search ~ixserver-
i   x11-xserver-utils               - X server utilities                       
i   xserver-common                  - common files used by various X servers   
i   xserver-xorg                    - X.Org X server                           
i   xserver-xorg-core               - Xorg X server - core server               
i   xserver-xorg-dev                - Xorg X server - development files 
i   xserver-xorg-input-all          - X.Org X server -- input driver metapackage
i   xserver-xorg-input-evdev        - X.Org X server -- evdev input driver     
i   xserver-xorg-input-synaptics    - Synaptics TouchPad driver for X.Org server
i   xserver-xorg-input-vmmouse      - X.Org X server -- VMMouse input driver to
i   xserver-xorg-input-wacom        - X.Org X server -- Wacom input driver     
i A xserver-xorg-legacy             - setuid root Xorg server wrapper           
i   xserver-xorg-video-all          - X.Org X server -- output driver metapackag
i   xserver-xorg-video-amdgpu       - X.Org X server -- AMDGPU display driver   
i   xserver-xorg-video-ati          - X.Org X server -- AMD/ATI display driver w
i   xserver-xorg-video-fbdev        - X.Org X server -- fbdev display driver   
i   xserver-xorg-video-intel        - X.Org X server -- Intel i8xx, i9xx display
i   xserver-xorg-video-nouveau      - X.Org X server -- Nouveau display driver 
i   xserver-xorg-video-qxl          - X.Org X server -- QXL display driver     
i   xserver-xorg-video-radeon       - X.Org X server -- AMD/ATI Radeon display d
i   xserver-xorg-video-vesa         - X.Org X server -- VESA display driver     
i   xserver-xorg-video-vmware       - X.Org X server -- VMware display driver   


Code: Select all

randomx@Alienware ~ $ sudo prime-supported
[sudo] password di randomx:
yes

Code: Select all

randomx@Alienware ~ $ prime-select query
nvidia
Wars come and go, but my soldiers stay eternal

Laurent85
Level 13
Level 13
Posts: 4849
Joined: Tue May 26, 2015 10:11 am

Re: Screen Tearing on Alienware Notebook

Postby Laurent85 » Mon Nov 20, 2017 9:59 am

OK, first switch to Intel graphics:

Code: Select all

sudo prime-select intel

Close and reopen your LM session.

Remove xorg.conf configuration file:

Code: Select all

[ -f /etc/X11/xorg.conf ] && sudo mv /etc/X11/xorg.conf /etc/X11/xorg.conf.backup_20171120


Install xorg 1.19.3:

Code: Select all

apt update
apt install xserver-xorg-hwe-16.04 xserver-xorg-legacy-hwe-16.04 xserver-xorg-video-all-hwe-16.04


If installation doesn't complete use:

Code: Select all

sudo dpkg --configure -a
apt install -f


Use following command to edit /etc/default/grub as root:

Code: Select all

gksu xdg-open /etc/default/grub


Enable Nvidia kernel mode setting, change line GRUB_CMDLINE_LINUX to:

Code: Select all

GRUB_CMDLINE_LINUX="nvidia-drm.modeset=1"


Update grub:

Code: Select all

sudo update-grub


Remove Xorg Intel driver, it's now recommended to use the built-in modesetting driver with Intel graphics cards. Command might report package is not installed, that's OK.

Code: Select all

apt remove xserver-xorg-video-intel-hwe-16.04


Reboot and open your LM session. If session opens normally without issue, switch back to Nvidia graphics using either prime applet either the command line:

Code: Select all

sudo prime-select nvidia


Reboot. Don't try to change xorg.conf settings manually. Use Nvidia settings utility only if necessary, default settings should work.
Image

User avatar
RandomX
Level 1
Level 1
Posts: 19
Joined: Sat Jan 07, 2012 6:57 am
Location: Rome
Contact:

Re: Screen Tearing on Alienware Notebook

Postby RandomX » Tue Nov 21, 2017 5:10 am

Laurent85 wrote:OK, first switch to Intel graphics:

Code: Select all

sudo prime-select intel

Close and reopen your LM session.


After i did that pc stuck.. also selecting others kernel on grub.. how i can revert this?
I think i will keep screen tearing..
Wars come and go, but my soldiers stay eternal

Laurent85
Level 13
Level 13
Posts: 4849
Joined: Tue May 26, 2015 10:11 am

Re: Screen Tearing on Alienware Notebook

Postby Laurent85 » Tue Nov 21, 2017 7:21 am

That command only changes active graphics card, same as using the Nvidia applet in system tray, your LM configuration is broken somehow.

To revert to previous config boot in recovery mode. From Grub Menu select Advanced options > select the recovery mode line entry

Select in Recovery menu:
fsck Check all filesystems, that will also mount filesystem in read write mode

Press enter to return to recovery menu

Select root Drop to root shell prompt > press enter twice

Then from the command line, switch back to Nvidia graphics

Code: Select all

prime-select nvidia
reboot
Image



Return to “Graphic Cards & Monitors”