# Compositor makes everything super slow, and web browser gets random black squares.



## CodeJoule (Apr 29, 2019)

Hello! I installed FreeBSD on my Thinkpad T420 recently, got video drivers and Xorg. I installed plasma5-plasma-desktop and am using startx with startkde. After a couple hours of usage opening the Applictions menu was extremley slow, and the keyboard started lagging a teensy bit as well. So far, I think I've solved this by disabling the compositor in Plasma's settings. I'd like to get the compositor working though.
Also, my web browser (qutebrowser) as well as the lock screen often get a bunch of black squares in random places. This may have something to do with my first issue.

I am using the intel driver, and set up Xorg accordingly, so mostly everything works. It was just slow. It's not the hardware as I've used Plasma a lot on GNU/Linux on this machine. Is something wrng with Xorg? Or how I set up my video?


----------



## rsronin (Apr 29, 2019)

What theme are you using? I had some troubles with plasma using a particular theme.
Did you install drm-kmod 'the right way'?  I combined the info on this forum and reinstalled the video driver and used `X -configure`.
I installed libva-intel-driver, which made a huge difference in performance.
Writing this from my Thinkpad T430.


----------



## Deleted member 30996 (Apr 29, 2019)

CodeJoule said:


> I installed FreeBSD on my Thinkpad T420 recently...
> *snip*
> I am using the intel driver, and set up Xorg accordingly, so mostly everything works. It was just slow. It's not the hardware as I've used Plasma a lot on GNU/Linux on this machine. Is something wrng with Xorg? Or how I set up my video?



I have a W520 running FreeBSD that has Optimus. I'm looking at the ThinkpadWiki T420 page and it does say it's available with Intel Integrated HD Graphics 3000 as well as Optimus.

I'd go in the BIOS and make sure it was set right before I tried anything else. Optimus uses Discreet Graphics but on mine there is one that specifies Intel.

From my T400 with Intel GMA 4500MHD and ATI Mobility Radeon HD 3470 Switchable Graphics using the ATI driver.


----------



## Vull (Apr 29, 2019)

For plasma5-plasma I recommend disabling Search > File Search in System Settings. Then, under Startup and Shutdown > Background Services, disable Search Folder Updater, as well as any other services you don't need. Then log out of the desktop and restart it using startx again.

EDIT: Also you might want to try changing Display and Monitor > Compositor > Rendering backend from OpenGL 2.0 to XRender when and if you re-enable compositor on startup.


----------



## CodeJoule (Apr 29, 2019)

rsronin said:


> What theme are you using? I had some troubles with plasma using a particular theme.


"Sweet" theme. I haven't figured out how where the Kvantum theme is so Kvantum doesn't quite work yet.


rsronin said:


> Did you install drm-kmod 'the right way'?  I combined the info on this forum and reinstalled the video driver and used `X -configure`.
> I installed libva-intel-driver, which made a huge difference in performance.
> Writing this from my Thinkpad T430.


I am not sure what you mean by "the right way". I followed the handbook, and installed `drm-kmod`, `xf86-video-intel`, and added stuff into Xorg's configs and my `/etc/rc.conf` file.
Do I need to configure `libva-intel-driver` in any way? The package's description says something about it being for "Intel GMA 4500 (Gen4) or newer". Does this include Intel Integrated HD Graphics 3000 (which is listed here)?



Trihexagonal said:


> I have a W520 running FreeBSD that has Optimus. I'm looking at the ThinkpadWiki T420 page and it does say it's available with Intel Integrated HD Graphics 3000 as well as Optimus.
> 
> I'd go in the BIOS and make sure it was set right before I tried anything else. Optimus uses Discreet Graphics but on mine there is one that specifies Intel.
> 
> From my T400 with Intel GMA 4500MHD and ATI Mobility Radeon HD 3470 Switchable Graphics using the ATI driver.


It seems that my model is not the one that includes Optimus. There are no BIOS configuration options for Optimus or graphics.



Vull said:


> For plasma5-plasma I recommend disabling Search > File Search in System Settings. Then, under Startup and Shutdown > Background Services, disable Search Folder Updater, as well as any other services you don't need. Then log out of the desktop and restart it using startx again.
> 
> EDIT: Also you might want to try changing Display and Monitor > Compositor > Rendering backend from OpenGL 2.0 to XRender when and if you re-enable compositor on startup.


Generally the default minimal plasma-desktop setup has worked well for me on other OSes in the past. My problem is most likley the way I set up graphics, Xorg, or both. However, thank you for the suggestion, I just took your advice and disabled baloo (file indexing). Also, what would XRender do?


----------



## rsronin (Apr 30, 2019)

Maybe this helps, because I don't know the 'right way' either.  I combined a lot of information both from this forum and other websites.
Thread 69639/
T420 has HD3000 so should work with drm-kmod if I understood it correctly. I don't have xf86-video-intel installed.


----------



## Vull (Apr 30, 2019)

CodeJoule said:


> ...
> Generally the default minimal plasma-desktop setup has worked well for me on other OSes in the past. My problem is most likley the way I set up graphics, Xorg, or both.


I've tried drm-kmod's i915kms configurations, and it worked okay, but I don't normally use that, or any other sort of specified intel graphic drivers. I just let Xorg sort it out for itself and it seems to do a pretty good job without any meddling from me.  What I've read on the subject strongly suggests that if you use drm-kmod, you should avoid having any other .conf configuration files in either the /etc/X11/ or /usr/local/etc/X11/ directories or xorg.conf.d subdirectories.



> ... However, thank you for the suggestion, I just took your advice and disabled baloo (file indexing). Also, what would XRender do?


I was getting blacked-out windows with the OpenGL compositors before switching to XRender and  thought it might be at least worth a try to see if that might be part of the problem you described as black squares in random places.


----------



## hunk77 (Mar 14, 2022)

My ThinkPad T470p (Intel "HD Graphics 630") running FreeBSD 13-RELEASE (drm-kmod, xf86-video-intel) also had very slow graphics output with driver acceleration enabled. When scrolling in mousepad (XFCE) or any other text editor I had a lag of ~0.3 seconds. It turns out that I only had to change the acceleration method in /etc/X11/xorg.conf to "SNA" and turn off some goodies.

Here's my "Device" Section:


```
Section "Device"
        Identifier  "Card0"
        Driver      "intel"
        BusID       "PCI:0:2:0"
        Option      "Accel"             "true"
        Option      "AccelMethod"       "SNA"
        Option      "VSync"             "false"
        Option      "PageFlip"          "false"
        Option      "TripleBuffer"      "false"
EndSection
```

Now everything feels fast and crispy.


----------



## grahamperrin@ (Mar 14, 2022)

FreeBSD bug 259791 – x11-drivers/xf86-video-intel: enable SNA by default

Sandybridge's New Acceleration – <https://en.wikipedia.org/wiki/SNA_(computer_graphics)>


----------



## Vull (Mar 14, 2022)

hunk77 said:


> My ThinkPad T470p (Intel "HD Graphics 630") running FreeBSD 13-RELEASE (drm-kmod, xf86-video-intel) also had very slow graphics output with driver acceleration enabled. When scrolling in mousepad (XFCE) or any other text editor I had a lag of ~0.3 seconds. It turns out that I only had to change the acceleration method in /etc/X11/xorg.conf to "SNA" and turn off some goodies.
> 
> Here's my "Device" Section:
> 
> ...



Thanks for the tip. I'll file it under things to try if I ever go back to using intel hardware.

This is just a quick notification to point out that this is a thread which is almost three years old now, and most of the information prior to your post is considerably out of date, although it might have been much more pertinent in 2019. Much of it should probably be ignored now, but, I can really only speak for my own posts. For example, I'm now using 13.0-RELEASE-p7, but in 2019 I was probably using FreeBSD 11.2 or 12.0. Also, I now use the /etc/X11/xorg.conf file to adjust the screen resolution for my default monitor, contrary to the advice I was giving in 2019, on what was, effectively enough, a different, but similar operating system.

My understanding of FreeBSD is continuously evolving, as is FreeBSD itself, and, as is this forum. I am not a FreeBSD credentialed expert, nor are most, or possibly all, of the other members of this forum. Many or most of us are anonymous. Some appear to be using their real names, but most of the rest of us have no way of knowing whether or not those name are actually their real real names, or alter-egos. Even if they are their real names, most of them do not appear to be the names of credentialed experts, on FreeBSD specifically, or on anything else in general. Those members with an "@" symbol in their names, who present themselves as developers, may or may not be exceptions. They appear legit to me, but what do I know?

We should all use our own judgment in evaluating the things we read on anonymous bulletin boards, message boards, and forums. As a general rule, I tend to trust the FreeBSD handbook more than I trust the things I read on forums, but sometimes even that information can be in error. At the end of the day I have to rely on my own personal assessments of everything I read, but that can also be quite flawed on occasion.

Try to be cautious; try to be wary. Read everything carefully. Perform your own tests, as it appears you have done regarding the SNA accelleration method.

These are just my opinions. I could be wrong about everything, some things, or nothing. Keep your own counsel, and, thanks again.


----------

