Screen Tearing on Alienware Notebook

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
RandomX

Screen Tearing on Alienware Notebook

Post by RandomX »

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 :)
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
catweazel
Level 19
Level 19
Posts: 9763
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Screen Tearing on Alienware Notebook

Post by catweazel »

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.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
RandomX

Re: Screen Tearing on Alienware Notebook

Post by RandomX »

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 
User avatar
catweazel
Level 19
Level 19
Posts: 9763
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Screen Tearing on Alienware Notebook

Post by catweazel »

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.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
RandomX

Re: Screen Tearing on Alienware Notebook

Post by RandomX »

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?
User avatar
catweazel
Level 19
Level 19
Posts: 9763
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Screen Tearing on Alienware Notebook

Post by catweazel »

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.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
RandomX

Re: Screen Tearing on Alienware Notebook

Post by RandomX »

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.
Citizen229

Re: Screen Tearing on Alienware Notebook

Post by Citizen229 »

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.
RandomX

Re: Screen Tearing on Alienware Notebook

Post by RandomX »

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
Citizen229

Re: Screen Tearing on Alienware Notebook

Post by Citizen229 »

Are you opening the config file as root?

Edit: nevermind. Thought you were trying to manipulate the file itself and not the GUI
RandomX

Re: Screen Tearing on Alienware Notebook

Post by RandomX »

Up.. :oops: :cry:
Laurent85
Level 17
Level 17
Posts: 7081
Joined: Tue May 26, 2015 10:11 am

Re: Screen Tearing on Alienware Notebook

Post by Laurent85 »

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
RandomX

Re: Screen Tearing on Alienware Notebook

Post by RandomX »

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.
Laurent85
Level 17
Level 17
Posts: 7081
Joined: Tue May 26, 2015 10:11 am

Re: Screen Tearing on Alienware Notebook

Post by Laurent85 »

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
RandomX

Re: Screen Tearing on Alienware Notebook

Post by RandomX »

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
Laurent85
Level 17
Level 17
Posts: 7081
Joined: Tue May 26, 2015 10:11 am

Re: Screen Tearing on Alienware Notebook

Post by Laurent85 »

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
RandomX

Re: Screen Tearing on Alienware Notebook

Post by RandomX »

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..
Laurent85
Level 17
Level 17
Posts: 7081
Joined: Tue May 26, 2015 10:11 am

Re: Screen Tearing on Alienware Notebook

Post by Laurent85 »

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
RandomX

Re: Screen Tearing on Alienware Notebook

Post by RandomX »

Locked

Return to “Graphics Cards & Monitors”