I am dual booting ubuntu 20.04 desktop on my mid 2012 macbook pro. I'd like to run it as headless server with the lid closed. To try to do this I set systemctl default to multi-user, disabled gdm, and set grub to boot into single user mode. Everything is working fine (~2% CPU) when I have an external monitor plugged in but as soon as I unplug the external monitor cpu usage spikes (~40%), and systemd_logind starts running reportedly using ~80% cpu. When I plug the external monitor back in systemd_logind stops using a bunch of cpu and the system goes back to around 2% cpu.
Any suggestions would be greatly appreciated.
PS: I tried to install ubuntu server originally, but it wouldn't let me do the partitioning the way I needed to dual boot, so i had to use desktop to install.
/etc/default/grub
. All you need to do is setting systemd's default target to multi-user. – danzel Oct 02 '20 at 16:17journalctl
show any relevant logs for the time range when the display is not connected? Runjournalctl -f
, disconnect the display, wait a couple of seconds and reconnect it. BTW, what happens when the lid is open? – danzel Oct 03 '20 at 07:07journalctl -f
and unplugging got me:systemd-logind[772]: Suspending...
systemd-logind[772]: Unit suspend.target is masked, refusing operation.
systemd-logind[772]: Failed to execute suspend operation: Permission denied
So I googled a bit and found this answer https://askubuntu.com/a/1180519/1132566
– badi95 Oct 03 '20 at 21:06Which seemed to fix the issue. Thanks for your help!