• system won't suspend automatically

    From Eben King@21:1/5 to All on Mon Jun 10 21:10:01 2024
    Hi, I have a Debian 12 (Bookworm?) installation with XFCE as my DE. I have three monitors, the left one is rotated CW so it's tall, and because lightdm can't seem to get that or the monitor positions correct I wrote a script
    that calls xrandr to set things up.

    I thought the errors from the monitor setup script (before I fixed it) were what was keeping the system from suspending. But now I've fixed the errors
    and it still doesn't suspend over night. Suspend works just fine when I go
    to log out and hit the suspend button. I don't see any obvious errors in journalctl. Where can I go to debug suspend? Thanks.

    --
    Thou shalt keep thine tongue prosperous, and thy mind numb. -Lusers 4:9
    And if thy head doth leave thine own arse, thou shalt shove it back in.
    For in such a way does it keep thy minimal knowledge from leaving thine
    own head. -- Lusers 4:10-11 (ItsDragoniteBitches and mephron on Reddit)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Wright@21:1/5 to Eben King on Mon Jun 10 23:00:02 2024
    On Mon 10 Jun 2024 at 15:05:23 (-0400), Eben King wrote:
    Hi, I have a Debian 12 (Bookworm?) installation with XFCE as my DE. I have three monitors, the left one is rotated CW so it's tall, and because lightdm can't seem to get that or the monitor positions correct I wrote a script
    that calls xrandr to set things up.

    I thought the errors from the monitor setup script (before I fixed it) were what was keeping the system from suspending. But now I've fixed the errors and it still doesn't suspend over night. Suspend works just fine when I go to log out and hit the suspend button. I don't see any obvious errors in journalctl. Where can I go to debug suspend? Thanks.

    Does xset -q show you anything like below?

    $ xset -q
    Keyboard Control:
    auto repeat: on key click percent: 0 LED mask: 00000000
    XKB indicators:
    00: Caps Lock: off 01: Num Lock: off 02: Scroll Lock: off
    03: Compose: off 04: Kana: off 05: Sleep: off
    06: Suspend: off 07: Mute: off 08: Misc: off
    09: Mail: off 10: Charging: off 11: Shift Lock: off
    12: Group 2: off 13: Mouse Keys: off
    auto repeat delay: 660 repeat rate: 25
    auto repeating keys: 00ffffffdffffbbf
    fedfffefffedffff
    9fffffffffffffff
    fff7ffffffffffff
    bell percent: 50 bell pitch: 400 bell duration: 100
    Pointer Control:
    acceleration: 2/1 threshold: 4
    Screen Saver:
    prefer blanking: yes allow exposures: yes
    timeout: 1000 cycle: 1000
    Colors:
    default colormap: 0x20 BlackPixel: 0x0 WhitePixel: 0xffffff
    Font Path:
    /usr/share/fonts/X11/misc,/usr/share/fonts/X11/100dpi/:unscaled,/usr/share/fonts/X11/75dpi/:unscaled,/usr/share/fonts/X11/Type1,/usr/share/fonts/X11/100dpi,/usr/share/fonts/X11/75dpi,built-ins
    DPMS (Energy Star):
    Standby: 1000 Suspend: 1000 Off: 1000
    DPMS is Enabled
    Monitor is On
    $

    Thou shalt keep thine tongue prosperous, and thy mind numb. -Lusers 4:9

    Thy tongue.

    Cheers,
    David.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From eben@gmx.us@21:1/5 to David Wright on Mon Jun 10 23:30:01 2024
    On 6/10/24 16:51, David Wright wrote:
    On Mon 10 Jun 2024 at 15:05:23 (-0400), Eben King wrote:
    Hi, I have a Debian 12 (Bookworm?) installation with XFCE as my DE. I have
    three monitors, the left one is rotated CW so it's tall, and because lightdm
    can't seem to get that or the monitor positions correct I wrote a script
    that calls xrandr to set things up.

    I thought the errors from the monitor setup script (before I fixed it) were
    what was keeping the system from suspending. But now I've fixed the errors
    and it still doesn't suspend over night. Suspend works just fine when I go
    to log out and hit the suspend button. I don't see any obvious errors in
    journalctl. Where can I go to debug suspend? Thanks.

    Does xset -q show you anything like below?

    $ xset -q
    Keyboard Control:...


    eben@cerberus:~$ xset -q
    Keyboard Control:
    auto repeat: on key click percent: 0 LED mask: 00002002
    XKB indicators:
    00: Caps Lock: off 01: Num Lock: on 02: Scroll Lock: off
    03: Compose: off 04: Kana: off 05: Sleep: off
    06: Suspend: off 07: Mute: off 08: Misc: off
    09: Mail: off 10: Charging: off 11: Shift Lock: off
    12: Group 2: off 13: Mouse Keys: on
    auto repeat delay: 500 repeat rate: 20
    auto repeating keys: 00ffffffdffffbbf
    fadfffefffedffff
    9fffffffffffffff
    fff7ffffffffffff
    bell percent: 50 bell pitch: 400 bell duration: 100
    Pointer Control:
    acceleration: 2/1 threshold: 4
    Screen Saver:
    prefer blanking: yes allow exposures: yes
    timeout: 0 cycle: 600
    Colors:
    default colormap: 0x20 BlackPixel: 0x0 WhitePixel: 0xffffff
    Font Path:

    /usr/share/fonts/X11/misc,/usr/share/fonts/X11/100dpi/:unscaled,/usr/share/fonts/X11/75dpi/:unscaled,/usr/share/fonts/X11/Type1,/usr/share/fonts/X11/100dpi,/usr/share/fonts/X11/75dpi,built-ins
    DPMS (Energy Star):
    Standby: 1200 Suspend: 0 Off: 1800
    DPMS is Enabled
    Monitor is On

    Like that, yes. What am I looking for? The DPMS stuff is just for
    monitors, correct?

    Thou shalt keep thine tongue prosperous, and thy mind numb. -Lusers 4:9

    Thy tongue.

    This is correct. I'll change it, and note the change.

    Dang, it's too easy to just do ^R and not hit "reply list". Maybe there's a key command. I'll look into that.

    --
    "The reason that the American Army does so well, is that war is chaos,
    and the American Army practices chaos on a daily basis."
    -Nazi German Officer

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ralph Katz@21:1/5 to Eben King on Tue Jun 11 03:30:02 2024
    On 6/10/24 13:05, Eben King wrote:
    Hi, I have a Debian 12 (Bookworm?) installation with XFCE as my DE.
    [...]
    and it still doesn't suspend over night.  Suspend works just fine when I go to log out and hit the suspend button.   I don't see any obvious errors in journalctl.  Where can I go to debug suspend?  Thanks.

    I also have bookworm, XFCE and a suspend issue. Dell laptop suspends on
    lid close, but with an attached monitor, it does not suspend on lid close.

    As a workaround, I use a keyboard shortcut to suspend. Closing then
    opening the lid wakes it up.

    I'm eager to see how you resolve this. If you file a bug, please post
    the number so I can add my case.

    Regards,
    Ralph

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Wright@21:1/5 to All on Tue Jun 11 06:00:01 2024
    Entire attribution and quote removed to avoid the mailing list
    treating this post as spam.

    Yes, but I don't know enough about modern monitor connections to know
    whether the monitor being on will inhibit the system from suspending.

    The docs for XFCE talk about preventing inconsistent configuration
    timings of the several modes, but I don't know (not using XFCE)
    how far this is carried between display management and system power
    management, or between the kernel's, X's, and XFCE's controls.

    Sorry not to be more help.

    Cheers,
    David.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From eben@gmx.us@21:1/5 to Ralph Katz on Tue Jun 11 16:50:01 2024
    On 6/10/24 21:11, Ralph Katz wrote:
    On 6/10/24 13:05, Eben King wrote:
    Hi, I have a Debian 12 (Bookworm?) installation with XFCE as my DE.
    [...]
    and it still doesn't suspend over night.  Suspend works just fine when I go >> to log out and hit the suspend button.   I don't see any obvious errors in >> journalctl.  Where can I go to debug suspend?  Thanks.

    I also have bookworm, XFCE and a suspend issue.  Dell laptop suspends on lid close, but with an attached monitor, it does not suspend on lid close.

    As a workaround, I use a keyboard shortcut to suspend.  Closing then opening the lid wakes it up.

    I'm eager to see how you resolve this.  If you file a bug, please post the number so I can add my case.

    Well, that is not encouraging. Does anyone know how to get the monitor
    state programmatically? I'll write my own script based on that. DFMS
    works. I mean if the computer won't do it for you, roll your own.

    --
    The best answer when anybody asks you
    if you're any good with explosives
    is to hold up two open hands
    and simply say "Ten". -- Anthony DeBoer on ASR

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Charles Curley@21:1/5 to eben@gmx.us on Tue Jun 11 18:40:01 2024
    On Tue, 11 Jun 2024 10:44:12 -0400
    eben@gmx.us wrote:

    Well, that is not encouraging. Does anyone know how to get the
    monitor state programmatically? I'll write my own script based on
    that. DFMS works. I mean if the computer won't do it for you, roll
    your own.

    Install arandr, use it to set things up the way you want them. Then
    have it emit a suitable script. Call that from XFCE's session manager
    on startup.

    --
    Does anybody read signatures any more?

    https://charlescurley.com
    https://charlescurley.com/blog/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From eben@gmx.us@21:1/5 to Max Nikulin on Tue Jun 11 19:00:02 2024
    On 6/11/24 12:27, Max Nikulin wrote:
    On 11/06/2024 21:44, eben@gmx.us wrote:
    Does anyone know how to get the monitor
    state programmatically?

    ddccontrol

    Thanks.

    However I am lost if you need to put your monitor to standby state (or to turn it off) or you expect suspend to RAM after some period of inactivity or when lid is closed. In the latter case check power and display settings in your DE configuration.

    I'll probably watch ddcontrol, and if the monitors go into <some state> and stay there for 30m or an hour, suspend. Maybe even have it
    user-configurable if I feel frisky. Maybe even do what it's _supposed_ to
    do, but you gotta pay extra for that.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From eben@gmx.us@21:1/5 to Charles Curley on Tue Jun 11 19:10:01 2024
    On 6/11/24 12:37, Charles Curley wrote:
    On Tue, 11 Jun 2024 10:44:12 -0400
    eben@gmx.us wrote:

    Well, that is not encouraging. Does anyone know how to get the
    monitor state programmatically? I'll write my own script based on
    that. DFMS works. I mean if the computer won't do it for you, roll
    your own.

    Install arandr, use it to set things up the way you want them. Then
    have it emit a suitable script.

    OK, no problem. The script I wrote uses xrandr to do that exact thing.

    Call that from XFCE's session manager on startup.

    How exactly do I do that, and why would it re-enable suspension?

    --
    "Cheating is the gift man gives himself." - Mr. Burns, The Simpsons.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From eben@gmx.us@21:1/5 to eben@gmx.us on Thu Jun 13 16:50:01 2024
    On 6/11/24 12:54, eben@gmx.us wrote:
    On 6/11/24 12:27, Max Nikulin wrote:
    On 11/06/2024 21:44, eben@gmx.us wrote:
    Does anyone know how to get the monitor
    state programmatically?

    ddccontrol

    Thanks.

    However I am lost if you need to put your monitor to standby state (or to
    turn it off) or you expect suspend to RAM after some period of inactivity or >> when lid is closed. In the latter case check power and display settings in >> your DE configuration.

    I'll probably watch ddcontrol, and if the monitors go into <some state> and stay there for 30m or an hour, suspend.

    Well that's a no-go, because when you de-power the monitors, ddccontrol
    gives you no info about what sleep state they're in. Reasonable, I guess.

    So I'm back to doing it manually, until I figure out what's wrong.

    Something came to mind: A while back when automatic suspension worked, I got
    an error that it failed because the swap partition ran out of room. I guess
    it was doing hybrid sleep and there was too much stuff in swap already? The old partition was the same size as RAM, and the new one is 1.5x. I did
    these steps to upgrade:

    Make a new swap partition
    swapon the new one
    swapoff the old one
    remove the old swap partition

    There wasn't room on the hard drive to just enlarge the old one without spending a lot of time moving partitions around. Some time then or after, automatic suspension stopped working. Do I have to tell something the UUID
    of the new swap partition, or does it figure it out?

    --
    Information is more dangerous than cannon to a society ruled by lies.
    --James M Dakin (from RT, S)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From eben@gmx.us@21:1/5 to Max Nikulin on Thu Jun 13 18:30:01 2024
    On 6/13/24 11:52, Max Nikulin wrote:
    On 13/06/2024 21:44, eben@gmx.us wrote:

    Well that's a no-go, because when you de-power the monitors,
    ddccontrol gives you no info about what sleep state they're in.
    Reasonable, I guess.

    Perhaps there is a command to put the monitor in standby state instead of power off. Maybe it is possible detect switched off state by reading some file in /sys.

    You still mix monitor and system issues. E.g. a media player may inhibit
    power saving for monitors. I have seen that sometimes suspend to disk (hibernate) is blocked, but I do not know details.

    It's blocked by something, to be sure. I don't think it's a failing monitor config script, since it doesn't get errors any more.

    An obvious reason is full swap, so RAM can not be saved there. Perhaps suspend to RAM may be blocked as well.

    Swap is nearly empty, all the time. Right now, for example:

    eben@cerberus:~$ free
    total used free shared buff/cache available
    Mem: 32294664 26585308 3050572 5360560 8486244 5709356
    Swap: 0 0 0

    eben@cerberus:~$ uptime
    12:14:13 up 4 days, 22:00, 2 users, load average: 1.14, 1.19, 1.34

    So it's not a "just booted" situation.

    Do I have to tell something the UUID of the new swap partition, or does
    it figure it out?

    Update grub and initramfs configuration.

    Right, I found this page

    https://wiki.debian.org/Hibernation#Changing_or_moving_the_swap_partition

    edited /etc/initramfs-tools/conf.d/resume to say

    RESUME=PARTLABEL=swap

    and ran "sudo update-initramfs -u". It exited successfully, with no errors
    or warnings. That won't take effect until I boot on Saturday, and I won't
    know if it worked until Sunday morning. If I change my swap partition
    again, I'll also name the new one "swap" so this might keep working.


    --
    Actually, we have scientifically determined
    that Heisenberg did indeed sleep exactly here.
    However, we have no idea whatsoever just how fast asleep he was.
    -- Dave Aronson on ASR

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From eben@gmx.us@21:1/5 to David Wright on Thu Jun 13 22:10:01 2024
    On 6/13/24 13:30, David Wright wrote:
    Swap: 0 0 0

    You have no swap.

    Well, that's another good reason it won't work.

    1. Fix /etc/fstab so it has
    PARTLABEL=swap none swap sw 0
    0

    2. Run "sudo swapon PARTLABEL=swap"

    3.eben@cerberus:~$ free
    total used free shared buff/cache available Mem: 32294664 27093456 2039172 5259032 8887968 52012 Swap: 50331644 0 50331644

    Thanks.

    --
    They that can give up essential liberty to
    obtain a little temporary safety deserve
    neither liberty nor safety. -- Ben Franklin

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Wright@21:1/5 to All on Thu Jun 13 22:00:01 2024
    Swap: 0 0 0

    You have no swap.

    Cheers,
    David.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)