# How to suspend system?



## unicorn (Mar 31, 2022)

How to suspend or hibernate system?I use xcfe,but cannot find suspend or hibernate button.How can I suspend system in terminal?


----------



## SirDice (Mar 31, 2022)

unicorn said:


> I use xcfe,but cannot find suspend or hibernate button


Is dbus running? Do you have a ConsoleKit session? Check with `ck-list-sessions`.




unicorn said:


> How can I suspend system in terminal?


zzz(8)


----------



## unicorn (Mar 31, 2022)

Sorry,I find suspend and hibernate button,but when click suspend button,I only see some messages like "uhub4 detached,xxx disconnected" etc.My laptop' cpu is still running.And I don't know how to back to system.I had to press power button to poweroff.


----------



## unicorn (Mar 31, 2022)

ck-list-sessions outputs nothing


----------



## SirDice (Mar 31, 2022)

unicorn said:


> ck-list-sessions outputs nothing


That's not good. Your 'permission' to shutdown (or sleep) the machine is determined by that ConsoleKit session. No session, no permission. 

It should show something similar to this:

```
dice@williscorto:~ % ck-list-sessions
Session1:
        unix-user = '1001'
        realname = 'SirDice'
        seat = 'Seat1'
        session-type = 'x11'
        session-class = 'user'
        session-state = 'active'
        active = TRUE
        x11-display = 'unix:0.0'
        x11-display-device = '/dev/ttyv8'
        display-device = ''
        remote-host-name = ''
        is-local = TRUE
        on-since = '2022-03-06T17:50:16.904859Z'
        login-session-id = ''
        XDG_RUNTIME_DIR = '/var/run/user/1001'
        VTNr = '9'
```

Lets see if we can fix that. How are you starting XFCE?


----------



## unicorn (Mar 31, 2022)

First kldload i915kms,and then starxfce4 in terminal


----------



## SirDice (Mar 31, 2022)

Is dbus running? `startxfce4` should start the session automatically as far as I know.


----------



## unicorn (Apr 1, 2022)

dbus should running.I set it in rc.conf.
How to fix it?


----------



## grahamperrin@ (Apr 3, 2022)

unicorn said:


> … messages like "uhub4 detached,xxx disconnected" …



Do you have any storage on USB? 

If so, you should unmount the file systems before attempting to sleep the computer.


----------

