Xfwm4
Xf.
Xfwm4 can be used as a stand-alone window manager but it is absolutely not meant to be used as such, it is written for the explicit purpose of working with the Xfce desktop environment.
Configuration
Xfwm4 has two different configuration utilities for historical reasons.
xfwm4-settings lets you configure theme, window manager related keyboard shortcuts, focus model and other focus settings and window snapping.
xfwm4-tweaks-settings lets you configure cycling, additional focus options, workspaces, default window placement and the display compositor.
It is, additionally, possible to set some configuration keys that are not available using any graphical configuration tool using the xfce4-settings-editor.
HOWTO Make Xfwm4 More Efficient
Xfwm4 supports doing vertical sync using either
xpresent or
glx.
How well
xpresent and
glx work on a given system depends on the GPU and the video driver used.
xpresent is the much better option for Intel and AMD graphics cards.
glx is the default for AMD and Intel cards in Xfce 4.14.
xpresent will be default for Intel graphics chips and some AMD graphics chips in Xfce 4.16.
The difference when playing a 4k video in mpv using moderate settings on a mid-range AMD GPU is a 30% CPU load when
--vblank=xpresent vs a 50% CPU load with
--vblank=glx.
There is no graphical configuration option where you can choose the method xfwm4 uses to do vertical sync. There is also no way to see what is actually used beyond compiling xfwm4 with
--enable-debug=yes.
You can choose what vertical sync method xfwm4 uses in two non-obvious ways. You can create a newconfiguration string called to in a terminal:
xfconf-query -c xfwm4 -p /general/vblank_mode -t string -s "xpresent" --create
Thestring can be set to the same way:
xfconf-query -c xfwm4 -p /general/vblank_mode -t string -s "glx" --create
can also be configured using the
xfce4-settings-editor program. Open that and select and an entry named
/general/vblank_mode as the type and give that new string the value and you're done.
You will need to restart xfwm4 with
xfwm4 --replace & to make the new setting take effect.
You can switch between
glx and
xpresent without making permanent configuration changes by running
xfwm4 --vblank=glx --replace & or
xfwm4 --vblank=xpresent --replace & respectively.
AMD Users Should Manually Configure Vblank Mode on xfwm 4.15.x / Xfce 4.16 too
xpresent will be the default xfwm4 vertical sync mode for Intel and some AMD graphics chips in Xfce 4.16 when it is released in October/November this year.
Which AMD graphics cards will and won't use
xpresent by default is, in the current xfwm4 git, almost random due to how Mesa identifies some but not all AMD cards as being AMD cards. Some cards are just identified as being
Radeon. That is a problem because xfwm4 4.15.x uses this code to check if
glx or
xpresent should be used in
src/compositor.c:
#if HAVE_PRESENT_EXTENSION const char *prefer_xpresent[] = { "Intel", "AMD", NULL }; #endif /* HAVE_PRESENT_EXTENSION */
AMD Radeon RX 470 graphics cards from some vendors are identified by Mesa as
AMD Radeon (TM) RX 470 Graphics. They will match that check. Other AMD Radeon RX 470 cards from other vendors are identified as just
Radeon RX 470 Series so they do not match that check.
Xfwm4 could check if a GPU is either
AMD or
RADEON as proposed in xfwm issue 409. There is no progress in getting the
"RADEON", added to
src/compositor.c so this will probably still be the case when Xfce 4.16 is released.
You could manually make sure Xfwm is using
xpresent if you are using Xfce 4.14.x and you should also manually ensure
xpresent is used if
glxinfo|grep Device returns a string that does not contain
Intel or
AMD.
Patches Extending Xfwm4
Ignacio Losiggio maintains a GitHub repository with several interesting patches for xfwm4. His Xfwm4-cycle-per-monitor.patch that allows you to cycle through all the windows on a specific monitor is the most interesting of those patches.
Links
The xfwm4 source is at gitlab.xfce.org/xfce/xfwm4/-/tree/master and the website is at docs.xfce.org/xfce/xfwm4/.
Enable comment auto-refresher