John Goerzen: Managing an External Display on Linux Shouldn t Be This Hard
I first started using Linux and FreeBSD on laptops in the late 1990s. Back then, there were all sorts of hassles and problems, from hangs on suspend to pure failure to boot. I still worry a bit about suspend on unknown hardware, but by and large, the picture of Linux on laptops has dramatically improved over the last years. So much so that now I can complain about what would once have been a minor nit: dealing with external monitors.
I have a USB-C dock that provides both power and a Thunderbolt display output over the single cable to the laptop. I think I am similar to most people in wanting the following behavior from the laptop:
- When the lid is closed, suspend if no external monitor is connected. If an external monitor is connected, shut off the built-in display and use the external one exclusively, but do not suspend.
- Lock the screen automatically after a period of inactivity.
- While locked, all connected displays should be powered down.
- When an external display is connected, begin using it automatically.
- When an external display is disconnected, stop using it. If the lid is closed when the external display is disconnected, go into suspend mode.
- In /etc/systemd/logind.conf, there are settings about what to do when the lid is opened or closed.
- Various desktop environments have overlapping settings covering the same things.
- Then there are the display managers (gdm3, lightdm, etc) that also get in on the act, and frequently have DIFFERENT settings, set in different places, from the desktop environments. And, what s more, they tend to be involved with locking these days.
- Then there are screensavers (gnome-screensaver, xscreensaver, etc.) that also enter the picture, and also have settings in these areas.
- Be logged in and using the desktop
- Without locking the desktop screen, switch the display input to another device
- Keep the display input on another device long enough for the desktop screen to auto-lock
- At this point, it is impossible to re-awaken the desktop screen.
sleep-inactive-ac-timeout=60 sleep-inactive-ac-type='blank' sleep-inactive-battery-timeout=120 sleep-inactive-battery-type='suspend'Of course, these overlap with but are distinct from the same kinds of things in Gnome settings. Sway? Running without Gnome seems like a challenge; Gnome is switching audio output appropriately, for instance. I am looking at some of the Gnome Shell tiling window manager extensions and hope that some of them may work for me.
Here's a description of how my monthly external backups are managed at a
technical level. I didn't realise I hadn't written this all down anywhere yet.
What

Blog post you re reading right now is privately hosted on Raspberry PI 4 Kubernetes cluster with its data coming from NFS share and MariaDB on...
The post 


This took me far too long to identify and debug, so I'm going to write
it up here for my own reference and to possibly help others.
Perl REGEX Problems courtesy of XKCD
Grafana console showing the use of the label_replace function
Made a graph for furusato nozei limits.
I wanted a prettier graph for
Should online communities require people to create accounts before participating?
This question has been a source of disagreement among people who start or manage online communities for decades. Requiring accounts makes some sense since users contributing without accounts are a common source of vandalism, harassment, and low quality content. In theory, creating an account can deter these kinds of attacks while still making it pretty quick and easy for newcomers to join. Also, an account requirement seems unlikely to affect contributors who already have accounts and are typically the source of most valuable contributions. Creating accounts might even help community members build deeper relationships and commitments to the group in ways that lead them to stick around longer and contribute more.
I was recently called upon by Origyn to audit the source code of some of their








Wishing everyone in Debian good health and prosperity in the Gujarati New Year Vikram Samvat 2078 called Pramadi.