View previous topic :: View next topic |
Author |
Message |
imbruxo n00b
Joined: 23 Mar 2024 Posts: 17
|
Posted: Sat Jun 01, 2024 11:15 am Post subject: suspend/hibernate not working and stuck screen openrc/nvidia |
|
|
I have problem that's so weird , I can't suspend my system using (loginctl suspend) and I should use ( echo meme > /sys/power/state as root ) or ( doas s2ram )
my GPU is intel HD 530 + nvidia quardo m5000m
my window manager is DWM with sddm display manager
I am using operc but have systemd-utils with this useflags :
Code: | sys-apps/systemd-utils -boot -secureboot -selinux -kernel-install -test -acl -ukify |
I run xscreensaver + tlp + connman + firewalld
and I installed and added acpid to rc default
my user access groups :
Code: | disk mem wheel audio video usb |
my elogind sleep.conf:
Code: |
[Sleep]
AllowSuspend=yes
#AllowHibernation=yes
#AllowSuspendThenHibernate=yes
#AllowHybridSleep=yes
SuspendMode=deep
SuspendState=mem standby freeze
#HibernateMode=platform shutdown
#HibernateState=disk
#HybridSleepMode=suspend platform shutdown
#HybridSleepState=disk
#HibernateDelaySec=
#SuspendEstimationSec=60min
# elogind additions
AllowPowerOffInterrupts=no
BroadcastPowerOffInterrupts=yes
AllowSuspendInterrupts=no
BroadcastSuspendInterrupts=yes
#SuspendByUsing=
#HibernateByUsing=
HandleNvidiaSleep=yes
|
and my logind config:
Code: |
[Login]
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
#UserStopDelaySec=10
#HandlePowerKey=poweroff
#HandlePowerKeyLongPress=ignore
#HandleRebootKey=reboot
#HandleRebootKeyLongPress=poweroff
#HandleSuspendKey=suspend
#HandleSuspendKeyLongPress=hibernate
#HandleHibernateKey=hibernate
#HandleHibernateKeyLongPress=ignore
HandleLidSwitch=suspend
HandleLidSwitchExternalPower=suspend
HandleLidSwitchDocked=ignore
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes
#RebootKeyIgnoreInhibited=no
#HoldoffTimeoutSec=30s
IdleAction=suspend
IdleActionSec=30min
#RuntimeDirectorySize=10%
#RuntimeDirectoryInodesMax=
#RemoveIPC=yes
#InhibitorsMax=8192
#SessionsMax=8192
#StopIdleSessionSec=infinity
|
my grub config :
https://0x0.st/XN5G.txt
my elogind system sleep script :
Code: |
#!/bin/bash
case $1/$2 in
pre/*)
# Put here any commands expected to be run when suspending or hibernating.
connmanctl disable ethernet
connmanctl disable wifi
rc-service connman stop
modprobe -r e1000e
modprobe -r iwlwifi
;;
post/*)
# Put here any commands expected to be run when resuming from suspension or thawing from hibernation.
modprobe -v e1000e
modprobe -v iwlwifi
rc-service connman start
connmanctl enable ethernet
connmanctl enable wifi
;;
esac
|
my elogind shutdown script:
Code: |
#!/bin/bash
case $1/$2 in
pre/*)
connmanctl disable wifi
connmanctl disable ethernet
modprobe -r e1000e
modprobe -r iwlwifi
;;
post/*)
modprobe iwlwifi
modrpobe e1000e
connmanctl enable wifi
connmanctl enable ethernet
;;
esac
|
my emerge --info:
https://0x0.st/XN5k.bin
my dracut.conf.d/resume.conf is :
Code: |
add_dracutmodules+=" resume "
omit_drivers+=" nvidia nvidia-drm nvidia-modeset nvidia-uvm "
compress="zstd"
hostonly="yes"
|
|
|
Back to top |
|
|
imbruxo n00b
Joined: 23 Mar 2024 Posts: 17
|
Posted: Sat Jun 01, 2024 3:02 pm Post subject: Solution was easy |
|
|
switched from openrc to systemd and everything is working as expected
BTW use systemd , it just works |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 22626
|
Posted: Sat Jun 01, 2024 3:05 pm Post subject: |
|
|
You say that the system cannot be suspended. What happens when you try? Nothing? The system crashes?
Why are you trying to bring down the network before suspending? Most systems handle suspending with the network active. |
|
Back to top |
|
|
imbruxo n00b
Joined: 23 Mar 2024 Posts: 17
|
Posted: Sat Jun 01, 2024 7:51 pm Post subject: |
|
|
Hu wrote: | You say that the system cannot be suspended. What happens when you try? Nothing? The system crashes?
Why are you trying to bring down the network before suspending? Most systems handle suspending with the network active. |
It was just a dark screen that's still on but not showing anything.
I couldn't use the computer because it was stuck on a black screen and I had to do a hard reset to fix it.
I tried really hard and I finally found a way to fix the problem, but it wasn't a standard way. (add [ exec s2ram ] to end of the sleep.sh in elogin script for pre section)
But when I got suspended, I couldn't resume and start system again after suspending.
now I'm not happy that I'm back in systemd. But everything is working like it should.
I wish others don't have this problem, or at least know how to solve it.
I also had this issue on Artix Dinit.
and it's really strange
Thank you for your comment and attention.
fun fact is chances are their is a easy solution that I don't know , BTW .... |
|
Back to top |
|
|
imbruxo n00b
Joined: 23 Mar 2024 Posts: 17
|
Posted: Sat Jun 01, 2024 7:59 pm Post subject: |
|
|
Hu wrote: | You say that the system cannot be suspended. What happens when you try? Nothing? The system crashes?
Why are you trying to bring down the network before suspending? Most systems handle suspending with the network active. |
and about The Network because after suspend in my Previous gentoo install , I could fix suspend problem but my LAN didn't work after suspend even if I would do a rc-service connman restart or what ever
I tried to change my router config or add static ip so it doesn't get wrong ip but mix of static ip and make network down was the valid solution that time
but in this install before I switch to systemd my connman whouldn't enable wifi automatically so I should enable it manually as you see
I had just this 2 problem in my gentoo learning journey |
|
Back to top |
|
|
|