Difference between revisions of "Installing MythTV on an Intel Mac Mini using Ubuntu"

From MythTV Official Wiki
Jump to: navigation, search
(Custom Resolutions)
Line 33: Line 33:
  
 
==Specific Configuration==
 
==Specific Configuration==
===Custom Resolutions===
+
=== Custom Resolutions ===
 +
 
 +
Intel integrated graphics controllers, such as the GMA950 used by the Intel Mac Mini systems, require some trickery to use widescreen or other resolutions not defined in the VGA BIOS. Feisty Fawn users can use the [[#Intel i810 Modesetting Driver|Intel i810 modesetting]] driver, while users of other versions of Ubuntu can use the standard i810 driver and [[#915resolution|915resolution]] (it may be possible for Dapper and Breezy users to use the modesetting driver, and for Feisty users to use 915resolution).
 +
 
 +
==== Intel i810 Modesetting Driver ====
 +
 
 +
First, install the i810 modesetting driver. This will remove the existing i810 driver and eliminate the need to use 915resolution to set custom resolutions.
 +
 
 +
<pre>% sudo apt-get install xserver-xorg-video-i810-modesetting</pre>
 +
 
 +
Edit your xorg.conf file to include the resolutions you wish to you. In my specific case, I was able to simply specify the desired resolution (1280x720, for 720p output via DVI->HDMI to my Samsung CRT HDTV), and did not need to use any modelines or tinker with 915resolution at all (I was unable to get anything other than 640x480 with the standard i810 driver and 915resolution).
 +
 
 +
{{Code box|/etc/X11/xorg.conf|
 +
Section "Screen"
 +
        Identifier      "Default Screen"
 +
        Device          "Onboard"
 +
        Monitor        "Samsung HDTV"
 +
        DefaultDepth    24
 +
        SubSection "Display"
 +
                Depth          24
 +
                Modes          "1280x720"
 +
        EndSubSection
 +
EndSection
 +
}}
 +
==== 915resolution ====
 +
 
 +
* You will need to install <code>915resolution</code> if it is not already installed:
 +
*:<pre>% sudo apt-get install 915resolution</pre>
 +
 
 
*If you want to run widescreen resolutions, or a resolution not set in the VGA BIOS, you'll need to use 915resolution to alter the modesettings. 915resolution should return something like this:
 
*If you want to run widescreen resolutions, or a resolution not set in the VGA BIOS, you'll need to use 915resolution to alter the modesettings. 915resolution should return something like this:
 
  root@ubuntu:~# 915resolution -l
 
  root@ubuntu:~# 915resolution -l

Revision as of 01:06, 8 April 2007

Edgy Eft (and probably the final versions of Dapper Drake) have enough support to just install Ubuntu from disk without and particular changes. It is probably better to use one of the other guides to set up your frontend box. There are still a couple of specific changes that need to be done for the macmini hardware, so they will be kept here, but for main setup instructions, the other guides are much better.

This guide assumes you are using edgy eft knot 3.

Install Linux

Before you begin, be aware that you might get stuck with the Mac OS X Install Disc in the drive and nothing on the hard drive if you don't have access to a Mac mouse.

  • Upgrade firmware. Check the Apple site. This worked for me: http://www.apple.com/support/downloads/macminiearly2006smcfirmwareupdate.html
  • Boot from Mac OS Install CD
  • Open Disk Utility
  • Make sure you change the boot type to MBR in the options dialog
  • Format disk to two partitions, both UFS, size doesnt matter
  • The install CD may be removed by restarting the computer while holding the button on a Mac mouse. [I was unable to eject the CD with a Microsoft mouse, or by any other means.]
  • Restart, boot from ubuntu edgy install cd (hold down c). If you are unable to boot from the ubuntu install cd, it may mean that your firmware hasn't been properly upgraded.
  • Choose to install a server. This will give you a minimalist setup and you can go from there.

You can eject the CD on reboot by holding down the F12 button. --High Noonan 00:42, 19 October 2006 (UTC)

Install MythTv

See Ubuntu_Dapper_Installation#Install_MythTV or Ubuntu_Installation#MythTV

You can also try this for a quick and dirty install:

  • Add the universe and multiverse repositories to /etc/apt/sources.list then:
 apt-get update
 apt-get install openssh-server xserver-xorg xinit xvattr ratpoison xterm
 apt-get install xfonts-base xine-ui libxine-extracodecs 915resolution mythtv-frontend
 apt-get install gsfonts-x11 msttcorefonts xfonts-base
 apt-get install xfonts-base xfonts-75dpi xfonts-100dpi
 apt-get install libgl1-mesa-dri libgl1-mesa-glx
 apt-get install portmap
 apt-get install libdvdnav4
 apt-get install libdvdread3

Specific Configuration

Custom Resolutions

Intel integrated graphics controllers, such as the GMA950 used by the Intel Mac Mini systems, require some trickery to use widescreen or other resolutions not defined in the VGA BIOS. Feisty Fawn users can use the Intel i810 modesetting driver, while users of other versions of Ubuntu can use the standard i810 driver and 915resolution (it may be possible for Dapper and Breezy users to use the modesetting driver, and for Feisty users to use 915resolution).

Intel i810 Modesetting Driver

First, install the i810 modesetting driver. This will remove the existing i810 driver and eliminate the need to use 915resolution to set custom resolutions.

% sudo apt-get install xserver-xorg-video-i810-modesetting

Edit your xorg.conf file to include the resolutions you wish to you. In my specific case, I was able to simply specify the desired resolution (1280x720, for 720p output via DVI->HDMI to my Samsung CRT HDTV), and did not need to use any modelines or tinker with 915resolution at all (I was unable to get anything other than 640x480 with the standard i810 driver and 915resolution).


Script.png /etc/X11/xorg.conf

Section "Screen"
        Identifier      "Default Screen"
        Device          "Onboard"
        Monitor         "Samsung HDTV"
        DefaultDepth    24
        SubSection "Display"
                Depth           24
                Modes           "1280x720"
        EndSubSection
EndSection

915resolution

  • You will need to install 915resolution if it is not already installed:
    % sudo apt-get install 915resolution
  • If you want to run widescreen resolutions, or a resolution not set in the VGA BIOS, you'll need to use 915resolution to alter the modesettings. 915resolution should return something like this:
root@ubuntu:~# 915resolution -l
Intel 800/900 Series VBIOS Hack : version 0.5.2

Chipset: 945GM
BIOS: TYPE 1
Mode Table Offset: $C0000 + $269
Mode Table Entries: 36

Mode 30 : 640x480, 8 bits/pixel
Mode 32 : 800x600, 8 bits/pixel
Mode 34 : 1024x768, 8 bits/pixel
Mode 38 : 1280x1024, 8 bits/pixel
Mode 3a : 1600x1200, 8 bits/pixel
Mode 3c : 1920x1440, 8 bits/pixel
Mode 41 : 640x480, 16 bits/pixel
Mode 43 : 800x600, 16 bits/pixel
Mode 45 : 1024x768, 16 bits/pixel
Mode 49 : 1280x1024, 16 bits/pixel
Mode 4b : 1600x1200, 16 bits/pixel
Mode 4d : 1920x1440, 16 bits/pixel
Mode 50 : 640x480, 32 bits/pixel
Mode 52 : 800x600, 32 bits/pixel
Mode 54 : 1024x768, 32 bits/pixel
Mode 58 : 1280x1024, 32 bits/pixel
Mode 5a : 1600x1200, 32 bits/pixel
Mode 5c : 1920x1440, 32 bits/pixel

Choose a mode you arent using, such as 5c, then run it again, specifying the new resolution. Here im using 1280x768:

root@ubuntu:~# 915resolution 5c 1280 768

The modesetting list should then update so that 1280x768 is available. Use 915resolution -l to check. You can then use the mode in your xorg.conf:

Script.png /etc/X11/xorg.conf

 SubSection "Display"
       Depth           24
       Modes           "1280x768" "1024x768" "800x600" "640x480"
 EndSubSection
  • 915resolution seems to sometime require a full reboot to take effect.
  • You can find the custom timings required by your LCD by following the instruction in post #7 of the following thread [Solved i915 1440x900 ext. VGA monitor problems

Viewing HD Material

  • Add a LinearAlloc option line to your xorg.conf. E.g. :

Script.png /etc/X11/xorg.conf

 Section "Device"
       Identifier      "IntelIntegrated"
       Driver          "i810"
       BusID           "PCI:0:2:0"
       Option          "LinearAlloc"   "16384"
 EndSection

16mb of memory seems to be enough for my setup, yours may vary.

  • A LinearAlloc value of "6144" was working with 1080i. After upgrading the i810 driver I encountered blue screens on HD material 720 and 1080 until increasing the value to "8160". This required a reboot to take effect. Just restarting gdm gave the same blue screen error. These values were pulled from the i810 driver support list.
  • If encountering a blue screen when viewing HD the following patch to libmyth may be required.

The latest freedesktop i810 driver does not require this patch. I compiled the (non-modesetting) driver by pulling the xf86-video-intel sources with git and compiling the latest driver by hand. Instructions here Ubuntu git i810 driver but I did not use the modestting option during the "git checkout".


Script.png xv-mini.diff

Index: libs/libmythtv/videoout_xv.cpp
===================================================================
--- libs/libmythtv/videoout_xv.cpp      (revision 11313)
+++ libs/libmythtv/videoout_xv.cpp      (working copy)
@@ -549,7 +549,7 @@
         VERBOSE(VB_PLAYBACK, LOC + QString("@ j=%1 Looking for flag[s]: %2")
                 .arg(j).arg(xvflags2str(neededFlags[j])));

-        for (uint i = 0; i < p_num_adaptors && (port == -1); ++i)
+        for (int i = p_num_adaptors - 1; i >= 0 && (port == -1); --i)
         {
             lastAdaptorName = ai[i].name;
             VERBOSE(VB_PLAYBACK, LOC +

Source: http://www.gossamer-threads.com/lists/mythtv/users/233302?#233302

Sound

  • Unmute IEC958 in alsamixer
  • Create /etc/asound.conf (or .asoundrc) (see below)
  • Setup xine to use 'default' device for passthrough. In ~/.xine/config change the line:
 #audio.device.alsa_passthrough_device:iec958:AES0=0x6,AES1=0x82,AES2=0x0,AES3=0x2

to:

 audio.device.alsa_passthrough_device:default

and change:

 audio.output.speaker_arrangement:Stereo 2.0

to:

 audio.output.speaker_arrangement:Pass Through

im not sure how to setup other players to work like this. I never tried with mplayer, and I couldnt get VLC to work at all.

Other Setup

  • I add the following to /etc/rc.local to make myth startup at boot:
 su -c startx mythtv

and in /home/mythtv/.xinitrc i add:

 ratpoison &
 mythfrontend &> /tmp/frontend.log
  • Add mythtv user to /etc/sudoers so it can shutdown. I use the following line:
 mythtv  ALL=NOPASSWD:/sbin/halt,/sbin/reboot,/bin/mount,/bin/umount

You then need to change the shutdown command in mythtv to be:

 sudo /sbin/halt



/etc/asound.conf

  • Make sure you create this file to get digital audio out.

Script.png /etc/asound.conf

pcm.nforce-hw {
    type hw
    card 0
}
pcm.!default {
    type plug
    slave.pcm "nforce"
}
pcm.nforce {
    type dmix
    ipc_key 1234
    slave {
        pcm "hw:0,1"
        period_time 0
        period_size 1024
        buffer_size 4096
        rate 48000
        channels 6
    }
}
ctl.nforce-hw {
    type hw
    card 0
}