laptop will not suspend

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

laptop will not suspend

Postby daniewicz » Jun 10th, '18, 17:41

Fully updated Mageia 6 with KDE. Suspend after closing the laptop lid was functional until an update over the last few months. Now closing the lid and reopening results in a system which can only be restarted with a cold boot.

Code: Select all
systemctl suspend
results in the correct behavior. System suspends and then comes back with a keystroke.

Any thoughts?
The dude abides.
User avatar
daniewicz
 
Posts: 153
Joined: Feb 10th, '13, 03:37

Re: laptop will not suspend

Postby morgano » Jun 11th, '18, 10:37

How does the menu choice for suspending work?
Mandriva since 2006, then Mageia since 2011 at home & work. Thinkpad T40 T42p T43 T60 T61 T400. Aspire 7. Fileserver. Workstation using LVM, LUKS, VirtualBox, BOINC, Dropbox, CAD, urpmi-proxy, NextCloud...
morgano
 
Posts: 506
Joined: Jun 15th, '11, 17:51
Location: Kivik, Sweden

Re: laptop will not suspend

Postby daniewicz » Jun 11th, '18, 15:38

Menu choices for reboot and shutdown also do not work,
The dude abides.
User avatar
daniewicz
 
Posts: 153
Joined: Feb 10th, '13, 03:37

Re: laptop will not suspend

Postby doktor5000 » Jun 11th, '18, 19:33

I also see that sometimes since kde5 was introduced, sometimes with a message that ksmserver crashed, sometimes like you described, the reboot/logout/shutdown buttons in start menu simply do nothing.

Pretty hard to debug, as you need to consider quite a few things
- are the relevant KDE services/modules loaded, like powerdevil (can be queried as regular user via qdbus org.kde.kded5 /kded loadedModules )
- if upower is running correctly
- is your dbus session working ( the above command should tell you )
- test if you can manually suspend via command
Code: Select all
qdbus org.kde.Solid.PowerManagement /org/freedesktop/PowerManagement Suspend

- if there are any other systemd inhibitors that might interfere ( systemd-inhibit --list )
- what does journal log say, if you run it as root via journalctl --follow and then wait until no new output appears, then trigger your action and see what is being added
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 14355
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: laptop will not suspend

Postby daniewicz » Jun 11th, '18, 22:15

Code: Select all
$ qdbus org.kde.kded5 /kded loadedModules
kded_accounts
remotenotifier
networkmanagement
kscreen
keyboard
baloosearchmodule
dnssdwatcher
appmenu
khotkeys
proxyscout
solidautoeject
colorcorrectlocationupdater
touchpad
kded_kmixd
statusnotifierwatcher
networkstatus
device_automounter
desktopnotifier


Code: Select all
# systemd-inhibit --list
     Who: PowerDevil (UID 1000/steved, PID 4751/org_kde_powerde)
    What: handle-power-key:handle-suspend-key:handle-hibernate-key:handle-lid-switch
     Why: KDE handles power events
    Mode: block

     Who: NetworkManager (UID 0/root, PID 915/NetworkManager)
    What: sleep
     Why: NetworkManager needs to turn off networks                                                                         
    Mode: delay

     Who: Screen Locker (UID 1000/steved, PID 4677/ksmserver)
    What: sleep
     Why: Ensuring that the screen gets locked before going to sleep
    Mode: delay

     Who: ModemManager (UID 0/root, PID 929/ModemManager)
    What: sleep
     Why: ModemManager needs to reset devices
    Mode: delay

4 inhibitors listed.


Code: Select all
# qdbus org.kde.Solid.PowerManagement /org/freedesktop/PowerManagement Suspend
Could not connect to D-Bus server: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.



And lastly, from journalctl --follow

Code: Select all
Jun 11 14:57:05 localhost.localdomain systemd-logind[927]: Lid closed.
Jun 11 14:57:05 localhost.localdomain org_kde_powerdevil[4751]: powerdevil: Suspend session triggered with QMap(("Explicit", QVariant(bool, true))("Type", QVariant(uint, 1)))
Jun 11 14:57:05 localhost.localdomain org_kde_powerdevil[4751]: powerdevil: Suspend session triggered with QMap(("Explicit", QVariant(bool, true))("SkipFade", QVariant(bool, true))("Type", QVariant(uint, 1)))
Jun 11 14:57:05 localhost.localdomain org_kde_powerdevil[4751]: powerdevil: Starting Login1 suspend job
Jun 11 14:57:05 localhost.localdomain NetworkManager[915]: <info>  [1528747025.6694] manager: sleep requested (sleeping: no  enabled: yes)
Jun 11 14:57:05 localhost.localdomain NetworkManager[915]: <info>  [1528747025.6694] manager: sleeping...
Jun 11 14:57:05 localhost.localdomain NetworkManager[915]: <info>  [1528747025.6695] device (enp0s10): state change: unavailable -> unmanaged (reason 'sleeping', internal state 'managed')
Jun 11 14:57:05 localhost.localdomain org_kde_powerdevil[4751]: powerdevil: Pausing all media players before suspending
Jun 11 14:57:05 localhost.localdomain NetworkManager[915]: <info>  [1528747025.6730] manager: NetworkManager state is now ASLEEP
The dude abides.
User avatar
daniewicz
 
Posts: 153
Joined: Feb 10th, '13, 03:37

Re: laptop will not suspend

Postby doktor5000 » Jun 12th, '18, 00:36

daniewicz wrote:
Code: Select all
$ qdbus org.kde.kded5 /kded loadedModules

powerdevil seems missing there, but from what I read it may not be a kded module anymore, but standalone binary. Best query via
Code: Select all
ps auxwww|grep -v grep|grep -i power

which should also show upower.
And also check in systemsettings under https://userbase.kde.org/System_Setting ... ce_Manager whether power management / powerdevil is shown as running, maybe try stopping and starting it.


daniewicz wrote:
Code: Select all
# qdbus org.kde.Solid.PowerManagement /org/freedesktop/PowerManagement Suspend
Could not connect to D-Bus server: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.


Did you run that as root or regular user? # seems like run as root, where this would be normal. If that is the result as regular user, that's your problem.
Might be a dbus problem, or because powerdevil or whatever it is now is not running, see above.


daniewicz wrote:And lastly, from journalctl --follow
Code: Select all
Jun 11 14:57:05 localhost.localdomain systemd-logind[927]: Lid closed.
Jun 11 14:57:05 localhost.localdomain org_kde_powerdevil[4751]: powerdevil: Suspend session triggered with QMap(("Explicit", QVariant(bool, true))("Type", QVariant(uint, 1)))
Jun 11 14:57:05 localhost.localdomain org_kde_powerdevil[4751]: powerdevil: Suspend session triggered with QMap(("Explicit", QVariant(bool, true))("SkipFade", QVariant(bool, true))("Type", QVariant(uint, 1)))
Jun 11 14:57:05 localhost.localdomain org_kde_powerdevil[4751]: powerdevil: Starting Login1 suspend job
Jun 11 14:57:05 localhost.localdomain NetworkManager[915]: <info>  [1528747025.6694] manager: sleep requested (sleeping: no  enabled: yes)
Jun 11 14:57:05 localhost.localdomain NetworkManager[915]: <info>  [1528747025.6694] manager: sleeping...
Jun 11 14:57:05 localhost.localdomain NetworkManager[915]: <info>  [1528747025.6695] device (enp0s10): state change: unavailable -> unmanaged (reason 'sleeping', internal state 'managed')
Jun 11 14:57:05 localhost.localdomain org_kde_powerdevil[4751]: powerdevil: Pausing all media players before suspending
Jun 11 14:57:05 localhost.localdomain NetworkManager[915]: <info>  [1528747025.6730] manager: NetworkManager state is now ASLEEP


Hmm, powerdevil seems to be doing something ...
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 14355
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: laptop will not suspend

Postby daniewicz » Jun 12th, '18, 20:35

Code: Select all
$ ps auxwww|grep -v grep|grep -i power
root       900  0.0  0.2 293988  8560 ?        Ssl  13:08   0:00 /usr/libexec/upowerd
steved    4834  0.1  1.6 689100 63332 ?        Sl   13:09   0:00 /usr/libexec/org_kde_powerdevil



this was run as root in my previous post
Code: Select all
# qdbus org.kde.Solid.PowerManagement /org/freedesktop/PowerManagement Suspend


I did not see a power management and or powerdevil service under startup services within System Settings
The dude abides.
User avatar
daniewicz
 
Posts: 153
Joined: Feb 10th, '13, 03:37

Re: laptop will not suspend

Postby doktor5000 » Jun 12th, '18, 23:39

daniewicz wrote:this was run as root in my previous post
Code: Select all
# qdbus org.kde.Solid.PowerManagement /org/freedesktop/PowerManagement Suspend


As mentioned, you need to run this as your regular user as it connects to your session dbus.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 14355
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: laptop will not suspend

Postby daniewicz » Jun 13th, '18, 16:14

When this is run as a regular user the laptop suspends correctly and can be awaken with a keystroke.

Code: Select all
qdbus org.kde.Solid.PowerManagement /org/freedesktop/PowerManagement Suspend
The dude abides.
User avatar
daniewicz
 
Posts: 153
Joined: Feb 10th, '13, 03:37

Re: laptop will not suspend

Postby doktor5000 » Jun 13th, '18, 22:58

Then feel free to use that command for a starter on the desktop and use that instead of the one inside the start menu, for the time being.

And you should report that as a bug in our bugzilla, mention that it does not work from start menu, but the mentioned command works, and ask for further instructions how to debug that.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 14355
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: laptop will not suspend

Postby daniewicz » Jun 18th, '18, 17:45

After using the command line to initiate a suspend for a few days, it has become apparent that this approach will not work intermittently. Sometimes this will work properly, other times it will not.
The dude abides.
User avatar
daniewicz
 
Posts: 153
Joined: Feb 10th, '13, 03:37

Re: laptop will not suspend

Postby doktor5000 » Jun 18th, '18, 23:25

And there's no output when it does not work when you run it manually in a terminal?
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 14355
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: laptop will not suspend

Postby daniewicz » Jun 18th, '18, 23:29

None.
The dude abides.
User avatar
daniewicz
 
Posts: 153
Joined: Feb 10th, '13, 03:37

Re: laptop will not suspend

Postby doktor5000 » Jun 19th, '18, 17:50

Then you will need to monitor all dbus messages, via e.g. dbus-monitor
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 14355
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest

cron