You are not logged in.
Hi all.
I've read (and sometimes wrote) several things.
I'm here to try to improve suspend issue with Nvidia (no wake up after suspend).
My solution (as for many others) is to use:
sudo pm-suspend
I've add a file in sudoers.d/, so this command don't need password any more. So I can make a button with it, good.
And now the question is: how to put pm-suspend by default in my system (ubuntu20.04) for any suspend request?
I don't thinks it's possible like this.
So I change it to : "how to customize suspend command in xfce4-session-logout?"
I know I can remove action in it with xfconf-query, also ToZ said you can't add an action in xfce4-session-logout without hardcode.
(is it me or is their many questions about this button?)
Ok.
But what about modify?
I guess it's the same but I ask anyway.
I consider this as last solution, if no other way:
For now, I've hide suspend in xfce4-session-logout (so no more accidental buggy suspend), and add a button to whiskermenu, by editing manually ~/.config/xfce4/panel/whiskermenu-1.rc, set show-command-suspend= to true
and modify the suspend command like this: command-suspend=sudo pm-suspend.
PHEW!
Am I to old or is this quite challenging? See this option waiting for me in ~/.config/xfce4/panel/whiskermenu-1.rc leave me with a strange filling: am I missing something? Why can't we do this with menu-editor?
Offline
Assuming you are running a systemd system, it looks like xfce4-session will use systemd to suspend. Can you check the suspend states that your computer supports:
cat /sys/power/state
Based on what I've read, I believe those are run in the order they are listed. Mine shows "freeze mem disk". It looks like pm-suspend uses "mem" - see: https://cgit.freedesktop.org/pm-utils/t … ns.in#n294.
On a hunch. can you edit /etc/systemd/sleep.conf, uncomment SuspendMode and set it mem?
SuspendMode=mem
You may need to restart to test.
For now, I've hide suspend in xfce4-session-logout (so no more accidental buggy suspend), and add a button to whiskermenu, by editing manually ~/.config/xfce4/panel/whiskermenu-1.rc, set show-command-suspend= to true
and modify the suspend command like this: command-suspend=sudo pm-suspend.PHEW! yikes
Am I to old or is this quite challenging? See this option waiting for me in ~/.config/xfce4/panel/whiskermenu-1.rc leave me with a strange filling: am I missing something? Why can't we do this with menu-editor?
You should do this from whiskermenu's Properties > Commands tab. The rc file will get overwritten with the settings there.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Very interesting, thanks!
My outputs:
:~$ cat /sys/power/state
freeze standby mem disk
:~$ sudo nano /etc/systemd/sleep.conf
(...)
[Sleep]
#AllowSuspend=yes
#AllowHibernation=yes
#AllowSuspendThenHibernate=yes
#AllowHybridSleep=yes
#SuspendMode=
#SuspendState=mem standby freeze
#HibernateMode=platform shutdown
#HibernateState=disk
#HybridSleepMode=suspend platform shutdown
#HybridSleepState=disk
#HibernateDelaySec=180min
So I change #SuspendMode= to SuspendMode=mem
Have to test now.
Damn, so simple...
You should do this from whiskermenu's Properties > Commands tab
I don't understand. Are you talking about MenuLibre (menu-editor)?
Offline
You should do this from whiskermenu's Properties > Commands tab
I don't understand. Are you talking about MenuLibre (menu-editor)?
What I mean is, that if you want to change the command that is being run by the Whiskermenu suspend button, right-click the Whiskermenu and choose "Properties". Then on the Commands tab, you can specify which command to run when clicking on the Suspend button.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
right-click the Whiskermenu
Ow! s**t! right-click the Whiskermenu... arrh
You just kill me... but thank you, I was missing something.
Big thanks!
Last edited by Ha! (2022-12-20 13:17:01)
Offline
I'm curious, did the change to sleep.conf solve the suspend issue for you?
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Mee too!
But I can't test: I don't have suspend option in xfce4-session-logout anymore!
I did:
:~$ xfconf-query -c xfce4-session -np '/shutdown/ShowSuspend' -t 'bool' -s 'true'
But don't comeback.
Maybe because of the change to sleep.conf?
Offline
Maybe because of the change to sleep.conf?
That's it.
Comment the #SuspendMode=mem mediately give suspend option back in logout menu.
Offline
I know I can remove action in it with xfconf-query, also ToZ said you can't add an action in xfce4-session-logout without hardcode.
(is it me or is their many questions about this button?)
Ok.
But what about modify?
So, no way to modify?
Offline
Interesting. In that same file, try uncommenting instead the SuspendState line and try each successive option in turn (mem, freeze, standby) to see if either of them work.
I don't see an option in xfce4-session to bypass systemd and use pm-suspend - I'm wondering if we can adjust systemd to use another suspend mode/state.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Leaving SuspendMode= like this (emtpy and uncommented) also make suspend option back.
I'll try what you suggest.
Offline
[ Generated in 0.015 seconds, 8 queries executed - Memory usage: 586.15 KiB (Peak: 602.99 KiB) ]