Saturday, April 30, 2005

Spdif passthrough and sound cards, Output to get

SourceForge.net: xine-user: " This is not a xine problem.
I have xine working with SPDIF AC3 on the following sound cards:-
1) Motherboard based sound card with optical outputs. (snd-intel8x0)
Output from alsamixer:
Card: Intel ICH5
Chip: Realtek ALC650F
(SPDIF works with the Analog to SPDIF [off])
(With Analog to SPDIF [on]) output goes to front analog speaker jack.)

2) A old SB Live (rev 06) (snd-emu10k1)
Card: Sound Blaster Live!
Chip: SigmaTel STAC9721/23
3) An SB Audigy 2 with mini-jack spdif out.
Card: Sound Blaster Audigy2 (snd-emu10k1)
Chip: SigmaTel STAC9721/23

It is a well know fact that SPDIF output does NOT work on all cards that ALSA works with. Some might only be able to get PCM output over SPDIF.

In order to make any progress, we will need to know which sound card and codec you are using.
So, get the 'CARD' and 'CHIP' output from alsamixer.
also, get the output from 'lspci -n | grep 0401'

I might be able to help then."

Saving envy24control profiles

[linux-audio-user] Audiophile 2496: "envy24control: invalid option -- ?
usage: envy24control [-c card#] [-D control-name] [-o num-outputs] [-i
num-inputs] [-p num-pcm-outputs] [-s num-spdif-in/outs] [-v] [-f
profiles-file] [profile name|profile id]
-c, --card Alsa card number to control
-D, --device control-name
-o, --outputs Limit number of analog line outputs to display
-i, --input Limit number of analog line inputs to display
-p, --pcm_output Limit number of PCM outputs to display
-s, --spdif Limit number of spdif inputs/outputs to display
-v, --view_spdif_playback shows the spdif playback
channels in the mixer
-f, --profiles_file use file as profiles file

So envy24control -f is probably what you want."

Old mplayer settings

mplayer dvd:// -dvd-device %d -fs -zoom -monitoraspect 16:9 -vo xv -ao alsa:device=hw=1.0

Friday, April 29, 2005

MythDVD and DVD

Default player is mplayer which doesn't support DVD menus/menuing and requires you to specify the title(s) to play in Settings; a real pain.

Changing to Xine:

http://wilsonet.com/mythtv/tips.php

xine -pfhq --no-splash dvd://

Specifying device:
vcd:///dev/cdrom@

Better OSD support too.

"The configuration can be done through a GUI as well as by editing a text file, and while the GUI is kind of ugly and clunky, is better than no GUI, which is what you've got with mplayer. The text file containing the settings for xine is also much better documented, though REALLY long."

Thursday, April 28, 2005

High performance tuning

>Darn, I compiled without "-–enable-opengl-vsync".
>Can I gain a lot of cpu by recompiling?

You can gain a lot smoother video at the very least.


> CPU is fine except when I record two DTV programs, and watch a third.

HDTV recording is not a cpu intensive action...

> I have disabled xvmc and enabled kernel deinterlacing to reduce
> combing. Video/audio is fine, but I'm concerned about intermittent
> frame drops during the recordings.

kerneldeint is the most cpu intensive deinterlacer Myth has. Try running Bob.

Wednesday, April 27, 2005

Exporting mythtv to other video formats

AboutNuvexport - nuvexport - Trac: "nuvexport is a perl script that interfaces with MythTV to let you export your recordings to other formats."

Works with transcode and mencoder.

Monday, April 25, 2005

YUM retries take too long

Add to /etc/yum.conf

# Added this because some mirrors go down and then retying takes forever.
retries=2
timeout=10

MythMusic install

yum install libvorbis libvorbis-devel vorbis-tools cdparanoia-devel cdparanoia-libs cdparanoia SDL-devel SDL [these were already installed, "Nothing to do"]

yum install libmad-devel libid3tag libid3tag-devel

NOTE: You also need flac-devel

Can't find libcdaudio with yum.

Info from README:

Downloaded libcdaudio-0.99.12.tar.gz from
http://libcdaudio.sourceforge.net

Untar'd in a tmp dir. cd to the src dir.
./configure
make
make install

---
Output of make install:

[root@be libcdaudio-0.99.12]# make install
Making install in src
make[1]: Entering directory `/root/tmp/libcdaudio-0.99.12/src'
make[2]: Entering directory `/root/tmp/libcdaudio-0.99.12/src'
mkdir -p -- . /usr/local/lib
/bin/sh ../libtool --mode=install /usr/bin/install -c libcdaudio.la /usr/loc
al/lib/libcdaudio.la
/usr/bin/install -c .libs/libcdaudio.so.1.0.0 /usr/local/lib/libcdaudio.so.1
.0.0
(cd /usr/local/lib && rm -f libcdaudio.so.1 && ln -s libcdaudio.so.1.0.0 lib
cdaudio.so.1)
(cd /usr/local/lib && rm -f libcdaudio.so && ln -s libcdaudio.so.1.0.0 libcd
audio.so)
/usr/bin/install -c .libs/libcdaudio.lai /usr/local/lib/libcdaudio.la
/usr/bin/install -c .libs/libcdaudio.a /usr/local/lib/libcdaudio.a
ranlib /usr/local/lib/libcdaudio.a
chmod 644 /usr/local/lib/libcdaudio.a
PATH="$PATH:/sbin" ldconfig -n /usr/local/lib
----------------------------------------------------------------------
Libraries have been installed in:
/usr/local/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the `LD_RUN_PATH' environment variable
during linking
- use the `-Wl,--rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
mkdir -p -- . /usr/local/include
/usr/bin/install -c -m 644 cdaudio.h /usr/local/include/cdaudio.h
make[2]: Leaving directory `/root/tmp/libcdaudio-0.99.12/src'
make[1]: Leaving directory `/root/tmp/libcdaudio-0.99.12/src'
make[1]: Entering directory `/root/tmp/libcdaudio-0.99.12'
make[2]: Entering directory `/root/tmp/libcdaudio-0.99.12'
test -z "/usr/local/bin" || mkdir -p -- . "/usr/local/bin"
/usr/bin/install -c 'libcdaudio-config' '/usr/local/bin/libcdaudio-config'
test -z "/usr/local/share/aclocal" || mkdir -p -- . "/usr/local/share/acloca
l"
/usr/bin/install -c -m 644 'libcdaudio.m4' '/usr/local/share/aclocal/libcda
udio.m4'
test -z "/usr/local/lib/pkgconfig" || mkdir -p -- . "/usr/local/lib/pkgconfi
g"
/usr/bin/install -c -m 644 'libcdaudio.pc' '/usr/local/lib/pkgconfig/libcda
udio.pc'
make[2]: Leaving directory `/root/tmp/libcdaudio-0.99.12'
make[1]: Leaving directory `/root/tmp/libcdaudio-0.99.12'
[root@be libcdaudio-0.99.12]#

---

make clean
make distclean

===

From libcdaudio's INSTALL doc:
You can remove the program binaries and object files from the
source code directory by typing 'make clean'. To also remove the
files that 'configure' created (so you can compile the package for
a different kind of computer), type 'make distclean'.

===

Back to ~/cvs/mythplugins dir.
./configure --disable-all --enable-mythmusic --enable-opengl

make clean
qmake mythplugins.pro
make

>> Compile aborted. Errors about 'flacencoder.h'.

yum install flac-devel

make clean
qmake mythplugins.pro
make
make install

Sunday, April 24, 2005

MythDVD installation

From the README:

Install libdvdread and libdvdread-devel packages (seem to have gotten these from the DAG repository):

yum install libdvdread
(requires libdvdcss)
yum install libdvdread-devel

# rpm -qa| egrep nasm
nasm-0.98.38-3

# yum install mjpegtools
# yum install mjpegtools-devel
# yum install xvidcore [readme says 'xvid']
# yum install a52dec [readme says 'liba52', ac3 audio]
# yum install a52dec-devel
# yum install libfame [and libfame-devel]
# yum install transcode [requires bunch of other pkgs]
# yum install mplayer

[root@be mythplugins]# ./configure --disable-all --enable-mythdvd --enable-transcode

# qmake mythplugins.pro
# make
# make install

REBOOT

Check mtd (myth transcoding daemon) can run:

[root@be ~]# mtd -n
2005-04-24 23:40:29.598 New DB connection, total: 1
mtd started at Sun Apr 24 23:40:29 2005
mtd is running on a host called be.donnlee.com
23:40:29: Waiting for connections/jobs
23:40:29: mtd is listening on port 2442

[ 'listening' is good; hit ctrl-c to exit ]

Run mtd in background:
[root@be ~]# mkdir /var/lib/mythdvd
[root@be ~]# mkdir /var/lib/mythdvd/temp
[root@be ~]# mtd -d

===

Setup in MythTV front-end GUI.
Top Level Myth Menu --> Setup --> DVD Settings.

But, the setup for MythDVD is MIA (not there!). Found this on myth-users:

> I have mythtv installed and working. And if I run rpm -qa it tells me
> I
> have mythdvd installed. But on mythfrontend in setup I do not see the
> screen for mythdvd. And if I run /usr/bin/mtd -n it tells me I do not
> have
> a DVD directory setup, and to run setup. Not sure where to run setup?
> Any help appreciated.
>
> Danny Aldham

I had this same problem with version 0.16.

If I remember correctly, after I installed mythmusic the mythdvd setup
showed up. I suspect there is something missing in the mythdvd setup
and it isn't creating the menus correctly.

===
So, installed mythmusic (see other blog entry). And yes, DVD settings are there now.

===

Device: /dev/dvd ?

My dmesg:
hdb: ATAPI 32X DVD-ROM CD-R/RW drive, 2048kB Cache, UDMA(33)

===

Some mplayer cli lines from myth-users@

cli options:

-vo xv
-vo xvmc

-ac hwdts,hwac3,a52
-ao alsa:default
-ao alsa:device=hw=1.0

---

player command in mythvideo:
mplayer -ao alsa -ac hwac3, -fs -monitoraspect 1.7777 -quiet -vo xv %s

---

mplayer -ao alsa:device=hw=0.2 -ac hwac3 dvd://1

mplayer dvd:// -ao alsa:device=spdif -ac hwac3

My experience:
* Anything with "-ac hwac3" or "-ac hwdts,hwac3" and "-ao alsa:whatever" would result in a burst of static sound and then silence.
* "-ac" without "-ao" results in silence.
* "-ao" without "-ac" works if device is set properly.

Final mythdvd setting for mplayer:

mplayer dvd:// -dvd-device %d -fs -zoom -vo xv -ao alsa:device=hw=1.0

Later, noticed that picture was stretched. So added -monitoraspect 16:9 like so:

mplayer dvd:// -dvd-device %d -fs -zoom -vo xv -ao alsa:device=hw=1.0 -monitoraspect 16:9

This supports DD and DTS via spdif coax.

NOTE: In mplayer, alsa device is "hw=1.0" (dot, not comma). In alsa-speak, it's "1,0" for Card1, Device0 (maps to 'aplay -l' output).

Note, %d is the /dev device. In my system the dvd drive is /dev/hdb this is setup in another mythdvd screen.

NOTE: The DD led on my Denon doesn't turn on, but the audio is definitely DD surround sound. When playing a DTS dvd, the DTS led does indeed come on. Kinda weird, but it all works.

libmpeg2 Checkbox Setting

"Libmpeg2 does decode mpeg2 faster than the built in decoder. There are
also some cons to libmpeg2. The most noticible is any corruption of
streams, even minor will create large green bars across the screen. The
built in decoder only gets small blockiness, no green, and barely
noticible. Libmpeg2 does not produce the same quality of picture. Motion
smoothness isn't as good either. For the same reason an athlon 64bit 3400
doesn't produce a more smooth motion than a P4 2.8Ghz, I doubt the
celeron would be as good either, but that may be fine depending on how
important perfection (or as close as can get) is for you. You also
don't really notice unless you put two systems side by side, so some
people won't care, but let the truth be known.. :) I would never
recommend anything that you have to reply on libmpeg2 only for decoding,
or XvMC.

--Brandon"

myth-users@

Mythplugins installation

./configure --disable-mythphone --disable-mythgame --disable-mythnews --disable-mythbrowser --enable-transcode --enable-vcd --enable-opengl

$ qmake mythplugins.pro
$ make
$ su -
# make install
# exit

OpenGL, GLX and Linux

OpenGL, GLX and Linux: "GLX is what makes using X and OpenGL work together since OpenGL does not handle presentation devices."

In xorg.conf:

Section "Module"
Load "dbe"
Load "extmod"
Load "fbdevhw"
Load "glx"

In Xorg.0.log:

[root@be mythplugins]# egrep -i "(opengl|glx|xv)" /var/log/Xorg.0.log
(II) Loading extension XVideo
(II) Loading extension XVideo-MotionCompensation
(II) LoadModule: "glx"
(II) Loading /usr/X11R6/lib/modules/extensions/libglx.so
(II) Module glx: vendor="NVIDIA Corporation"
(II) Loading extension GLX
(II) Loading extension NV-GLX
(II) Initializing extension GLX

Reference: Enable real time thread processing

from mythtv howto:

Enabling real-time scheduling of the display thread.
MythTV supports real-time scheduling of the video output thread. There are three ways to go about enabling this: You can use rlimits, you can use the realtime security module, or on older systems you can SUID the executable. Enabling real-time scheduling is optional, but can make the video display smoother, especially if you are decoding HDTV.

rlimits

The rlimits method is the preferred method and is included in Linux 2.6.12 and above. Unfortunately, you need PAM version 0.79 or above, which may not be supported by your distribution yet. Assuming anyone running mythfrontend is in the audio group and rlimits are supported, all you need to do is place this in your /etc/security/limits.conf


* - rtprio 0
* - nice 0
@audio - rtprio 50
@audio - nice 0


Realtime module

The second option is to use the Linux realtime kernel module. This is will be phased out over time, but is currently supported by many distributions that do not yet support rlimits. If you are not using the distribution kernel you must configure your kernel with:

Security options : [*] Enable different security models
Security options : [M] Default Linux Capabilties

You may also need to install the realtime module, using your distribution's realtime package. Assuming the users who will be running mythfrontend will be in the audio group you can get the GUID of a named group like so:
$ grep audio /etc/group

If the number printed out from the grep was 18, you can now load this module as root before starting mythfrontend:
# modprobe realtime gid=18


Run as root option (not safe)

The final and least preferred option is to set the sticky bit on the mythfrontend executable. This opens a security hole, but is the only option on systems that do not support either rlimits or the realtime module. This does not work on modern distributions either, and is not recommended on any system connected to the internet. This may also make it impossible to debug MythTV without running gdb as root. If you would still like to do this, you just need to run this as root:

# chmod a+s /usr/local/bin/mythfrontend /usr/local/bin/mythtv

Optimizing Performance for HDTV

Verify you are using the right nVidia drivers:

[root@be mythplugins]# cat /proc/driver/nvidia/version
NVRM version: NVIDIA Linux x86 NVIDIA Kernel Module 1.0-7174 Tue Mar 22 06:44:39 PST 2005
GCC version: gcc version 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)


Verify 8x AGP is enabled:

[root@be mythplugins]# cat /proc/driver/nvidia/agp/status
Status: Enabled
Driver: AGPGART
AGP Rate: 8x
Fast Writes: Disabled
SBA: Enabled


Proper user of openGL sync for retrace (from myth-users@):

Start mythfrontend with the "--verbose playback" option and redirect output to a file. Check for Open GL Sync messages (GLX SGI OPENGL VSYNC or something like that) when a recording or live tv is played back. Possibly could also use glxinfo to check for the GLX SGI OPENGL VSYNC is supported.


Change RTC frequency to 1024 (default = 64):

Add this to /etc/sysctl.conf on FC:

# Enable some RTC stuff for HDTV performance
dev.rtc.max-user-freq = 1024

(or just 'echo 1024 > /proc/sys/dev/rtc/max-user-freq')


View with:
cat /proc/sys/dev/rtc/max-user-freq

Saturday, April 23, 2005

Change apache tcp port # (listen port)

Edit /etc/httpd/conf/httpd.conf like so:

#Listen 80
Listen 81

Restart httpd:

service httpd restart

Password access to mythweb

From howto:

$ cd ~/mythplugins-0.18/mythweb
$ su
# mkdir /var/www/html/mythweb
# cp -r . /var/www/html/mythweb
# exit
$

Edit the /var/www/html/mythweb/config/conf.php file if required.

By default, MythWeb uses an Apache .htaccess file to restrict access to the website and to configure some variables.

To create the password file for Apache (if your system doesn't already have one), you could do something like this:

# cd /var/www
# htpasswd -c htpasswd mythtv
New password:
Re-type new password:
Adding password for user mythtv

See the man page for htpasswd for more examples.

To access the web page, open a web browser and use http://[name or ip address]/mythweb/

Not in howto docs:

Uncomment these lines in mythweb/.htaccess

AuthType Basic
AuthName "MythTV"
AuthUserFile /var/www/htpasswd
Require valid-user

Edit httpd.conf:



# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
# Changed by DCL for mythweb authentication.
#AllowOverride None
AllowOverride All

Common error message:

> Warning at
> /var/www/html/mythweb2/includes/init.php, line 46: session_start()
> [function.session-start]:
> open(php_sessions/sess_8456ca958bc5b001433bd3c12026d33c, O_RDWR) failed:
> Permission denied (13)

(this is explained in the README file)

So, allow apache write access to the 'php_sessions' dir:

[root@be mythweb]# pwd
/var/www/html/mythweb
[root@be mythweb]# chown apache php_sessions/

If you can't see thumbnail previews:
# chown apache image_cache/

Restart apache:
# service httpd restart

Can 20 Pin ATX Power Supply Being Used w/ MB Requires 24 Pins?

Can 20 Pin ATX Power Supply Being Used w/ MB Requires 24 Pins?: "Yes. As long as pin 1 on the 20 pin power connector align up with the pin 1 on motherboard 24 pin power connector. Same apply to the ATX12V AUX connector, as long as its pin 1 on the four pin connector align with the pin 1 on the six pin connector on the motherboard, they should work." [see url for pics]

Can't put config into Pronto (Getting config from pronto ok)

> I get "error downloading configuration into RC device".

Try tapping the screen to activitate the remote prior to downloading. I also suggest that you ensure you have the latest firmware in the remote.

Friday, April 22, 2005

Low pitch, slow audio fixed after P4 upgrade

On Athlon 2100+, voices were noticably low in pitch and slowed down. I was able to cope, by using Time Stretch = 1.3x (but pitch was still low).

After P4 upgrade, sound is normal.

ALSA Sound After P4-3.4GHz Upgrade

Note, to get sound working had to reboot after the very first bootup on the new mobo (ASUS) and CPU (P4-3.4GHz). On 2nd boot, it was working.

List of ALSA devices:

[root@be ~]# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: M2496 [M Audio Delta DiO 2496], device 0: ICE1712 multi [ICE1712 multi]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: ICH5 [Intel ICH5], device 0: Intel ICH [Intel ICH5]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: ICH5 [Intel ICH5], device 4: Intel ICH - IEC958 [Intel ICH5 - IEC958]
Subdevices: 1/1
Subdevice #0: subdevice #0


Card0 = M-Audio Delta DiO 2496
Card1 = ASUS on-board spdif (coax) sound

Config'd .asoundrc to be:

[root@be ~]# pwd
/root

[root@be ~]# cat .asoundrc
pcm.digital {
type plug
slave.pcm "digital-hw"
}

pcm.digital-hw {
type hw
card 1
device 0
}


Tested with:

[root@be ~]# aplay -D digital bustin.wav

And music played :-)

For MythTV frontend, mythfrontend, set audio device to ALSA:digital to match my .asoundrc

Full ALSA environment is:


[root@be ~]# aplay -L
PCM list:
hw {
@args.0 CARD
@args.1 DEV
@args.2 SUBDEV
@args.CARD {
type string
default {
@func getenv
vars {
0 ALSA_PCM_CARD
1 ALSA_CARD
}
default {
@func refer
name 'defaults.pcm.card'
}
}
}
@args.DEV {
type integer
default {
@func igetenv
vars {
0 ALSA_PCM_DEVICE
}
default {
@func refer
name 'defaults.pcm.device'
}
}
}
@args.SUBDEV {
type integer
default {
@func refer
name 'defaults.pcm.subdevice'
}
}
type hw
card $CARD
device $DEV
subdevice $SUBDEV
}
plughw {
@args.0 CARD
@args.1 DEV
@args.2 SUBDEV
@args.CARD {
type string
default {
@func getenv
vars {
0 ALSA_PCM_CARD
1 ALSA_CARD
}
default {
@func refer
name 'defaults.pcm.card'
}
}
}
@args.DEV {
type integer
default {
@func igetenv
vars {
0 ALSA_PCM_DEVICE
}
default {
@func refer
name 'defaults.pcm.device'
}
}
}
@args.SUBDEV {
type integer
default {
@func refer
name 'defaults.pcm.subdevice'
}
}
type plug
slave.pcm {
type hw
card $CARD
device $DEV
subdevice $SUBDEV
}
}
plug {
@args.0 SLAVE
@args.SLAVE {
type string
}
type plug
slave.pcm $SLAVE
}
dmix {
@args.0 SLAVE
@args.1 FORMAT
@args.2 RATE
@args.SLAVE {
type string
default 'hw:0,0'
}
@args.FORMAT {
type string
default S16_LE
}
@args.RATE {
type integer
default 48000
}
type dmix
ipc_key 5678293
ipc_key_add_uid yes
slave {
pcm $SLAVE
format $FORMAT
rate $RATE
}
}
dsnoop {
@args.0 SLAVE
@args.1 FORMAT
@args.2 RATE
@args.SLAVE {
type string
default 'hw:0,0'
}
@args.FORMAT {
type string
default S16_LE
}
@args.RATE {
type integer
default 48000
}
type dsnoop
ipc_key 5778293
ipc_key_add_uid yes
slave {
pcm $SLAVE
format $FORMAT
rate $RATE
}
}
shm {
@args.0 SOCKET
@args.1 PCM
@args.SOCKET {
type string
}
@args.PCM {
type string
}
type shm
server $SOCKET
pcm $PCM
}
tee {
@args.0 SLAVE
@args.1 FILE
@args.2 FORMAT
@args.SLAVE {
type string
}
@args.FILE {
type string
}
@args.FORMAT {
type string
default raw
}
type file
slave.pcm $SLAVE
file $FILE
format $FORMAT
}
file {
@args.0 FILE
@args.1 FORMAT
@args.FILE {
type string
}
@args.FORMAT {
type string
default raw
}
type file
slave.pcm null
file $FILE
format $FORMAT
}
null {
type null
}
default {
type plug
slave.pcm {
type hw
card {
@func getenv
vars {
0 ALSA_PCM_CARD
1 ALSA_CARD
}
default {
@func refer
name 'defaults.pcm.card'
}
}
device {
@func igetenv
vars {
0 ALSA_PCM_DEVICE
}
default {
@func refer
name 'defaults.pcm.device'
}
}
subdevice {
@func refer
name 'defaults.pcm.subdevice'
}
}
}
cards 'cards.pcm'
front 'cards.pcm.front'
rear 'cards.pcm.rear'
center_lfe 'cards.pcm.center_lfe'
side 'cards.pcm.side'
surround40 'cards.pcm.surround40'
surround41 'cards.pcm.surround41'
surround50 'cards.pcm.surround50'
surround51 'cards.pcm.surround51'
surround71 'cards.pcm.surround71'
iec958 'cards.pcm.iec958'
spdif 'cards.pcm.iec958'
modem 'cards.pcm.modem'
digital {
type plug
slave.pcm digital-hw
}
digital-hw {
type hw
card 1
device 0
}

Sound onboard ASUS P5AD2

SUSE Linux - ASUS P5AD2: "I have a P5AD2-E premium, so same audio.

I just installed SuSE 9.2.9 (9.3 beta) which comes with kernel 2.6.11.x and
ALSA 1.0.8 and didn't have to do anything to get the sound running. YaST2
(and the default kernel) took care of that."

Booting problems after motherboard/cpu upgrade

LinuxQuestions.org - Booting problems after motherboard/cpu upgrade. - where Linux users come for help: "Also, you can move a Linux install between any mainboard you want to; the only thing you will have problems with is the video card and X config. What usually happens is, you boot up, X cannot start, so you use the distro's X config utility to reconfigure and then boot right into afterwards. I have done this in front of some winblows using family and friends much to their amazement and chagrin, lol..."

pcHDTV Cards and MythTV Installation

Hard drive partitioning using Disk Druid:

/dev/hda1, /boot, 100MB, ext3
/dev/hda2, swap, Same_size_as_RAM, n/a
/dev/hda3, /, Rest_of_disk, ext3

(based on suggestion from Jarod's page (wilsonet.com/mythtv)
===

Downloaded and untar'd:
FC2-3-Kernel-2.6-pcHDTV-driver-1.5.tar.gz 2.6 kernels (12/20/04)

(from pchdtv.com)

cd to the 'drivers' dir and 'make' to compile.

# make install

Ignore error message about inserting bttv (that's for the HD-2000 card).

# depmod -a
( make sure there are no msgs )

# modprobe cx8800
( look for errors in dmesg )

***Important: REBOOT

( check dmesg for errors again )

look for /dev/video32 and /dev/video33

Download from pchdtv.com:
tools-2.6.a (status unstable) only for 2.6 kernel drivers

This has the dtvsignal tool. untar. precompiled binaries are already in there, so just run from the untar subdir or 'make install' to add to $PATH.

Verify cards are working with:
dtvsignal /dev/video32 56
dtvsignal /dev/video32 56

( this shows a dynamic ascii meter )

Can scan for all active channels with:
[root@myhost tools-2.6-a]# ./dtvscan /dev/video32

===

Get mythtv via cvs. Later, when you run mythfrontend, you can see what version you are running in the stdout when mythfrontend is started:

"2005-04-22 02:24:32.937 mythfrontend version: 0.18.20050409-1 www.mythtv.org"

===

Compiling myth, requires qt and qt-devel (yum install these if they don't exist)

'yum update qt' failed because yum complained gpg key was missing for 'updates-released'. Websearch hit revealed:

rpm --import /usr/share/rhn/RPM-GPG-KEY
rpm --import /usr/share/rhn/RPM-GPG-KEY-fedora

['yum update qt' worked after this]

Later, to install MythDVD, I also needed:
# rpm --import /usr/share/doc/fedora-release-3/*GPG-KEY*

install qt-devel:
yum install qt-devel

after installing qt-devel, I have the qt binaries (qmake, etc)

Re-login as root:
# su -

Now QTDIR var is set:

# echo $QTDIR
/usr/lib/qt-3.3

# which qmake
/usr/bin/qmake

# yum install lirc
# yum install lirc-devel

# chkconfig --list | egrep lirc
# chkconfig lirc on

REBOOT

lirc now shows up in /dev :-)

===
yum install lame
yum install lame-devel

===

./configure (myth) says "XvMC support no" bummer!

after reading webpages: I see that drivers are there:

[root@mythtv ~]# cd /usr/X11R6/lib/
[root@mythtv lib]# ls -R | egrep -i xvmc
libI810XvMC.a
libI810XvMC.so
libI810XvMC.so.1
libI810XvMC.so.1.0
libXvMC.a
libXvMCNVIDIA.a
libXvMCNVIDIA_dynamic.so.1
libXvMCNVIDIA.so.1.0.7174
libXvMC.so
libXvMC.so.1
libXvMC.so.1.0
xf86xvmc.h
xvmcext.h
XvMC.h

But "XvMC" doesn't show up in Xorg.0.log like some other people's. Actually, I learned this is not true, I was looking for "XvMC" in the log, but it's listed as "XVideo-MotionCompensation".

Some people had files that I was missing so:

# yum install libXvMCW

[ This turned out to be a mistake. ]

GOOD FIND:

"xorg 6.7.0 supports XvMC, and XFree86 4.4 probably does. Check for a file named libXvMC.* in /usr/X11R6/lib. When you run X and XvMC is enabled, you will see this in /var/log/Xorg.log.0:

(II) Loading extension XVideo
(II) Loading extension XVideo-MotionCompensation"

I checked my Xorg.0.log and it DOES have this "Loading extension XVideo-MotionCompensation" line :-)

Can compile mythtv with xvmc:

configure --help

says there is an option:

./configure --enable-xvmc enable XvMC (Linux/BSD MPEG accel.)

I did this, and now says XvMC support "yes".

NOTE: Next time I should "./configure -–enable-opengl-vsync --enable-xvmc"


# qmake mythtv.pro
# make [this takes some cpu time]

got compile error "/usr/bin/ld: cannot find -lXvMCW"

so 'yum remove libXvMCW' [ pretty sure magnito didn't install libXvMCW ]

checked config.mak and it no longer has using_xvmcw :-)

then:
make clean
qmake mythtv.pro
make

Last few lines of 'make' were:

make[1]: Leaving directory `/root/cvs/mythtv/themes'
cd setup && make -f Makefile
make[1]: Entering directory `/root/cvs/mythtv/setup'
g++ -c -pipe -march=pentiumpro -Wall -W -O3 -Wall -Wno-switch -fomit-frame-pointer -D_REENTRANT -DMMX -DUSING_IVTV -DUSING_XRANDR -DUSING_XVMC -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DPREFIX=\"/usr/local\" -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_SHARED -I/usr/lib/qt-3.3/mkspecs/default -I. -I/usr/local/include -I../libs/libmythtv -I../libs -I../libs/libmyth -I../libs/libmythtv/dvbdev -I/usr/lib/qt-3.3/include -o main.o main.cpp
g++ -c -pipe -march=pentiumpro -Wall -W -O3 -Wall -Wno-switch -fomit-frame-pointer -D_REENTRANT -DMMX -DUSING_IVTV -DUSING_XRANDR -DUSING_XVMC -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DPREFIX=\"/usr/local\" -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_SHARED -I/usr/lib/qt-3.3/mkspecs/default -I. -I/usr/local/include -I../libs/libmythtv -I../libs -I../libs/libmyth -I../libs/libmythtv/dvbdev -I/usr/lib/qt-3.3/include -o backendsettings.o backendsettings.cpp
g++ -o mythtv-setup main.o backendsettings.o -L/usr/lib/qt-3.3/lib -L../libs/libmyth -L../libs/libmythtv -L../libs/libavcodec -L../libs/libavformat -lmythtv-0.18 -lmythavformat-0.18 -lmythavcodec-0.18 -lmyth-0.18 -lfreetype -lmp3lame -lasound -L/usr/X11R6/lib -lXinerama -lXv -lXxf86vm -lXvMCNVIDIA -lXvMC -lqt-mt -lXext -lX11 -lm -lpthread
make[1]: Leaving directory `/root/cvs/mythtv/setup'
cd i18n && make -f Makefile
make[1]: Entering directory `/root/cvs/mythtv/i18n'
gcc -c -pipe -march=pentiumpro -Wall -W -O3 -Wall -Wno-switch -fomit-frame-pointer -DMMX -DUSING_IVTV -DUSING_XRANDR -DUSING_XVMC -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DPREFIX=\"/usr/local\" -I/usr/lib/qt-3.3/mkspecs/default -I. -I/usr/local/include -o dummy.o dummy.c
g++ -o i18n dummy.o
make[1]: Leaving directory `/root/cvs/mythtv/i18n'

Install the binaries:

# make install

Enable real-time scheduling for smoother video:

[root@mythtv mythtv]# chmod a+s /usr/local/bin/mythfrontend
[root@mythtv mythtv]# ls -l !!:2
ls -l /usr/local/bin/mythfrontend
-rwsr-sr-x 1 root root 1158481 Apr 19 02:07 /usr/local/bin/mythfrontend

Later, when you run mythfrontend and play a recording, you can verify realtime priority is being used. Check the mythfrontend messages on stdout:

"2005-04-22 02:24:41.104 Using realtime priority."
[ Might have to run as 'mythfrontend --verbose audio' to see this msg ]

----

Create some directories such as /mythtv/live, /mythtv/recordings, /mythtv/video, and /mythtv/music

make read/write privs:

chmod a+rwx /mythtv/recordings [ /mythtv/video, and /mythtv/music]

---------

per instructions, import setup commands into mysql.
if u get this error, ignore it:

ERROR 1064 at line 4: You have an error in your SQL syntax near 'TEMPORARY TABLES ON mythconverg.* TO mythtv@localhost IDENTIFIED BY "mythtv"' at line 1

(seems to happen on newer versions of mysql)

---
ignore these errors (lirc related, lirc not setup yet):

mythtv: could not connect to socket
mythtv: Connection refused

----
Before running mythtv-setup:

[root@be ~]# mythtv-setup
mythtv-setup: error while loading shared libraries: libmythtv-0.18.so.0: cannotopen shared object file: No such file or directory
[root@be ~]# ls /usr/local/lib | egrep mythtv
libmythtv-0.18.so
libmythtv-0.18.so.0
libmythtv-0.18.so.0.18
libmythtv-0.18.so.0.18.0
mythtv
[root@be ~]# vi /etc/ld.so.conf
[ Add /usr/local/lib to bottom of file ]
[root@be ~]# ldconfig


---

mythtv setup: Make sure you select card type == pchdtv2000/3000!

Add nightly cron job to update database:
$ crontab -e
----Insert the following text into your mythtv user crontab----
### Run mythfilldatabase every night at some random time after 3:01am
01 3 * * * sleep $(expr $RANDOM \% 14400) && /usr/local/bin/mythfilldatabase > /var/log/mythtv/mythfilldatabase.log 2>&1

---

Create user 'mythtv'
# adduser mythtv
# passwd mythtv
( use pw = "mythtv" )

==========

4/19/05
Started hdnet/kron recording and non-hidef dtv recording.
Went to view them, got hi cpu and lots of swapping on List of programs to watch (triggered by the small thumbnail preview?):

# vmstat 1
procs -----------memory---------- ---swap-- -----io---- --system-- ----cpu----
r b swpd free buff cache si so bi bo in cs us sy id wa
0 14 261608 1304 136 7292 388 44 3900 44 1581 346 1 9 0 91
0 13 261608 1360 136 7276 168 48 4856 48 1437 372 0 10 0 90
0 13 261608 1416 152 7304 208 8 7656 8 2100 567 0 10 0 90
0 16 261600 1360 152 7520 280 20 6392 20 2016 543 0 10 0 90
0 16 261608 1528 140 7268 364 132 7896 132 1736 445 0 12 0 88
0 13 261612 1304 132 7432 628 32 7272 48 1592 405 0 11 0 89
0 14 261612 1136 136 7644 584 12 8228 20 1766 443 0 10 0 90
0 16 261628 1640 164 7028 848 32 10156 32 2715 707 0 11 0 88
0 13 261628 1304 152 7472 396 4 8404 4 1673 483 0 14 0 86
0 14 261628 1360 168 7412 424 916 14092 1004 2628 807 1 38 0 61
3 16 262488 1192 148 6656 232 56 8836 56 1775 609 0 79 0 21
3 12 262492 1360 148 6504 92 28 12424 28 1790 665 0 92 0 8
3 13 262492 1192 148 6616 184 48 14680 48 2038 824 0 86 0 14
3 16 262492 1276 148 6524 152 136 13604 136 2186 851 1 80 0 19
3 15 262500 1220 148 6448 16 12 15996 12 1747 707 0 100 0 0
3 13 262500 1276 152 6500 0 84 14356 84 1915 709 0 87 0 13
3 18 262504 1276 160 6332 328 116 30760 116 3964 1781 0 94 0 6
3 16 262504 1220 152 6656 44 48 12264 48 1742 749 0 70 0 30
3 15 262512 1276 152 6344 60 48 16492 48 1865 794 0 94 0 6
3 17 262512 996 152 6700 12 32 19024 32 1890 879 0 100 0 0
2 15 262508 1276 156 6596 20 32 13024 32 1704 691 0 66 0 34
3 14 262516 1164 152 6572 40 36 14996 36 1682 802 1 80 0 19
3 14 262516 1388 156 6328 72 24 14352 24 1644 768 0 86 0 14
0 15 262516 1388 156 6480 132 48 19520 48 2247 927 0 81 0 19
3 15 262516 1388 148 6472 160 40 8888 40 1615 575 0 46 0 54
procs -----------memory---------- ---swap-- -----io---- --system-- ----cpu----
r b swpd free buff cache si so bi bo in cs us sy id wa
3 15 262512 1164 148 6424 104 20 10504 20 1655 698 0 70 0 30
3 15 262516 1052 152 6420 24 64 17340 64 1818 909 1 99 0 0
0 15 262520 1164 156 6616 0 4 13968 4 1559 682 0 95 0 5
3 16 262512 1164 148 6700 36 44 10956 44 1619 584 0 73 0 27
3 15 262512 1220 152 6476 8 20 15568 20 1877 825 0 89 0 11
3 12 263712 1052 148 6584 108 1404 15352 1404 1963 680 1 70 0 29
3 13 263704 996 148 6736 340 192 20064 192 1980 770 0 100 0 0
0 12 263676 1444 156 7224 488 204 17476 204 2052 651 0 59 0 41
2 14 264424 1556 148 6668 320 1016 8672 1016 1590 454 0 19 0 81
0 15 264412 1556 156 6536 496 136 11596 136 2428 699 1 31 0 68
0 13 264380 1108 160 6964 252 20 6352 20 1551 515 0 33 0 67
0 13 264356 1164 164 6964 112 36 5460 36 1575 518 0 45 0 55
3 13 264344 1108 148 6864 108 68 11072 68 1789 671 0 77 0 23
3 15 264356 1108 152 6840 160 68 10180 68 1844 616 0 70 0 30
3 13 264468 1164 164 6756 76 176 10648 176 2655 1011 1 42 0 57
0 16 264472 1128 164 6604 64 28 7796 28 1773 557 0 51 0 49
3 16 264480 1024 144 6836 44 28 8364 28 1626 548 0 83 0 17
3 17 264480 1108 116 6772 24 4 9472 28 1776 682 0 100 0 0
2 14 264484 1220 116 6752 56 20 8476 20 1708 703 1 99 0 0
1 14 264560 1052 120 6864 144 140 8284 144 1719 696 0 100 0 0
2 12 264564 940 120 6908 124 44 9176 44 1656 645 1 99 0 0
2 16 264564 1164 120 6568 16 32 10412 32 1732 689 0 100 0 0
3 12 264576 1444 120 6552 28 48 8272 48 1598 590 0 89 0 11
4 14 264576 996 104 6940 104 32 10928 48 1910 699 0 86 0 14
3 15 264568 996 112 7052 184 36 8512 36 1663 616 1 80 0 19
procs -----------memory---------- ---swap-- -----io---- --system-- ----cpu----
r b swpd free buff cache si so bi bo in cs us sy id wa
3 15 264556 1276 112 6800 0 16 6892 16 1614 625 1 99 0 0
2 15 264556 1108 120 7288 60 28 2768 28 1444 399 0 20 0 80
3 13 264556 1332 116 7048 32 20 4824 20 1501 514 1 21 0 78
1 14 264536 1332 112 7224 112 36 5344 36 1661 597 0 20 0 80
0 12 264556 1444 120 7068 12 52 5984 52 1532 534 0 25 0 75
0 13 264556 1108 136 7464 60 80 4004 80 1562 472 0 10 0 90
1 12 264556 996 148 7480 36 28 4120 28 1434 344 0 12 0 88
1 12 264568 1220 136 7420 32 24 9424 28 1583 532 0 22 0 78
0 14 264580 1500 144 7184 4 56 9776 56 1576 504 0 21 0 79
0 13 264572 1668 148 7088 52 8 7168 8 1477 478 0 16 0 84
0 11 264580 1108 164 7388 24 20 7728 20 1497 440 0 15 0 85
0 12 264584 1332 156 7480 4 8 6868 76 1526 477 1 13 0 86
0 14 264576 1332 136 7660 16 8 5692 8 1475 444 0 14 0 86
0 9 264568 1052 152 7944 24 0 7404 4 1569 458 0 14 0 86
0 8 264392 1388 156 9212 136 144 5384 144 1721 500 1 6 0 94
0 11 263944 2004 176 9912 56 56 888 72 1153 117 0 2 0 98
0 8 263936 2640 188 10228 16 0 340 16 1129 103 1 1 0 98
0 8 263736 3652 192 10524 188 0 332 0 1122 97 0 1 0 99
0 8 263508 3652 200 11224 392 0 984 0 1136 134 0 2 0 98
0 8 263376 3736 208 11764 272 0 820 0 1131 104 0 2 0 98
0 9 235984 26428 240 12684 348 0 1088 0 1149 131 0 2 0 98
0 10 235816 24468 308 14656 612 0 2440 204 1175 217 1 1 0 98
0 7 235236 23516 372 16084 580 0 1444 84 1202 251 1 1 0 98
0 4 235236 23052 456 16536 548 0 1044 100 1170 225 1 2 0 97
0 3 235236 23556 504 16872 208 0 544 92 1155 166 0 2 0 98
procs -----------memory---------- ---swap-- -----io---- --system-- ----cpu----
r b swpd free buff cache si so bi bo in cs us sy id wa
1 3 235148 24792 544 17012 116 0 168 84 1128 163 0 1 0 99
0 2 235060 26252 588 17100 180 0 180 88 1147 197 0 2 0 98
0 0 235060 24292 1008 18384 1092 0 2380 840 1361 879 2 4 18 76
0 0 235060 24308 1008 18384 0 0 0 0 1084 203 1 0 99 0
0 0 235060 24196 1012 18496 20 0 136 0 1071 188 0 0 96 4
0 0 235060 24084 1016 18556 20 0 84 0 1091 198 0 0 98 2
0 0 235060 24084 1016 18556 0 0 0 0 1064 177 0 0 100 0
0 0 235060 23804 1020 18696 176 0 320 0 1108 226 0 0 53 47
0 0 235060 23804 1020 18696 0 0 0 0 1064 189 0 0 100 0
0 0 235060 23804 1020 18696 0 0 0 0 1082 194 0 0 100 0
0 0 235060 23808 1020 18696 0 0 0 0 1067 171 0 0 100 0
0 0 235060 23808 1020 18696 0 0 0 0 1083 197 0 0 100 0
0 0 235060 23808 1020 18696 0 0 0 0 1064 183 0 0 100 0
0 0 235060 23808 1020 18696 0 0 0 0 1083 182 0 0 100 0
0 0 235060 23864 1020 18696 0 0 0 0 1064 182 0 0 100 0
0 0 235060 23864 1020 18696 0 0 0 0 1082 191 0 0 100 0
0 0 235060 23864 1020 18696 0 0 0 0 1066 175 0 0 100 0
0 0 235060 23864 1020 18696 0 0 0 0 1084 205 0 0 100 0
0 0 235060 23920 1020 18696 0 0 0 0 1064 169 0 0 100 0
0 0 235060 23920 1020 18696 0 0 0 0 1084 188 0 0 100 0

Alt-tab'd to terminal window, but this took lots of time and swap (~10 mins). Never fully alt-tab'd over. mythback & frontend quit. not in 'ps'.

Need more RAM?

Currently have: 256 MB DDR266 (PC2100) DIMM

Disabled thumbnail preview, just static image. much better! :)

===

Watching and Recording at the same time works ok, but not when fast-forward and rewinding while watching a show. CPU is max'd for a few seconds and this causes distorted video in the show(s) being recorded.

Researched Athlon overclocking and Gigabyte bios settings. Tried various core speeds and overvoltage settings. Tested with prime95 on windows 2000. Viewed actual core speed, Vcore, etc with CPU-Z. Highest, stable OC was:

>> Clocked at 143MHz w/ +7.5% overvoltage: Vcore = 1.984V, 13x multiplier.

After this, ff/rew was very crisp. Checked cpu with vmstat. Recording two shows while watching a 3rd show off disk was acceptable.

===

Can't get mythdvd, mythvideo, and the others via cvs? Error looks like:
cvs server: cannot find module `mythdvd' - ignored


They reorganized the cvs tree on 4/12/2005. So do this:

# cd /root/cvs
# cvs -z3 -d :pserver:mythtv@cvs.mythtv.org:/var/lib/mythcvs checkout mythplugins


All addson are now merged into 'mythplugins'.

Soundcard recommendation from myth-users list

$29.00
Turtle Beach RIVIERA 6 (5.1) Channels 24-bit 48KHz PCI Interface Sound Card
Model #: TBS-3425-01
Item #: N82E16829118105

Search for subject: "Sound card for MythTV box"

Maudio Dio 2496 S/PDIF, Try another soundcard

Mailing List Archive: Maudio Dio 2496 S/PDIF: "I finally gave up and switched to a Soundblaster Audigy. Now I use the DIO 2496 in one of my frontends using the analog output. Sorry I don't have a solution but hopefully I saved you some time."

Debugging mythfrontend audio problems "mythfrontend --verbose audio"

[mythtv] ALSA in mythtv not working: "running mythfrontend w/ --verbose audio"

===

When playing a recording you should see these mythfrontend msgs:

2005-04-22 02:24:39.855 Stream #1 (audio track #0) is an audio stream with 2 channels.
2005-04-22 02:24:39.857 Auto-selecting AC3 audio track (stream #1).
2005-04-22 02:24:39.858 Initializing audio parms from audio track #0.
2005-04-22 02:24:40.062 Killing AudioOutputDSP
2005-04-22 02:24:40.064 Opening audio device 'iec958'.
2005-04-22 02:24:40.068 in SetParameters(format=2, channels=2, rate=48000, buffer_time=500000, period_time=125000)

Note, in this case, the audio device is ALSA:iec958, which is defined by my /root/.asoundrc file.

DigitalSoundHowTo - MythTV.info

DigitalSoundHowTo - MythTV.info: "But I want to have all my sound go to the S/PDIF connector, how do I do that?"

Thursday, April 21, 2005

pcHDTV ALSA, SPDIF, 5.1 output

Mailing List Archive: ALSA, SPDIF, 5.1 output: "I have 'Audio output device' set
to 'ALSA:default'. I do NOT have the 'Enable AC3 to SPDIF passthrough'
checked, because that just causes static to come out of the speakers --
no matter what channel I am tuned to."

Same thing experienced with be.donnlee.com

Tried other audio output devices mentioned in the thread:
ALSA:spdif
ALSA:iec958

All resulted in no sound (silience), even tried "+" key to switch audio track.

Deinterlacing may not work with XvMC

MythTV Setup Guide and HOWTO: "If you are using recent nvidia drivers (or the WinTV PVR-350 TV-Out) then you can leave [xvmc] enabled. However, note that XvMC can conflict with some settings such as deinterlace."

Wednesday, April 20, 2005

IDE Errors. Fixed by replacing old IDE ribbon cable

Gentoo Forums :: View topic - Problem with hdd...: "hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x84 { DriveStatusError BadCRC }
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x84 { DriveStatusError BadCRC }
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x84 { DriveStatusError BadCRC }
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error } "

After I replaced ide cable with new one that came with 80GB Hitachi Deskstar, errors in dmesg went away. :)

Tuesday, April 19, 2005

XvMC - How to use new MPEG acceleration feature

nV News Forums - How to use new MPEG acceleration feature: "xorg 6.7.0 supports XvMC, and XFree86 4.4 probably does. Check for a file named libXvMC.* in /usr/X11R6/lib. When you run X and XvMC is enabled, you will see this in /var/log/Xorg.log.0:

(II) Loading extension XVideo
(II) Loading extension XVideo-MotionCompensation"

[ ie. don't search .log for "xvmc" ]

Sunday, April 17, 2005

NTP setup

Added to /etc/ntpd.conf:

server time-nw.nist.gov

Sync with nist (do 3 times):

[root@mythtv modules]# ntpdate -u time-nw.nist.gov
17 Apr 17:36:30 ntpdate[5800]: step time server 131.107.1.10 offset -64.211774 sec
[root@mythtv modules]# ntpdate -u time-nw.nist.gov
17 Apr 17:36:32 ntpdate[5801]: adjust time server 131.107.1.10 offset -0.000377 sec
[root@mythtv modules]# ntpdate -u time-nw.nist.gov
17 Apr 17:36:34 ntpdate[5802]: adjust time server 131.107.1.10 offset -0.000089 sec

Start ntpd service:

[root@mythtv modules]# service ntpd start
Starting ntpd: [ OK ]

Verify:

[root@mythtv modules]# ntpq -p
remote refid st t when poll reach delay offset jitter
=================================
time-nw.nist.go .ACTS. 1 u 7 64 1 34.605 -0.702 0.002
200.141.215.162 200.192.112.8 3 u 5 64 1 773.906 285.638 0.002
pluto.fips.at 130.149.17.21 2 u 5 64 1 183.031 -10.479 0.002
ns3.dns.pciwest 192.43.244.18 2 u 4 64 1 37.428 -7.180 0.002
LOCAL(0) LOCAL(0) 10 l 3 64 1 0.000 0.000 0.002


Make ntpd always start up on boot:

[root@mythtv modules]# chkconfig ntpd on

Verify ntpd will be started at runlevel 3 and 5:

[root@mythtv modules]# chkconfig --list | egrep -i ntp
ntpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off

Fedora Core 3 nVidia FX5200 installation

Removed Radeon LE (agp)
Installed nVidia FX5200 card (MSI FX5200-TD128; 128M DDR,DVI-I, 4pin tv-out) in htpc. Also AGP.
NOTE: Linux boot will freeze cuz nvidia not compatible with rhgb (RedHat Graphical Boot).
* Boot again, and type "a" at grub boot loader.
* Remove "rhgb" from "kernel /vmlinuz-2.6.6-1.435 ro root=LABEL=/ rhgb quiet"
Boot into FC3 and it detected hw change.
New xorg.conf driver is "nv" and "FX (generic)"
Changed default runlevel from 5 to 3 (no Xwindows) in /etc/inittab
Rebooted in runlevel 3 (multiuser, text).
Followed nvidia install directions for 7174 drivers.
No precompiled kernel interface was found. Let it compile for me.
"Installation of the NVIDIA Accelerated Graphics Driver for Linux-x86
(version: 1.0-7174) is now complete. Please update your XF86Config or
xorg.conf file as appropriate; see file
/usr/share/doc/NVIDIA_GLX-1.0/README for details."


Saved off a copy of /var/log/Xorg.0.log
Examined Xorg.0.log and saw that glx (ver 7174) was loaded :-)

"""
(II) LoadModule: "glx"
(II) Loading /usr/X11R6/lib/modules/extensions/libglx.so
(II) Module glx: vendor="NVIDIA Corporation"
compiled for 4.0.2, module version = 1.0.7174
Module class: XFree86 Server Extension
ABI class: XFree86 Server Extension, version 0.1
(II) Loading extension GLX
"""

and that 7174 driver was loaded:

(II) LoadModule: "nvidia"
(II) Loading /usr/X11R6/lib/modules/drivers/nvidia_drv.so
(II) Module nvidia: vendor="NVIDIA Corporation"
compiled for 4.0.2, module version = 1.0.7174
Module class: XFree86 Video Driver

also saw:

(II) NVIDIA dlloader X Driver 1.0-7174 Tue Mar 22 06:46:47 PST 2005
(II) NVIDIA Unified Driver for all NVIDIA GPUs
(II) Primary Device is: PCI 01:00:0


No "(EE)" lines found :)
(EE) = error

====

Applied DTV standard ATSC modeline to xorg.conf, it was close fit on panny plasma but had empty black stripe on left side (black vertical bar). So booted windows2000 and viewed pstrip.ini for modeline used as windows htpc. saved to gmail.

When Section "Screen" had modes:
Modes "848x480-pstrip" "800x600" "640x480"

...X would flip to 848x480, then to 800x600, then display the desktop.

Tried disabling DPMS (websearch hit):

#Option "dpms"

and replaced
Load "extmod"

with
SubSection "extmod"
Option "omit DPMS" # Disable monitor probing of supported resolutions.
EndSubSection

still wants to jump to 800x600, so forced 848x480 by deleting extra modes and leaving one mode:
Modes "848x480-pstrip"

Works! :-) but there is a black stripe on the right side, very thin one.

"If you are getting a correct image, but it's not correctly positioned, (or even if you think it is) run xvidtune and try moving the display around and see if that helps center the image. Xvidtune really only needs to be used if you are using a non HDTV display like myself. If you have a true native HDTV display you don't need to do this."
[ http://www.linuxis.us/linux/media/howto/linux-htpc/video_card_configuration.html ; Linux HTPC howto ]

After using xvidtune's "left" and "right" (and "apply") buttons, clicked "show" and new modeline was printed to stdout.
Added new modeline to xorg.conf:

ModeLine "848x480-vidtune" 33.99 848 872 904 1080 480 490 503 525 -hsync -vsync

Tweaked it some more, better centering with:
ModeLine "848x480-vidtune" 33.99 848 900 932 1100 480 490 503 525 -hsync -vsync

This is for my 42" Panasonic plasma.

mysql installation notes

Make sure mysql and mysql-server are installed:
-----------------------------------------------
[root@bouncer tmp]# rpm -qa|egrep -i sql

libdbi-dbd-mysql-0.6.5-9
mysql-3.23.58-13
mod_auth_mysql-20030510-5
php-mysql-4.3.9-3
mysql-bench-3.23.58-13
mysql-server-3.23.58-13
MySQL-python-0.9.2-4
perl-DBD-MySQL-2.9003-5
mysql-devel-3.23.58-13


Run mysql for the first time:
-----------------------------
[root@bouncer tmp]# /etc/rc.d/init.d/mysqld start
Initializing MySQL database: [ OK ]
Starting MySQL: [ OK ]


Verify mysql server is online:
------------------------------
[root@bouncer tmp]# /usr/bin/mysqladmin status


Remove anonymous access to mysql:
---------------------------------
shell> mysql -u root
mysql> DELETE FROM mysql.user WHERE User = '';
mysql> FLUSH PRIVILEGES;


Set password for user 'root':
-----------------------------
First, find out what the machines hostname is:

mysql> SELECT Host, User FROM mysql.user;
+-------------------------+------+
| Host | User |
+-------------------------+------+
| bouncer.ourbabyhome.com | root |
| localhost | root |
+-------------------------+------+
2 rows in set (0.01 sec)

(hostname is bouncer.ourbabyhome.com)

To assign passwords to the root accounts using mysqladmin, execute the following commands:

shell> mysqladmin -u root password "newpwd"
shell> mysqladmin -u root -h host_name password "newpwd"

eg.

# mysqladmin -u root password "mypass"
# mysqladmin -u root -h bouncer.ourbabyhome.com password "mypass"

Check like so:

mysql> SELECT Host, User,Password FROM mysql.user;
+-------------------------+------+------------------+
| Host | User | Password |
+-------------------------+------+------------------+
| localhost | root | 137245292607ad59 |
| bouncer.ourbabyhome.com | root | 137245292607ad59 |
+-------------------------+------+------------------+
2 rows in set (0.00 sec)


===

Grant a user access to a database:

CREATE DATABASE mydatabase;

GRANT ALL ON mydatabase.* TO fred@localhost IDENTIFIED BY "mypass"

grant all on bouncer.* TO donn@localhost IDENTIFIED by "mypass";
grant all on bouncer.* TO donn@bouncer.ourbabyhome.com IDENTIFIED by "mypass";

nVidia drivers for MythTV

pchdtv.com :: View topic - nvidia 7167 driver performance gone: "[quote='inkling']Something is seriously wrong with the nvidia 7167 drivers.

Yes, there is. Having to do with AGP, apparently. nVidia posted 7174 drivers on their website on Friday. Others on the MythTV list have already posted success stories.

The concensus seems to be to either back off to 6629 or upgrade to 7174."

Saturday, April 16, 2005

M-Audio Delta DiO 2496 sound card setup with Fedora Core 3 linux and ALSA

Got driver/module info from http://www.alsa-project.org/alsa-doc/

FC3 came with alsa. Confirmed with:

modinfo soundcore

Inserted modules for maudio 2496 with:

modprobe snd-ice1712;modprobe snd-pcm-oss;modprobe snd-mixer-oss;modprobe snd-seq-oss

Actually these modprobe's were not necessary for future reboots (Fedora Core 3)

Viewed with:
lsmod

Adjusted volume with 'alsamixer'.
Saw "Card: M Audio Delta DiO 2496"
"Chip: ICE1712 - multitrack"
"Item: IEC958"

Read how to use alsamixer: man page

M key toggles muting

===

Add fedora-extra to yum repository:

The best way to use Fedora Extras is via yum. Add a file (e.g. fedora-extras.repo) in your /etc/yum.repos.d dir with following

content:

[extras]
name=Fedora Extras - $releasever - $basearch
baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/$releasever/$basearch/
gpgcheck=1
gpgkey=http://download.fedora.redhat.com/pub/fedora/linux/extras/
RPM-GPG-KEY-Fedora-Extras

[extras-testing]
name=Fedora Extras Test Updates - $releasever - $basearch
baseurl=http://download.fedora.redhat.com/pub/fedora/
linux/extras/testing/$releasever/$basearch/
gpgcheck=1
gpgkey=http://download.fedora.redhat.com/pub/fedora/linux/extras/
RPM-GPG-KEY-Fedora-Extras
enabled=0

[extras-debug]
name=Fedora Extras - $releasever - $basearch - Debugging packages
baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/$releasever/$basearch/debug/
gpgcheck=1
gpgkey=http://download.fedora.redhat.com/pub/fedora/linux/extras/
RPM-GPG-KEY-Fedora-Extras
enabled=0

----

Import the authentication key:

You will also want to make sure you've imported this:

http://download.fedora.redhat.com/pub/fedora/linux/extras/RPM-GPG-KEY-Fedora-Extras

key into your rpm database. Use this command to import it:

rpm --import http://download.fedora.redhat.com/pub/fedora/linux/
extras/RPM-GPG-KEY-Fedora-Extras


=====

Installed alsa-tools (from Fedora Extras) to get envy24control tool (gui sound mixer for M-Audio)

yum install alsa-tools

=====

CDROM /media/cdrecorder (when a data cd is loaded, doesn't automount an Audio CD):

[root@mythtv ~]# mount
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/hda1 on /boot type ext3 (rw)
none on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
/dev/hdb on /media/cdrecorder type iso9660 (ro,nosuid,nodev,fscontext=system
_u:object_r:removable_t,user=donn)


[root@mythtv ~]# eject /dev/hdb

===============

yum install xmms-cdread

[still cant read cdrom]



============

Make xmms play mp3's:

get xmms-mp3 from DAG repository.

added /etc/yum.repo.d/dag.repo

Contents of dag.repo:

[dag]
name=Dag RPM Repository for Fedora Core
baseurl=http://apt.sw.be/fedora/$releasever/en/$basearch/dag
gpgcheck=1
enabled=1


Added dag key:

[root@mythtv yum.repos.d]# rpm --import http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt

yum install xmms-mp3


=====

List soundcards:

[root@mythtv ~]# cat /proc/asound/cards
0 [M2496 ]: ICE1712 - M Audio Delta DiO 2496
M Audio Delta DiO 2496 at 0xa000, irq 11

(soundcard 0 is Maudio 2496)

===========
tried various suggestions from the internet: basic /etc/asound.conf and .asoundrc files.
revert to default (removed /etc/asound.conf, .asoundrc files). /etc/modprobe.conf contains its orig lines:

[root@mythtv ~]# cat /etc/modprobe.conf
alias eth0 8139too
alias snd-card-0 snd-ice1712
options snd-card-0 index=0
install snd-ice1712 /sbin/modprobe --ignore-install snd-ice1712 && /usr/sbin/alsactl restore >/dev/null 2>&1 || :
remove snd-ice1712 { /usr/sbin/alsactl store >/dev/null 2>&1 || : ; }; /sbin/modprobe -r --ignore-remove snd-ice1712
alias usb-controller ehci-hcd
alias usb-controller1 uhci-hcd
alias ieee1394-controller ohci1394


===========

Got 44.1KHz mono wav off net. BUSTIN.wav:
goog search "wav 44.1khz"

aplay -d default BUSTIN.wav (WORKS! :-)

NOTE: I had to reboot once before aplay worked.

[root@mythtv ~]# aplay -D default bustin.wav
Playing WAVE 'bustin.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Mono
<<<>>>

[ xmms player still complains that it cant use sound device ]
Was able to fix xmms:
* Preferences, Under "Output plugin", plugin name "ALSA 1.2.10 output plugin [libALSA.so]", Click "Configure" button and set

"Audio device" to "default" (was set to hw:0,0 during troubleshooting). Left Mixer unchecked. Then was able to play bustin.wav

with xmms.

then, audio cd's wouldn't play. enabled cd reader, disabled cd audio player per internet instructions. cd appears to
be playing visually, but no sound.

also was able to use envy24control mixer sliders by changing patchbay to spdif out(L)=Digital Mix L, and spdif out(R)=Digital Mix R

After changing envy24ctrl to "Digital Mix L/R", xmms could play Audio CDs :-)
Adjusted Digital mixer sliders in envy24control to my prefferred volume levels for listening.

Setting up xmms for Audio CD playing:

Open the xmms media player. Right click in xmms and select Options>Preferences>Audio I/O Plugins

Select 'CD Audio Player' and uncheck the 'Enable plugin' button. Select 'Audio CD Reader' and 'enable' it. Select 'Configure' for

audio CD Reader and ensure the correct device is selected you want to play CDs from (/dev/hdx where x is a,b,c, or d, or /dev/scd0

etc if it is a SCI device)

Now save the options and right click on xmms and select 'Play File' a dialogue box will open. Enter the device name in the selection

box, for example /dev/hdc and click 'OK'

The CD will now play, and if you are online and cddb was enabled in the plugin options you will see the CD track names appear in the

xmms playlist. The next time you put in a CD you will not need to 'Select File' Just press the 'Play' button and it should start

playing.

[ in my system, /dev/hdb is the cdrom drive (a HP dvd burner actually) ]

After all this was working, checked what alsamixer said the setting were:

Along the sliders, it said "Digital" and "Digital" instead of "PCM out" and "PCM out". So "Digital" seems to be the right

setting.

then, tested mp3 playing (note, that xmms-mp3 was yum/installed earlier, see above). loaded file and it played :-)


==========

alsamixer:


Digital, Digital


envy24control:
Patchbay: spdif out(L)=Digital Mix L, spdif out(R)=Digital Mix R
Hardware settings: Master clock=44100, Locked(unchecked), Reset(checked), Vol Change rate=140,
Professional(checked), Data mode=Audio, Stream=Stereophonic, Emphasis=Not indicated, spdif input=Coaxial


Note, despite what some people said on the internet, soundcard seems to work fine while sharing IRQ with eth0:

[root@mythtv ~]# cat /proc/interrupts
CPU0
0: 1811760 XT-PIC timer
1: 991 XT-PIC i8042
2: 0 XT-PIC cascade
8: 1 XT-PIC rtc
9: 0 XT-PIC acpi
10: 105175 XT-PIC uhci_hcd, uhci_hcd, ohci1394, radeon@pci:0000:01:00.0
11: 16761 XT-PIC ICE1712, ehci_hcd, uhci_hcd, eth0
12: 14160 XT-PIC i8042
14: 14989 XT-PIC ide0
NMI: 0
ERR: 0

(Notice ice1712 is sharing irq11 with eth0 and other stuff)

Thursday, April 07, 2005

Modelines for video card config

The Linux HTPC Howto: "Modelines ready-to-go for native HDTV displays"

IrMan on Linux

The Linux HTPC Howto: "Linux Infra-Red remote control"

pcHDTV and MythTV Howto

The pcHDTV and MythTV Howto: "Setting up pcHDTV cards and MythTV"

depmod not found!

pchdtv.com :: View topic - DVB Driver for the HD-3000: "You got a common error in that the video4linux 'make install' assumes you have /sbin in your path somewhere. Your error that it can't find depmod means that it hasn't re-run the module list so it cant find the 'new' module cx88-dvb. Just type:

> /sbin/depmod -ae

and then try the modprobe. "

DVB Driver for the HD-3000

pchdtv.com :: View topic - DVB Driver for the HD-3000: "I have used the DVB drivers in MythTV and I have had great success with it. The DVB support in Myth is really great. It has been a lot more stable for me than using the pcHDTV driver. Version 0.17 of MythTV should be out this weekend with all the updated DVB support, otherwise you will have to use the current CVS version."

What is DVB? Why is it better? see post.

pcHDTV Firmware

pchdtv.com :: View topic - firmware problems.... where to install?: "put the firmware files into /lib/firmware/" [more]

Downloading and Compiling the latest linux kernel

pchdtv.com :: View topic - 2.6.11 kernel: "Get the latest kernel. Note, the last line makes sure that you are compiling a unique kernel..." [see post]

v1.6 drivers for 2.6.9 kernel ONLY

pchdtv.com :: View topic - 2.6.11 kernel: "Do NOT use the 1.6 driver with 2.6.11. 1.6 driver is ONLY for 2.6.9."

Don't rm/unload/load modules. Reboot is better.

Use modprobe cx8800 to activate 2nd HD3000 card

pchdtv.com :: View topic - Trying to get dual HD3000's working: "modprobe cx8800

then looked at /var/log/dmesg and it show both cards.. the second one linked to /dev/dtv1.

all better.."

Problems (hard freeze) with Dual tuners HD3000s

pchdtv.com :: View topic - Dual tuners HD3000s: "Does either card share an interrupt (cat /proc/interrupts) with anything else?"

Shared interrupt looks like this:
10: 461353 XT-PIC usb-uhci, usb-uhci, cx8800[0], cx8800[1]

(int 10)

Solution: Swap cards/slots.

Kernel and installing pcHDTV 2.0 drivers

pchdtv.com :: View topic - pcHDTV-3000 v1.6/v2.0 with 2.6.9 kernel: "that is how I did on my system at home with the HD-3000 card, just 'make' and 'make install' from within the 2.0 directory. Never had to modify or need the kernel source.

BTW, just do 'modprobe cx88_atsc', Don't do it for the other modules since that is how I load the modules on my system. Also, when you do the 'make install', do that with the kernel loaded and aye, you have to do another reboot after it but makes sure the 2.0 modules gets loaded."

Troubleshooting v2.0 drivers - pchdtv.com

pchdtv.com :: View topic - installed 2.0 drivers on 2.6.9 got no sig level on dtvsignal: "How about posting lines of relevtive lines from syslogd starting from the 'Linux video capture interface: v1.00' and down. Hint: The devices that the kernel assigns are in these messages. Also, VEEEERY important, make sure the tv signals are getting to the card.

Also, just do 'modprobe cx88_atsc' will be enuff."

lsmod output (see post).

dmesg:
"Linux video capture interface: v1.00
cx2388x v4l2 driver version 0.0.4 loaded
ACPI: PCI Interrupt Link [LNK2] enabled at IRQ 3
ACPI: PCI interrupt 0000:01:09.0[A] -> GSI 3 (level, low) -> IRQ 3
cx88[0]: subsystem: 7063:3000, board: pcHDTV HD3000 HDTV [card=22,autodetected]
tuner 2-0061: chip found @ 0xc2 (cx88[0])
tuner 2-0061: type set to 52 (Thomson DDT 7610 (ATSC/NTSC))
cx88[0]/0: found at 0000:01:09.0, rev: 5, irq: 3, latency: 32, mmio: 0xe2000000
cx88[0]/0: registered device video0 [v4l2]
cx88[0]/0: registered device vbi0
cx88[0]/0: registered device radio0
pcHDTV HD3000 driver version 2.0.0 loaded
ACPI: PCI interrupt 0000:01:09.2[A] -> GSI 3 (level, low) -> IRQ 3
cx88[0]/2: found at 0000:01:09.2, rev: 5, irq: 3, latency: 32, mmio: 0xe3000000
cx88[0]/2 FW version: 113-4-194-3
cx88[0]/2: registered device video1 [atsc]"

"registered device video1 [atsc]" = /dev/video1 (type=atsc)