Xorg is cutting onions

And it’s wreaking havoc with me. I’m not just crying, but my screen is tearing.

I currently use bare i3 without any real bells or whistles. My aspirations to package compton have been shelved indefinitely since I stopped using it myself. This was prompted mainly by discovering the ability to manually create Xorg configuration files (at time of writing, /usr/share/X11/xorg.conf.d/) and simultaneously reading up about the “TearFree” option in the Intel video driver. That was all I needed to get a working vsync; suddenly, the added bonuses of colored drop shadows and dimmed inactive windows fell away. My core reason for using the compositor was gone.

When I switched to i3, there was even less reason than before – window management is so different from my Openbox movements that I feel foolish starting compton ever.

But the trouble was not long in coming. Several weeks (months? I should keep better logs) ago, I started seeing screen tearing creeping back to haunt me. The most annoying thing was that there was no discernible (!!!) pattern to when it came up – between one and four days of uptime would suddenly magic the tearing into existence; restarting Xorg was the only way to magic it out. The journal was silent on the issue; nothing of note was ever happening when the tearing started. It was not tied to some system thing that I could easily track, then.

Several driver / Xorg / Wayland updates later, the issue continued to persist. Actually, the problem followed me from my old Acer Ultrabook to my new Lenovo Thinkpad (a clean installation in which I reproduced my settings, rather than copying them over from my old computer). Whatever the problem was, it was either a distro-intrinsic issue that everyone was being silent on (incessant Googling turned up nothing) or a really specific thing that only I was encountering.

One day, after I had just freshly re-logged in, I opened a browser and happened to scroll up and down, verifying that there was no tearing. I opened mpv on some file or another to loop in the background, for which I have the following alias (called “gfy”):

quiet mpv –fs –loop=inf “$@”

The only part you need to pay attention to is “–fs” (“quiet” is just a /dev/null redirector). After I started this up, going back to my web browser caused tearing.

I was thunderstruck. Running a single application in fullscreen would cause tearing across all others?

The problem was not just mpv, but with fullscreen vlc, too. Fullscreen flash and HTML5 (via Firefox) did not trigger the same problem. Some googling suggests that this is a related problem.

I have no idea what’s caused this, but it’s super unsavory. I’ll have to ride it out until Wayland goes gold – and even then I suppose that if I’ve misunderstood the nature of Wayland, this might not even go away.

At least I have chicken (non-fullscreen playback).



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s