I have a home file server with ubuntu 20.04. Experimenting with VLC in terminal and being not a pro user I had accidentally installed Gnome which immediately started doing things it was not asked for. The weirdest one for me at the moment is preventing system from shutting down by power button press depending on HDMI CABLE CONNECTION (!)

Pressing power button makes no effect until the video cable is connected. Once connected (no matter how much time has past) the monitor shows me the login screen with the warning of systems preparing to shut down while some users are still logged in. Timer starts from 60 seconds. But not earlier than the cable is connected. There is no problem to turn it off by "sudo shutdown" from a SSH session. Though I did not really need Gnome there, I'm not going to remove it right now. So please any suggestions on how to make the system handle the power button unconditionally.

  • The safest way to reverse your installing packages (I gather due to depends rules) is to reverse whatever you did; however you've provided no clear clues as to what you did. If we guess at what you did, we risk making the problem worse... Provide details, or if you don't recall use logs (command logs, apt logs etc). If you've enabled GUI tools you system has likely been changed from server into a desktop system; thus the change in behavior.
    – guiverc
    Apr 29, 2022 at 9:52
  • @guiverc Thanks. I changed the question so that it only touches on one topic: handling the button. Apr 30, 2022 at 8:12
  • By adding desktop packages; you've changed your prior server into a desktop system, but haven't provided details on what you've actually installed thus details of your system are unknown (it's a server which was changed to an unknown desktop system due to unstated packages being installed). Desktops can be shutdown via command (ie. ssh in & tell it to shutdown) or via Keyboard with Ubuntu 20.04 LTS (SysRq combination)
    – guiverc
    Apr 30, 2022 at 8:15
  • @guiverc Unfortunately, the only thing I know for sure is that some modern version of Gnome was installed. That was not an intentional desktop installation. It accidentally joined while I was following instructions from the internet on how to launch a video WITHOUT a DESKTOP) In any case, doesn't Gnome catch the power button the same way regardless of the specifics of its installation? May 5, 2022 at 17:02


You must log in to answer this question.

Browse other questions tagged .