Tuesday, July 30, 2013

Gentoo, Linux 3.10 and Nvidia drivers (also Linux 3.11)

Update: Check the end for Linux 3.11

Looks like binary Nvidia drivers aren't compatible with Linux kernel 3.10 for some reason. There's a patch (found it in Nvidia forum DevZone) but for some reason Gentoo maintainers won't include it in gentoo-sources even as an use flag. Portage only tells me:

* Gentoo supports kernels which are supported by NVIDIA
* which are limited to the following kernels:
* <sys-kernel/gentoo-sources-3.10
* <sys-kernel/vanilla-sources-3.10
* 
* You are free to utilize epatch_user to provide whatever
* support you feel is appropriate, but will not receive
* support as a result of those changes.
* 
* Do not file a bug report about this.

I haven't heard about epatch_user before but it seems perfeclty reasonable for Gentoo to have something like this. Basically it is a way for user to easily patch sources to be built without editing ebuilds.

I started to look for info about how to use this epatch_user. Gentoo handbook was the first place to look but I didn't get it to work with that info. After looking at other pages I found out what was wrong. I think the handbook should say
/etc/portage/patches/<category>/<package>/<name>[-<version>[-<revision>]]
instead of
/etc/portage/patches/<category>/<package>[-<version>[-<revision>]]
where <name> is an arbitrary name for the patch. Anyways I wrote a (very) short howto for those with the same problem.

A short howto

Run all the commands as root:
mkdir -p /etc/portage/patches/x11-drivers/nvidia-drivers
wget http://pastie.org/pastes/8123499/download -O /etc/portage/patches/x11-drivers/nvidia-drivers/nvidia-drivers-325.08-lnx311-rc0.patch
emerge nvidia-drivers

Quite easy. Of course this assumes you have gentoo-sources-3.10.x configured and compiled and nvidia-drivers-325.08 unmasked.

Linux 3.11

Seems like something different for Linux 3.11. That's solved by a patch from https://bugs.gentoo.org/show_bug.cgi?id=482168. Put that file in /etc/portage/patches/x11-drivers/nvidia-drivers-325.15/ and Nvidia 325.15 should compile for Linux 3.11.

Monday, July 8, 2013

Regim and processing astrophotos in Linux only

Thanks to Astrophotography community in G+ I found Regim. I've stacked my astrophotos using Deepskystacker in Windows and everything else (with computer in general) I do in Linux, so booting to Windows is always a pain. Now it seems that's over. Regim is written on Java and it works quite well in Linux. I've experienced couple of crashes but otherwise everything seems good.

Regim is easy to use, extremely automatic and does easily some things I haven't found in DSS. For example removing gradient which is quite handy for me since I take photos on my backyard. Every one of them has some gradient from nearby city lights.

On the other hand Regim is quite limited in what it does and it really requires real image processing software to get anything done.

I tried Regim on some of my old imaging data and compared it to what I got with DSS. Here's PanSTARRS comet close to Andromeda processed with DSS.

PanSTARRS and Andromeda stacked with DeepSkyStacker

Here's what I got with Regim. After stacking I removed the gradient, adjusted white balance with Regims "manual" tool (I set the b-v value of Andromeda center to 0.63), and did the final adjustments in Darktable. So everything in Linux only. Finally.

PanSTARRS and Andromeda stacked with Regim

Now if only Gimp could handle 16bit colours...

Tuesday, May 14, 2013

Windows and error messages

People say Linux is difficult to use because when something goes wrong, the error messages are too cryptic. I disagree.

I recently installed new Nvidia drivers for Windows 7 and ended up with computer stuck in reboot cycle. Blue Screen Of Death flashed for a fraction of a second. I understand Microsoft wanting to get rid of the notorious BSOD, but I don't see how hiding the error message altogether helps anything. Of course F8 on boot helped and I got to see the BSOD and it's message. It said something about Nvidia and booting with "latest working configuration" (or something like that) worked. Great.

Couple of boots after (and after Windows had updated its SATA-drivers) I got the same reboot cycle with flashing BSOD. This time the latest working configuration didn't help so I went to see the BSOD. Here it is:
An user friendly error message
I'll also type out the technical information in case someone searches Google for help, as I did.
*** STOP: 0x0000007B (0xFFFFF880009A9928,0xFFFFFFFFC0000034,0x0000000000000000,0x0000000000000000)

My searches didn't right away give me a direct answer on what to do, but I found out this has something to do with SATA (and Windows had just updated SATA-drivers... hmm...). I went to BIOS, changed all the SATA buses from AHCI to IDE and Windows booted up nicely.

Of course this was after couple of days of troubleshooting from Linux. I ran ntfsck and all the other rescue tools I could think of. I also tried all the tools from Windows installation disc.

So... I'm just wondering why the error can't say for example "Can't read system disk" or something other less cryptic than 0x0000007B.

Totally different story is my problems after buying a new motherboard which instead of BIOS is an EFI one. Windows didn't start up, only rebooted the computer without any error messages at all. Nothing on logs either. After couple of days of rescue discs and such I found out the reason was an unpartitioned 500GB HDD. I set up an partition table for it and Windows booted up just fine.

Anyways... Linux has always told me what exactly is wrong. If my skills haven't been good enough to fix it, Google has always found a solution. I've known what to look for.

Tuesday, April 16, 2013

Gentoo on Raspberry Pi

I have some problems with both Raspbian and RaspBMC. RaspBMC is perfect for XBMC which I'm used to having working whenever I need it. Everything else is difficult. I'd like to install some additional software such as Gphoto, irssi, screen... but I have to be extra careful not to break everything. More than 5 times have I borked the installation and had to do it all over again.

Raspbian is Debian. And a proper one. It works out of the box with everything but XBMC. I found a selfprogramming blog with compiled packages and instructions how to install them. Nice, but "difficult". There's no repository, you have to manually softlink files. Maintaining this XBMC will not be easy. Also you have to set yourself it to automatically start, but I don't consider that a bad thing. I still haven't figured how to do that so XBMC won't be running all the time but will be when I want it to.

Anyways... I don't believe Gentoo would magically do everything I want just the way I want. I'm trying it because I'm more familiar with it than Debian. I know how to use dpkg and apt, but that's about as deep as I know Debian.

My plan is to eventually cross compile everything on my desktop. Now I have Distcc set up and desktop handles some of the compilation. It really speeds up the emerge processes. My plan also includes not having portage tree or kernel sources clogging up the SD card. I'll try installing the XBMC first before attending to these problems.

For now the Gentoo is running. Installation finished with some minor problems which I'll address in different posts on this blog.

Friday, April 5, 2013

PanSTARRS and Andromeda

Yesterday, April 4th, must have been quite a day for astrophotographers. The comet C/2011 L4 (PanSTARRS) was as close as it gets to the Andromeda galaxy. I also went outside in hope of catching the view on camera.

The weather could have been better. There were thin clouds obstructing the view and spoiling my photos. Comet itself was quite easy to find although there was no chance of seeing it with naked eye or even through camera. I pointed my camera to where I knew Andromeda was and after couple of shots I had them both on image.

I took several images hoping that DeepSkyStacker could find a bit more of Andromeda than the center. Here's what I have:


If you know what Andromeda looks like, you can see it. I've taken a lot better photos of Andromeda before. Now it was too early for that. Also the gradient is quite disturbing. I've heard IRIS might be able to remove the gradient. DSS certainly did not.


Friday, March 22, 2013

PanSTARRS comet and Aurora Borealis

I saw a picture of the comet PanSTARRS (C/2011 L4) taken in Turku Finland at March 16th 2013 and decided that to go out and search it myself the next day. So Sunday the 17th I went to Kuuvuori (Moon mountain in english) in Turku with some other stargazers who were there yesterday. I was at the spot at 18:50 and started to set up my equipment.

At about 19:50 we found it on my dobson. Hmm... I better check the time because this seems quite late. 19:52 says the EXIF timestamp of my first photo of it. Maybe it was a bit earlier... Anyways here it is.


Whoa! Or not much to see... Depends on how much you respect the astronomy itself. That photo is actually not the first. All the photos through my dobson were more or less blurred. This was taken with 75-300mm zoom lens at max zoom. Maybe I should have shot a video through the dobson, like I do with planets.

Couple minutes after really seeing the comet something happened. I saw "clouds" on recently clear sky, or at least I thought I did. The "clouds" turned green and the show started. All the previous Aurora Borealis I've seen had been faint and required a bit of imagination to see. This one did not. The sky was flashing green and purple so fast my camera couldn't catch it. I saw arches, rays, something that reminded me of a scifi movie "warp speed".

Warp speed
For a while northern lights filled the whole sky. I decided to enjoy the view rather than fiddle with my camera to get better pictures. I got one with both the comet and Aurora in view. Comet is quite small in the photo so I marked it.


I had my camera on an equatorial mount so the ground is tilted. Don't mind that.

I won't lie when I say that half an hour was probably the best show I've ever seen.



Saturday, February 9, 2013

Comparing planet stacking software

Living near city lights makes it quite difficult for me to see deep sky objects. I see many, but has to be an excellent weather. Planets are a lot easier target. Lately Jupiter has been in a good position for viewing. I've also tried to take a lot of photos. One of which was quite a success (with my skills and equipment) because you can see the moons as well.

A single shot of Jupiter. No stacking used here. 
This is the first photo ever I took of Jupiter that didn't require any imagination to recognize the planet. Well... best of the hundred I took that night. But still just a single shot and a bit help from Gimp.

Planets should be photographed by taking a video and stacking that. I've found 3 software to do that. RegiStax, AutoStakkert! and AviStack. None of them is open source but AviStack should work on Linux once you succeed on installing IDL Virtual Machine. For some reason I can't make it work.

I took my Skyliner 200, 2x Barlow, Canon EOS 1100D and a laptop with EOS Camera Movie Recorder (which is open source, yay!). I recorded this video:


...or actually about 6 of those. They're all quite identical so no need to share them all.

With the same movie I tried four different stacking software. My skills with them are almost non-existent so this comparison is mostly about how well the programs do automatically.

Here's the result:

I used drizzle when available, but I have no idea whether that was a good idea. I'm quite sure there was no need for it, but I don't know if it did any damage. This need more testing.

Autostakkert was perhaps the most automatic. It also did the best job although there was no wavelet sharpening. I did that with RegiStax6. The result is a lot better than the image that's also stacked with RegiStax.