Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Questions on Suspend / Resume
View unanswered posts
View posts from last 24 hours

Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message

Joined: 23 May 2006
Posts: 1150

PostPosted: Mon Jan 02, 2017 4:56 pm    Post subject: Questions on Suspend / Resume Reply with quote

I am using stable kde-plasma and as suspend was fixed, I tried it out and it works out of the box.

I have two questions about it:

I realized that there is no sound after resume, so I checked and alsasound service was is stopped and aparently not needed on a normal boot, I guess udev and/or pulseaudio handles sound? So starting alsasound and unmuting soundcard worked. But after resume again no sound, until I stopped alsasound and restarted the service. Is this normal behaviour, and how can I solve this in order to have sound activated on a resumed session?

After a resume I have a locked screen. I do have autologin activated while booting as this is my personal workstation with no other having physical access to it, so I do not want to have to type login password after resume, thats why I would like to know, if I can configure resume to be unlocked and not asking for password.

thanks in advance for your helpful answers.

emerge --info:
Portage 2.3.0 (python 3.4.5-final-0, default/linux/amd64/13.0/desktop/plasma, gcc-4.9.4, glibc-2.22-r4, 4.9.0-gentoo x86_64)
System uname: Linux-4.9.0-gentoo-x86_64-Intel-R-_Core-TM-2_Duo_CPU_E8500_@_3.16GHz-with-gentoo-2.3
KiB Swap:    9767516 total,   9767516 free
Timestamp of repository gentoo: Mon, 02 Jan 2017 12:00:01 +0000
sh bash 4.3_p48-r1
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
app-shells/bash:          4.3_p48-r1::gentoo
dev-lang/perl:            5.22.3_rc4::gentoo
dev-lang/python:          2.7.12::gentoo, 3.4.5::gentoo
dev-util/cmake:           3.6.3::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.22.4::gentoo
sys-apps/sandbox:         2.10-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo                                                                 
sys-devel/automake:       1.11.6-r1::gentoo, 1.12.6::gentoo, 1.14.1::gentoo, 1.15::gentoo                           
sys-devel/binutils:       2.25.1-r1::gentoo                                                                         
sys-devel/gcc:            4.9.4::gentoo                                                                             
sys-devel/gcc-config:     1.7.3::gentoo                                                                             
sys-devel/libtool:        2.4.6-r2::gentoo                                                                           
sys-devel/make:           4.1-r1::gentoo                                                                             
sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers)                                                           
sys-libs/glibc:           2.22-r4::gentoo                                                                           
    location: /usr/portage                                                                                           
    sync-type: rsync
    sync-uri: rsync://
    priority: -1000

    location: /usr/local/portage
    masters: gentoo
    priority: 0

CFLAGS="-march=native -O2 -pipe"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs candy clean-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
USE="X a52 aac acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cups cxx d3d9 dbus declarative dri dri3 dts dvd dvdr emboss encode exif fam ffmpeg firefox flac fortran frei0r gdbm gif glamor gnutls gpm gtk hpcups iconv icu ipv6 jpeg kde kipi lcms ldap libnotify llvm lm_sensors mad mmx mmxext mng modules mp3 mp4 mpeg multilib ncurses nls nptl ocr ogg openal opencl opengl openmax openmp osmesa pam pango pcre pdf phonon plasma png policykit ppds pulseaudio qml qt3support qt4 qt5 readline realtime s3tc scanner sdl seccomp semantic-desktop session spell spice sse sse2 sse3 ssh ssl ssse3 staging startup-notification svg tcpd theora tiff truetype udev udisks unicode upower usb uxa vaapi vdpau vhost-net vorbis vpx webrtc-aec widgets wxwidgets x264 xattr xcb xcomposite xinerama xml xscreensaver xv xvid zlib" ABI_X86="64 32" ALSA_CARDS="hda-intel" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext smp sse sse2 sse3 sse4_1 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev" KERNEL="linux" L10N="de el en fr it tr" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="de de_DE el en fr fr_FR it tr" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby21" SANE_BACKENDS="pixma" USERLAND="GNU" VIDEO_CARDS="amdgpu radeon radeonsi intel i965" XFCE_PLUGINS="clock power multiload-nandhp trash" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Back to top
View user's profile Send private message

Joined: 22 May 2004
Posts: 593
Location: Arlington, TX, US

PostPosted: Mon Jan 02, 2017 5:42 pm    Post subject: Reply with quote

Under System Settings->Desktop Behavior->Screen Locking, there is a "Lock screen resume" checkbox. Is that checked?
Back to top
View user's profile Send private message

Joined: 23 May 2006
Posts: 1150

PostPosted: Mon Jan 02, 2017 6:16 pm    Post subject: Reply with quote

Thanks Section_8. Yes, it was checked, and unchecking did what it is supposed to do and system resumes now into non-locked session, so 2nd question is solved. Thank you :)

I am looking forward to get information on the sound related first question.

Once again, I love this forum and it's great support of a great distro that gentoo is!!!
Back to top
View user's profile Send private message

Joined: 23 May 2006
Posts: 1150

PostPosted: Tue Jan 03, 2017 3:19 pm    Post subject: Reply with quote

According to
pasuspender /bin/true
after a resumed session brings sound back. Tested it and it's true
/etc/init.d/alsasound start
works too, but how can I automate the execution of one of the above automatically after a resumed session from suspend to disk/ram? And which solution of the above is better? Or is there a bether way to fix this?
Back to top
View user's profile Send private message

Joined: 23 May 2006
Posts: 1150

PostPosted: Fri Jan 06, 2017 9:15 am    Post subject: Reply with quote

Back to top
View user's profile Send private message

Joined: 30 Aug 2008
Posts: 1877
Location: United Kingdom

PostPosted: Fri Jan 06, 2017 9:30 am    Post subject: Reply with quote

You could create a Bash script /etc/pm/sleep.d/10-hooks along the following lines:

export XAUTHORITY="$userhome/.Xauthority"
export DISPLAY=":0"
case "$1" in
        # Put in here any command you want to run before suspending or hibernating.
        # Put in here any command you want to run when returning from suspension or hibernation.
        exit $NA

Clevo W230SS: amd64 nvidia-drivers & xf86-video-intel.
Compal NBLB2: ~amd64 xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC eudev elogind & KDE on both.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum