Author Topic: Fix Screen Tear on Optimus.(SOLVED)  (Read 927 times)

Offline Anon.Linux

  • Newly Subscribed
  • *
  • Posts: 6
  • Karma: 0
  • New Forum User
    • View Profile
  • Peppermint version(s): Peppermint 9
Fix Screen Tear on Optimus.(SOLVED)
« on: December 21, 2018, 01:28:10 pm »
So I noticed there are plenty of posts on how to fix screen tear on individual GPUs, but is there a fix for Intel/Nvidia dual graphics? I surprisingly am not experiencing tearing when I have Nvidia selected as my GPU in use, but when I switch to Intel I do get tearing. Should I switch back to Intel and run the Intel fix or do I have to do something special so as not to mess up my Nvidia?

Thank you.
« Last Edit: December 24, 2018, 07:35:06 am by Anon.Linux »

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26452
  • Karma: 65531
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Fix Screen Tear on Optimus.
« Reply #1 on: December 21, 2018, 04:41:17 pm »
Can you leave this with me for a few days (busy with the new release) .. I have a laptop with optimus, and solved screen tearing but would need to go back through how I did it.

Meanwhile, can you give us the output from:
Code: [Select]
inxi -Fzand tell us how you're currently switching between the nvidia and intel drivers
(nvidia-settings, or bumblebee)
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline Anon.Linux

  • Newly Subscribed
  • *
  • Posts: 6
  • Karma: 0
  • New Forum User
    • View Profile
  • Peppermint version(s): Peppermint 9
Re: Fix Screen Tear on Optimus.
« Reply #2 on: December 22, 2018, 04:27:05 am »
Sure thank you for looking into it. I usually use Prime-select in the terminal to switch GPUs, but I also use Nvidia-Settings. I definitely do not use Bumblebee since it is deprecated and does not work with newer Optimus computers (and you can't use Vulkan with it).

Code: [Select]
System:    Host: Anon-Linux1 Kernel: 4.15.0-43-generic x86_64 bits: 64 Desktop: N/A
           Distro: Peppermint Nine
Machine:   Device: laptop System: TOSHIBA product: Qosmio X75-A v: PSPLTU-016016 serial: N/A
           Mobo: Type2 - Board Vendor Name1 model: Type2 - Board Product Name1 v: Type2 - Board Version serial: N/A
           UEFI [Legacy]: Insyde v: 1.50 date: 04/18/2014
Battery    BAT1: charge: 42.5 Wh 100.0% condition: 42.5/47.4 Wh (90%)
CPU:       Quad core Intel Core i7-4700MQ (-MT-MCP-) cache: 6144 KB
           clock speeds: max: 3400 MHz 1: 1739 MHz 2: 1506 MHz 3: 1510 MHz
           4: 1533 MHz 5: 1499 MHz 6: 1640 MHz 7: 1497 MHz 8: 1530 MHz
Graphics:  Card-1: Intel 4th Gen Core Processor Integrated Graphics Controller
           Card-2: NVIDIA GK106M [GeForce GTX 770M]
           Display Server: x11 (X.Org 1.19.6 )
           drivers: modesetting (unloaded: fbdev,vesa)
           Resolution: 1920x1080@60.50hz
           OpenGL: renderer: Mesa DRI Intel Haswell Mobile version: 4.5 Mesa 18.0.5
Audio:     Card-1 Intel 8 Series/C220 Series High Def. Audio Controller
           driver: snd_hda_intel
           Card-2 Intel Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller
           driver: snd_hda_intel
           Card-3 Turtle Beach driver: USB Audio
           Sound: Advanced Linux Sound Architecture v: k4.15.0-43-generic
Network:   Card-1: Intel Centrino Wireless-N 2230 driver: iwlwifi
           IF: wlp7s0 state: down mac: <filter>
           Card-2: Qualcomm Atheros AR8161 Gigabit Ethernet driver: alx
           IF: enp13s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
Drives:    HDD Total Size: 1000.2GB (2.6% used)
           ID-1: /dev/sda model: HGST_HTS725050A7 size: 500.1GB
           ID-2: /dev/sdb model: HGST_HTS725050A7 size: 500.1GB
Partition: ID-1: / size: 442G used: 6.4G (2%) fs: ext4 dev: /dev/sda1
           ID-2: /home size: 458G used: 2.3G (1%) fs: ext4 dev: /dev/sdb1
           ID-3: swap-1 size: 17.76GB used: 0.00GB (0%) fs: swap dev: /dev/sda2
RAID:      No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors:   System Temperatures: cpu: 50.0C mobo: N/A
           Fan Speeds (in rpm): cpu: N/A
Info:      Processes: 232 Uptime: 4 min Memory: 1075.7/15968.9MB
           Client: Shell (bash) inxi: 2.3.56

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26452
  • Karma: 65531
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Fix Screen Tear on Optimus.
« Reply #3 on: December 22, 2018, 09:58:11 am »
Which card are you having the screen tearing on ?

IIRC I had it on both, and it required 2 different fixes .. just checkin yours is the same.

As it may take me a while too rediscover how I fixed it on both .. which would you like to fix first ?

[EDIT]

I've just noticed you're on the "modesetting" driver not the "intel" one .. so things might be a bit different for your intel card than mine, but I'll still try remembering what I had to do.

Optimus is weird, it's not two separate cards, the nVidia chip still relies on the intel one to do all the drawing .. so we may need to figure out how to force the "intel" rather than "modesetting" driver first.
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline Anon.Linux

  • Newly Subscribed
  • *
  • Posts: 6
  • Karma: 0
  • New Forum User
    • View Profile
  • Peppermint version(s): Peppermint 9
Re: Fix Screen Tear on Optimus.
« Reply #4 on: December 22, 2018, 01:49:10 pm »
I seem to only have screen tearing on the Intel driver. I don't notice anything on the Nvidia side of things.

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26452
  • Karma: 65531
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Fix Screen Tear on Optimus.
« Reply #5 on: December 23, 2018, 02:24:07 pm »
I'm not ignoring this, I'm just trying to get my hands on something with a recent enough intel chip that it uses the "modesetting" driver by default.

The problem is, the fix I had in mind required the "intel" driver .. now I'm pretty certain you can force your system to use the "intel" driver instead of "modesetting", but it would require you edit xorg.conf .. the problem with that is when you switch to the nvidia card from within nvidia-settings, that xorg.conf would get destroyed.

So I'm looking for a way to force the "intel" drivers that would persist.

Are you up for some experimentation ? .. be aware you'd need a LiveUSB at hand just in case your machine became unbootable, and it would be best if all your important stuff is backed up in case you need to do a reinstall.
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline Anon.Linux

  • Newly Subscribed
  • *
  • Posts: 6
  • Karma: 0
  • New Forum User
    • View Profile
  • Peppermint version(s): Peppermint 9
Re: Fix Screen Tear on Optimus.
« Reply #6 on: December 24, 2018, 03:52:17 am »
Sure I would be up for it. Just let me know what to do.

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26452
  • Karma: 65531
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Fix Screen Tear on Optimus.
« Reply #7 on: December 24, 2018, 04:10:33 am »
I'm wondering what driver your card would fall back to if we simply blacklisted the modesetting driver .. let me do a little homework, then I'll post instructions to test.

I've also recently heard MX Linux have a script for switching between the modesetting and intel drivers .. so I wanna have a look how they're implementing it, and if it can be used in this scenario.
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline Anon.Linux

  • Newly Subscribed
  • *
  • Posts: 6
  • Karma: 0
  • New Forum User
    • View Profile
  • Peppermint version(s): Peppermint 9
Re: Fix Screen Tear on Optimus.
« Reply #8 on: December 24, 2018, 06:36:27 am »
Not sure, I know every other Distro I've installed typically puts my intel drivers at i915 as the default.

Offline Anon.Linux

  • Newly Subscribed
  • *
  • Posts: 6
  • Karma: 0
  • New Forum User
    • View Profile
  • Peppermint version(s): Peppermint 9
Re: Fix Screen Tear on Optimus.
« Reply #9 on: December 24, 2018, 07:15:28 am »
Hmm...that's odd. I've tried going to desktop effects and ticking the synchronize to Vertical Blank option a few times before and it had no effect, still had screen tear.

I just switched to the Nvidia card, went under Nvidia settings and unticked sync to vblank and flipping options under X-screen. Switched back to the intel driver, enabled sync to Vertical Blank under compositor option, turned off desktop effects, then turned them back on and the screen tear on Intel is gone.

Thank you for the help.
« Last Edit: December 24, 2018, 07:36:13 am by Anon.Linux »

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26452
  • Karma: 65531
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Fix Screen Tear on Optimus.(SOLVED)
« Reply #10 on: December 24, 2018, 07:57:32 am »
That's absolutely brilliant Anon.Linux, and may help some other people who've been having screen tearing issues with the modesetting driver .. many thanks for the follow up :)
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec