Thursday, March 19, 2009 | Permalink
It's been a while since I last tried Linux, for two reasons. First is the OpenGL debacle that has turned this API much less interesting to me, and with all my demos written in DX10 there hasn't been much need to ever boot into Linux. The other reason is that for a long time AMD didn't provide any drivers for my particular GPU, a Radeon HD 3870x2. Oddly enough, the release notes for the Linux drivers still say that the HD 3870x2 is not supported, although clearly it worked for me now, so I suppose this is just a documentation error. How long it's been working I have no idea.
Anyway, so I wanted to try some stuff in Linux recently, primarily the SSE intrinsics. In the past I've used Gentoo, which is more of a power user distribution, but I couldn't be bothered to use that again since it's quite a lot of work to set i up, besides it's not being updates as much as it used to be these days. Ubuntu on the other hand seems to be the most trendy distribution now, so I decided to give it a try. I have to say I'm quite impressed.
It gave me a quite "Windows-like" experience. First I installed it on my laptop. It installed without problems and once I was in the OS it notifed me about updates which it downloaded and installed for me. Drivers for all my hardware was set up automatically and everything just worked out of the box. It even asked me whether it should install the proprietary drivers for my video card and set that up automatically for me as well. Once I got down to compiling stuff and needed libraries I was able to find and install everything I needed with a few searches in Adept.
In the past I would have said that the big problem for Linux is that it's an OS for geeks made by geeks and that for instance my mom who has big enough trouble with Windows would not be able to use it. And frankly, even if you're a geek, who wants to hack around in a bunch of config files anyway? I don't know how much of this is Ubuntu vs. Gentoo, or just the general progress of Linux in the last year or so, but with the experience I had I have to say that I would now be comfortable with recommending Linux to anyone. If you have never worked with either Windows or Linux before and you're starting entirely from scratch, I don't think it would be any harder to get started on Linux than on Windows.
Anyway, this was on my laptop. I installed it there primarily because I didn't think drivers for my HD 3870x2 existed, because that's what the driver release notes say anyway, whereas the Mobility HD 3650 should be fine. So given this positive experience I decided to give it a try on my desktop machine as well. Especially since I didn't want to have to copy files back and forth between my computers. Just for convenience I decided to use Wubi
, which basically is an Ubuntu installer you run from Windows. It really can't be simpler than that. Download an exe, double-click and off you go. Once it's done you have a fully working complete Linux installation. Not a virtual machine like "Linux inside Windows" or anything like that, but a standard OS you boot into, except its file system is a large file on your Windows drive. And if you don't like it you can also uninstall it like any other application. With Wubi any form of inconvenince or danger of changing the partitions on your harddrive is eliminated. There's really no excuse for not giving Linux a try anymore. So I gave it a shot, and it worked fine, and to my surprise it even installed drivers for my GPU, which I thought didn't exist. And they worked fine too. The Wubi installation seems to differ from the regular installation though in a few ways. I found I had to change a few settings here and there, like changing from single-click to double-click for opening files and so on. Also it seems the packages Adept knows about differ. The standard installation had all dev packages I needed, whereas I had to resort to typing apt-get on the commandline to install some packages in the Wubi installation. I suppose Adept has some sort of index of packages it knows about and the Wubi installation only includes those a normal user would use, or something like that. I haven't used Ubuntu before or Adept so I really don't know. Other than those minor annoyances, the Wubi installation worked really fine too.
Two thumbs up for the Linux community.
Friday, March 20, 2009
There is MinGW, which should have support for all SSE intrinsics you might need, so Linux as a SSE testground is a bit strange
Friday, March 20, 2009
why do you think you needed linux for using sse intrinsics... ?
the Windows sdk comes with the xmmintrin.h header file which contains declarations for MMX/SSE/SSE2 intrinsics.
btw - i played around with gentoo years ago as well. It seems that most linux users I know spend an awful lot of their time configuring their system/desktops....
Friday, March 20, 2009
ah - scratch last comment. you never said you needed to install linux in order to experiment with intrinsics... I misread.
Saturday, March 21, 2009
Sorry, I guess the post was a bit unclear. I actually implemented all the SSE stuff in MSVC first. But I also wanted to make sure it works in Linux before I go to great lengths with this idea since I want to keep cross platform compatibility. I only needed a few minor changes to make it compile and run fine under GCC in Linux so it looks like I'll keep this code.