You are not logged in.

#1 2014-08-15 13:50:02

firekage
Member
From: Eastern Europe, Poland
Registered: 2013-06-30
Posts: 617

[SOLVED] Problem with suspend to ram using kde

Hello.

I would like to ask for your help. I'm trying to solve one big problem - i'm not able to suspend to ram using kde (button). Suspend to ram works great only when i use command in terminal:

sudo pm-suspend

When i put this command in terminal, my computer sleeps, everything goes ok. Screen is being switched, than turned off. I would like to check why i'm not able to suspend to disk using kde button in kde. If i use it, then screen is being switched (black screen with cursor on the left right corner of screen), i hear that my hard drive disk sound like "loosing power", they are more silent than when computer works, but after it, nothing happens exept that screen is turned on, curor in the left upper corner of the screen is not blinking. I can't do anything, it looks like kde/arch freezes. I can do only power off by holding power off button, can't even do a reset. Could somebody help me? I don't know how to determine what is wrong, what causes this strange behaviour on my desktop (on laptop and netbook with default installation it works).

I checked logs in /var. There are ok.

This is my upower -d command

[firekage@arch_desktop ~]$ LANG=C upower -d
Device: /org/freedesktop/UPower/devices/keyboard_0003o046DoC52Bx0004
  native-path:          /sys/devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.2/0003:046D:C52B.0003/0003:046D:C52B.0004
  vendor:               Logitech, Inc.
  model:                K230
  serial:               D035075E
  power supply:         no
  updated:              Fri Aug 15 15:48:58 2014 (92 seconds ago)
  has history:          yes
  has statistics:       no
  keyboard
    present:             no
    rechargeable:        yes
    state:               unknown
    warning-level:       none
    percentage:          0%
    icon-name:          'battery-missing-symbolic'

Device: /org/freedesktop/UPower/devices/DisplayDevice
  power supply:         no
  updated:              Thu Jan  1 01:00:00 1970 (1408110630 seconds ago)
  has history:          no
  has statistics:       no
  unknown
    warning-level:       none
    icon-name:          ''

Daemon:
  daemon-version:  0.99.0
  on-battery:      no
  lid-is-closed:   no
  lid-is-present:  no
  is-docked:       no
  critical-action: HybridSleep
[firekage@arch_desktop ~]$ 

I don't know why deamon says that it can't be suspended to ram when using

sudo pm-suspend

works ok, works great. Could somebody help me?

Thanks.

Last edited by firekage (2014-08-18 21:05:16)

Offline

#2 2014-08-17 10:37:54

Morn
Member
Registered: 2012-09-02
Posts: 886

Re: [SOLVED] Problem with suspend to ram using kde

Try to suspend via "systemctl suspend" which should work as a normal user. I assume this is also what KDE uses under the hood to suspend.

Offline

#3 2014-08-17 11:29:39

midixinga
Member
Registered: 2014-01-18
Posts: 193

Re: [SOLVED] Problem with suspend to ram using kde

firekage wrote:

--- I would like to check why i'm not able to suspend to disk using kde button in kde. If i use it ...

"to disk" ? It`s a typo ?

Offline

#4 2014-08-18 11:16:15

firekage
Member
From: Eastern Europe, Poland
Registered: 2013-06-30
Posts: 617

Re: [SOLVED] Problem with suspend to ram using kde

midixinga wrote:
firekage wrote:

--- I would like to check why i'm not able to suspend to disk using kde button in kde. If i use it ...

"to disk" ? It`s a typo ?

Yes, it's a typo - "suspend to ram" should be there.

Offline

#5 2014-08-18 11:21:15

firekage
Member
From: Eastern Europe, Poland
Registered: 2013-06-30
Posts: 617

Re: [SOLVED] Problem with suspend to ram using kde

Morn wrote:

Try to suspend via "systemctl suspend" which should work as a normal user. I assume this is also what KDE uses under the hood to suspend.

It does not work, the same as using kde button in K>finish>suspend. It switches screen of, i see a black sreen with cursor in the left upper corner of the screen, nothing happens, juz it stays forever, have to power off computer.

Offline

#6 2014-08-18 11:27:45

Morn
Member
Registered: 2012-09-02
Posts: 886

Re: [SOLVED] Problem with suspend to ram using kde

firekage wrote:

It does not work, the same as using kde button in K>finish>suspend. It switches screen of, i see a black sreen with cursor in the left upper corner of the screen, nothing happens, juz it stays forever, have to power off computer.

Have you checked "journalctl" output for error messages from systemd?

Last edited by Morn (2014-08-18 11:28:11)

Offline

#7 2014-08-18 11:42:22

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: [SOLVED] Problem with suspend to ram using kde

Maybe one of the scripts in /usr/lib/pm-utils/sleep.d/ does something that makes "pm-utils suspend" work for you.

You could copy /usr/lib/systemd/system/systemd-suspend.service to /etc/systemd/system/, edit it and put "ExecStart=pm-utils suspend" there.

Offline

#8 2014-08-18 19:28:36

firekage
Member
From: Eastern Europe, Poland
Registered: 2013-06-30
Posts: 617

Re: [SOLVED] Problem with suspend to ram using kde

Morn wrote:
firekage wrote:

It does not work, the same as using kde button in K>finish>suspend. It switches screen of, i see a black sreen with cursor in the left upper corner of the screen, nothing happens, juz it stays forever, have to power off computer.

Have you checked "journalctl" output for error messages from systemd?

Yes. I did not find anything useful.

Offline

#9 2014-08-18 19:32:48

firekage
Member
From: Eastern Europe, Poland
Registered: 2013-06-30
Posts: 617

Re: [SOLVED] Problem with suspend to ram using kde

lucke wrote:

Maybe one of the scripts in /usr/lib/pm-utils/sleep.d/ does something that makes "pm-utils suspend" work for you.

You could copy /usr/lib/systemd/system/systemd-suspend.service to /etc/systemd/system/, edit it and put "ExecStart=pm-utils suspend" there.

Tried this. My file looks like this;

firekage@arch_desktop /etc/systemd/system]$ cat systemd-suspend.service 
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.

[Unit]
Description=Suspend
Documentation=man:systemd-suspend.service(8)
DefaultDependencies=no                                                                    
Requires=sleep.target                                                                     
After=sleep.target                                                                        
                                                                                          
[Service]                                                                                 
Type=oneshot                                                                              
ExecStart=/usr/lib/systemd/systemd-sleep suspend                                          
#ExecStart=/bin/sh -c 's2ram && run-parts --regex .\* -a post /usr/lib/systemd/system-sleep'
ExecStart=pm-utils suspend
[firekage@arch_desktop /etc/systemd/system]$ 

I looked at both files named systemd-suspend.service in /etc/systemd/system and in /usr/lib/systemd/system/. These two files are the same files. I just added to my one line that is commented out. With this line, without this line, and with the one line you mentioned, still the same. I post screen that i taken with my camera:

http://i.imgur.com/PNXWywI.jpg

I can do only power switch off in order to do anything. It stays on this screen.

Moderator edit: (ewaller) removed image tags for over sized image https://wiki.archlinux.org/index.php/Fo … s_and_Code

Last edited by ewaller (2014-08-18 21:23:01)

Offline

#10 2014-08-18 19:54:44

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: [SOLVED] Problem with suspend to ram using kde

The file you posted has two uncommented ExecStart lines. Only the last one should be uncommented. Try running "systemctl daemon-reload" after implementing changes.

-edit-

And the line should actually be "ExecStart=/usr/bin/pm-suspend", my mistake.

Last edited by lucke (2014-08-18 19:58:02)

Offline

#11 2014-08-18 21:04:14

firekage
Member
From: Eastern Europe, Poland
Registered: 2013-06-30
Posts: 617

Re: [SOLVED] Problem with suspend to ram using kde

lucke wrote:

The file you posted has two uncommented ExecStart lines. Only the last one should be uncommented. Try running "systemctl daemon-reload" after implementing changes.

-edit-

And the line should actually be "ExecStart=/usr/bin/pm-suspend", my mistake.


I would like to thank you very much - it works! This problem was something that was bugging me for a long time but i just could not solve it. I checked logs, do a reinstall, checked archwiki with topics that are related to suspend/hibernate and i had to do something wrong.

It works, i'm really glad. Big problem was solved, now i can suspend to ram with KDE and not only it works, shuts down my computer, but i don't have also problem with resuming from suspend to ram (even with nvidia drivers). Thank all of you for your time, advices, support smile




Nie ma to jak pomoc rodaka big_smile

Arch community is great, as always!

Last edited by firekage (2014-08-18 21:04:51)

Offline

Board footer

Powered by FluxBB