From: Sam N. <sa...@th...> - 2009-09-09 20:37:57
|
On Sat, 2009-08-29 at 04:02 +0200, Alexandre Boeglin wrote: > Hi, the variable you are looking for is named "SystemAudioVolume". > When > the sound is muted in OS X System properties, it is equal to 0x80, so > I > guess the most significant bit is a flag. Otherwise, the value seems > to > represent a percentage, taking values between 0x03 up to 0x64 (but the > scale is not linear, as 25% in System properties is represented by > 0x32). > > Or at least this is how it seems to work on my 2006 Mac Pro. > > To modify this in the EFI shell, it seems that you have to use the > dmpstore command, saving the variable to a file, modifying the file, > then loading it back. Hey! that works fine. Thanks very much Alex. For posterity the process on my non-pro2,1 goes something like this: #<Boot EFI shell> #<spend 30 minutes finding the page break switch for help :) > Shell>help -b #<cd to a writable partition (I had booted from a refit CD, so fs0 was the disk, fs1 was the 100MB efi partition)> Shell>fs1: fs1:\> #<dump the nvram variable> fs1:\>dmpstore SystemAudioVolume -s sav.txt #<edit the the dumped variable with a hexeditor (probably wiser to keep the original dump and edit a copy)> fs1:\>hexedit save.txt #<load the new nvram variable> fs1:\>dmpstore SystemAudioVolume -l sav.txt #<exit to refit and reboot> fs1:\>exit Enjoy the BONGless restart. So for a while it wasn't apparent what value to change with the hexeditor, and tbh, not being familiar with any hexeditor, I'm not sure I got it right. Further experimentation indicates I may have just borked it, but apparently that also serves to make it shut up. The files (now back in Debian) look like this: $ cat SystemAudioVolume.txt $SystemAudioVolumeaC|*��K���A�\��q <-with no newline $ hexdump -C SystemAudioVolume.txt 00000000 24 00 00 00 53 00 79 00 73 00 74 00 65 00 6d 00 |$...S.y.s.t.e.m.| 00000010 41 00 75 00 64 00 69 00 6f 00 56 00 6f 00 6c 00 |A.u.d.i.o.V.o.l.| 00000020 75 00 6d 00 65 00 00 00 10 61 43 7c 2a ab bb 4b |u.m.e....aC|*..K| 00000030 a8 80 fe 41 99 5c 9f 82 07 00 00 00 01 00 00 00 |...A.\..........| 00000040 71 |q| 00000041 (In hexedit.efi the 00000041 line did not appear.) Since running dmpstore SystemAudioValume by itself returned output something like: 00000: 71 "q" I took a guess and replaced the 71 with Alex's 80 getting: $ hexdump -C SystemAudioVolume80.txt 00000000 24 00 00 00 53 00 79 00 73 00 74 00 65 00 6d 00 |$...S.y.s.t.e.m.| 00000010 41 00 75 00 64 00 69 00 6f 00 56 00 6f 00 6c 00 |A.u.d.i.o.V.o.l.| 00000020 75 00 6d 00 65 00 00 00 10 61 43 7c 2a ab bb 4b |u.m.e....aC|*..K| 00000030 a8 80 fe 41 99 5c 9f 82 07 00 00 00 01 00 00 00 |...A.\..........| 00000040 80 |.| 00000041 Which turned off the bong and I'm happy. But for kicks I also tried 32 (for 25% more BONG) $ hexdump -C sav.txt 00000000 24 00 00 00 53 00 79 00 73 00 74 00 65 00 6d 00 |$...S.y.s.t.e.m.| 00000010 41 00 75 00 64 00 69 00 6f 00 56 00 6f 00 6c 00 |A.u.d.i.o.V.o.l.| 00000020 75 00 6d 00 65 00 00 00 10 61 43 7c 2a ab bb 4b |u.m.e....aC|*..K| 00000030 a8 80 fe 41 99 5c 9f 82 07 00 00 00 01 00 00 00 |...A.\..........| 00000040 32 |2| 00000041 But that also gave me silence, so I think I'm doing it 'wrong.' However reloading the original (71) file did bring back the bonging. So I don't think any of this is particularly dangerous for those who may want to here the noise again someday. :) |