Rebooting a Mac Mini after power loss, but my way

tl;dr: On the incriminated A1347 Mac Mini, I found the command to be “setpci -s 0:03.0 0x7b.b=20“. Then you need a way to make it sticky (add it at startup).

For work, I’m currently experimenting setting some kind of mail alert system when one of our UPS units stops receiving power after an unexpected outage and decided to install Intelligent Power Protector from Eaton on an A1347 Mac Mini running Debian Wheezy (the UPS unit plugged to it via USB is a Protection Station 800). Why a Mac Mini? Because we have plenty at work that became useless and outdated. They’re also lightweight, easy to move and easy to set up.

Unfortunately, Intelligent Power Protector only sends emails through SMTP port 25 and you can’t change it. Intelligent Power Manager on the other hand can send through another port but can’t be installed on Linux. So the only way I found is to install Intelligent Power Manager on a Windows machine and that will trigger email alerts when the Mac Mini loses power, if Power Manager is correctly seeing the Mac on the LAN.

Now I need the Mac Mini to be able to automatically restart when power comes back. For that, I read many things on that topic and many possible solutions and indeed, none of them worked. Instead I used an approach similar to the one in that post:

https://ubuntuforums.org/showthread.php?t=1209576&p=7620648#post7620648

So what I did is grabbing another identical Mac Mini (an A1347 from 2010) still running Mac OSX. Then I installed the LSPCI port for OSX:

https://rampagedev.wordpress.com/more-guides/use-lspci-for-info/

Once it’s installed and after rebooting, I get this when typing “lspci” on a freshly opened Terminal:

lspci

Hmm, that tells me we have nVidia devices but I can’t see where is my LPC device or ISA bridge (responsible for the function I want in my case). So going back to the Debian Mac Mini, let’s run lspci from there by typing “lspci | grep LPC”. I’m now getting this:

 

root@debmacmini:~# lspci | grep LPC
00:03.0 ISA bridge: NVIDIA Corporation MCP89 LPC Bridge (rev a2)
root@debmacmini:~#

Okay, that looks more like what I wanted. This confirms that on NVidia-equipped Mac Minis, the ISA bridge is located at 00:03.0 and not 00:1f.0 (like it is for Intel chipsets). So I know now where to look at.

Now going back to the Mac OSX Mac Mini again, let’s open Energy saver settings from the “System Preferences” window (Click on the apple, then “System Preferences”) and check that the value for “Start up automatically after power failure” isn’t ticked. Now on the Terminal window still opened, let’s type “lspci -s 00:03.0 -vvvxxxx > before-setpci.txt”. That will write the result of the lspci command into the before-setpci.txt file:

untick

Now, let’s tick the “Start up automatically after power failure” option and then type “lspci -s 00:03.0 -vvvxxxx > after-setpci.txt” afterwards:

tick

Now we need to compare the files. Before doing so let’s clean them up. When you open both of them, there’s a lot of info going on:

before-setpci after-setpci

Remove all the bits before “00: de 10 80 0d 0f 00 a0 00 a2 00 01 06 00 00 80 00” (that means removing “Region 0: I/O ports at 2100” and all lines above) and after “f0: 00 78 00 fe fd 00 00 00 10 00 80 80 00 00 00 00” for both files and save them. This is what we should have:

before-setpci-edited after-setpci-edited

Now we can compare them by typing “diff before-setpci.txt after-setpci.txt”:

diff

As you can see, only one byte have changed at location 0x7b and went from “60” to “20”. So we now know that you must change that byte to “20” in order to get that auto-reboot after power loss on an A1347 Mac Mini not running Mac OSX.

So, going back to the Debian one, I simply type “setpci -s 0:03.0 0x7b.b=20” to set the value. Then check that the value is correctly set by typing “setpci -vD -s 0:03.0 0x7b.b”:

 

root@debmacmini:~# setpci -s 0:03.0 0x7b.b=20
root@debmacmini:~# setpci -vD -s 0:03.0 0x7b.b
0000:00:03.0 @7b = 20
root@debmacmini:~#

Now let’s yank out the cord out of the Debian Mac Mini. Wait a bit and put the cord back in. Bingo! It restarts! Yay!… Yay? Okay, let’s find out if our setting remained by typing “setpci -vD -s 0:03.0 0x7b.b” after the Mac has restarted. Uh-oh… It turned back to “60”. It looks like we need to have the command executing itself each time the Mac boots up to make the change permanent. So let’s edit /etc/rc.local (for a Debian system) and add that “setpci -s 0:03.0 0x7b.b=20” to it, like this:

 

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will “exit 0” on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

setpci -s 0:03.0 0x7b.b=20
exit 0

 

On that Mac Mini, I installed vim. So to edit it, I simply typed “vim /etc/rc.local”, pressed the [Inser] key to be in edit mode, typed my command above “exit 0” and then exited vim by typing [Esc] then [W] then [Q]. Just to be sure, I ran my command once again and yanked out the cord. Put it back and Bingo! And this time for real.

For those using a Mac Mini as a server running Debian or Ubuntu Server or whatever and wants to restart automatically after a power outage, I hope this has been helpful.

The Sealed Esoteric History gets an episode 2!

This is one of the hottest news if you’re into Touhou and happen to enjoy animation. Here’s a little teaser the circle recently posted:

This appears to be centred in the Moriya shrine this time, will get a full voice release from the beginning, will last over 40 minutes and will be ready for Comiket 92 in August!

I wonder why this doesn’t get more exposure as we may finally have our Fantasy Kaleidoscope killer. You don’t realize it but it’s longest animated feature a Touhou fanime has to offer in years! But that might be too early to judge. I suggest to wait for later announcements. I sincerely hope it won’t be priced too high given its duration.

Also, for some who might remember the gubbins I wrote about the charm of lack of voice and “fanmade cachet”, all of that may surely be missed since it’s turning full voice. But I think this was the smartest move, given the ambitions of the circle and the orientation the series is taking. I hope this will turn out great. Renko and Merry shouldn’t change. Please make Sanae be properly casted. Also note that an additional voiceless version can actually be technically added on the same disc, though I doubt the circle will find that idea relevant or that there would be any demand for that. Someone mentions, within the comments of that Youtube video, that this episode 2 would get a voiceless release in Winter and so would a future episode 3, even though I highly doubt about the reliability of that info. (edit: well, it looks like it will actually gets a no-voice version too, according the circle’s tweets; there’s a demand for that it seems, as I indeed saw a few people ask about it!)

MMD Drama Festival 6 – My selection

Rather than posting a series of lonely Tweets that could get lost easily, I decided it was better to write an article instead. I’ll have more liberty this way, will be able to express more of my thoughts and have them more accessible.

As you may have guessed, I had mixed impressions about this 6th edition of the MMD Drama Festival. The huge drop of interest in MMD is now really palpable. The tide started turning after the third edition in 2014. It was the last one to feature a large selection of pretty high quality and memorable works. Most experienced MMDers seem to be tired now or have grown up with noone to replace them ([irony inside]or have screwed up so badly* or gone so over-ambitious that they can’t produce a thing anymore and therefore retire**[/irony outside]). This is something I gradually noticed over the years. Why “lack of interest”? Simply because MMDers don’t give a damn anymore. If they are to produce a high quality and ambitious work, they do it a their own pace, outside the Drama Festival. The most memorable MMD dramas have more chances to be released at any time of the year rather than during events. The only events that seem to still motivate MMDers now are MMD cups and Touhou Nico Dousai festivals. The tide is probably turning among the Japanese scene. Now the only hope would be the Chinese, Asian and Western scenes (if only they were more open-minded and motivated).

*Siraseuni, Kinoe, Notoaru, Sidare, In_Situ
**Harumao, Hojicya, Haripote, Nir, Whiteglint, FC (though I’m probably stretching a bit for some of them)

The only things remaining in this 6th edition are bandwagoning (could almost renamed Picture-card show festival), lack of variety (Kancolle still dominates everything), overall declining quality (where are all the good writers?) and among all that some nice little attempts floating on the surface. A good indicator of how the tide has probably turned. Also, to my biggest surprise, no presence of Kemono Friends (I placed hopes in that franchise) and more amusingly not a sign of Touken Ranbu this time.

So here’s my selection of interesting works from this 6th MMD Drama Festival:

My personal crushes

Surprisingly, they come from the Kancolle side. It’s really nice to see something really well made and pleasing standing out of the crowd:

【MMD艦これ】朝潮のキセキ ~HIEILOVE4~【MAD再現】, by のりタマ (music driven)
The HIEILOVE series still lives up to expectations. This is the kind of works the MMD Drama Festival needs.


【MMDドラマフェスティバル6】戦女神達の狂宴完成版【MMD艦これ】, by nirakun (MMD action)
Reminds of oro-kamen, but longer and more epic. Really nice shading, good pace and really pleasant to watch. There’s some vibe reminiscent of early Kancolle MMDs from 2014-2015 when it was still fresh and new.

The sensations

Unfortunately for me, they come from genres I’m not really after (too opportunist to my taste) but you might like them:

765プロのみなさんのおかげです 続・細かすぎるモノマネ名場面集:前, by ストラビンスP (animated comic)
One of the only two incarnations of Idolm@aster for this edition. You might actually like this series as I see it’s pretty successful. However, I can’t sense any creativity in this and the lack of lipsync animation can disturb (it can certainly have its charm but seeing how the author fully animated just about everything else makes it look off)


【艦これMMDドラマ】首領ジャラ!-艦娘博打物語- 第二幕【ドンジャラ】, by ベホイミ (yukkuri-voiced comedy)
Behoimi at work. No need to say more. His works rely a lot on dialogue and can’t be understood without a translation if you don’t speak the language. But if you like the genre, don’t mindthe yukkuri voice or are simply curious, this is for you.

The ones who tried

They tried not bandwagoning and not being lazy or opportunist. But chemistry isn’t always taking because of either poor direction, lack of writing ability or simply lack of that magic sparkle that makes a work memorable:

【東方MMD】終わる話。, by ちぇしゃ@火薬 (atmospheric?)
Someone who still try to find its feet. Some story attempt centred on Marisa. It can work if you’re really into those kind of “traditional” MMD dramas like I am. This author did make some other nice little pieces in the same vein.


【MMDドラマフェスティバル6】『彼女の望』(東方MMD), niwaka@乙型 (story)
An attempt at writing a story. Pace and mood are awkward. Feels dull for the most part. There’s still work to do in order to produce something more captivating and interesting.


The whole 始まりの歌Ⅲ ~魔法使いにできる事~ series, by どりーむまっぷ (fantasy)
I’m only posting a link to the first episode here. One of the rare fantasy attempts. I really miss those. While I salute the effort, chemistry doesn’t really work on me. The culprit being the too awkward pacing (did it need to be spread over 6 episodes?).


【MMDドラマフェスティバルⅥ】Never Naming Legendary【#2-5】, by つちのこ (fantasy, half picture-card show)
Another one who tries to find its feet. The series gradually evolved from 90% picture-card who to only 40%. Nice effort. However, despite the nice direction, the story fails to interest me. Also, terribly underrated.

Honourable mentions

Same as above except chemistry can actually take because directing feels a bit more solid. Those works can be actually really interesting to watch, depending on your tastes:


【MMDドラマ?】CROSS STORIES 雪華の戦姫 F-3, by まく (Vocaloid and sword fights)
Not among the best series around but still nice to see it still ongoing. If you’re into Vocaloid MMD dramas and miss them, you may like.


【MMD艦これ】古に 鷹舞い降りし 青葉山 第4話 後篇③【ドラマ】, by Leo (Kancolle and sea fights)
Almost the Kancolle equivalent of above work. Nice writing and directing for once. My only grief is the chattiness. Also pinpoints a recurring illness among those kind of Kancolle MMD dramas, they all lack originality. Too bad this one is no exception.


【ミリオンライブ】茜ちゃんのとある一日 前編【MMDドラマ】, by ポピー (Idolm@ster Million Live)
What a nice surprise. Again, not the best work around but I like the artistic touch and its tone, save the pretty rough lipsync animations. A bit underrated.


MMDアニメ「俺の就職先がブラックなわけだが」-第2話-, by Sero (anime-like with Vocaloid characters, full voice)
Yay! The first full voice MMD drama of 2017. Finally! For some reason full voice works are being phased out whereas they were all the rage back in 2015. It’s probably due to the closing of the Koebu website. I really liked episode 1 as it definitely set a new mark in MMD dramas with its smart artistic orientation of being in a very anime-esque style rather than slapping voice on a traditional-looking unvoiced MMD drama. But I also feared the novelty effect wouldn’t last long. Funnily, that’s exactly what happened. It suffered the “Yomi syndrome”. I mean we have something pretty looking and sounding (mixing might be too loud however) but with a rather pointless and empty plot. Note that Studio Sero is actually made of two people, the author and his wife. Yes, this guy is older than me. And he still quite didn’t find its feet yet, despite knowledge and skill he may have earned of his tools over the years. Proof that talent and age don’t always go well together. However, I acknowledge and appreciate the effort of having tried because his series looks pretty unique.


【MMDドラマフェスティバルⅥ】とある水上の建物の話, by 塩蛙 (atmospheric)
塩蛙’s submission with original characters. His usual touch is there, intact for sure. However, when you work with original characters you have less material to work with when writing a story, having to create everything from scratch. And that’s the problem of this work and all other ones of him featuring original characters. For that reason, chemistry works less than with his attempts with Touhou. Story feels a bit superficial and you end up watching only for its nice mood and the care put into the audio department. Note that he plans to produce something in full voice. I hope we won’t screw up doing so.

Mayonnaise Pasta Sauce

This category is for rubbish artistic decisions and/or total misuse of computer-generated voices such as Softalk, CeVIO and Voiceroid, but the works themselves still having some enjoyment potential:


the VOCALOIDとの最終戦争を全力で終結させるUTAU共 series, by yuurika (talkroid?)
Complete waste of really nice shading. Perfect illustration of nowadays MMD scene. Nice animating or graphic skills but somewhat abysmal taste or incapacity to produce something solid and worth with that skill, other than showoff efforts (same dance moves repeated over and over, short tests, effect showcases…). Note that the use of Voiceroid is his trademark.


【MMDドラマフェスティバルⅥ】テのひらサイズ アドベンチャー_chapter 6, by フェアネス or ぷにほっこりP
Started out as a nice silent series but for some reason the author decided it was nice to add in some rubbish Voiceroid. If you don’t mind those voices you might like it.

Off competition

Works submitted around the same time but surprisingly outside the MMD Drama Festival that I happened to almost like better than most of this festival’s submissions.


【東方MMD】 探し物 Ex, by SF2B463 (translates as “the missing thing”, story)
2017 will definitely be the year of unexpected sequels. There’s something pretty lovely about those. Especially compared to planned sequels that never see the day because the author either went away, lost motivation, screwed up or became overbooked. This is situated right after Merry got sent back to earth through a gap Yukari Yakumo made. This is pretty much dialog-based only, so not easy to understand without a translation. But it’s always so nice watch the author’s neat animation and realizing he’s been MMDing for 7 years now (the average lifespan of a full-animating MMDer being 2 years).


【東方MMD】おちびなフラン5話, by LVがたりないけど物理で殴る/LVgatari (silent short)
Episode 5 of his little Flan series. I really like how it turns out. LVgatari is really at his best doing these little things, as they end up inspiring and never forced or cliché like on ぱにょぺらんP/霧雨あろえ‘s works for instance.

Okay, I think I’m done with this selection from the 6th MMD Drama Festival. Time after time it looks like what made the MMD scene so great, inspiring and ground-breaking is fading away. The fault to the age of the program and its lack of evolution mainly, but also some questionable behaviours from artists I tend to see more and more. It looks like it’s the ones who create the most interesting content who are prone either to quit suddenly without warning, go on long hiatus, have an intriguing temper (Sidare blocked me on Twitter because I mentioned him on one of my posts, and I didn’t do anything wrong from my perspective), delete their works or simply lose motivation very quickly over time. It’s like when you are a viewer, you naturally want to see more of them but no my friend! You don’t deserve it as a filthy passive viewer/secondary/leecher/insert whatever “/jp-ish” term is the best. To the artists’ credits, a good part of the viewers of their works are mostly immature themselves, not very smart, generally post pointless comments and can be very annoying (not to mention wild and unnecessary reprinting which bring them even more unwanted viewer base). Whereas people who throw very little artistic effort are the one who last the longest and are even still in activity after 4 or 5 years! Still doing the same soup, not evolving one bit and having their usual viewer base even demanding more! That’s how this scene turned from great to cringy, questionable and immature. Because all the good batch is slowly leaving and not being renewed. I have very little hope for this to change but as a consolation, I suggest to enjoy the remaining quality pieces even more. Because there still are. They just require a little more digging. Also, if you happen to read this and have been following the scene for quite long but are too lazy to create, just like me and you think you have potential, why instead not get started? You might have a chance to better master the concept of animating and posing than I. Just take inspiration from the best works, grasp what is making them so unique and enjoyable and you may come up with something interesting too. Note that the best works are not always the prettier looking and sounding. Some of them are in fact pretty rudimentary and cope very well with the very few elements at their disposal. As long as you don’t try to bandwagon, I think you can have your chance too, whatever the style you’re the most comfortable with.