I have configured hibernation on my laptop. It works as intended now as long as there is not external screen connected.
I often connect a second screen and close the lid of the laptop. It's set to do nothing when the lid is closed. The laptop display will just turn off and I can continue working on the larger screen. So far so good.
Now when I hibernate with an external screen connected, instead of hibernating properly some close lid action starts creating problems with the ubuntu login screen.
Hibernation with the second screen connected only works if I fully disable the lid action in: /etc/UPower/UPower.conf IgnoreLid=true
This however renders my second screen useless as the laptop screen stays powered on with closed lid and I can't get the full screen reso on my external screen.
I already tried to set all possible lid options in dconf editor to 'nothing'. Yet, this seems to have no effect. Same goes for lid related changes in /etc/systemd/logind.conf
I am lost at this point. I hope someone here can help.
Edit: I use a swap file for hibernation. 8GB RAM/ 16GB Swap. Hibernation works as long as no external monitor is connected with the laptop lid closed.
Update: When I hibernate with the laptop lid closed the system seems to sleep first then hibernate. When it boots back up it apparently then first comes back from hibernation and then tries to wake-up from sleep which fails due to RAM being empty (hibernation had caused a power off before). I still didn't find a solution for this problem. I made this observation from what I see happening on screen. Not sure if there are any logs that can confirm this.
Update: It's not the close lid action causing the problem. The problem occurs if a second screen is fully connected (using graphics card) regardless of any lid action.