Question about shutdown and sleep. reddit / freebsd ---------------------------------------------------------------------- [deleted] · 2021-08-20 09:14 [deleted] ---------------------------------------------------------------------- -kilix- · 2021-08-20 10:13 according to man page ^(Calling \`\`poweroff'' is equivalent to running:) ^(shutdown -p now) ---------------------------------------------------------------------- [deleted] · 2021-08-20 10:27 Ohh cool. The power button does the same thing right? And how do I put my system to sleep? ---------------------------------------------------------------------- FUZxxl · 2021-08-20 10:59 `zzz` is correct. If the system doesn't wake back up, there's something wrong. Consider reading man pages and the FreeBSD handbook. They explain everything. You should do this before asking any questions as it saves all of us (including you!) a lot of time. ---------------------------------------------------------------------- [deleted] · 2021-08-20 12:09 I am sorry. May I ask which browser do you recommend? I am using firefox and it sorta hangs (idk if thats the correct word) for half a second after like every 15 seconds. doesn't matter if I am typing or watching video on youtube. Is this normal? Edit: not hangs exactly but sorta "skips". hard to explain. ---------------------------------------------------------------------- FUZxxl · 2021-08-20 14:47 I usually use Chrome. Firefox hanging could perhaps be a graphics driver issue. ---------------------------------------------------------------------- nabucosound · 2021-08-20 14:58 If it "hangs" it might be what is called "micro stutter", try adding this on your `/etc/sysctl.conf`: kern.sched.steal_thresh=1 ---------------------------------------------------------------------- [deleted] · 2021-08-20 15:49 sysctl kern.sched.steal\_thresh=1 worked! I guess this is temporary and i need to save it as you have answered above. Thanks a lot! ---------------------------------------------------------------------- grahamperrin · 2021-08-20 16:25 You can configure the computer to do a variety of things when the power button is pressed. Edit: `/etc/sysctl.conf` I have: `hw.acpi.power_button_state="S3"` S3 is explained in the manual page for **acpiconf(8)** ---------------------------------------------------------------------- Tj_h__ · 2021-08-20 16:26 HAH i did not know about the `zzz` command that's so fun ---------------------------------------------------------------------- grahamperrin · 2021-08-20 16:28 > … couldn't wake it up. … Which version of FreeBSD? What's the graphics hardware? Consider sharing a hardware probe. As superuser: 1. `pkg install -y sysutils/hw-probe sysutils/lsblk sysutils/pciutils sysutils/usbutils` 2. `hw-probe -all -upload` ---------------------------------------------------------------------- [deleted] · 2021-08-20 16:44 [deleted] ---------------------------------------------------------------------- [deleted] · 2021-08-20 16:46 [deleted] ---------------------------------------------------------------------- procrastinator7000 · 2021-08-20 18:29 > you shouldn't "reboot" and instead do "shutdown -r now" Can anyone tell me why? ---------------------------------------------------------------------- Daedalus312 · 2021-08-20 21:23 Something is wrong in the graphics system. The operating system itself normally wakes up from sleep mode, but if Xorg server and DE (KDE for example) is installed, then during waking up from sleep mode, I get a black screen. The keyboard and mouse do not react in any way at the same time. It is impossible to switch to the next console window to shut down the operating system normally. It is only possible to use the hardware shutdown button on the laptop. You can also connect from a computer or from a smartphone via SSH and write a command to turn it off and it will work. I have known about this problem for six months now and I just disabled sleep mode in the KDE settings. ---------------------------------------------------------------------- grahamperrin · 2021-08-21 04:07 From the manual: Normally, the shutdown(8) utility is used when the system needs to be halted or restarted, giving users advance warning of their impending doom and cleanly terminating specific programs. ---------------------------------------------------------------------- grahamperrin · 2021-08-21 04:19 > what does it do by default? I don't have a spare notebook handy, you might find that the button performs a shutdown. A few technical points of reference: Incidentally, S4 (hibernation) is in the manual but does not work. ---------------------------------------------------------------------- grahamperrin · 2021-08-21 04:33 > Rx580 Search results for AMD *Radeon RX 580*: * https://bsd-hardware.info/?id=pci:1002-67df-1462-3418 * https://bsd-hardware.info/?id=pci:1002-67df-148c-2378 * https://bsd-hardware.info/?id=pci:1002-67df-1682-c580 ---------------------------------------------------------------------- grahamperrin · 2021-08-21 05:13 > (KDE for example) KDE Plasma here, I can wake from sleep with FreeBSD 14.0-CURRENT and [graphics/drm-kmod](https://www.freshports.org/graphics/drm-kmod/) (result: drm-current-kmod) on a circa 2013 HP EliteBook 8570p with AMD graphics. Sets of probes: * https://bsd-hardware.info/?computer=8f084339058d * https://bsd-hardware.info/?computer=6fbb1f806232 – same boot disk, different computers. Until recently, I often used drm-devel-kmod. No more: * [[drm ERROR :radeon_ttm_init] failed initializing buffer object driver(-22) – radeonkms no longer loads with drm-devel-kmod on AMD Thames [Radeon HD 7550M/7570M/7650M] · Issue #93 · freebsd/drm- kmod](https://github.com/freebsd/drm-kmod/issues/93) ---- Whether 14.0-CURRENT with drm-kmod or drm-devel-kmod will allow wake from sleep with your Radeon RX 580, I don't know; re: it seems that there's nothing in the database. ---------------------------------------------------------------------- mirror176 · 2021-08-21 22:58 Unless referring to a physical reset switch, which a laptop normally does not have, I consider a \`shutdown -r now\` to be a reboot; is there a different kind of reboot besides these two that people are thinking of? When present, the physical reboot button should be last resort; like cutting power, it'll interrupt 'everything' and immediately do a reboot with no concern of things like the OS being in the middle of writing to disk. Cutting power/hardware reset button could lead to disk corruption in such a case though worse with power loss + flash media that may be rewriting a block larger than the OS requested be rewritten because internally its how it works and it hides that truth from the computer/OS by design. ---------------------------------------------------------------------- grahamperrin · 2021-08-22 14:07 > … the physical reboot button … like cutting power ~~False.~~ ~~A simple press on the button is not like cutting power.~~ Sorry, I misread. ---------------------------------------------------------------------- mirror176 · 2021-08-27 00:15 Odd, processes never received anything but aggressive interruption where they weren't permitted to finish anything on any PC I tested a reset button press on. Can you clarify what hardware/specifications I should look for for next to avoid that as my main PC does need replacement? ---------------------------------------------------------------------- [deleted] · 2021-08-27 09:37 [deleted] ---------------------------------------------------------------------- grahamperrin · 2021-08-27 09:38 Sorry, > physical reboot button I misread that as a physical *power* button. (I haven't seen a reboot/interrupt button for a long time.) From : hw.acpi.power_button_state Suspend state (S1–S5) to enter when the power button is pressed, or “NONE” (do nothing). Default is S5 (power-off nicely). ---------------------------------------------------------------------- mirror176 · 2021-08-30 23:29 So much for me having hopes of a 'good button' that is nearly worth just unplugging on my current machine. Desktop cases still often (though not always) have them. Motherboards do and if you have a power/reset button fail you can normally swap the switches to keep your favorite operating. Guess focus goes back to more practical questions of 'how Nvidia vs AMD compare' for FreeBSD use; not the flamewar though, but the technical what works/doesn't, how things may break and be buggy, etc.