helloSystem / hello

Desktop system for creators with a focus on simplicity, elegance, and usability. Based on FreeBSD. Less, but better!
2.31k stars 57 forks source link

Integrate zzz, xscreensaver and rc.suspend #170

Open antranigv opened 3 years ago

antranigv commented 3 years ago

I just installed helloSystem on a real hardware, finally, so expect a lot of bug reports in the coming days :P

Hardware: Lenovo ThinkPad T480s

I did sudo zzz in the terminal, and it all worked fine. So a proper way to get this integrated is the following.

1) Add a "suspend/sleep" button in the power options (which, btw, the menu makes no sense, since selecting Shut Down / Restart / Log Out brings the same dialog) 2) When the hardware is about to suspend, FreeBSD runs /etc/rc.suspend, we can add xscreensaver-command -lock in there, so it locks the screen and sleeps 3) The hardware is back on! now there's a screensaver, very good security feature!

I can see that hw.acpi.lid_switch_state is set to S3 already, so it will work with the lid as well!

probonopd commented 3 years ago

Add a "suspend/sleep" button in the power options (which, btw, the menu makes no sense, since selecting Shut Down / Restart / Log Out brings the same dialog)

Do we really need this if closing the lid works?

When the hardware is about to suspend, FreeBSD runs /etc/rc.suspend, we can add xscreensaver-command -lock in there, so it locks the screen and sleeps

FreeBSD doesn't do that automatically when hw.acpi.lid_switch_state is set to S3? How can we tell the system to run /etc/rc.suspend when the lid is closed?

kettle-7 commented 3 years ago

FreeBSD doesn't do that automatically when hw.acpi.lid_switch_state is set to S3?

It does for me.

My computer can suspend perfectly fine, but on FreeBSD and FreeBSD only, when it wakes up, the screen stays off. Switching vt, pushing keys, closing the lid and opening it again, all does nothing. The screen stays black. But printf "\a" makes sound, and sudo reboot restarts the computer.

Another FreeBSD ticket?

probonopd commented 3 years ago

FreeBSD doesn't do that automatically when hw.acpi.lid_switch_state is set to S3?

It does for me.

So, if FreeBSD works as it should. then closing the lid would do the right thing. No need for zzz, correct?

My computer can suspend perfectly fine, but on FreeBSD and FreeBSD only, when it wakes up, the screen stays off.

If you can reproduce this outside of helloSystem (e.g., with "naked" FreeBSD, GhostBSD, NomadBSD, etc.), then I'd kindly ask you to open a ticket with details regarding your hardware (or a ilnk to a Hardware Probe) at https://bugs.freebsd.org/. Thanks!

kettle-7 commented 3 years ago

My computer can suspend perfectly fine, but on FreeBSD and FreeBSD only, when it wakes up, the screen stays off.

Loading the radeonkms driver did it.

kettle-7 commented 3 years ago

Okay, how did it take me this long to figure it out?

The radeonkms driver not only lets my computer suspend properly, but also fixes a broken battery status icon in KDE Plasma and lets me change the display brightness!

probonopd commented 3 years ago

Does the radeonkms driver get loaded automatically when you run the helloSystem Live ISO and/or installed system?

kettle-7 commented 3 years ago

No. I added it to my display manager.

louies0623 commented 1 year ago

Do we really need this if closing the lid works?

It will be needed, because the screen of the desktop computer is just collapsed on the table, and there is no function of sleep and lock screen.

louies0623 commented 1 year ago