Hidden "Suspend" option in Logout Dialog

Moderator: Forum moderators

Post Reply
User avatar
MochiMoppel
Posts: 1229
Joined: Mon Jun 15, 2020 6:25 am
Location: Japan
Has thanked: 21 times
Been thanked: 436 times

Hidden "Suspend" option in Logout Dialog

Post by MochiMoppel »

I always wondered why Puppy's logout dialog offers "Shut down" and "Reboot" and who-knows-what, but never a "Suspend" option.

I use my own logout dialog (with suspend as default), so I never noticed that BW64 10.0.7 comes with 2 different logout dialogs, and one of them even offers "Suspend", but this option is hidden by default. Why is that, and why the inconsistent dialogs?

The newer (?) dialog (left in screenshot) can be accessed via the main menu's "Leave" item. IMHO a much better name than the "Log out" used by the secondary menu, accessible on the right side of the clock. Both feature some options which have nothing to do with logout, but only the secondary menu features a "Suspend" option, hidden by default and only activated after a visit to the "Preferences" menu.

I tried "Suspend" and it works. I therefore suggest to include it in the "Leave" menu - where it belongs.

leave-logout.jpg
leave-logout.jpg (80.59 KiB) Viewed 488 times
User avatar
rockedge
Site Admin
Posts: 6521
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2727 times
Been thanked: 2614 times
Contact:

Re: Hidden "Suspend" option in Logout Dialog

Post by rockedge »

logout dialog offers "Shut down" and "Reboot" and who-knows-what

I use restart window manager a lot while working on JWM configuration. No idea why there is a red question mark....

User avatar
Marv
Posts: 447
Joined: Fri Dec 20, 2019 3:09 am
Has thanked: 209 times
Been thanked: 120 times

Re: Hidden "Suspend" option in Logout Dialog

Post by Marv »

rockedge wrote: Fri Sep 13, 2024 2:40 pm

logout dialog offers "Shut down" and "Reboot" and who-knows-what

I use restart window manager a lot while working on JWM configuration. No idea why there is a red question mark....

I also use restart WM a lot also when honing the desktop, both in JWM and LXDE and in all my pups, never had it fail. If it weren't there I'd have to patch it back in.

Suspend is a lot more hardware dependent in my experience and I can see some justification for not exposing it up front there. Lord knows, lidsuspend has generated at least its' share of questions and hair-pulling over the decades.

My pups: LxPupSc64 and Voidpup64 with LXDE ydrv & synaptics touchpad drivers, both using savefiles. Ydrv based NoblePup64 (JWM & LXDE), Bookworm64 & Fossapup64-small (LXDE/PCManFM). No savefiles, no fdrvs there. :thumbup:

radky
Posts: 355
Joined: Fri May 28, 2021 2:14 am
Has thanked: 41 times
Been thanked: 320 times

Re: Hidden "Suspend" option in Logout Dialog

Post by radky »

@MochiMoppel

The Woof-CE Puppy logout dialog (usr/sbin/logout_gui) first appeared in 2013 with the following basic functions for the JWM desktop:

logout (wmexit)
reboot (wmreboot)
poweroff (wmpoweroff)
restartx (restartwm)
refresh (fixmenus)

The above logout_gui is the standard Woof-CE iteration that now appears as the 'Leave' option in the Puppy menu. It is the default shutdown option provided by the jwmconig/ptheme desktop of Woof-CE (for example, Peebee's JWM Pups), and recent iterations also support the desktops of lxpanel/openbox and/or modern dwl/labwc.

In BW64, desktop management is provided by JWMdesk (rather than jwmconfing/ptheme) and this desktop manager provides the alternate (optional) logout_gui which supports JWM only. The original logout_gui is still available in the main menu for those who prefer it, and it remains available as a shutdown dialog even if the user disables the alternate gui or perhaps removes JWMdesk and installs an alternate desktop environment such as lxpanel/openbox.

The JWMdesk logout gui provides additional functions the user may find useful when preparing for shutdown -- such as the option to create a backup of current session files before poweroff, plus an option to suspend the desktop. These supplemental options are included in the logout gui for convenience, rather than requiring the user to search elsewhere in the main menu or in other configuration dialogs.

Since suspend to RAM does not work for all kernels or hardware variations, this 'logout' button is available only if the user enables the suspend option in the Preferences menu.

The JWMdesk logout gui is also optional -- simply go to Preferences and enable (show) or disable (hide). The user has full control to show or not show the optional JWMdesk logout gui.

The 'Restart JWM' and 'Rebuild menu' buttons of the JWMdesk logout gui are not 'shutdown' options but are provided for user convenience in JWMdesk and in the legacy Woof-CE logout gui. If you wish, these buttons are easily edited or removed from the gui script.

The 'Rebuild menu' button of the JWmdesk logout gui calls fixmenus and jwm -reload. In older Pups this options updates the jwm menu after the user installs new applications or manually modifies the menu .desktop files. Granted, the most recent Pups such as BW64 include a fixmenusd daemon which automatically runs the fixmenu function when .desktop files are modified. However, the 'Rebuild menu' button remains as an on-demand option in the JWMdesk logout gui to support Pups which do not automatically run fixmenus.

User avatar
mikewalsh
Moderator
Posts: 6139
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 787 times
Been thanked: 1970 times

Re: Hidden "Suspend" option in Logout Dialog

Post by mikewalsh »

For quite some time, I'd been using the 'standard' Log-out GUI, modified by replacing 'Rebuild menus' by the 'Suspend' option - modifying the /usr/sbin/logout_gui appropriately:-

Image

With which I was happy for a long while; suspend is a 'must' for me, since a carer's workload is very variable.....it was more convenient to suspend frequently during the day than it was to keep powering-down & up again (and less strain on components, too).

I came across a beautiful alternative from josejp2424's 'Busterpup64' a few years ago. Jose had completely rebuilt his logout GUI from scratch, in a horizontal row rather than a grid. It also has a 60-second count-down 'timeout' bar along the top; this powers-down automatically if nothing else is selected. I've been using it ever since, modifying with some of my own required alternatives, in every Pup in the kennels. It looked better, too, since the switch to this HP desktop at the beginning of the pandemic - plus moving to a 16:9 display - meant two things; it fitted the screen better, and it meant I could use larger icons without things looking silly.

Image

I also have my 'mini-logout GUI' that I put together; this largely repeats much of the main logout GUI, although the 'RestartJWM' button re-loads a 'default' back-up copy of .jwmrc-tray instead of a pure restart of the existing configuration. This gets loaded at boot, so it never changes; if I want to modify/make changes, I go into /mnt/home and make the changes to the backup .jwmrc-tray that lives here, instead of /root/.jwmrc-tray:-

Image

The icon for this lives at the far right of the bottom tray, beyond the clock. I still HAVE 'Rebuild menus', and this is where that option now resides.

======================================

Ozsouth and I did find, when I switched one or two occupants of the kennels to one of his 6-series kernels, that although the rig would happily suspend, it would no longer recover the desktop correctly. Everything HAD 'resumed', but there was just a blank, black screen. Nothing would recover it, and we TRIED, believe me.

After some intense head-scratching, Oz came up with a wee script that lives in /root/Startup, and which has fixed the suspend routine, directly addressing one of the kernel's XHCI power-handling routines. This is on an Intel-powered HP midi-tower Pavilion desktop rig.......using the 8th- OR 9th-gen (never sure which) 'Coffee Lake' Core architecture. I'm attaching it below in case anyone else has the same suspend issues with similar hardware.

Remove the fake '.gz' and ensure it's executable.

Mike. ;)

Attachments
makesuspxhc.gz
Script to help with 'resume after suspend' for Intel-powered 8th/9th-gen Core CPUs running a 6-series kernel...
(192 Bytes) Downloaded 8 times
User avatar
MochiMoppel
Posts: 1229
Joined: Mon Jun 15, 2020 6:25 am
Location: Japan
Has thanked: 21 times
Been thanked: 436 times

Re: Hidden "Suspend" option in Logout Dialog

Post by MochiMoppel »

rockedge wrote: Fri Sep 13, 2024 2:40 pm

I use restart window manager a lot while working on JWM configuration. No idea why there is a red question mark....

...because "Restart window manager" doesn't restart the window manager. It simply causes the wm to redraw/refresh the desktop. The wm keeps running, as all other applications. No logout of anything. IMO it doesn't fit into the kind of actions that one would associate with "Logout" or "Leave".

Marv wrote: Fri Sep 13, 2024 4:29 pm

Suspend is a lot more hardware dependent in my experience and I can see some justification for not exposing it up front there.

Sure, suspend is always iffy and needs the right combination of HW and kernel, but unless it's presented by default users wouldn't know that it exists. I think it would be much better to give the user an option to hide the icon if it turns out that suspend doesn't work as expected, i.e. an opt-out instead of an opt-in. The argument for hiding the Suspend icon by default is inconsistent because the suspend.sh script runs by default when closing the lid or pressing the power button with the same chance of success or failure. AFAIK there is no GUI to prevent this.

User avatar
rockedge
Site Admin
Posts: 6521
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2727 times
Been thanked: 2614 times
Contact:

Re: Hidden "Suspend" option in Logout Dialog

Post by rockedge »

.....because "Restart window manager" doesn't restart the window manager.

On my systems I can adjust the logout_gui to use

Code: Select all

jwm -reload

which does not stop and start JWM but reloads the configuration file(s) on the fly.

or this command which does stop JWM completely and restarts the window manager thereby reloading the configuration in the process:

Code: Select all

jwm -restart

Depending on the configuration intensity I can use the appropriate command.

Post Reply

Return to “BookwormPup”