Solved Unsolvable tearing on both nvidia and intel gpu.

Good day,

I first tried with a nvidia gtx 1050 and the standard nvidia-driver package. But I had a lot of tearing so I wanted to adjust the settings via nvidia-settings. The problem with the standard driver is that nvidia-settings do not open. So then I tried to configure the driver via a configuration file in /etc/X11/ and /usr/local/etc/X11/ and /usr/local/etc/X11/xorg.config.d/ But every time I use a (correct) nvidia configuration file I get a black screen when SDDM should appear.

Since I have an Intel gpu with integrated graphics, I wanted to give it a try this way. And that is why I have the DVI cable connected to the motherboard instead of the nvidia card.

/boot/loader.conf
Code:
kern.vty=vt
drm.i915.enable_rc6=7
drm.i915.semaphores="1"
drm.i915.enable_fbc="1"

/etc/rc.conf
Code:
kld_list="/boot/modules/i915kms.ko"

But I have visible tearing again. And I see the same problem as what I saw with the nvidia driver. When you create an xorg configuration file for the driver, SDDM always displays a black screen, even if the configuration file is 100% correct.

I also installed the xf86-video-intel package without changing the above configuration. And then the tearing became worse. Then I also did some research work for Wayland (via sway or gnome) on FreeBSD, but it doesn't seem ready for everyday use.

Since I have had the problem on FreeBSD 12 and 12.1 and on both nvidia and intel, I wonder why there are not many people who complain about this problem: that SDDM in FreeBSD always gives a black screen when you have some configuration file for xorg and gpu driver.

It seems to me a considerable problem that a large part of the nvidia and intel gpu's can't work without screen tearing. Help is welcome, but keep in mind that I can work reasonably well with Arch Linux and other advanced systems. So I think the issues I'm talking about are bugs or missing features. But I'm not sure since I haven't used FreeBSD for very long.
 
Is that so?

I don't know if it's a general problem with the nvidia driver, but I use very popular computer components, many people will experience the same problem. If I remember correctly, nvidia-settings gave this error message:
Code:
ERROR: Unable to load info from any available system

Since you are a self-proclaimed "advanced" user, FreeBSD analog to strace is called truss.

Where did I say I am 'an advanced user'? I said that I can work reasonably well with advanced systems. By which I mean that I can follow the user documentation and configure the system in the recommended way. And by which I also mean that I have searched for solutions online. Such as using compton instead of xfwm. And try to do vsync with compton via eg:
Code:
 compton --backend glx --vsync opengl-swc
But I could not find a solution for the problem for both intel and nvidia, after hours of research. Which is not really normal since screen tearing should not be a stumbling block in 2020. I think everyone can agree on that?
 
Good day,

I first tried with a nvidia gtx 1050 and the standard nvidia-driver package. But I had a lot of tearing so I wanted to adjust the settings via nvidia-settings. The problem with the standard driver is that nvidia-settings do not open. So then I tried to configure the driver via a configuration file in /etc/X11/ and /usr/local/etc/X11/ and /usr/local/etc/X11/xorg.config.d/ But every time I use a (correct) nvidia configuration file I get a black screen when SDDM should appear.

Since I have an Intel gpu with integrated graphics, I wanted to give it a try this way. And that is why I have the DVI cable connected to the motherboard instead of the nvidia card.

/boot/loader.conf
Code:
kern.vty=vt
drm.i915.enable_rc6=7
drm.i915.semaphores="1"
drm.i915.enable_fbc="1"

/etc/rc.conf
Code:
kld_list="/boot/modules/i915kms.ko"

But I have visible tearing again. And I see the same problem as what I saw with the nvidia driver. When you create an xorg configuration file for the driver, SDDM always displays a black screen, even if the configuration file is 100% correct.

I also installed the xf86-video-intel package without changing the above configuration. And then the tearing became worse. Then I also did some research work for Wayland (via sway or gnome) on FreeBSD, but it doesn't seem ready for everyday use.

Since I have had the problem on FreeBSD 12 and 12.1 and on both nvidia and intel, I wonder why there are not many people who complain about this problem: that SDDM in FreeBSD always gives a black screen when you have some configuration file for xorg and gpu driver.

It seems to me a considerable problem that a large part of the nvidia and intel gpu's can't work without screen tearing. Help is welcome, but keep in mind that I can work reasonably well with Arch Linux and other advanced systems. So I think the issues I'm talking about are bugs or missing features. But I'm not sure since I haven't used FreeBSD for very long.

If that's a fairly modern nvidia card, you probably need to load another module other than nvidia.ko
I don't recall the exact name. Read what the drivers message says. You can get that with:
pkq query -a %m | grep -B10 -A10 nvidia

I sadly can't verify the pkg command since I'm typing on my phone.
 
Concerning Intel GPU (HD630 precisely), I have a similar problem. I mean graphic tearing. Never solved. Also, there is no sound thru HDMI. I made a PR 237340 for this last point.

I gave up, thinking that the drivers aren't mature enough for this chip. But if someone can bring me the proof that it is a false idea, she/he is welcome.
 
If that's a fairly modern nvidia card, you probably need to load another module other than nvidia.ko
I don't recall the exact name. Read what the drivers message says. You can get that with:
pkq query -a %m | grep -B10 -A10 nvidia

I sadly can't verify the pkg command since I'm typing on my phone.

I don't think that I made a mistake with the configuration. I have tried all these things:

/boot/loader.conf
Code:
nvidia_load="YES"

/etc/rc.conf
Code:
kld_list="nvidia nvidia-modeset"
nvidia_name="nvidia"
nvidia_modeset_name="nvidia-modeset"

Concerning Intel GPU (HD630 precisely), I have a similar problem. I mean graphic tearing. Never solved. Also, there is no sound thru HDMI. I made a PR 237340 for this last point.

I gave up, thinking that the drivers aren't mature enough for this chip. But if someone can bring me the proof that it is a false idea, she/he is welcome.

My drivers should be mature enough, since they have legacy status in the meantime. I use Intel® HD Graphics 2500. For the drivers I use drm-legacy-kmod, libva-intel-driver, mesa-libs and mesa-dr.
 
My drivers should be mature enough, since they have legacy status in the meantime. I use Intel® HD Graphics 2500. For the drivers I use drm-legacy-kmod, libva-intel-driver, mesa-libs and mesa-dr.
That's the point, I think. HD 2500 is older than HD 630. And this last isn't supported by graphics/drm-legacy-kmod.

Since, I updgrade from time to time graphics/drm-kmod with the latest repository but there is no improvment so far.

I have installed multimedia/libva, graphics/mesa-libs and graphics/
mesa-libs
(and upgraded as well) without any effect.
 
Use picom (compton fork). I have a GTX 1650 and I get no tearing with it. I never had much luck setting V-sync with nvidia-settings.
 
I don't know if it's a general problem with the nvidia driver, but I use very popular computer components, many people will experience the same problem. If I remember correctly, nvidia-settings gave this error message:
Code:
ERROR: Unable to load info from any available system

Now, be a reasonable person and do truss nvidia-settings.

But I could not find a solution for the problem for both intel and nvidia, after hours of research. Which is not really normal since screen tearing should not be a stumbling block in 2020. I think everyone can agree on that?

Code:
Section "Screen"
    ...
    Option "metamodes" "nvidia-auto-select +0+0 { ForceFullCompositionPipeline = On }"
EndSection
 
Now, be a reasonable person and do truss nvidia-settings.

This is the output of that command:
Code:
ERROR: Unable to load info from any available system
truss: Unable to enable LWP events for pid 94223: No such process

Code:
Section "Screen"
    ...
    Option "metamodes" "nvidia-auto-select +0+0 { ForceFullCompositionPipeline = On }"
EndSection

SDDM in FreeBSD always gives a black screen when I use a configuration file for xorg (and gpu driver). Even if the configuration file is completely correct. It only works if no letter is stored in the configuration file. From the moment that one letter is stored in the configuration file, it seems to stop working.
 
Use picom (compton fork). I have a GTX 1650 and I get no tearing with it. I never had much luck setting V-sync with nvidia-settings.
Picom does not seem to be in the standard FreeBSD packages:
Code:
pkg: No packages available to install matching 'picom' have been found in the repositories
 
Running an Intel HD 630 here and zero issues with tearing. Can't run any Nvidia cards because they hate my monitor and I cannot exit from X without the display going into ever-sleep. I also have never run a DE on FreeBSD, only super light window managers and never a compositor. The only 3D things I run are games in wine.
 
This is the output of that command:
Code:
ERROR: Unable to load info from any available system
truss: Unable to enable LWP events for pid 94223: No such process

:-/

SDDM in FreeBSD always gives a black screen when I use a configuration file for xorg (and gpu driver). Even if the configuration file is completely correct. It only works if no letter is stored in the configuration file. From the moment that one letter is stored in the configuration file, it seems to stop working.

Can you please attach /var/log/Xorg.0.log both for zero config and Nvidia blob cases? The DVI cable should be plugged into GTX 1050, obviously.
 
Running an Intel HD 630 here and zero issues with tearing.
Interesting. What do you did to get that?
Never saw a video without tearing. No matter it's a local file with vlc or a distant one with plex server (Chrome used).

Maybe it's just thank to wine or video games?
 
It just works, no xorg config, nothing. DPMS works, 3D video games work in wine, online videos work and I "think" local video files work as well but it's been a while since I have watched any of the stored video I have.
 
I know. But I have always had problems with the previous packages I wanted to install from ports, so I will not do that again.

The only thing that solves tearing on my system is picom or using xfce 4.14 whose new compositor works nicely and is low of resources.
 
D
Interesting. What do you did to get that?
Never saw a video without tearing. No matter it's a local file with vlc or a distant one with plex server (Chrome used).

Maybe it's just thank to wine or video games?
drm-kmod. Using kld_list="/boot/modules/i915kms.ko" in /etc/rc.conf.

Done that since longtime. Seems I haven't your black magic in my box... Are you're sure you see video without tearing?
 
Yep - watching a homemade video right now, plays perfectly in mpv. Played several: .mp4, .m4v and .avi, no issues. Youtube videos also play perfectly in Chromium. Actually, I am not really sure what tearing looks like because I have never experienced it (any visual issues while watching video).
 
So, zero config gives you VESA, as expected. What about Nvidia blob?
Well I normally already configured it correctly that it should use the nvidia driver. So I started digging a little deeper and adjusted some things to my configuration:

Instead of just linux_load="YES"
I also have linux64_load="YES"
added to /boot/loader.conf

kern.vty = vt was enabled and I disabled it in /boot/loader.conf because I had read somewhere that this enabled the vesa module.

And then of course I turned on all options that enable nvidia such as kld_list = "fuse linux linux64 nvidia nvidia-mode set" in /etc/rc.conf , and also nvidia_load = "YES" nvidia_name = "nvidia"
nvidia-modeset_load = "YES" nvidia-modeset_name = "nvidia-modeset" in /boot/loader.conf

But it still didn't work and the log file in /var/log still indicated that the nvidia module was not loaded. Then I found this thread: https://forums.freebsd.org/threads/how-do-i-get-the-nvidia-driver-to-work.59295/

In his case, the /var/log file also indicated that the nvidia driver was not loaded, while kldstat just indicated that the nvidia module was loaded. I have checked this and this was also the case with me. So kldstat indicated that the nvidia module was loaded.

Then I read a little further in that thread and saw that a configuration file was really needed to make it clear to the system that it should use the nvidia module.

So then I executed nvidia-xconfig, and then it finally worked. nvidia-settings now opens in the normal way. And that is why I was able to switch on Force Full Composition Pipeline, so that I no longer have screen tearing.

I would like to thank everyone for the help.
 
Back
Top