2

Background

Lumina offers a Suspend option, which works.

KDE Plasma 4 offers Sleep and Hibernate options, neither of which work.

As suspend to RAM can work with Lumina, so I'd like to try the same with KDE.

The question

Are there command-line approaches to sleep (suspend to RAM) and hibernate (suspend to disk)?

Software

PC-BSD 11.0-CURRENTMAR2016 (based on FreeBSD) with upower and Lumina release 0.8.8_2,1.

[graham@macbookpro82] ~% pkg -v upower
1.6.4
[graham@macbookpro82] 

[graham@macbookpro82] ~% pkg info lumina                                                                                                                                                                   
lumina-0.8.8_2,1                                                                                                                                                                                           
Name           : lumina                                                                                                                                                                                    
Version        : 0.8.8_2,1                                                                                                                                                                                 
Installed on   : Wed Mar  9 13:31:37 2016 GMT                                                                                                                                                              
Origin         : x11/lumina                                                                                                                                                                                
Architecture   : freebsd:11:x86:64                                                                                                                                                                         
Prefix         : /usr/local
Categories     : x11
Licenses       : BSD3CLAUSE
Maintainer     : [email protected]
WWW            : http://lumina-desktop.org
Comment        : Lumina Desktop Environment
Options        :
        MULTIMEDIA     : on
        PCBSD          : on
Shared Libs required:
        libxcb-composite.so.0
        libxcb-damage.so.0
        libQt5X11Extras.so.5
        libQt5Gui.so.5
        libQt5Core.so.5
        libxcb-ewmh.so.2
        libGL.so.1
        libXdamage.so.1
        libxcb-image.so.0
        libQt5Concurrent.so.5
        libQt5Widgets.so.5
        libxcb-util.so.1
        libQt5Network.so.5
        libxcb-icccm.so.4
        libQt5Multimedia.so.5
        libQt5Svg.so.5
        libxcb.so.1
        libQt5MultimediaWidgets.so.5
Shared Libs provided:
        libLuminaUtils.so.1
Annotations    :
        icon           : \"http://www.pcbsd.org/appcafe/icons/x11_lumina.png\"
        repo_type      : binary
        repository     : pcbsd-major
        screen1        : \"http://www.pcbsd.org/appcafe/screenshots/x11/lumina/screen1.png\"
Flat size      : 11.8MiB
Description    :
Lumina-DE is a lightweight, BSD licensed desktop environment,
designed specifically for use on FreeBSD

WWW: http://lumina-desktop.org
[graham@macbookpro82] ~% 

KDE

[graham@macbookpro82] ~% pkg info pcbsd-meta-kde
pcbsd-meta-kde-1429798531
Name           : pcbsd-meta-kde
Version        : 1429798531
Installed on   : Wed Mar  9 14:25:06 2016 GMT
Origin         : misc/pcbsd-meta-kde
Architecture   : freebsd:11:x86:64
Prefix         : /usr/local
Categories     : misc
Licenses       : 
Maintainer     : [email protected]
WWW            : http://www.pcbsd.org
Comment        : The meta-port pcbsd-meta-kde
Annotations    :
        icon           : \"http://www.pcbsd.org/appcafe/icons/misc_pcbsd-meta-kde.png\"
        repo_type      : binary
        repository     : pcbsd-major
        screen1        : \"http://upload.wikimedia.org/wikipedia/commons/thumb/5/54/KDE_4.png/1024px-KDE_4.png\"
Flat size      : 0.00B
Description    :
The meta-port for PC-BSD meta-pkg kde

WWW: http://www.pcbsd.org
[graham@macbookpro82] ~% 

Hardware

Apple notebook, early 2011 MacBookPro8,2

It's currently without a battery, so hibernation is particularly desirable. (If I can get sleep or hibernation to work with KDE Plasma 4 on PC-BSD, then I'll arrange a replacement battery.)

Notes

[graham@macbookpro82] ~% pkg search power | grep manage
gnome-power-manager-3.18.0     Power management system for the GNOME Desktop
mate-power-manager-1.12.1      Power management system for the MATE Desktop
upower-0.99.3                  D-Bus daemon for simplifying power management tasks                                                                                                                         
xfce4-power-manager-1.5.2      Power manager for the Xfce Desktop                                                                                                                                          
[graham@macbookpro82] ~% pkg search suspend                                                                                                                                                                
p5-Thread-Suspend-1.22_1       Suspend and resume operations for threads                                                                                                                                   
[graham@macbookpro82] ~% pkg search sleep                                                                                                                                                                  
vdr-plugin-sleeptimer-0.8.2_5  Video Disk Recorder - sleep timer plugin                                                                                                                                    
[graham@macbookpro82] ~% pkg search hibernat
[graham@macbookpro82] ~% freebsd-version ; uname -a                                                                                                                                                        
11.0-CURRENTMAR2016                                                                                                                                                                                        
FreeBSD macbookpro82 11.0-CURRENTMAR2016 FreeBSD 11.0-CURRENTMAR2016 #0 e0cb0b6(freebsd-base-graphics): Sat Feb 27 01:01:50 UTC 2016     root@devastator:/usr/obj/tmp/build/80Wd/pcb                       sd/git/freebsd/sys/GENERIC  amd64                                                                                                                                                                          
[graham@macbookpro82] ~% 

FreeBSD 10.2 manual pages:

Graham Perrin
  • 341
  • 1
  • 3
  • 31
  • 1
    Maybe https://wiki.freebsd.org/SuspendResume will help on how to use the CLI on FreeBSD or derivatives for suspend/resume. – schaiba Mar 11 '16 at 11:30

1 Answers1

1

SuspendResume - FreeBSD Wiki (Suspend/Resume – 2014-10-06)

Thanks to @schaiba for the hint.

acpiconf(8)

Option -h does not work as described in the manual page –

$ date ; freebsd-version ; uname -a
13 March 2016 at 15:29:23 GMT
11.0-CURRENTMAR2016
FreeBSD macbookpro82 11.0-CURRENTMAR2016 FreeBSD 11.0-CURRENTMAR2016 #0 e0cb0b6(freebsd-base-graphics): Sat Feb 27 01:01:50 UTC 2016     root@devastator:/usr/obj/tmp/build/80Wd/pcbsd/git/freebsd/sys/GENERIC  amd64
$ acpiconf -h
usage: acpiconf [-h] [-i batt] [-k ack] [-s 1-4]
$ 

– but sleep mode 3 can be tested:

… the CPU context is lost and memory context is preserved …

The wiki directs users to test without X.

It's also possible to test whilst the X Window System runs so, for example, in a terminal window:

sudo acpiconf -s 3

If, following sleep, the resumed screen is illegible, a press of the power button may perform an ACPI shut down.

Hibernation

My test of sleep mode 4 with a MacBookPro8,2 effectively stopped the computer, with no resume, but according to the wiki that's expected with FreeBSD:

… We don't yet have the necessary infrastructure in place to make suspend to disk work on amd64 or i386. …


The FreeBSD Laptop Compatibility List

Linked from the Suspend/Resume page in the FreeBSD wiki, but no longer served from https://laptop.bsdgroup.de/freebsd/index.html

At http://web.archive.org/web/20130705054229/http://laptop.bsdgroup.de/freebsd/index.html some of the compatibility list content is archived. Not all – for example, of the three listings for Apple products, two of the linked pages are not archived.

Graham Perrin
  • 341
  • 1
  • 3
  • 31
  • KDE Plasma 4 on PC-BSD 11.0-CURRENTMAR2016: following `acpiconf -s 3` in vty 2, sleep then resume produces a KDE screen that is illegible. – Graham Perrin Mar 13 '16 at 16:06