r/HomeServer • • 17d ago

First server. Keeps going to sleep.... help.

Ok im new, go easy on me. I just got my first server up and running. its a used HP elitedesk mini G5. I installed Debian, got Immich, Jellyfin and Homeassistant on there, and im accessing it through Casa OS.

I turned off "automatic suspend" in the settings, but its still going into sleep mode.

The HP elitedesk was used when i got it, and im having trouble getting past the BIOS password to change those settings.

Ideas?

This thing idles at less than 2 watts according to the casaOS dashboard, so im ok just leaving it on. Assuming thats easier than a wake-on-lan setup.

3 Upvotes

13 comments sorted by

3

u/pelazas1 17d ago

the gnome setting only counts while you're logged in, the login screen still suspends it after ~20 min. sudo systemctl mask sleep.target suspend.target turns sleep off for good.

2

u/greasywallaby 16d ago

this worked! I woke up the machine with the power button, then opened casaOS remotely, opened a terminal, used that code, then rebooted. Its been up for 3 hours now!

1

u/greasywallaby 16d ago

This is the answer I was hoping for. Thank you! I'll try this when I get home from work

1

u/g333p 13d ago

Another thing you may want to investigate is the nic "going to sleep" and not waking up. I have an elitedesk as well that became unreachable over network after a while and it turned out that the intel nic went to a lower cstate and the system was unable to wake it up.

I ended up adding this to my grub and it has fully fixed the issue for my machine.

GRUB_CMDLINE_LINUX_DEFAULT="quiet pcie_aspm=off intel_idle.max_cstate=1"

1

u/OMP-1 16d ago

Did you install Debian with a desktop environment? Headless Debian has sleep disabled but most desktop environments enforce a sleep setting. If you’re trying to change the sleep setting from a gui tool while logged in, that will only change the sleep settings while logged in and there are like two or more places you need to check the sleep settings for

1

u/greasywallaby 16d ago

i did. Im pretty new at this and the command terminal is not my comfort zone. Another person suggested "sudo systemctl mask sleep.target suspend.target" and that seems to have worked.

1

u/Killer2600 15d ago

Considering my Raspberry Pi idles at 3 watts, I wouldn’t trust CasaOS saying a more powerful machine idles at 2 watts. I’d get an actual power consumption meter ( e.g. kill-a-watt) to know what the system is consuming from the wall.

1

u/greasywallaby 15d ago

thats a fair point, even if its 10-20 watts i wont lose any sleep over that.

Im still very new at this, so just proud of myself for getting all this stuff to work with eachother.

2

u/[deleted] 17d ago

I use proxmox on my prodesk mini and it’s never gone to sleep on it’s own, might be worth using that.

1

u/Steven_J_Lemenne 17d ago

Ciao io uso il server solo con true nas scale, era tutto ok ma da quando inserii una riga di comando errata su tailscale ha iniziato ad andare in loop. Quindi magari qualche tua app ti sts creando questa situazione analoga. Individua il problema da terminale debian o disinstalla l'ultima app che hai configurato

1

u/Anti-Hero25 17d ago

Crazy… I had to write a whole Wake Over Lan system to achieve this …. You could do what I do , have a Google pixel host a status web page that sends a Magic packet to wake the server whenever you need it. Phone uses a PoE connection , always on when I need it. X

1

u/Realistic-Ad-7239 12d ago

Install Claude on your server and have it fix it

0

u/ButterscotchFar1629 17d ago

Switch to Proxmox or don’t use a desktop install….