December 27, 2007
Installing Fedora 8 on a Gigabyte GA-G33M-S2H motherboard with 2x 500GB SATA drives, onboard GMA 3100 video into an Antec Fusion (Black) caseThis entry is a little bit different than the others I've made: I'll be updating it as I continue working on the box.
Surprisingly, this was the first system I've ever put together myself. The first computer I ever used was an Apple //e that my father bought. I was probably about eleven years old. It was great. Of course, he did whatever assembly was required on that machine. We had that machine for years: I was still using it into high school. Probably in my freshman year of high school, my dad bought a "Fat Mac", one of the 512k Macs in the original case. At some point he got a 10MB hard drive for it that sat under the machine in a matching beige.
When I went off to college, I worked part-time at the campus computer store (a great job for a CS major, maybe) and saved up until I could by my first machine: a Mac IIci. I had that for four years, and in my last year there I bought a PowerMac 6100av. When I went off to grad school I made the switch to laptops and Windows, with a Toshiba Satellite Pentium II based laptop. I eventually replaced that with an IBM ThinkPad A31p, which I have been running since 2001. When I moved to Japan it was my primary machine, until I got one of the last of the PowerPC PowerBooks: a PowerBook G4 with the superdrive and 1440x960 display. I'm using it this very minute to type this up, and it is my primary work machine at home. (I have actually at work a MacBook Pro Core Duo 2 machine, as well as a Dell box with linux on it, and a ThinkPad 60p that runs windows.) The venerable IBM ThinkPad A31, with three internal hard drives, has been running as my entertainment center for the past two years, hooked up to a 24" 1920x1200 LCD monitor. It is a great machine, but with a 1.8GHz P4 Mobile chip, it is starting to show its age, and can't play a lot of the video files that I download now. Since I'm in Japan, I download a lot of American TV programs to keep me up-to-date on what is going on over in America. The A31 has no chance at playing anything in h.264, and can't do any sort of HD content.
So I finally gave in and bought a new system. I thought I would get a media-center type system, and go with a desktop so that I can upgrade it as time goes on. I was planning on getting a Shuttle box, but the prices for those are pretty high. I spent about the same as I would on a shuttle box, but was able to pick up the beautiful Antec Fusion black case, which is designed to be quiet (it is very, very quiet) and cool. On the downside, it can only take one 5.25" device, and two 3.5" devices, which is a bit limiting. I would love to have four hard drives in there for some sort of nice RAID setup, but I'll settle for two very quiet drives instead.
First thing was to unpack everything, and start setting up the motherboard. I think the Antec case is well designed, with a really nice drive cage for the DVD drive, and well cushioned drive housings for the two hard drives. I installed the Hard Drives and hooked them up to the SATA slots on the motherboard, as well as the DVD drive via the IDE interface. I had to hook up various leads for the front USB and FireWire ports and some of the indicators, but none of that was too hard. One thing that bothered me is that I was not able to find the powersupply fan control that the manual talked about - it is supposed to be a three pin lead that I can plug into the system board so it can monitor and perhaps regulate the power supply fan, but even without plugging that in I can't hear anything from the fans, so I don't think it is a big deal. The case also has two large 120mm fans that I set at the lowest level, which I also can't hear unless I put my head up to them.
Linux booted up fine, and the installer ran without a hitch. It auto-detected everything, got the network up and running, had no trouble with the SATA drives or DVD, so things look like they are golden. I am currently running the package update. The only problem that I had is that the monitor reported it is receiving a 2020x1204 signal at horizontal 73KHz and vertical 59.7Hz, which of course does not display well on the 1920x1200 LCD monitor. I am not sure what caused this; right now the video card driver was autodetected and is using the "intel - Experimental modesetting driver for Intel integrated graphics chipsets" driver, which sounds good but perhaps set the modeline wrong for the monitor.
The Monitor section on the new install has the monitor as:
Section "Monitor"The Monitor section on my working A31p says:
ModelName "LCD Panel 1920x1200"
HorizSync 31.5 - 74.5
VertRefresh 56.0 - 65.0
Section "Monitor"So I remember that I had to dig through the Xorg initialization log to find out that the EDID automatically supplied values were incorrect, so by setting the ignoreedid option I could get it to run in 1920x1200. I might have to do the same thing here. After trying that, it turns out that the IgnoreEDID option is ignored and does nothing.
HorizSync 24.0 - 83.0
VertRefresh 55.0 - 75.0
# Ignore incorrectly specified modelines from the monitor (WTF?)
Option "IgnoreEDID" "true"
I can't believe that the default install of Fedora 8 with developer tools off of the DVD does not include Emacs. So I had to install that. Yay for yum, which at least makes it easy. Also, I'm shocked that GNU screen is not included. Unfortunately, that did not fix the problem. The DVI resolutions are still strange.
Interestingly, if I boot up with the VGA cable plugged in and run off of the analog video output, everything works great. Compiz loads up and Desktop Effects are enabled, so I get cute wobbly windows. I'm going to have to spend some time tracking down why the DVI port does not work properly: I really wanted to have a nice digital connection to my LCD! I should also note that I had to disable Desktop Effects because video was stuttery under them. I'm not sure exactly why this was, and perhaps there is a way to fix it, but I don't need wobby windows as much as I need smooth video.
Also, when I was playing with sdlmame, I realized that I didn't have direct rending (dri) working. I had to add the magic incantation of
Section "Module"Also, I'm using this for my video card setup (the default AccelMethod is XAA instead of EXA, which is supposed to be faster.) Basically I use all the defaults except for the AccelMethod one. I didn't notice it being any faster though. Using glxgears, I get around 1200 FPS. Is that good? I have no idea at all.
# devans: newer method that should be faster (see man intel)
Option "AccelMethod" "EXA"
to my /etc/X11/xorg.conf to get DRI working. Desktop Effects are still slow though and video doesn't play well when Desktop Effects are enabled though. It could just be that the Intel GMA3100 is too slow to really hack it.
I had to set the sound preferences in Fedora up properly to play sound, but they did work when I plugged the speakers into the RCA out jack on the back of the box. I'm afraid I didn't have a place on the motherboard to hook up the front-accessible sound jack, which is a shame because that would be very useful to use.
Update: DVI is working just fine! If I unplug the VGA cable, and plug in the DVI cable after the BIOS boot, and perhaps after the text-mode linux screen (I am not sure) DVI works great. Wow, it is very clear. I'll probably do a bit more testing to see if this survives a reboot. (It could be the new kernel perhaps.)
Installing Good SoftwareFollowing http://www.mjmwired.net/resources/mjm-fedora-f8.html I installed the good stuff: Amarok, Xine, Mplayer, all the binary codecs needed to play stuff, Azureus, and a bunch of other stuff.
I set up Azureus just using the standard yum install method, but the problem with that is that I don't have the plugins and stuff installed that I have set up. I really want to have at least the rssfeed plugin working so I can automatically download American TV shows. According to the Azureus Wiki, plugins are stored in your home directory at /home/<USER>/.Azureus/plugins, but when you install the plugins for everyone it looks like they go into the install folder. When I installed with yum, that turned out to be /usr/share/azureus/plugins. So I copied over the plugins from my other install in there. I also copied over my ~/.Azureus directory. I think that should take care of all my settings and plugins.
SDLMAMEOne of the things I wanted to test out was MAME performance, so I could play Super Street Fighter II Turbo on my big screen. To that end, I decided to install sdlmame and see how well that would play on my setup. The Dribble Repository offers a yum compatible repository that has all sorts of fun stuff (check the website) and conveniently has sdlmame packaged up and ready to go. It plays nice with the standard Fedora repos, as well as Livna which I added since it makes life easier by providing some things that are not quite pure open source, but very convenient to have (multimedia things as well as proprietary nvidia / ati drivers, although right now using the onboard Intel video I don't need either of those, but they have been very useful in the past.) Follow the Livna Configuration and then run
their page on configuring the Dribble repository. I installed the qmc2 mame front-end and sdlmame, which both worked well. Unfortunately, performance was very slow. I was getting about 12 FPS in Pacman, which is not playable. I think this has to do with the GMA3100 OpenGL performance, since the software renderer was much faster than the default opengl render, and I've also been having some speed problems with Desktop Effects which also uses opengl and the video card for rendering. So this is something I'll have to look into later, or possibly buy a video card for. Also, SDLMAME for some reason kills my mouse, and I can't quit the program. When I try to quit, nothing happens, and the processor sits at 100% utilization. I am able to ctl-alt-F4 to another virtual terminal and log in, then I can kill -9 the process. My mouse won't work when I do that though, and then I have to re-start the Xserver.
Interestingly, I downloaded xmame from x.mame.net and compiled that from source. It runs well, but still I can't run things fullscreen. So I'm sure that the problem is in the video settings somewhere. Here is a related bit of info:
xmame -video-mode 1 -fullscreen -sound-mixer-plugin alsa -dp alsa -nosi -ef 5 -skip_gameinfo mslug2
That worked well for someone else, but didn't work for me.
Setting up SambaI was confused that Fedora 8 didn't have Samba (windows file sharing) set up out of the box. I had to install some additional samba bits as well as system-config-samba (I believe, I'm going from memory right now) to get the nice graphical Samba setup panel that is under the Administrator Preferences group. Once I set that up, I wasn't able to actually log into the share from my windows machine. A little star showed up on the notification area that was some sort of SELinux error browser GUI. That is great. I am running with an enforcing SELinux policy, and this causes strange and random things to fail. In this case, I had to set the samba_enable_home_dirs boolean to 1 to allow samba to access my home directory. That was done with:
setsebool -P samba_enable_home_dirs 1
You can find information about Samba and SELinux using man samba_selinux.
I also set up a share at /data, where I have all of my media content. According to the man page, to get that to work, I'll need to set up the samba_share_t file type attribute on the directory (and children!) for that to work:
Actually, you can also set up a general "this is shareable read/write content" that applies to various demons (web, ftp, smb, etc.) in a similar manner. I couldn't find the file_contexts.local file they wanted above, so I don't know if this will last a reboot or not. The relevant excerpt is:
SELinux requires files to have an extended attribute to define the file
type. Policy governs the access daemons have to these files. If you
want to share files other than home directories, those files must be
labeled samba_share_t. So if you created a special directory /var/eng,
you would need to label the directory with the chcon tool.
chcon -t samba_share_t /var/eng
If you want to make this permanant, i.e. survive a relabel, you must
add an entry to the file_contexts.local file.
I think I'll set things up that way, and then go to some extra lengths to make everything in there non-executable just in case... (Of course, pending free time to look up how to do that: I know how to mount something as non-executable, but I don't think I can do that in my current configuration of 2 500GB hard drives with LVM spanning them and /data as just a directory in the root file system.)
If you want to share files with multiple domains (Apache, FTP, rsync,
Samba), you can set a file context of public_content_t and public_con-
tent_rw_t. These context allow any of the above domains to read the
content. If you want a particular domain to write to the public_con-
tent_rw_t domain, you must set the appropriate boolean.
allow_DOMAIN_anon_write. So for samba you would execute:
setsebool -P allow_smbd_anon_write=1
Another person has blogged their solution for this problem as well.
Moving Amarok settings to the new machineI use Amarok as my music player on linux. It is really nice. It is easily the best of all the music players I've tried in Linux, and I think I like it better than iTunes, although I'm not really too sure about that yet. I set it up to use MySQL as the database for the music, so I believe I will have to do a database dump and then import that database into the new Amarok install on the new machine.
First, create a dump of MySQL:
mysqldump --add-drop-table -u sadmin -p pass21 amarok > amarokdb.sql(Of course, replace your user name with the DB admin name, and password with the proper password. If you aren't using amarok as your database name, change that to match as well.) Carefully look through the dump to make sure that there are not any critical tables in there that you wouldn't want to overwrite - we have instructed mysqldump to drop tables so it will delete all tables that might exist when you import this file. In this case,
Before we can put this on the new machine, make sure you have MySQL installed and running, then log into the client and create the amarok DB:
(Taken straight from the Amarok wiki referenced below.)
1) Edit /etc/mysql/my.cnf, adding this line to stanzas [client] and [mysqld]:
default-character-set = utf8
2) Restart the mqsql daemon to pick up the new default charset
Do this before you create the database for amarok.
Make sure the MySQL daemon is running. If necessary, add it to your linux startup scripts, via whatever method your distro uses.
Create a root password for MySQL, if you have not already done so.$ mysql -u root
set password for root@localhost = password('xxxxxxx');
Of course change xxxxxx to the password you want.
Once you have done that, you must create a MySQL database and a user for amarok for through any usual method. You can just use the "mysql" command: (it will ask for your MySQL root password)$ mysql -p -u root
CREATE DATABASE amarok;
GRANT ALL ON amarok.* TO amarok@localhost IDENTIFIED BY 'PASSWORD_CHANGE_ME';
Then import the table on the target machine:
mysql -u sadmin -p pass21 amarok < amarokdb.sql(Of course, make sure your user and password are correct.) In my case I also had to edit ~/.kde/share/config/amarokrc to replace the paths of the directories to monitor to point to their new locations.
The AmaroK Wiki also has some good information on MySQL and Amarok.
Getting hardware temperature sensors workingOut of the box, /proc/acpi/thermal_zone/ stuff wasn't working (neither were the fan sensors.) I have to look into this and try to figure out what is going on.
After some searching on the web, I find that I need to modprobe the correct module to access the sensors. The first step in this process is to run /usr/sbin/sensors-detect. According to the output, I've got an "ITE IT8718F Super IO Sensors" chip on my ISA bus at 0x290, and "Intel Core family thermal sensor", which load with:
modprobe it87and once inserted into /etc/modprobe.d/sensors things should work out dandy after reboots. Actually, it looks like the script automatically modified /etc/sysconfig/lm_sensors, so I don't even need to create a file to load the modules for me since the lm_sensors init.d script should do that. Running the modprobe lines on the command line myself and then sensors showed that things worked great! I'm not really sure how much I trust the readings though: the gnome temperature monitoring applet shows that my motherboard is running at 25C, 21C, and -2C (that can't be right - perhaps these is no sensor in that slot?) while the CPUs are at 12C each. I'm just running a DVD in a window and installing stuff though, so aside from the -2C reading maybe those are all kosher.
# sleep 2 # optional
/usr/bin/sensors -s # recommended
Getting Hard Drive SMART temperature monitors workingAnother thing I wanted to be able to monitor is hard drive temperature. I did a sudo yum install hddtemp but that couldn't read the temperatures. Going back into the BIOS, I noticed that SMART was not enabled for the drives, which was probably why. After enabling it, hddtemp /dev/sda /dev/sdb reported 22C and 21C respectively. I couldn't find any nice way to display the temperatures though. I installed gdesklets, but there weren't any good monitors packaged with it. I installed a whole bunch of desklets (the official site has almost none, but there are other sites that have older desklets) but none of them worked well on a 24" monitor where I'm sitting on the other side of the room. They don't scale and I can't see them, and all of the hard drive monitors assumed paths like /dev/hdX, but I need /dev/sdX and they wouldn't let me change that. I don't really care that much about getting the hard drive temps displayed so I'll just forget about a gauge for them.
Getting the integrated LCD working
The Antec Fusion case comes with a LCD built-in. Really all I want to do is to get it to display the time. Over at codeka.com Dean Harding posted a patch for LIRC that supports the display. You need to have LIRC and LCDProc. LIRC was already installed on my system by yum, and sudo yum install lcdproc worked to install that. Since these are patches though, I'll need to download the source and patch that. Alternatively I can just wait until they roll in Dean Harding's patches, which sounds a lot easier to me. I might just do that.
Following the instructions from http://codeka.com/blogs/index.php?cat=30 I have downloaded LIRC version 0.8.2 (http://prdownloads.sourceforge.net/lirc/lirc-0.8.2.tar.bz2) and the two newest patches from codeka.com. When trying to do the make to compile lirc, I received an error:
lirc-0.8.2/drivers/lirc_dev/lirc_dev.c:883: error: void value not ignored as it ought to be
The problem seems to be that the kernel function unregister_chrdev() has changed to return void. The following message shows some information about the problem. I also just changed the code to call the function, and things compiled well.
Then I downloaded LCDProc as per directions (http://jaist.dl.sourceforge.net/sourceforge/lcdproc/lcdproc-0.5.2.tar.gz) After patching and compiling that, it seemed like things worked well, but when I try to start the LCDd server (LCDd -f -r 4) I received an error:
Driver [imonlcd] has invalid display size
Floating point exception
By deleting the Size=16x2 line in /usr/local/etc/LCDd.conf I was able to fix that error (as indicated on the blog comments) but then the problem is that nothing shows up on the screen. It could be that there is a problem with the contrast setting.
After poking around more, I believe that the problem is that I am not using the new version of lirc_imon.ko that I just built. So I tried a
LCDd -f -r 4
And things worked great! I set Contrast=300, and things are great. When I quit the LCDd, then the display turns into a clock, which is totally cool. Since I want that to automatically happen every time I boot the machine, I created /etc/modprobe.d/lirc and added:
install lirc_imon /sbin/insmod /root/lirc-0.8.2/drivers/lirc_imon/lirc_imon.ko
That should load the proper module on boot. Now the question is how to configure LCDd to show interesting things. To make interesting things show up, you need to change the settings in /etc/sysconfig/lcdproc/lcdproc.conf. Change those and play around with them until they suit you.
Trying to start LCDd automatically with
service LCDd start
resulted in an error:
Starting up LCDd: Could not open driver module server/drivers/curses.so: server/drivers/curses.so: cannot open shared object file: No such file or directory
Driver [curses] binding failed
Could not load driver curses
There is no output driver
Critical error while initializing, abort.
The problem is that it is reading a different config file than the one that I expected. The server version is reading
so I copied the correct file over to there. (cp /usr/local/etc/LCDd.conf /etc/sysconfig/lcdproc/) and things started up correctly.
Then I used
chkconfig --level 345 LCDd on
chkconfig --level 345 lcdproc on
to set both lcdproc and LCDd to turn on at boot time. Things should be golden. I'm not sure how much I like having all this cycling information on the screen though. It might become annoying.
Also, when I get some time I should check out http://www.kde-apps.org/content/show.php/amarok-lcdproc?content=46139 for some information about a script that is a LCDd client for Amarok that will have information about the currently playing song displayed.
After a kernel upgrade, the LCD didn't come back up on boot. It turns out that is because these modules are built for the previous kernel version I was running. I had to do:
# ./configure --with-moduledir=/lib/modules/188.8.131.52-107.fc8/kernel/drivers/input/lirc/ --with-x --with-driver=imon --with-major=61 --with-port=none --with-irq=none# make; make install; insmod /lib/modules/184.108.40.206-107.fc8/kernel/drivers/input/lirc/lirc_imon.ko
I then modified /etc/modprobe.d/lirc so that it pointed to the correct kernel. With every kernel upgrade I'll have to re-compile and edit that file to point to the right one (or add a command to guess the right place for it, but whatever) until the lirc incorporates these changes into their version that is packaged with fedora.
HD Video PlaybackI had a 720p x264 rip of The Matrix laying around, and Xine played it very well, although there were some glitches with sound. The processors stayed loaded at about 25% each, so I'm hopeful that 1080p playback will work well also. The one video that I have is encoded in Microsoft VC-1 format, and I wasn't able to get Mplayer or Xine to play it.
Later testing with other videos has shown that 1080p can work great (at about 90% usage of both processors!) without any sound glitches, but other encodes of 720p sometimes have sound glitches. It sounds like the sound is going slightly slower than the video, and sometimes to "catch up" the sound will click and skip a half second of sound or so. It might depend on the codec used for sound, but I'm not really sure.
This post here on charlies-server.com has a good write-up about playing 1080p content in Mplayer, which I need to check out.
Installing Japanese SupportThis didn't come up for a while, but I needed to add Japanese language support. I did that with
sudo yum groupinstall japanese-supportbased on the instructions from RedHat's Release Notes on Fedora 8. After doing that, I had to go to System->Preferences->Personal->Input Method and check "Enable Input Method Feature". That requires a log-out, so I had to log out and log back in. Then the zenkan key on the keyboard or control-space enabled Japanese input. Yay!
Getting my ipod to mountI really thought that just plugging in my ipod should be enough for it to mount and show up on the desktop, but apparently that is not the case. First, I checked the /var/log/messages log and it was showing up as /dev/sdc when plugged in, but nothing was happening. So I checked System->Preferences->Hardware->Removable Devices and Media, which allows you to auto-mount things as you plug them in. (I know this works because I had it working fine under Fedora Core 6 I think.) When I tried to run the program I got an error that "hald" was not running. Strange. I checked and there was no hald, but there was a haldaemon, which was not running. A short sudo /sbin/service haldaemon start later, it would run. It did not mount the ipod, but now I am able to check and /dev/disk/by-label/DEVANS_IPOD exists. That sounds great.
For good measure, I did a sudo yum install ipod-sharp and libipoddevice to install two ipod-related libraries.
According to this post which looks pretty good, I need to create some new HAL rules for my ipod. Ok. But I can't find hal-device-manager to look at the devices (text mode hal-device does work) so I did a sudo yum install hwbrowser to get a graphical client.
I wanted to get hal automounting this thing, but that didn't work. In the end I just added
/dev/disk/by-label/DEVANS_IPOD /mnt/ipod auto noauto,user,uid=500 \to the /etc/fstab and then run a mount /mnt/ipod (I had to make the empty mount point in /mnt first) and it shows up just fine.
CommentsProvide your email address when commenting and Gravatar will provide general portable avatars, and if you haven't signed up with them, a cute procedural avatar with their implementation of Shamus Young's Wavatars.
Comments have now been turned off for this post