4

I have a Clevo P640RF laptop with an Intel 6700HQ processor and an Nvidia 965M with optimus switching. After about a week's worth of arm wrestling with the laptop, I have finally managed to stabilize the operating system. I am running Ubuntu 16.04 with Unity and have installed the latest versions of kernel (4.7.7) and firmware (1.161). In addition, I have installed the nvidia-370 driver and have managed to achieve the following

  • Nvidia PRIME works! I can switch between Onboard and discrete successfully
  • System is stable. No crashes or lockups

Issues:

  • Severe screen tearing when I use the Nvidia graphics card. The screen tears when watching videos, browsing, and when dragging windows around. I have tried a lot of things but haven't managed to solve it.

  • No screen tearing with the intel graphics card. On the other hand, there is a small but noticeable stutter when watching videos in the browser or in video players. I can't seem to find a solution for this stutter. However, I made an interesting discovery today regarding the onboard intel graphics. I tried playing a video in VLC and forced the output to openGL. The stuttering vanished and the video playback was buttery smooth. However, this doesn't work with the Nvidia card and is limited to only videos played back in VLC.

Can someone please help me solve the video stutter issue? I got this laptop with a 14 day RMA option. Other than these issues with Linux, I love the hardware and the overall feel of the machine. If I don't fix this, I'll have to give it back with a heavy heart. Any help would be greatly appreciated. Thank you!!

  • When do you experience screen tearing with Nvidia card? Just dragging things around on the desktop? Or only when watching videos? Which version of Ubuntu and which desktop environment are you using? – You'reAGitForNotUsingGit Oct 12 '16 at 23:24
  • @AndroidDev I have answered your questions in the original post. Thank you. – Karthik Upadhya Oct 13 '16 at 08:54
  • @doug I have tried VLC and the inbuilt movie player. I just noticed this yesterday and haven't gotten a chance to do any additional testing. Do you know of a way to force graphics through OpenGL for the entire desktop environment? That could be a possible solution. – Karthik Upadhya Oct 13 '16 at 08:54
  • 1
    For totem try installing gstreamer1.0-vaapi, that will provide vaapi support for supported codecs which may help as far as when on the Intel gpu. Another option is to try mpv, it requires a little setting up for best use, if you use this version & either unity or gnome-shell pin mpv to the launcher & ck. the quicklists for some info & links https://launchpad.net/~mc3man/+archive/ubuntu/mpv-tests – doug Oct 13 '16 at 15:23
  • Thank you. Will try these options. Do you know of anyway I can fix the stuttering in the browser? I stream a lot of videos and find the stuttering uncomfortable. – Karthik Upadhya Oct 13 '16 at 18:13
  • @KarthikUpadhya - Can you live with disabling the Intel graphics and only using the Nvidia? – You'reAGitForNotUsingGit Oct 14 '16 at 00:43
  • @AndroidDev Yes. That is an acceptable solution. Hopefully, in the future, support for optimus would be better. – Karthik Upadhya Oct 14 '16 at 09:01
  • Companies like System76 also sell Clevo laptops with linux support. I wonder how they manage to solve these issues. – Karthik Upadhya Oct 14 '16 at 09:05
  • @KarthikUpadhya - Well, in that case, you can sudo apt-get purge nvidia-prime and disable the Intel card in the BIOS. – You'reAGitForNotUsingGit Oct 14 '16 at 10:56
  • @AndroidDev I don't have an option to disable the nVidia card in the BIOS. My guess is that this is a Windows specific laptop. So if I remove the nVidia graphics drivers, the system would revert to the nouveau drivers which makes the system unstable. – Karthik Upadhya Oct 14 '16 at 12:45
  • What did yoy decide to do? I worked on this one more. No am sure compositor is short term fix while we waot on Xorg 1.9 – pauljohn32 Oct 25 '16 at 04:17

5 Answers5

0

I beg your pardon, because I'll talk about debian. I'm using Lenovo Legion Y520 Laptop (NVIDIA 1050), it has hybrid video, so there is no option to use descrete card only in the bios.

From the start I used xfce + bumblebee, using drivers from default repos (added contrib non-free though). With them I could run apps using nvidia with primusrun/optirun (as I understood it is the same if the VirtualGL is not installed). I could see that glxgears draw 60fps. Regardless to that vsync I saw video tearing: the image "breaks" at some refresh line.

I spent couple days of googling, tried different drivers, messed with Xorg configuration, tried "modesetting" thing (uses nvidia always) but the problem still remained with some variations.

At some point I installed gnome(gdm3) + bumblebee + latest drivers from the repos (384) and did not notice video tearing. So I guess that there's something inside lightdm related to the issue.

0

Nvidia-370 is not ready for all chips, newest is good philosophy is not a part of Linux generally, maybe using 361 or another stable version can solve your problem.

1.System Settings

2.Software & Updates

3.Additional Drivers --> choose "361" or something else (tested)

Torvald's comment about Nvidia (warning:nsfw)

al0s
  • 549
  • Thank you. Have tried with nvidia-367 and nvidia-364. The issue persists. – Karthik Upadhya Oct 16 '16 at 12:04
  • See the edit on my answer above. The once-and-final fix from nvidia will be released when Xorg-1.9 is released and nvidia can sit on top of it. That's hot-off-the-presses news. Before then, the user level fixes that will help are in the compositor enhancements, possibly including the pipeline setting in X11, and making sure the video performance is set on maximum. I've not succeeded in making the pipeline setting work, but just using the compton compositor should make your laptop acceptable, no matter which nvidia driver is in use (I'm on 367). If that fails, I'd send it back if I were you. – pauljohn32 Oct 22 '16 at 18:57
0

I have a similar setup but with a quadro K1100M , to get mine stable i tried a few different drivers from the ubuntu graphics driver PPA.

https://launchpad.net/~graphics-drivers/+archive/ubuntu/ppa

I also got much better system stability and solid video with optimus using the xanmod 4.8 kernel, there are ubuntu packages its super easy to install.

https://xanmod.org/

Amias
  • 5,246
  • Thanks for the suggestion. Will give it a shot and let you know. – Karthik Upadhya Oct 16 '16 at 12:04
  • I have tried different versions of nvidia and intel drivers and there is no difference. I would be satisfied even if the onboard graphics card worked properly. Maybe a new kernel will help with that. – Karthik Upadhya Oct 16 '16 at 12:09
  • The issues persist with the xanmod kernels with different driver combinations. Any other suggestions? – Karthik Upadhya Oct 16 '16 at 14:55
  • do you have the vdpau libraries setup ? sudo apt-get install vdpau-driver-all – Amias Oct 16 '16 at 20:03
  • Yes. Both VDPAU and VAAPI libraries are installed and up to date. – Karthik Upadhya Oct 17 '16 at 09:47
  • Interesting note : Playback using OpenGL GLX in VLC is buttery smooth. When I open the same video in Totem using terminal, it tells me that it is using VA-API and the video stutters. Based on my understanding, OpenGL is accomplished by the Mesa drivers and not VA-API drivers.

    So, one probable solution would be to use Mesa drivers system wide instead of VA-API. Any suggestions on how to accomplish that?

    – Karthik Upadhya Oct 17 '16 at 15:22
  • there should be log entries in /var/log/Xorg.0.log that will explain what is happening. you could also trace totem and see what it fails to load – Amias Oct 18 '16 at 09:23
  • This is the Xorg log – Karthik Upadhya Oct 19 '16 at 18:20
  • *Ignore the above comment. Typed by mistake and can't edit

    This is the Xorg log -> https://paste.ubuntu.com/23349906/ Other than one error, nothing else seems to be off. I'll look into that error now.

    – Karthik Upadhya Oct 19 '16 at 18:22
0

The Girl in this video talks about "some project on git-hub that works pretty nice". I is the Optimus chip supported my Nvidia officially now or do you maybe need this? This was the project she talked about I guess, its maybe what you need.

redanimalwar
  • 1,550
  • 3
  • 19
  • 35
  • Thank you. I have tried bumblebee but that doesn't work. Nvidia Prime works for me but that causes screen tearing and stuttering. – Karthik Upadhya Oct 19 '16 at 18:04
0

@KarthikUpadhya I admire your determination to keep trying things. I see same troubles on Dell Precision 5510. Lets compare notes

The tearing and distortion with the Nvidia card is much worse on an external monitor than it is on the laptop's builtin display. Do you see the same difference?

I see no benefit in Bumblebee/Optimus. Maybe the MS Windows driver is further toward the goal. This post makes me think there is some hope yet from Nvidia: https://devtalk.nvidia.com/default/topic/957814/linux/prime-and-prime-synchronization/.

I see the tearing when scrolling web in Firefox, not just in movies. The tearing looks like a rolling pin filled with water is horizontal across the middle of the page. On an HDMI-external monitor, the tearing is pie shaped polygons.

There are quite a few webpages with tips, such as 1) make sure nvidia is on max performance (I think this does help) 2) turn on sync to vblank 3) turn on pipeline (http://www.thelinuxrain.com/articles/got-tearing-with-proprietary-nvidia-try-this) 4) use a compositing window manager.

I think 1) helps. 2) is missing from nvidia-settings now, but it is an adjustment in some window managers (KDE). 3) has no effect, but I did not try hard because the first time I did it, it caused the black screen of death and I had a hard time escaping.

I've experimented with these things a lot and I can say for sure your desktop framework--the window manager and compositor--make a huge difference. Right now I like XFCE4 as desktop, and I was testing settings and was able to make the computer almost useless by turning off the compositor in XFWM4. If I do that, then the Geeqie image viewer has a really bad "torn to black rectangles" appearance when images scroll up and down.

I suggest you consider installing KDE and see if their compositing is better.

Supposing this is going in the right direction, I find a post that matches my best guess, which is that the 100s of little adjustments we find in the network are not in the core of the problem, and adopting better compositing will fix. Look at this one: https://devtalk.nvidia.com/default/topic/543305/linux/screen-video-tearing-gtx6xx-7xx-kepler-9xx-maxwell-in-almost-all-applications-including-desktop/post/4374890/#4374890. "The internet is riddled with various solutions and it came down to simply getting rid of all of that garbage and simple using NO xorg.conf and using this compton command for "fixing" the v-sync to remove tearing.

compton --backend glx --vsync opengl-swc --detect-rounded-corners --detect-client-opacity

"

I did not do that yet, but I'm reading about it to figure out WTFIGO. I don't understand it very deeply, there's something in me that believes this really should not be necessary. But it is, so I'll try.

There are very long discussions about this on the nvidia linux pages, but if you look through there, you'll note that many people don't mention their desktop environment, window manager, and compositing. The fact that some people see this as an inconvenience and others say it is intolerable probably traces back to software. I think the Nvidia site is a little tought to find sometimes, appears they moved it: https://devtalk.nvidia.com/default/board/98 https://devtalk.nvidia.com/default/topic/533434/linux/current-graphics-driver-releases/

I'm able to use the laptop to browse web and do my job, but I can live with it only because I'm a very patient person :) You must be as well, since you are still asking about it.

pauljohn32
  • 3,743
  • Nvidia has been much more active and open lately, it seems to me. See here: https://devtalk.nvidia.com/default/topic/775691/linux/vsync-issue-nvidia-prime-ux32vd-with-gt620-m-/8. Claim is that fixes are in Xorg-1.9 that will work with linux kernel > 4.5 and yet-to-be released nvidia driver. Xorg changes were only finalized in 2016-09, not now in Ubuntu, which sits at 1.8. If you don't get relief from compositor, maybe you should relax for a few weeks. If you are in Ubuntu 16.01, your kernel is new enough, just need Xorg update. – pauljohn32 Oct 22 '16 at 10:04
  • I woke up today and decided to try compton to replace the XFCE compositor. Seems better. Still not perfect, some rolling pin distortion. On Ubuntu 16.10. 1) Install compton and compton-conf packages 2) In XFCE window manager tweaks, turn off the compositor 3) open terminal and run compton-conf. Those are opacity settings, easy to change if you don't like. Warning: default has active window .8 opaque, suggest reset to 1.0. close compton-conf 4) in terminal, run compton. Result is instantaneous. If you like compton as replacement compositor, configure into session startup programs. – pauljohn32 Oct 22 '16 at 17:28
  • Hey! Sorry, I have been traveling for the last week and couldn't get a chance to respond.

    This is a point by point response to your query *. I haven't tried with an external display. I will give that a shot and let you know.

    *. Bumblebee doesn't work for me at all. Nvidia prime allows me to switch between the onboard and discrete graphics cards, only after a logout.

    *. Yep, I see tearing in firefox with both the discrete and onboard graphics cards. Chromium does not have tearing with the onboard gfx card.

    – Karthik Upadhya Oct 30 '16 at 19:32
  • The Nvidia performance levels don't seem to make any difference to the output. I have tried pipeline, and it doesn't work. Sync to vblank is on, and lastly, I have tried both compton and compiz. – Karthik Upadhya Oct 30 '16 at 19:34
  • Do you know if your laptop has a hardware mux or is muxless? Mine is the latter. Most of the solutions on the internet are available for the former laptops. As you pointed out, the fix has to come form either Xorg, or the newer display renderers such as Wayland and Mir. – Karthik Upadhya Oct 30 '16 at 19:37
  • Thanks for your time, and once again, sorry for the delay in replying to you. – Karthik Upadhya Oct 30 '16 at 19:38
  • I was wondering if you kept the laptop. You were on deadline to return it. My device shows in lspci as NVIDIA Corporation GM107GLM [Quadro M1000M] (rev a2). I can't tell if that's muxless or not. I use Nvidia Prime to choose between the 2 adapters. I'm mux or muxless? Inquiring minds want to know. – pauljohn32 Oct 31 '16 at 05:28
  • I decided to keep the laptop and am hoping that the Linux community solves the problem sometime in the near future. One the question regarding the mux, if you have the ability to choose between the discrete and on board graphics in the bios, then you have a laptop with a hardware mux. If you don't, then it's most likely muxless. – Karthik Upadhya Oct 31 '16 at 20:05
  • Good. I've been making same gambles since 1998 and it usually works out. It is virtually certain in my mind that when the Xorg updates come out and the matching nvidia updates come out, this will be solved. You may see differences by changing the compositor in the short term. On one screen, compton is definitely nicer than XFCE4 built-in – pauljohn32 Nov 03 '16 at 04:30
  • Based on my reading of the Nvidia developer forums, the current set of Nvidia drivers have solved the issue for muxless systems. They have implemented a software double buffer between the integrated and discrete graphics chips. The vsync issue can be fixed by compiling the latest commit of Xorg from github. Whether the updated Xorg will solve the vsync issue will depend on the code that is carried from the current github version to the final stable version. – Karthik Upadhya Nov 03 '16 at 09:06