Quick notes about software packages and desktop settings.
When using multiple monitors and they go into power-saving mode, sometimes the desktop manager will change from side-by-side to mirrored layout or some other change that is undesired. My guess is that this happens because one monitor powers-down before the other. In any case, here is a way I found to maintain the layout (from here) and modified for use with Endeavour (Arch) Linux using XFCE.
$ echo $DISPLAY :0.0 $ xrandr|grep ' connected'|awk '{print $1}' HDMI-1 HDMI-2
Create the following script named
/usr/local/sbin/wake-monitor
. Replace values on highlighted lines with the ones you got in the above step.
#!/bin/bash export DISPLAY=:0.0 if [[ $1 =~ resume|thaw|post ]] then xrandr --output HDMI-2 --primary --auto --right-of HDMI-1 # sleep 3s in case the monitor is not powered-up until getting the first (above) command. sleep 3 xrandr --output HDMI-2 --primary --auto --right-of HDMI-1 fi
Create
/etc/systemd/system/wake-monitor.service
:
[Unit] Description=Correct monitor configuration upon wake from sleep and also when entering a display manager After=sleep.target display-manager.service StopWhenUnneeded=yes [Service] User=ab Type=oneshot RemainAfterExit=no ExecStart=/usr/local/sbin/wake-monitor resume [Install] WantedBy=sleep.target display-manager.service
Test the script by running it.
/usr/local/sbin/wake-monitor resumeNothing should change. If the monitors change to an undesired layout, adjust the
xrandr
parameters until it works as expected.
Enable the service.
sudo systemctl daemon-reload sudo systemctl enable wake-monitor.service
Test it by putting the computer to sleep and then waking it up again.
I have noticed that dhcpcd will misbehave in situations where dhclient does not. On a Raspberry Pi 3, for example, dhcpcd will take down the Ethernet port (i.e., it loses the IP address), even though ps
shows that it is still running.
systemctl disable --now dhcpcd
[Unit] Description=dhclient on eth0 Wants=network.target Before=network.target [Service] Type=forking PIDFile=/run/dhclient.pid ExecStart=/sbin/dhclient -4 eth0 ExecStop=/sbin/dhclient -x [Install] WantedBy=multi-user.target
systemctl enable --now dhclient
Unlike Evolution, by default Thunderbird will stop at a period/dot/full-stop when you try to double-click an IP address. To make it behave like Evolution:
The only drawback I find to this is that if you select a word that has a period or comma following it, you will get the punctuation selected.
If you are using XFCE and you find that your displays wake back up seconds after going to sleep, the reason may be XFCE's display auto-detection. When it detects a change in displays it pops-up a message, which then wakes the displays back up.
Change the Show dialogue setting in the pull-down men to say Do nothing:
Your monitors should now stay asleep.
If you are getting the error message “not a valid video, audio, or image file” when you try to open any kind of video try this:
If that fixed it, then to regain video acceleration benefit you will need to install the appropriate video driver for your card. For me, using an Intel NUC with Intel built-in GPU, I searched for vaapi and from the search results installed intel-media-driver. On my desktop using a Radeon 580 card I installed vulkan-radeon. In both cases I was then able to set the hardware decoder to Linux VA-API.