regolith-linux / regolith-desktop

Meta package for the Regolith Desktop Environment
1.51k stars 31 forks source link

Request for Comment: Disable Compton by Default #156

Closed kgilmer closed 4 years ago

kgilmer commented 4 years ago

The compositor which deals with transparency, fading, and other fancy graphics is called Compton. Regolith uses a fork of Compton called picom. For some users, the picom with Regolith's settings provides a buggy experience. Garbled screens, fonts, windows failing to render, etc.. In these cases the first thing is to suggest "does it still happen if you disable Compton?" and almost always it does.

Supporting Compton is difficult because it seems to behave differently based on graphics hardware, driver implementation, and version. Given Regolith's lean and mean project style, it is not feasible to test Compton across a large set of systems, nor is it possible to take a fix for one user and expect it won't cause regressions for others.

The two primary visual effects that I think users will miss is the border shadow provided for i3bar, which provides subtle visual separation between a terminal and the bar, which share the same background color, and the slight dimming of windows that do not have focus. Disabling compton would remove these visual effects.

The proposal is to disable Compton by default but provide simple instructions such that users can easily enable it if they choose to.

If you have an opinion on this issue, give a thumbs up/down or provide more detailed feedback as a comment. This RFC will be open until Nov 1 2019.

ploum commented 4 years ago

I guess it's also compton that provides rofi transparency. None of the compton features seem really required. It looks more like "subtle graphic improvement".

Let's take Users A, users which have bugs due to Compton. And users B, users who will complain that transparency/borders are missing.

My assumption is that #A >> #B and that, as a result, Compton should be disabled by default. Let's keep it easy.

I also believe that, sooner or later, Regolith should switch to Wayland and Sway, which means that all the Compton work is short-term benefit only (like 1 year max).

osimmasgard commented 4 years ago

Isn't Compton helping against "tearing" when one for example is viewing youtube in fullscreen?

hakasapl commented 4 years ago

The default Compton conf file that comes with Regolith worked for screen tearing, but introduced many flickering issues in a number of GUIs. I made my own Compton file that only fixes screen tearing, but without all the normal visual effects:

# Disable Shadows
shadow = false;

# Disable Opacity
inactive-opacity = 1;
frame-opacity = 1;

# Disable Fading
fade-in-step = 1;
fade-out-step = 1;

# GLX and VSync (This is the important part)
backend = "glx";
vsync = true;

I personally don't like the effects that Compton comes with, but the vSync, in my opinion, is absolutely necessary. I'm not sure what is in the Regolith Compton conf that caused flickering, but the config above works fine for me (I just modified the default Compton conf file).

hakasapl commented 4 years ago

In my opinion, Regolith should come with a very minimal compton config, like the one above, coming with only vsync, and users could add other things if they wanted to. Maybe some more involved configs in the wiki or something?

kgilmer commented 4 years ago

@ploum : from my understanding, Wayland is different enough from Xorg that a separate stack should probably be written to support it, rather than having Regolith as-is working for both systems. Like a lot of software, I expect it to take quite awhile for Xorg to be replaced by Wayland, as there is a long tail of old apps and things that don't work quite right or have issues. Wayland is certainly the way the Linux Desktop is moving but I don't necessarily see Regolith supporting both systems of of the box.

@osimmasgard : yes this is a primary feature but can also be implemented at the graphics driver layer. For example: https://askubuntu.com/questions/945895/solution-to-intel-graphics-screen-tearing-flickering-causes-excessive-fan-use

@hakasapl: I'm glad you got it working and like your minimal configuration. I am currently testing xcompmgr but may also test your configuration w/ Compton (picom). A key point I think is that everyone is in the boat of "I'm not sure what is in the Regolith Compton conf that caused flickering" because there seems to be a lot of different behavior based on drivers and HW. This makes it very difficult to support.

hakasapl commented 4 years ago

@kgilmer With the Regolith compton conf, when the backend was set to xrender instead of glx, no flickering or artifacts occurred for me (maybe that will give you a clue as to the root issue with the Regolith config).

Maybe using a default minimal configuration in the release (which still allows basic things such as Rofi transparency, but mainly vsync), and including documentation about switching to the less buggy xrender if the user experiences problems with glx. Without compton screen tearing gets very bad for me.

kgilmer commented 4 years ago

@hakasapl I would like to make your compton configuration available as a compositor "plugin" (see https://github.com/regolith-linux/regolith-desktop/issues/175). If you're interested and have the time to submit a PR, it would look like this with your configuration instead of the default. If not, no worries I'll package your configuration myself. Either way, but I want to give you the option.. :smile: