I’ve never really thought of myself as a “distrohopper” - sure, I’ve used my fair share of distributions, but I’m not really on r/unixporn or checking distrowatch.com daily or installing distributions without having a good reason to switch. I’m not really interested in playing around with different distributions for the sake of it. I’ve got my needs and preferences and I try to align my distribution choice with those.
For servers: vanilla Debian. For desktops I rarely use: Mint. For my laptop: that’s been up in the air lately, but I’ve always used some flavor of rolling release minimal distribution. I’ve switched from Arch to Void to Artix over time, and I’ve been settled on Artix for several months.
Here lately though, I’ve been increasingly frustrated with a couple aspects of minimal distributions, and so I’ve finally been researching desktop environments and stable distributions that would meet my needs. My requirements are as follows: something stable that I don’t have to constantly configure (thus I have accepted systemd as a given in this setup), but something that I can still set up my particular nitpicky workflow (with bspwm and sxhkd for tiling window management). I primarily want it to support multiple monitors, little stuff that a DE takes care of like the network connection, bluetooth, notifications, laptop power management, etc. But I want it to be configurable enough so that I can strip out the window manager and hotkeys from the DE and replace it with my setup.
Maybe I’m getting old, but I’ve just wanted something that just works. I don’t get the same joy out of configuring every little thing to my liking, and when I open my laptop I typically just want to get work done. Encountering things like “dang how do I connect to a network again?” or “my stupid password manager opened in light theme again” or “hmm I need to configure my custom bluetooth module to show something other than my headphones” or “dude my laptop keeps going to sleep while I’m typing” or “I want to work at my desk with my larger monitor but I’m going to have to remember an xrandr command to turn it on” was just cutting into my time to get work done and frustrating me. I know it is all fixable and I absolutely adore that I could if I wanted to, but the thing for me now is I don’t really want to.
Enter Linux Mint XFCE
From my research, it looked like Mint was the way to go. I encountered multiple posts from people who set up bspwm with XFCE and left all other aspects of the desktop environment intact, such as the panel.
What wasn’t part of the bargain was the issues I ran into with suspend and hibernate. I thought a DE was supposed to have those down pat. But how wrong I was.
Fighting S3 suspend
First off, I ran into S3 suspend (deep sleep) not working. My laptop would go to sleep, power button flashing, screen completely off. That part worked. What didn’t work was waking up from sleep. The power button would go solid, capslock and numlock keys would respond as if the keyboard was active, but the screen backlight would stay off and I would have to power cycle the machine. I tried to SSH into the machine after waking up from sleep and couldn’t reach it, so something wasn’t working right. It was hanging at some point before reconnecting to the network.
I ran through several tests to isolate the issue, and it seemed to be hardware/BIOS. If you recall, I Librebooted this machine, and I found a recent issue regarding S3 sleep not working properly with Libreboot. I tested all the sleep modes and they worked in the test suite, just not when the laptop actually went to sleep.
I was able to switch to s2idle and that work, so I finally ended up doing that.
Bonus issue while testing this… I had to install solaar or my stupid Logitech trackball USB dongle would wake up the machine immediately after it slept.
Already not off to a good start, but I figured this one was my fault for Librebooting the machine.
Fighting hibernate
Apparently hibernate has a host of hardware support issues and is being phased out, to the point where it is not supported out of the box on Ubuntu (and thus Ubuntu flavors such as Mint). I’m not sure this is the best option given its wear on the SSD, but especially with S3 sleep not working, I needed to enable this or my laptop would be essentially useless unless I powered it off or was plugged into a dock at all times. My battery isn’t in the best of shape given this is a used machine. So AMA, I wanted to enable hibernate.
Turns out this is an undertaking. First I had to create a swapfile, as Mint only creates a 2GiB swap partition when it installs (why it does this is beyond me). After that, the typical enabling at boot in /etc/fstab, but then a couple oddities I’d never encountered before like grabbing the physical offset and editing the grub parameters.
After that, you still have to enable it in the menu by editing polkit rules.
Ok, a bit convoluted, but I can understand it given it’s disabled by default, and I can sort of understand the decision to disable it by default if you’re maintaining a distribution that must support such a plethora of hardware. I just found so many threads regarding sleep and hibernate that I’d expect it to be a bit more straightforward or even a toggle in the settings to enable it if hibernate is detected as enabled. But I digress.
So I’ve got hibernate working. But now I have an issue. I have sleep OR hibernate available to me. What about loginctl’s built-in function, “suspend-then-hibernate”? That is the one that I find useful. That is the one that I enable as my default sleep function. It is built-in functionality. But no, I have suspend OR hibernate available to me via the menus and power settings.
I don’t want to hibernate every time I close my laptop lid. After hibernation I must decrypt my disk and wait a normal boot up cycle. If I only sleep every time I close the lid, then my battery drains away (particularly using s2idle instead of deep sleep).
I tried to pass over the functionality to logind. I honestly can’t remember what I ran into here, but it wasn’t working and it was editing a config file instead of using the settings, which I wanted to avoid as I was trying to set up a desktop environment to handle this BS. I gave up. I found a random forum post that suggested linking suspend-then-hibernate to suspend, so that every time the suspend function gets run, it just runs suspend-then-hibernate instead. After that you edit one line in /etc/systemd/sleep.conf to set your hibernate delay, and you’re done. A little bit of a hack, but it worked.
At this point, I’ve won, but I don’t feel like I’ve won. I feel like I worked harder to get this working than I had on my Artix system where I had to set everything up from scratch. But whatever, it’s working now, and it shouldn’t require more fiddling. I just couldn’t see myself using a laptop as a daily driver without power management working to this basic degree, so I had to get this set up before moving on.
Full sleep and hibernate configuration
Switch from deep sleep to s2idle
echo s2idle | sudo tee /sys/power/mem_sleepto test- Edit
/etc/default/grubto addmem_sleep_default=s2idletoGRUB_CMDLINE_LINUX_DEFAULTline sudo update-grub
Fix Logitech dongle waking from sleep immediately
Install solaar and ensure it starts at boot
Enable hibernate
https://ubuntuhandbook.org/index.php/2021/08/enable-hibernate-ubuntu-21-10/
Create swapfile at least as big as your RAM
sudo dd if=/dev/zero of=/swapfile bs=1K count=18M
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
Edit /etc/fstab to enable swapfile at boot
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
Locate physical offset of swapfile
sudo filefrag -v /swapfile
Edit /etc/default/grub - add resume=/swapfile resume_offset=xxx to GRUB_CMDLINE_LINUX_DEFAULT (where xxx is your physical offset)
sudo update-grub
Add same two grub paramters to /etc/initramfs-tools/conf.d/resume
sudo update-initramfs -c -k all
Enable hibernate in XFCE’s GUI
sudoedit /etc/polkit-1/rules.d/10-enable-hibernate.rules
polkit.addRule(function(action, subject) {
if (action.id == "org.freedesktop.login1.hibernate" ||
action.id == "org.freedesktop.login1.hibernate-multiple-sessions" ||
action.id == "org.freedesktop.login1.hibernate-ignore-inhibit" ||
action.id == "org.freedesktop.login1.handle-hibernate-key" ||
action.id == "org.freedesktop.upower.hibernate") {
return polkit.Result.YES;
}
});
Replace suspend service with suspend-then-hibernate
sudo ln -s /lib/systemd/system/systemd-suspend-then-hibernate.service /etc/systemd/system/systemd-suspend.service
Set HibernateDelaySec value in /etc/systemd/sleepd.conf
Set power management options in GUI
- System tab - Suspend both on battery and plugged in
- Display tab - disable display power management and brightness reduction (another issue where the system would lock prior to sleeping, thus would ask for authentication to suspend)
- Security tab - set Automatically lock the session to Never
- Security tab - check the box for Lock screen when system is going to sleep
On to multiple monitors
I configured the rest of my setup as normal, just copying files and setting configs. I replaced XFCE’s window manager with bspwm and the hotkey management with sxhkd. It worked surprisingly well with the built-in panel.
Until I connected a second monitor. Everything broke. Long story short, the panel does not play nice with the desktops that you set for bspwm on more than one monitor. I fiddled for a couple hours before deciding it wasn’t worth the effort. So I installed polybar and disabled XFCE’s panel.
It was at this point that I began to question what the point of switching to Mint was. The window manager and hotkeys I could see as interchangeable and not really a huge benefit of using a DE, but the panel was something I desperately wanted to work.
It was back to the drawing board.
Are tiling DE’s a thing?
I went back to distrowatch and searching reddit threads to figure out if there was any DE that supported tiling without some wack extension or complex configuration that would inevitably lead to me questioning why I was switching in the first place. If I couldn’t find something, I was just going to switch back to Artix, or maybe vanilla Debian to get the stability while still configuring everything from scratch.
Enter Pop!_OS. (Henceforth Pop, it’s a stupid name to type.) A few things stuck out to me on first look.
- It runs a custom DE (COSMIC) that supports tiling out of the box.
- It’s developed by System76 and seems to be active with plenty of users.
- It’s based on Ubuntu.
Bonus, it uses full-disk encryption out-of-the-box. If I could jive with the quirks of COSMIC, I’d get all the benefits. I figured I’d still need to fix the sleep and hibernate issues, but I already fought that battle. It was really just a matter of installing it and fiddling with COSMIC to see if I could stand it.
For the answer to that, well I’m currently writing this from Pop running COSMIC. There were a few nitpicks I had but I’ve either configured/hacked them out or accepted them and started to get used to them.
Configuring Pop
Suspend
Somewhat mysteriously, S3 sleep did work after installing Pop. I’m not complaining, I just have no idea what’s different. I thought it was a BIOS/firmware/hardware thing, but it seems to work just fine. Also, I didn’t run into the same Logitech USB dongle issue at all. Magic!
Hibernate
Another Ubuntu flavor, so it’s disabled by default. They do have a dedicated page with instructions on how to set it up, as it’s such a demanded feature.
While I was adding a swap partition, I also separated the root and /home partitions. It’s been ingrained into me (from experience) that those should always be separated.
I couldn’t get hibernate working in the menu and I don’t really care to. I did the same linking systemd-suspend to systemd-suspend-then-hibernate and that has met my needs.
Workspaces
Oh these drove me nuts at first. Two things.
First, I’m used to setting a fixed number of workspaces (say 6) and those workspaces always being there. Pop deletes any empty workspace except for the last one. It took me a while to figure out that I could pin workspaces to have similar behavior, but I eventually reverted to the workspace deletion after getting used to it.
The other thing (and this still sort of irks me) was the Alt+Tab and Super+Tab behavior. On my previous setup, I use Alt+Tab to navigate between most recent windows on the same workspace, and Super+Tab to navigate between most recent workspaces. In Pop, both are bound to the same action - switching through a list of most recent windows (like Windows desktop behavior). This drove me nuts at first. I found a few threads and Github issues; it seems to be something that is in the works or at least in consideration, but not implemented at this time. For now, I’m just getting used to how it behaves, but I may consider installing rofi again to play with this behavior.
Dropdown terminal
My biggest complaint is the lack of dropdown terminal support. I use tdrop with Alacritty, which I found does not work. But I even tried Guake and Yakuake and discovered that COSMIC doesn’t have the support for a dropdown terminal, really. They pop up in the middle of the screen. That was enough for me to stop my testing, but I feel like I would have run into other annoyances based on the tiling/floating setting, alt tabbing, etc.
Again, there is an open Github issue that indicates this behavior is at least in consideration, but it isn’t implemented yet. I went with a vibe-coded COSMIC terminal extension that for the most part works.
But then I ran into a tiny but massive annoyance. I always open the same tmux session when I open a dropdown - over time I’ve switched from using multiple terminals to one tmux session, and gotten used to that workflow. I like it a lot, and tmux is robust. Something I took for granted was Alacritty’s hold shift to select text. That passes through your mouse clicks to the terminal instead of passing them to tmux, so I can select text and copy paste as needed - which I do a lot.
COSMIC doesn’t have a modifier to select text (though again I found an open Github issue with the functionality requested). So if I set tmux to mouse mode on, I’m in tmux’s stupid copy mode which I can’t be fucked to figure out, and there’s no way to select text without passing it through tmux. If I disable the mouse selection, I suddenly can’t scroll the terminal without using keybinds instead of the scroll wheel. The scroll wheel scrolls through command history, which is utterly useless.
I hope this is a functionality that COSMIC terminal adds, but for now I’ve simply switched my tmux keybinds to work with the terminal tabs functionality, and I’m getting by.
EOF