Boot Optimisation Is Entirely Useless When You Reboot Once Or Twice A Year
A few months ago, I spent a weekend optimising the shit out of my system to the point where I could press the power on button and be fully logged into KDE with all my shit open in 8 seconds flat. It seemed like a cool idea at the time as I didn’t have an SSD and that was FuckingFast.png, however I didn’t really think about the fact that I reboot maybe 5 times a year (I totally hotload my kernel: don’t do this) and the fact that fsck likes to run every 90 days.
Enter KDE and nvidia collectively shitting themselves this morning somehow, and Xorg eating my CPU like it was ice cream in a heatwave. I managed to SSH in from another PC to get KDE to cleanly close down (didn’t actually work it seems) and then reboot the PC. At this point I had to leave my house in 5 minutes and needed to check something really important rather quickly. Then I got fscked. Hard. See, it never occurred to me that fsck would need to run on my enormous LVM, nor how long that would take.
I ended up checking what I needed to on my phone and then coming home a few hours later to see fsck at about 80%. Eventually it finished it’s shit and I got logged in to find my KDE session opening shit I closed months ago, and about 6 hours of YATTA work lost (maybe not) as it was open when the system crapped a brick. I still have no idea what happened, nor why YATTA was using 37% of my RAM yet still slow as hell, and where all my swap went, but at least I know that boot optimisation is entirely useless. I am totally getting an SSD in a few weeks to bring this down to sub 5 seconds.
Lucky For My Siblings That Homicide Is Illegal
This will be a short post, as I don’t trust myself to write anything that properly conveys my rage without murdering a member of my family. I like to download my TV shows. My sister likes to watch TV shows. Occasionally stuff I download and stuff she likes to watch overlap. This is what I refer to as the “Oh Shit” zone. Problems that arise in the Oh Shit zone usually happen when someone, in this case my sister, wants to use one of my machines, and has no idea how to. I guess she experimented and figured out I had a dropdown documents folder, and somehow got into my videos, and subsequently my TV. This is where Windows Syndrome kicked in.
Windows Syndrome is what I call the computer using habits of Windows users. They like everything to be all GUI friendly and clicky. My machine is not like that. At all. I play all my movies and whatnot from CLI. I barely use a GUI file browser. It stands to reason that I was unaware that the standard action for clicking a media file was that it would open in SMPlayer, a decent GUI for mplayer, and a SHIT GUI for mplayer-uau. I use mplayer-uau. I happened to go out last night with some friends before the new semester starts, and when I returned home, I remembered that I had left my SD keyring in my machine, and that it was completely unlocked and in KDE. This is where I got a bad feeling.
On reaching my computer, I prepared for the worst. I didn’t prepare enough. What greeted me was KDE, with no window borders, dmesg shitting bricks, conky going crazy, and a completely unresponsive desktop. Ctrl+Alt+fn+F2′ing to VT2 (sorry, apple keyboard) revealed something I did not expect. A shitload of smplayer cache processes, AND A BURNT OUT CORE. How in the hell did my sister manage to burn out a core by just watching a video in a player that throws a minor segfault on good days?
This is where I got a bit scared. I looked at the hostname, and that was when shit hit the fan. This was not my desktop, this was my main rendering box. An octocore Xeon setup. A very expensive octocore Xeon setup. I didn’t pay anywhere near full price as I got it second-hand but it still cost me rather a lot. I’ve since disabled the core in /sys/devices/system/cpu/online but I’m still running some tests on my beautiful ECC registered RAM and my Quadro 4800 but I am hoping extremely hard that it was just the CPU. Needless to say she won’t pay for it.
On the side, and this is just icing on the cake, she got pasta sauce or something on my insanely sexy scope node mouse. I laughed at that. Then I remote wiped her laptop. Petty vengeance is so satisfying. That concludes this episode of Emess Hates People Who Touch His Stuff.
This One’s on Kovensky
Kovensky linked me a VERY interesting article, particularly for Sonictail I believe: http://insanecoding.blogspot.com/2009/05/will-linux-ever-be-mainstream.html
I like how he goes on about Qt being awesome because frankly it is. Then Nokia pumped this out at the end of last year and it looks to finally be going somewhere interesting: http://labs.trolltech.com/blogs/2008/12/02/widgets-enter-the-third-dimension-wolfenqt/
The stuff in the first article is quite a good read for any tech people, especially the part at the end about how fixing the way X and *nix sound servers work coupled with Qt/OpenGL/Phonon would revolutionise gaming. I for one would love to see a natively built game using Qt like that. With a bit of simple hax it could even be rigged to work on Sony’s Phyre Engine, given it already uses OpenGL. Phonon support would not be hard to add, and if Phonon got support in the PS3 firmware Qt itself wouldn’t be far behind.
I can only see coding the PS3 interface from Sony’s part becoming easier with such a toolkit, if they are not already using it secretly internally, CyberLink seem to be.
Which actually gets me a bit annoyed. Has anyone else attempted to run CyberLink PowerDVD HD in WINE? It came with my BDROM. The first thing I noticed after it failing to do anything useful was that it used Qt, which really makes me wonder why they haven’t put out a *nix version of the software. Sure it uses custom UI blobs, but they’re all included in the binary and it should run perfectly well natively. The only problem I can see is that external software CyberLink provide, such as ArcSoft’s Home Theatre software, won’t run natively.
If a company has gone to the trouble of using a toolkit that runs in *nix, why haven’t they spoken to affiliate companies about a 3rd party native DTS-MA/True-HD decoder? Plenty of soundcards support *nix, and with it the decoding of these formats, so why are we not seeing anything? I think that article above really explains this quite well. Linux already has excelletn MPEG4-AVC decoding support, with VDPAU which even outperforms DXVA as far as GPU assisted decoding goes, why don’t we have the same thing for audio?
I seem to have answered my own question, the “audio situation” in linux specifically is terrible. FreeBSD has no problem. Solaris has no problem. OSX has no problem. Linux has OSS, ALSA, aRTS, PulseAudio, ESD… I could go on. They are all slow, they are all a pain to configure. Phonon is excellent but still acts as a server of sorts. All the factioning is destroying linux.
NB: I could be incorrect about CyberLink using Qt but I don’t believe so. Point still exists that we have the option of having an excellent OS yet factioning keeps destroying that possibility.
I Strongly Dislike Open-Source Developers And So Should You
Open source projects are awesome, right? They provide usually excellent programs, with source that allows any random developer to hack it apart and improve and bugfix. They allow people like Michael Niedermeyer to yell at people and be tyranical about media players and what code is allowed (fuck you I want matroska editions, uau plz2provide) and they allow people like the great folks at the Chakra Project to make what I like to refer to as KDE on crack.
Yesterday, I went about the usual task of adding another disk to my LVM grid. I had also upgraded from KDE 4.2 to 4.3, and because KDEmod is awesome, I assumed there would be no conflict with the absolute retardation that stock KDE in Arch had introduced with its crazy package splitting (fuck you Debian for encouraging people to split shit) My LVM went fine. I had 950GB of space floating there for the ComSSA LAN this weekend. Excellent. Reboot. FUCK.
Somebody had FORGOTTEN TO TELL ME AND THEN PROCEED TO MAKE NO NOTE OF IT ANYWHERE AT ALL that due to Arch’s dumb splitting, KDEmod had been forced to rename the ~/.kde4 dir to ~/.kdemod4. I rebooted into a system that appeared to lack ALL my settings in their entirety. A simple symlink fixed this but the time it took me to find out about it was crazy. This is by no means the biggest cockup Arch has done recently, I recommend reading http://archlinux.me/brain0/2009/08/16/shit-happens-when-you-party-naked-or-use-crappy-shell-scripts/ for a good read on how to fuck up a repo, admitedly I have done this to Ophion twice, but not quite as spectacularly.
I guess I can complain about Arch but it is still my favourite distro, at least until FreeBSD implements Pacman, and then I am getting the fuck away from Linux. Arch is quirky, and it has some really random bugs that no other distro seems to have, expecially involving wine and ffmpeg, and the 64bit version is a load of shit for the most part. Curse their insanely good package manager for keeping me in Linux-land.
Now to finish all that Gulden Draak in my fridge and worry about finding a good window border style and wallpaper, because I am finally changing my desktop for the first time in 3 years. I might even ditch KDE, who knows~
y u do dis firefox?
I have been a long time hater of Firefox since about 1.0 came out. I remember loving it back in the 0.8 days, before it turned into a bloatmare (bloated nightmare, I am a master of the English language obviously) So last week, when I had so many tabs open in Opera, Arora, and Konqueror and decided I would nuke them and reopen later to see what I had up and kill the irrelevant tabs. I was then faced with a choice: Midori, Galeon, or Firefox. Now all three are GTK so should be as bad as each other, but I figured Midori was just an Arora clone (or vice versa really) and Galeon is old, so I went with Firefox. Wrong Fucking Choice.
I am wondering if anyone else has had this issue with Firefox, I believe it only effects *nix users, as an OSX G5 user I know has said it happens to her. One certain pages, but not all, and it seems to be somewhat random except GMail ALWAYS does it, cause my HDD to start grinding. It makes a terrible noise like the arm and head are ramming into the platter like a 15 year old virgin and his birthday whore in this terrible cacophany of OH GOD MY HARD DISKS FFFFFFFFFFFFF. Has this happened to anyone else?
That’s about all I have to say on the matter besides for Firefox 3 still rapes memory but isn’t too bad without any extensions, and it’s still an ugly as fuck GTK application.
All about makepkg and splitpkg .conf files
Today I was looking into ICC (Intel’s C/C++ Compiler) after someone in #x264 mentioned it. I was wondering if it was possible to not only customise a pkgbuild, but also the entire build environment as well. Obviously it’s possible if anyone takes the time to read makepkg.conf, however it got me thinking on some other things. Makepkg, for those who aren’t aware, is like a lot of the other Arch tools: simple shell script. The same goes for abs, and various other daemon and startup related things Arch does.
Customised compiler usage, or “I want to use ICC on everything”
To configure makepkg or splitpkg for ICC, simply open the required conf file, skim down to the ‘Architecture, Compile Flags’ block (for cleanliness rather than necessity,) and add in CC=icc and CXX=icpc. That’s it. As makepkg is a shellscript, it automatically loads the correct info into the build environment when running your pkgbuild. For an individual pkgbuild once off or whatever, add those variables to your build block pre-make.
Package differences and binary patching
I only noticed this feature earlier today, but makepkg actually has an xdelta module. One could add in the xdelta flag (read the source, too much :EFFORT: for me) and generate binary patches of previous patches, allowing relatively small changes to HUEG packages to not raep the connections of Indonesian, Brazillian, and Australian users. You could also stick Options=(xdelta) in your pkgbuild I guess. You’d need to have your previous package on hand however.
What the shit is splitpkg?
Chakra and KDEmod users, FLOCK! Splitpkg is the build system Chakra and KDEmod development uses. It’s an exact copy of makepkg and makepkg.conf, only the config is edited to allow for building regular packages as well as KDEmod packages. Splitpkg automatically outputs the built packages in the directory of choice, as well as a few other things.
I also run Quadpkg on my machine, another variation that compiles for -j5, outputs .tar.xz packages, and does some other handy optimisations for quadcores. My quadpkg is also configured for ICC now, which hopefully gives it more oomf.
There are other things one could try, for laziness, like distpkg, which is identical to makepkg, only setup to always use DistCC. Some things are better off not being done over distcc, but really it’s as simple as editan the pkgbuild for this, however, :EFFORT:
Now to figure out why nVidia is still broken, and then do some ICC builds of x264, ffmpeg, and mplayer. Ophion is sorely in need of repository updates on these as well as Aegisub, and quadcore optimisations could be interesting, although not too big a difference is for sure.
Remote Dependency Fetching
edogawaconan came to me today with a rather pitiful story. While Australian internet is notoriously fucked, it does maintain fairly OK speed, at an average of 1.5mbit or so. Indonesia lacks our silly bandwidth allocation but really lacks in the speed dept, to the point where downloading 35MB of makedeps or deps for a PKGBUILD takes forever. I think part of the problem is because Linux is generally faster than Windows, one tends to notice the internet being slower than the rest of the system.
So to combat this, I wrote a small bashscript that when pointed to a PKGBUILD file and given an output, it will get the URL’s for the deps and makedeps and cat them to a file. The script can easily be modified to SSH into your university and download for you, or just take the output file along with you to uni and run a wget -i output. Take the downloads deps/makedeps and either copy them to /var/cache/pacman/pkg and run something like makepkg -sri to install deps, compile and install the app, and remove makedeps.
I could of course add more functionality to the script but I don’t really care, and like always there is no help or support or whatever else I guess. Syntax and link below:
getdeps /path/to/PKGBUILD /path/to/output
I would recommend chmodding it +x and possibly sticking it in /usr/bin/ for ease of use, and of course this only works in Arch (including Chakra and Ophion,) and POSSIBLY Arch derivatives. The above example assumes it is in /usr/bin/, but if not and it’s in your current working dir for example, ./getdeps.sh in out and whatever.
EDIT: Updated with edogawaconan’s helper stuff, because I don’t care for helpful announces on failed syntax.
http://ophion.pastebin.com/f79a80758
I Hate Typesetters
I really hate it when typesetters don’t set the resolution for the script properly. Especially when I just burnt 350MB of my bandwidth on an encode and script that isn’t that great. Not to say it was bad video wise, but I saw no reason for the HUEG filesize given that on my 1080p monitor the SD encode looks about the same.
What does shit me off is when the subs are set for 704×400, and libass being broken as fuck but fairly good at what it does scales the \pos tags in the sub track, as floats. VSFilter on the other hand (I’m assuming here, but it seems the most valid explanation) uses an integer. For the non-coders, this means that when libass scales positioning tags, it creates decimals, while VSFilter truncates that down to a solid number. That or VSFilter is capable of rendering to decimals, whichever. Point is libass can’t render to decimal and therefore shits itself.
It’s really not hard for typesetters to fix this. Static and Eclipse do it all the time, Menclave are starting to. Shinsen on the other hand seem to think there is nothing wrong with it. From a windows user point of view, yeah, its fairly ok, as 99% of windows users will be using VSFilter anyway. However SHS DO tell people to use mplayer on linux/OSX/whatever, which uses libass, thus rendering incorrectly like so.
Clearly not everyone will be pissed at this, but for the increasingly large number of mplayer users, it’s goddamn annoying and so easy for the group to fix. You can argue the user can demux it themselves and fix, but honestly is it that hard for the typesetter to do? I normally get the SD encode and accidentally grabbed the HD today, I guess I learnt my lesson.
TL;DR fuck shinsen and any other typesetters that don’t set the res properly.
Matroska Attachment Scripting
Earlier today, martino asked in #darkhold about extracting large ammounts of fonts and other attachments from mkv files. Noting that on linux there is no mkvextract gui, I went ahead and wrote a poorly formatted script. Copy to where ever and run it how you will, syntax is ./mkvattachex.sh infile.mkv a b c, where a, b, and c are optional. a is the number of video tracks, b the number of audio, and c the number of subtitle tracks. These are important so that the script can tail properly however I am pretty sure I can fix this. Defaults are all 1 so if it’s a standard file with only 1 of each then they can be ignored. The script will extract all attachments, which generally means all included fonts. I have no idea if it will kill your system and if it does, as always, blame movax.
Here be the actual script, I’ll be updating it later on with proper functionality:
http://ophion.pastebin.com/f8437ff2
Ordered Chapters and You
One of the most interesting features of the Matroska container is Ordered Chapters. Admitedly until recently I wasn’t such a big fan of it, due to lack of support for them in linux, or anything other than Haali’s splitter really. I understood the point and found them to be clever and useful (although after using them I disabled it due to not wanting to have to watch the OP of a series at the time) however I never really thought much about how good they are. Recently Kovensky and elenril patched the mplayer PKGBUILD for Ophion, it now has support for ordered chapters.
Ordered chapters are a function of matroska that allows segments of a file to be externally linked. Think of the video file as a php web page for example. Obviously the site looks like 1 big page, but on the server end its a series of php includes to ‘mux’ a bigger file out of. With ordered chapters, segments are linked to allow clips from other files to be included in the main file without it being seen by the viewer. Take for example the DVD rip of Shigofumi I am watching at the moment. The episodes themselves contain the opening scene, the main episode, the ending, and the next episode preview, but no opening theme song. The OP is a separate file, but with ordered chapters in my mplayer, smplayer reads it like one file, along with timestamps and subtitles.
It took a bit of tweaking to get subtitles using the ssa/ass library to work (-correct-pts in mplayer options will fix it) however I’m pretty happy with it now. I haven’t commited the new package to the repository yet, considering making a testing repository, but it all seems fairly solid and stable so far. If anyone would like to try it out, the package can ge found here.
For more information, read what TheFluff has written over on Walls of TL;DR