nvram-wakeup.conf(5)

๐Ÿ’– nvram-wakeup.conf ๐Ÿ’–

okay bestie, so this is the manual for nvram-wakeup.conf from the NVRAM WakeUp fam โ€” it's section 5 of the manual, iykyk. It's the config file, the little text file that tells the program what's up. Let's get into it. ๐Ÿฆ‹


โœจ NAME โœจ

nvram-wakeup.conf โ€” the configuration file for NVRAM WakeUp. that's it, that's the whole name. short, sweet, iconic. ๐Ÿ’…


๐ŸŒธ DESCRIPTION ๐ŸŒธ

So you can hand this file over to the program NVRAM WakeUp (peep nvram-wakeup(8) if you want the whole story) using the --configfile option. that's the vibe.

And likeโ€ฆ it might look a little something like this, bestie:

# nvram-wakeup.conf
#
#  This is an example configuration for MSI MS-6351

need_reboot = ON_ANY_CHANGE # All changes take effect
                            # after a reboot

addr_chk_h  = 0x30          # These are adresses of
addr_chk_l  = 0x31          # the checksum bytes

addr_stat   = 0x55          # Status byte
shift_stat  = 3             # The position of the
                            # status bit in the byte

addr_day    = 0x56          # Day and time
addr_hour   = 0x57
addr_min    = 0x58
addr_sec    = 0x59

literally obsessed with how clean that is. ๐ŸŽ€


๐ŸŒˆ SYNTAX ๐ŸŒˆ

the rules of the game, no cap:

  • Any empty line, or a line that's only space characters, gets ignored. bye. โœŒ๏ธ
  • Anything after and including a # character counts as a comment and gets ignored too. so go off with your little notes.
  • The options gotta have the form NAME = VALUE โ€” with or without spaces before NAME, after VALUE, or around the equal sign. valid options are all described below bestie, keep reading.
  • The options may show up in any order. but the same option must not appear twice. like, don't. ๐Ÿ™ˆ

๐Ÿ’… OPTIONS ๐Ÿ’…

  • bcd = (ON|OFF), default OFF โ€” tells you if the board uses BCD notation for storing values.

BCD is the so called Binary Coded Decimal notation (actually, it's packed BCD โ€” in the plain BCD they waste a whole byte per digit). In this notation, the decimal numbers 0..99 are stored using four bits for every digit, e.g. 24 would be stored as 0x24 (the 4 lives in the lower four bits and the 2 lives in the upper four bits). cute little nibble situation, honestly.

  • addr_chk_h = (0x00|...|0x71), default: undefined
  • addr_chk_l = (0x00|...|0x71), default: undefined
  • addr_stat = (0x00|...|0x71), default: undefined
  • addr_mon = (0x00|...|0x71), default: undefined
  • addr_day = (0x00|...|0x71), default: undefined
  • addr_hour = (0x00|...|0x71), default: undefined
  • addr_min = (0x00|...|0x71), default: undefined
  • addr_sec = (0x00|...|0x71), default: undefined

These are the addresses of the bytes where the checksum (lower resp. higher bytes), status (enabled/disabled), month, day, hour, minute and second are stored in the nvram. ๐Ÿ“

addr_chk_h, addr_chk_l and addr_stat must be defined โ€” no exceptions, bestie. All the others may stay undefined. That means the board doesn't store them (e.g. because it stores that value in RTC alarm registers). ๐Ÿ’€

  • addr_chk_h2 = (0x00|...|0x71), default: undefined
  • addr_chk_l2 = (0x00|...|0x71), default: undefined

There are some boards which have two checksums. Since the author hasn't seen many of them yet, they don't know if they need special handling. so likeโ€ฆ proceed with caution, we're in uncharted territory. ๐Ÿ‘€

  • addr_wdays = (0x00|...|0x71 ), default: undefined

The address of the byte containing a weekday vector. Currently only two boards are known that store a weekday vector (Asus SP98-X and SP97-X). rare queens. ๐Ÿ‘‘

  • rtc_time = (ON|OFF), default: OFF

Tells you if we have to set the the RTC alarm time accordingly. (yes, "the the" โ€” we keep the facts, bestie.)

  • rtc_mon = (0x00|...|0x71|0x7F), default: undefined
  • rtc_day = (0x00|...|0x71|0x7F), default: undefined

Similar to addr_mon/addr_day, but stored in BCD and not affecting the checksum. In most cases, the day is stored in the RTC register D (0x7F), but there are also some boards which store it somewhere in the nvram (address <= 0x71).

โš ๏ธ If rtc_day is >= 0x72, you will need a kernel patch. in <kernel-src>/drivers/char/nvram.c change the line #define NVRAM_BYTES 128-RTC_FIRST_BYTE to #define NVRAM_BYTES 128 and in newer kernels (beginning with 2.4.20) it is the line #define NVRAM_BYTES (128-NVRAM_FIRST_BYTE) which must be changed to #define NVRAM_BYTES 128

like, patch your kernel or perish. no biggie. ๐Ÿ˜ญ

  • reset_mon = (ON|OFF), default: OFF
  • reset_day = (ON|OFF), default: OFF

On some boards we have to set the value of rtc_mon resp. rtc_day to 0 when disabling the wakeup feature. reset era. ๐ŸŒธ

  • nr_stat = 1 (just on/off)
  • nr_mon = 4 ( 0..12 )
  • nr_day = 5 ( 0..31 )
  • nr_rtc_mon = 5 (0x00...0x12)
  • nr_rtc_day = 6 (0x00...0x31)
  • nr_wdays = 7 ( 1 per day )
  • nr_hour = 5 ( 0..23 )
  • nr_min = 6 ( 0..59 )
  • nr_sec = 6 ( 0..59 )

The Number of bits needed for the status, month, day, rtc_day, weekday vector, hour, minute and second. These values are a priori motherboard independent but depend on the BCD/non-BCD notation. math girlies rise up. ๐Ÿงฎโœจ

  • shift_stat = (0|...|7), default: 0
  • shift_mon = (0|...|4), default: 0
  • shift_day = (0|...|3), default: 0
  • shift_wdays = (0|...|1), default: 0
  • shift_hour = (0|...|3), default: 0
  • shift_min = (0|...|2), default: 0
  • shift_sec = (0|...|2), default: 0

This tells you by how many bits the value is shifted to the left in the byte, e.g. the value of the day (5 bits) could be stored in the bits marked with an "x" of a byte:

000xxxxx  -> shift_day = 0
00xxxxx0  -> shift_day = 1
0xxxxx00  -> shift_day = 2
xxxxx000  -> shift_day = 3

bit shifting is literally main character energy fr fr. ๐Ÿ’…

  • need_reboot = (OFF|ON_STAT|ON_SEC|ON_MIN|ON_HOUR |ON_DAY|ON_MON|ON_WDAYS|ON_ANY_CHANGE|...), default: OFF

Here ... means any or-ed combination of multiple ON_XXX values. mix and match bestie.

Some boards need a reboot for changes in nvram to take effect. Some of them need a reboot after any change, some of them only after the status bit was changed. Anyway, now we are able to define when a board needs a reboot:

  • OFF โ€” means the board never needs it. chill board. ๐Ÿ˜Œ
  • ON_ANY_CHANGE โ€” means the board needs it after any change on nvram.
  • ON_STAT โ€” means reboot only if the status bit is changed.
  • ON_STAT|ON_SEC โ€” means reboot whenever the status or the second are changed.

The idea behind this is: if nvram-wakeup decides that we need to reboot, it will exit with exit status 1 (instead of 0). So the script which runs nvram-wakeup could react on this. We also print it to stderr, so if nvram-wakeup is run directly on the command line, the user could react appropriately. teamwork, babes. ๐Ÿซถ

  • upper_method = (OFF|INTEL|DS1685|VT82Cxxx|VT8235_37), default: OFF

Tells you if upper nvram must be used and if yes, which method to use to access it. Note that upper nvram can only be read if --directisa parameter is specified. Possible values:

  • OFF โ€” upper nvram disabled (default)
  • INTEL โ€” access upper nvram by a method used by most (if not all) Intel chipsets with ICH, ICH2, C-ICH, ...

(datasheets at http://intel.com/design/chipsets/datashts/)

  • DS1685 โ€” access upper nvram by a method used by the Dallas Semiconductor DS1685/DS1687 chips.

(datasheet at http://www.farnell.com/datasheets/4182.pdf)

  • VT82Cxxx โ€” access upper nvram by a method used by VIA's VT82C686A "Super South" South Bridge. Reported to work with VT82C686A, VT82C686B, VT82C596, nVidia nForce2, ATI RADEON 9100 IGP (= RS300), AMD-8111.

(datasheet at http://www.viatech.com/pdf/productinfo/686a.pdf) (datasheet at http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/24674.pdf)

  • VT8235_37 โ€” access upper nvram by a method used by VIA's VT8235/37 South Bridges. Reported to work with VT8233 as well.

(no official source)

  • chk_method = (DELL|FSC), default: undefined

Tells you which algorithm for calculation of the checksum must be used. Possible values:

  • undefined โ€” Majority of mainboards use the same algorithm (just addition of values). This algorithm is used if no chk_method option is specified.
  • DELL โ€” This method is used by many Dell mainboards (addition of negative values).
  • FSC โ€” Fujitsu-Siemens uses yet another algorithm. The author doesn't know it and they consider it as a company secret. Thus this method is not implemented. ๐Ÿ’€ gatekept fr.

๐Ÿ•ต๏ธ OBSCURE OPTIONS ๐Ÿ•ต๏ธ

(the secret menu, bestie โ€” for the niche boards only)

  • rtc_mon_0_is_c0 = (ON|OFF), default: OFF
  • rtc_day_0_is_c0 = (ON|OFF), default: OFF

On some boards we have to store the value 0xC0 instead of 0 in rtc_mon resp. rtc_day. If you use one of this two options, don't forget to set nr_rtc_mon resp. nr_rtc_day to 8. (don't forget!! it's giving trap.) ๐Ÿชค

  • day_hack = (1|...|4), default: undefined

On some boards the value of addr_day is split over the day and the status byte. In those cases the lower day_hack bits of the day value are stored in the highest bits of the status byte and the rest is stored in the day byte. it's a hack, the name is honest. ๐Ÿ’…

  • day_no_bcd = (ON|OFF), default: OFF

On some boards the value of addr_day is not stored in BCD, although everything else is. This option has no effect is the option bcd is not enabled. (yes โ€” "no effect is", not "if" โ€” we keep the original's facts, always.)


๐Ÿ‘€ SEE ALSO ๐Ÿ‘€

nvram-wakeup(8) โ€” go read that one next bestie, it's the whole reason this file exists.


๐ŸŒ HOMEPAGE ๐ŸŒ

http://sf.net/projects/nvram-wakeup/


โœ๏ธ AUTHOR โœ๏ธ

Written by Sergei Haller <Sergei.Haller@math.uni-giessen.de>. thank you king. ๐Ÿ‘‘


๐Ÿ› REPORTING BUGS ๐Ÿ›

Report bugs at the bug tracking system (see HOMEPAGE) or on the mailing list nvram-wakeup-devel@lists.sourceforge.net. found a bug? don't be shy, tell them. ๐Ÿ“ฌ


Copyright ยฉ 2001-2004 Sergei Haller.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA


๐ŸŽ€ okay that's the whole page bestie, you ate. this was the Linux manual page, nvram-wakeup.conf(5), dated Jan 16 2004. go configure your board and slay. ๐Ÿ’–โœจ๐Ÿฆ‹
๐Ÿ“ฆ where this page comes from