Bug 260994 - Sleep, wake: document the requirement for Kernel Mode Setting (KMS) drivers; include the console context
Summary: Sleep, wake: document the requirement for Kernel Mode Setting (KMS) drivers; ...
Status: Closed FIXED
Alias: None
Product: Documentation
Classification: Unclassified
Component: Books & Articles (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-doc (Nobody)
URL: https://lists.freebsd.org/archives/fr...
Keywords:
Depends on:
Blocks: handbook-2022
  Show dependency treegraph
 
Reported: 2022-01-07 01:05 UTC by Graham Perrin
Modified: 2023-09-10 17:56 UTC (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Graham Perrin freebsd_committer freebsd_triage 2022-01-07 01:05:17 UTC
>>>> 𠈶… kms drm drivers. The suspend/resume code is in those drivers. They work 
>>>> console, X11 and wayland, more or less. …

>>> … (handbook suspend/resume section, man zzz acpiconf, maybe apm too, wiki) 
>>> … drm kmod drivers to actually make resuming succeed on 
>>> console-only computers. …

>> … drm kmod drivers usually are being associated as graphics drivers 
>> for xorg. Thus it is not at all intuitive/obvious that these are 
>> also required on console-only computers to make resuming succeed. 
>> 
>> … *not* mentioned anywhere in the documentation regarding suspend/resume, 
>> making users wonder why resuming fails. 

> Absolutely agreed on need more docs and an update pass. I raised it as 
> part of this year's core team meeting with the foundation. … likely 
> can be handled by a simple document PR.
> 
> Warner


For the benefit of newcomers to systems such as FreeBSD: let's (also) now use the FreeBSD Handbook glossary, which is currently detached from the Handbook, to demystify some of the more ambiguous/obscure phrases.  


<https://docs.freebsd.org/en/books/handbook/glossary/#_c>

* add an entry for console.

<https://docs.freebsd.org/en/books/handbook/glossary/#_d>

* add an entry for DRM; see digital rights management and Direct Rendering Manager

* digital rights management (maybe make a separate bug report) might simply  
  state that Google's Widevine CDM <https://en.wikipedia.org/wiki/Widevine> is 
  not a feature of any web browser in the FreeBSD ports collection

* Direct Rendering Manager can refer to e.g. 
  <https://en.wikipedia.org/wiki/Direct_Rendering_Manager>.

<https://docs.freebsd.org/en/books/handbook/glossary/#_k>

* add entry for KMS; see Kernel Mode Setting

* Kernel Mode Setting can refer to e.g.  
  <https://en.wikipedia.org/wiki/Direct_Rendering_Manager#Kernel_Mode_Setting> 
  and FreeBSD Handbook section 12.13.2.2 (Suspend/resume).

<https://docs.freebsd.org/en/books/handbook/glossary/#_t>

* add an entry for ttys; see console.


acpiconf(8)
<https://www.freebsd.org/cgi/man.cgi?query=acpiconf&sektion=8&manpath=FreeBSD>

apm(8)
<https://www.freebsd.org/cgi/man.cgi?query=apm&sektion=8&manpath=FreeBSD>

zzz(8)
<https://www.freebsd.org/cgi/man.cgi?query=zzz&sektion=8&manpath=FreeBSD>


<https://docs.freebsd.org/en/books/handbook/config/#acpi-config>
<https://docs.freebsd.org/en/books/handbook/book/#acpi-config>

<https://docs.freebsd.org/en/books/handbook/config/#ACPI-comprob>
<https://docs.freebsd.org/en/books/handbook/book/#ACPI-comprob>

<https://docs.freebsd.org/en/books/handbook/config/#_suspendresume>
<https://docs.freebsd.org/en/books/handbook/book/#_suspendresume>


<https://wiki.freebsd.org/SuspendResume>


I'll bring in Stefan Blachmann (one of the people who are quoted above).
Comment 1 Stefan B. 2022-02-15 03:27:33 UTC
May I bump this, as suspend/resume is important for many people.

In addition to the corrections Graham suggested, the vt(4) man page should imho honestly mention that with non-KMS-supported graphics cards/chips vt breaks suspend/resume; in these cases sc should be used (except on UEFI systems ofc).

This problem caused me a lot of work in my autodetecting/autoconfiguring installer for FreeBSD ( https://github.com/SkunkOS/SkunkInstall ), which also configures for functional suspend/resume.
Comment 2 Pau Amma 2022-06-06 09:37:56 UTC
Probably best placed in a new chapter 2 section, post-installation tasks.
Comment 3 Graham Perrin freebsd_committer freebsd_triage 2023-05-24 00:32:04 UTC
Editing the URL to work around (list archive) bug 270601
Comment 4 Graham Perrin freebsd_committer freebsd_triage 2023-05-24 00:45:51 UTC
(In reply to Graham Perrin from comment #0)

The first quote (about "kms drm") is from <http://markmail.org/message/cvl5ocgppd7ximmy>. 


(In reply to Pau Amma from comment #2)

Would someone from x11@ like to draft something for the FreeBSD Handbook?

(I don't know enough about the subject.)

Thanks
Comment 5 Sergio Carlavilla Delgado freebsd_committer freebsd_triage 2023-08-01 09:48:14 UTC
Fixed, sorry for the delay.
Comment 6 Graham Perrin 2023-09-03 11:34:46 UTC
Thanks. 

Related glossary entries (comment 0) can/should be a new bug report. 

(In reply to Pau Amma from comment #2)

> Probably best placed in a new chapter 2 section, post-installation tasks.

No mention of DRM, resume or wake in <https://docs.freebsd.org/en/books/handbook/bsdinstall/>

<https://docs.freebsd.org/en/books/handbook/x11/> includes 'Graphic card drivers' however the section makes no mention of resume or wake. 

What am I missing? 

Where, in the FreeBSD Handbook, is the fix?
Comment 7 Graham Perrin freebsd_committer freebsd_triage 2023-09-03 11:54:17 UTC
No mention of keyword 'wake' anywhere in the FreeBSD Handbook. This omission can be corrected in a later edition. 

Found: a note under <https://docs.freebsd.org/en/books/handbook/book/#_suspendresume>, with direction to <https://docs.freebsd.org/en/books/handbook/book/#x11> for more information, however (comment 6) the #x11 area is where I did _not_ find what was expected.

The relevant link to <https://reviews.freebsd.org/D41052> was omitted from this report.

<https://github.com/freebsd/freebsd-doc/commit/9401f487d47fb9147a5c6792e0318b9389749de3> (commit message below) did mention three bug reports, however the values in the PR: line were not the format that is required for automated cross-referencing. 

----

 Handbook-WG: Upgrade config chapter

Changes:

* Change the title of the chapter to be more acurate
* Add a config files entry (/etc, /usr/local/etc), and /etc/sysctl.conf
* Rework the entry "managing services in FreeBSD"
* Upgrade cron section and add periodic info
* Upgrade syslog section
* Remove tuning section, some parts are really outdated
* Upgrade power management section
* Little upgrades to swap section

ACPI info obtained from:

* https://freebsdfoundation.org/wp-content/uploads/2022/04/ACPI-Support-for-Embedded-Controllers.pdf
* https://freebsdfoundation.org/wp-content/uploads/2018/04/Pain-and-Suffering-on-the-Road-to-Resume.pdf
* https://wiki.freebsd.org/ACPI
* https://papers.freebsd.org/2002/watanabe-acpi.files/watanabe-acpi-paper.pdf
* https://vermaden.wordpress.com/2018/11/28/the-power-to-serve-freebsd-power-management/
* https://github.com/freebsd/drm-kmod/blob/master/drivers/gpu/drm/i915/i915_params.c

PR:                             219953,260994,216753
Differential Revision:          https://reviews.freebsd.org/D41052
Reviewed by:                    fernape, karels
Sponsored by:                   Daifressh
Comment 8 Graham Perrin 2023-09-03 16:14:49 UTC
Re: opening comment 0

> … use the FreeBSD Handbook glossary, … to demystify some of the more 
> ambiguous/obscure phrases. …

See also: bug 273545