Using Ubuntu desktop as server (Pi-Hole), what if user enters suspend mode?

mx flag

I have setup a machine for guests and for home use when we need a quick web browsing. This machine is infrequently used. Most of the time it is on suspend mode (consuming 2 watts).

I would like to run Pi-Hole on this machine. But this would requires the machine to be permanently on (Ryzen 5700G, integrated graphics, watt meter shows 30W when computer is idle, not suspended). Maybe I just need to apply How to Disable Suspend and Hibernation Modes In Linux. Or install Ubuntu server + Desktop environment.

What is the recommendation to run a Linux desktop as server? "Server" here means "internal server", only exposed to home network.

ng flag

I'm reading between the lines and there seem to be a few tightly related questions here about running services while conserving power:

Can I run applications or services like pihole when the system is suspended?

Unfortunately not. When a system is suspended, all actions are halted. See: What is Suspend?

Can I run Ubuntu Server on my home network and will that save power compared to Ubuntu Desktop?

Yes. And Yes.

You can install Ubuntu Server on your device and you can run services like Pi-hole on your home network. Actually, Pi-hole is designed to run on home and other local and private networks.

Ubuntu Server will use less power than Ubuntu Desktop because desktop environments (DEs) are fairly heavy on resources. It takes a lot of software running simultaneously and harmoniously to power a DE. Less work for your CPU, hard drive, and other resources will result in lower power consumption.

However, you will not have the same level of power savings that you would get from suspending the system. The server needs to have processes running in order to be available to interact with the other devices on your network.

You also mentioned installing a DE on top of Ubuntu Server to save power. Unfortunately, there are probably not any significant power savings to be had if you install Ubuntu Server + a DE compared to Ubuntu Desktop with the same DE. Arguably, there is some variation in power consumption among different flavours and DEs, but not having a desktop at all is going to save the most power.

Here's a few additional notes on Pi-Hole. If you're only really planning on running Pi-hole on this particular hardware, you don't really need a DE. It will install a web based UI that you can control from a browser on other computers on your local network. Pi-Hole also has excellent internal documentation and they have an active support community.

Polymerase avatar
mx flag
Hi, this computer needs DE as it is used for casual web browsing (its main function). The Pi-Hole evaluation is just to use that computer resource b/c it sits idle most of the time. Instead of buying new hardware. I just want to know how to deal with a desktop regarding power management. I suppose I should permanently disable Suspend mode. Once I am OK with PiHole, I will plan for proper hardware. I may actually stick with this config permanently. At 30W (actual measure from watt meter) it costs $20 per year to run.
Polymerase avatar
mx flag
I am OK to have that Ubuntu desktop computer running 24/7. It has quality hardware, I am confident it has no troubles running non-stop for years. I'll set the router to use the PiHole as DNS server and I am OK with home internet disruption in case PiHole goes wrong. It's easy to configure the router so PiHole troubles is not a concern. But HOW do I make Ubuntu desktop to run a PiHole server process 24/7? Would one of these two approaches be appropriate: 1) Disable Suspend mode `sudo systemctl mask ...` (link in OP). 2) go to each user profile and configure power mgmt to never suspend.
Polymerase avatar
mx flag
There are 3 user profiles. It is pretty simple indeed to modify the power mgmt config of each user to disable suspend. One last clarification. If all users are logged out, ie. the monitor shows the login screen the whole day. What would be the default power management behavior of Ubuntu desktop in terms of power management?
I sit in a Tesla and translated this thread with Ai:


Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.