greeter icon indicating copy to clipboard operation
greeter copied to clipboard

Greeter doesn't appear after resume from suspend or hibernate

Open reynoldsbd opened this issue 4 years ago • 5 comments
trafficstars

What Happened

My laptop is configured to suspend when the lid is closed. But after opening the lid to resume the system, the greeter never appears.

Same issue happens if I disable any "lid close" actions in System Settings and instead use acpid(8) to hibernate after closing the lid: greeter is not visible upon resume, but sounds are audible.

I'm quite sure this is not a dupe of #165. The login prompt never becomes visible, even after waiting many hours.

Expected Behavior

I expect to always see login prompt after resuming from suspend or hibernation.

Steps to Reproduce

  1. Open System Settings, configure to suspend when laptop lid is closed
  2. Close laptop lid, allow system to enter sleep, re-open laptop lid

Obviously, many people are able to perform these steps every day without issue, so this is probably due to some quirk in my hardware.

Logs

Nothing interesting in systemd journal or Xorg logs, just normal suspend/resume spew. Absolutely no indication that there is anything wrong with display hardware

Platform Information

Elementary OS 5.1.7 Hera Fully up-to-date

Laptop is a 1st-generation (2016) Razer Blade Stealth with an i7-6500 and Intel HD Graphics 520

reynoldsbd avatar Dec 06 '20 22:12 reynoldsbd

Alternative hibernate-based repro:

  1. Enable resume from hibernate (see archwiki)
  2. Open System Settings, disable any "lid close" action
  3. Create the file /etc/acpi/events/hibernate with the following contents:
    event=button/lid
    action=/etc/acpi/hibernate.sh %e
    
  4. Create the file /etc/acpi/hibernate.sh with the following contents:
    #!/bin/sh
    
    if [ $3 = close ]
    then
            AC=$(cat /sys/class/power_supply/AC0/online)
            if [ $AC = 0 ] # AC adapter not connected
            then
                    /bin/systemctl hibernate
            fi
    fi
    
  5. Set x bit and reload acpid
    sudo chmod +x /etc/acpi/hibernate.sh
    sudo systemctl kill -s HUP acpid
    
  6. Unplug AC adapter, close lid to trigger hibernate
  7. Open lid, press power to resume from hibernate

As described in original issue, greeter is not visible, although background noises are audible.

Interestingly, if I close and re-open the lid with the AC adapter plugged back in (to avoid triggering hibernate), the greeter appears!!!

Is it possible that the greeter is sitting around waiting for a "lid open" event that for some reason isn't being arriving?

reynoldsbd avatar Dec 06 '20 22:12 reynoldsbd

did you manage to solve it?

tdias25 avatar Feb 07 '21 12:02 tdias25

Sorry, no solution. Now that I know that the issue is related to the way my lid switch operates, my workaround is simply to avoid using it to trigger hibernate. Instead I just make sure to hibernate with the power button before shutting the lid

reynoldsbd avatar Feb 07 '21 18:02 reynoldsbd

When you say "the greeter never appears", do you mean you only see a fully black screen? So no top bar with indicators and gray screen?

Or does it look like below, where you're only missing the login card? greeter without login

peteruithoven avatar Jul 05 '22 19:07 peteruithoven

Screen was fully black

reynoldsbd avatar Jul 16 '22 15:07 reynoldsbd