个人工具

“UbuntuHelp:MythTV/Install/Troubleshooting”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
 
(未显示同一用户的8个中间版本)
第1行: 第1行:
 
{{From|https://help.ubuntu.com/community/MythTV/Install/Troubleshooting}}
 
{{From|https://help.ubuntu.com/community/MythTV/Install/Troubleshooting}}
 
{{Languages|UbuntuHelp:MythTV/Install/Troubleshooting}}
 
{{Languages|UbuntuHelp:MythTV/Install/Troubleshooting}}
 
+
<<Include([[UbuntuHelp:MythTV|MythTV]]/Header)>>
[[Include(MythTV/Header)]]
+
 
== Trouble Shooting ==
 
== Trouble Shooting ==
 
=== Access denied for user: 'mythtv@localhost' ===
 
=== Access denied for user: 'mythtv@localhost' ===
 
The most common reason for this problem is not properly setting up your group membership for the user you are trying to launch mythtv with.
 
The most common reason for this problem is not properly setting up your group membership for the user you are trying to launch mythtv with.
 
* Are you in the mythtv group?
 
* Are you in the mythtv group?
** You can check who is in the mythtv group by running
+
* You can check who is in the mythtv group by running
 
<pre><nowiki>
 
<pre><nowiki>
 
grep mythtv: /etc/group
 
grep mythtv: /etc/group
 
</nowiki></pre>
 
</nowiki></pre>
** If you aren't in the mythtv group, add yourself to the group
+
* If you aren't in the mythtv group, add yourself to the group
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo usermod -a -G mythtv USERNAME
 
sudo usermod -a -G mythtv USERNAME
 
</nowiki></pre>
 
</nowiki></pre>
 
Where USERNAME is the name of the user being added.
 
Where USERNAME is the name of the user being added.
** After adding yourself to the group, remove ~/.mythtv and /home/mythtv/.mythtv and then '''log out/in'''.
+
* After adding yourself to the group, remove ~/.mythtv and /home/mythtv/.mythtv and then '''log out/in'''.
 
<pre><nowiki>
 
<pre><nowiki>
 
rm ~/.mythtv -rf && rm /home/mythtv/.mythtv -rf
 
rm ~/.mythtv -rf && rm /home/mythtv/.mythtv -rf
第53行: 第52行:
 
FLUSH PRIVILEGES;
 
FLUSH PRIVILEGES;
 
</nowiki></pre>
 
</nowiki></pre>
 
 
=== Access denied for user: 'root@localhost' ===
 
=== Access denied for user: 'root@localhost' ===
 
 
Somehow, during setup your root password for mysql that you entered into mythtv doesn't match.
 
Somehow, during setup your root password for mysql that you entered into mythtv doesn't match.
 
 
Running
 
Running
 
<pre><nowiki>
 
<pre><nowiki>
第88行: 第84行:
 
</nowiki></pre>
 
</nowiki></pre>
 
and make sure that you update the password there as well.
 
and make sure that you update the password there as well.
 +
==== If still no access for 'root@localhost', may need to re-install MySQL ====
 +
A possible problem seen in (k)Ubuntu 8.04 and possibly other setups is that MySQL is already pre-installed (since it is used by the pre-installed Amarok) but not set up properly for [[UbuntuHelp:MythTV|MythTV]].  A solution is to remove and purge MySQL and any dependent programs, then install [[UbuntuHelp:MythTV|MythTV]] (which will re-install MySQL), and only ''then'' re-install other programs that depend on MySQL.  This can be done in Synaptic (or Adept) or in a terminal, as follows:
 +
<pre><nowiki>
 +
sudo apt-get remove amarok
 +
sudo apt-get purge mysql-common
 +
sudo apt-get install mythtv
 +
</nowiki></pre>
 +
The first command "''sudo apt-get remove amarok''" removes Amarok but keeps the configuration files; substitute the name of any installed programs which you know depend on MySQL and for which you want to keep the configuration.  If you forget to do this for any programs (or skip this step), things will still work, but when you re-install your Amarok or other programs, they will be like new installations and not retain any of your previous settings.
 +
The second command "''sudo apt-get purge mysql-common''" removes MySQL and removes any configuration files, so that when you re-install, you have a chance to set your own root password (or leave blank).  It will also remove [[UbuntuHelp:MythTV|MythTV]] (which needs MySQL).  The third command "''sudo apt-get install mythtv''" does the actual reinstallation (re-installing [[UbuntuHelp:MythTV|MythTV]]  will automatically re-install MySQL).  If you removed Amarok or any other programs, you would want to re-install them with a fourth command "''sudo apt-get install amarok''", etc.
 +
=== Mythtv sucessfully finds DVB-T channels, but you cannot watch them ===
 +
This is caused by [https://bugs.launchpad.net/ubuntu/+source/mythtv/+bug/188473/ bug #188473]. Mythtv associates the channels it has found (or imported from a channels.conf) with the wrong transponder (basically the frequency the channel is transmitted on). Fortunately the mess is easily fixable. Connect to your database using the mysql command line tool and the login data from /etc/mythtv/mysql.txt (or ~/.mythtv/mysql.txt):
 +
<pre><nowiki>
 +
mysql -u mythtv -p
 +
</nowiki></pre>
 +
Then list the channels and the transponders:
 +
<pre><nowiki>
 +
mysql> select * from dtv_multiplex;
 +
mysql> select * from channel;
 +
</nowiki></pre>
 +
Now check the association between the mplexid column of the channels (hope there are not more than a few) and the dtv_multiplex table against the DVB-T transmission data for your region. If you are in Germany or Austria you can use: [http://dvb-t.the-media-channel.com/]. If you have a channels.conf file for your country, the second column for each channel should be the frequency. Then correct the association for each channel. I had the following tables before correcting them:
 +
<pre><nowiki>
 +
| mplexid | sourceid | transportid | networkid | frequency | inversion | symbolrate | fec  | polarity | modulation | bandwidth | lp_code_rate | transmission_mode | guard_interval | visible | constellation | hierarchy | hp_code_rate | sistandard | serviceversion | updatetimestamp    |
 +
+---------+----------+-------------+-----------+-----------+-----------+------------+------+----------+------------+-----------+--------------+-------------------+----------------+---------+---------------+-----------+--------------+------------+----------------+---------------------+
 +
|      1 |        1 |        500 |      8232 | 858000000 | a        |      NULL | NULL | NULL    | NULL      | 8        | 3/4          | 8                | 1/4            |      0 | qam_16        | n        | 3/4          | dvb        |              2 | 2008-02-02 20:16:03 |
 +
|      2 |        1 |        500 |      8232 | 514000000 | a        |      NULL | NULL | NULL    | qpsk      | 8        | auto        | a                | auto          |      0 | auto          | a        | auto        | dvbt      |            33 | 2008-02-02 20:16:03 |
 +
|      3 |        1 |        330 |      8232 | 474000000 | a        |      NULL | NULL | NULL    | NULL      | 8        | 3/4          | 8                | 1/4            |      0 | qam_16        | n        | 3/4          | dvb        |              1 | 2008-02-02 20:16:09 |
 +
|      4 |        1 |        330 |      8232 | 490000000 | a        |      NULL | NULL | NULL    | qpsk      | 8        | auto        | a                | auto          |      0 | auto          | a        | auto        | dvbt      |            33 | 2008-02-02 20:16:09 |
 +
</nowiki></pre>
 +
<pre><nowiki>
 +
| chanid | channum | freqid | sourceid | callsign      | name          | icon | finetune | videofilters | xmltvid | recpriority | contrast | brightness | colour | hue  | tvformat | commfree | visible | outputfilters | useonairguide | mplexid | serviceid | atscsrcid | tmoffset | atsc_major_chan | atsc_minor_chan |
 +
+--------+---------+--------+----------+----------------+----------------+------+----------+--------------+---------+-------------+----------+------------+--------+-------+----------+----------+---------+---------------+---------------+---------+-----------+-----------+----------+-----------------+-----------------+
 +
|  11121 | 10121  | NULL  |        1 | PULS 4        | PULS 4        |      |    NULL |              |        |          0 |    32768 |      32768 |  32768 | 32768 | Default  |        0 |      1 |              |            0 |      3 |    10121 |      NULL |        0 |              0 |              0 |
 +
|  12302 | 11302  | NULL  |        1 | 3SAT          | 3SAT          |      |    NULL |              |        |          0 |    32768 |      32768 |  32768 | 32768 | Default  |        0 |      1 |              |            1 |      3 |    11302 |      NULL |        0 |              0 |              0 |
 +
|  12303 | 11303  | NULL  |        1 | ORF Sport Plus | ORF Sport Plus |      |    NULL |              |        |          0 |    32768 |      32768 |  32768 | 32768 | Default  |        0 |      1 |              |            1 |      3 |    11303 |      NULL |        0 |              0 |              0 |
 +
|  11101 | 10101  | NULL  |        1 | ORF1          | ORF1          |      |    NULL |              |        |          0 |    32768 |      32768 |  32768 | 32768 | Default  |        0 |      1 |              |            1 |      1 |    10101 |      NULL |        0 |              0 |              0 |
 +
|  11112 | 10112  | NULL  |        1 | ORF2 St        | ORF2 St        |      |    NULL |              |        |          0 |    32768 |      32768 |  32768 | 32768 | Default  |        0 |      1 |              |            1 |      1 |    10112 |      NULL |        0 |              0 |              0 |
 +
|  11120 | 10120  | NULL  |        1 | ATV+          | ATV+          |      |    NULL |              |        |          0 |    32768 |      32768 |  32768 | 32768 | Default  |        0 |      1 |              |            1 |      1 |    10120 |      NULL |        0 |              0 |              0 |
 +
|  11132 | 10132  | NULL  |        1 | ORF2 B        | ORF2 B        |      |    NULL |              |        |          0 |    32768 |      32768 |  32768 | 32768 | Default  |        0 |      1 |              |            1 |      1 |    10132 |      NULL |        0 |              0 |              0 |
 +
</nowiki></pre>
 +
The following statements solved my problems:
 +
<pre><nowiki>
 +
mysql> update channel set mplexid=2 where mplexid=1;
 +
Query OK, 4 rows affected (0.00 sec)
 +
Rows matched: 4  Changed: 4  Warnings: 0
  
 +
mysql> update channel set mplexid=4 where mplexid=3;
 +
Query OK, 3 rows affected (0.00 sec)
 +
Rows matched: 3  Changed: 3  Warnings: 0
 +
</nowiki></pre>
 
=== Mythbackend isn't running at startup right after install ===
 
=== Mythbackend isn't running at startup right after install ===
 
Typically this is caused by incorrect permissions on the directory where the backend will be saving your recordings.
 
Typically this is caused by incorrect permissions on the directory where the backend will be saving your recordings.
 
 
You can verify this to be the problem by attempting to restart the backend:
 
You can verify this to be the problem by attempting to restart the backend:
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo /etc/init.d/mythtv-backend restart
 
sudo /etc/init.d/mythtv-backend restart
 
</nowiki></pre>
 
</nowiki></pre>
 
 
Then checking that the backend successfully started:
 
Then checking that the backend successfully started:
 
<pre><nowiki>
 
<pre><nowiki>
 
ps -p `cat /var/run/mythtv/mythbackend.pid`
 
ps -p `cat /var/run/mythtv/mythbackend.pid`
 
</nowiki></pre>
 
</nowiki></pre>
 
 
If you don't see output like:
 
If you don't see output like:
 
<pre><nowiki>
 
<pre><nowiki>
PID TTY          TIME CMD
+
  PID TTY          TIME CMD
 
30711 ?        00:00:00 mythbackend
 
30711 ?        00:00:00 mythbackend
 
</nowiki></pre>
 
</nowiki></pre>
 
 
check the log file for errors:
 
check the log file for errors:
 
<pre><nowiki>
 
<pre><nowiki>
 
more /var/log/mythtv/mythbackend.log
 
more /var/log/mythtv/mythbackend.log
 
</nowiki></pre>
 
</nowiki></pre>
 
 
The end of the log file will indicate exactly why the backend is no longer running. If it ends up being a permissions or ownership problem, just change the permissions and ownership of the recordings directory:
 
The end of the log file will indicate exactly why the backend is no longer running. If it ends up being a permissions or ownership problem, just change the permissions and ownership of the recordings directory:
 
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo chown mythtv.mythtv /var/lib/mythtv
 
sudo chown mythtv.mythtv /var/lib/mythtv
 
sudo chmod u=rwx,g=rwxs,o=rx /var/lib/mythtv
 
sudo chmod u=rwx,g=rwxs,o=rx /var/lib/mythtv
 
</nowiki></pre>
 
</nowiki></pre>
 
 
(This assumes that your directory for recordings is <code><nowiki>/var/lib/mythtv</nowiki></code>. If you have the recordings stored somewhere else, be sure to replace <code><nowiki>/var/lib/mythtv</nowiki></code> in the above command with that location.)
 
(This assumes that your directory for recordings is <code><nowiki>/var/lib/mythtv</nowiki></code>. If you have the recordings stored somewhere else, be sure to replace <code><nowiki>/var/lib/mythtv</nowiki></code> in the above command with that location.)
 
 
The end result is that the ownership and permissions should match <code><nowiki>/var/lib/mythtv</nowiki></code> as it was set by the installer. (You might want to replace <code><nowiki>/var/lib/mythtv</nowiki></code> with a symbolic link to your custom location if you are using a customized location.)
 
The end result is that the ownership and permissions should match <code><nowiki>/var/lib/mythtv</nowiki></code> as it was set by the installer. (You might want to replace <code><nowiki>/var/lib/mythtv</nowiki></code> with a symbolic link to your custom location if you are using a customized location.)
 
 
==== Ownership of NFS lockfile is wrong ====
 
==== Ownership of NFS lockfile is wrong ====
 
 
After installing Mythbuntu over an existing Gutsy setup, mythbackend wouldn't start.  The problem was, the permissions on mythtv/recordings/nfslockfile.lock were wrong.  Somehow during the install process, owner was set to ntp, group to mythtv, and perms were 644.  The fix:
 
After installing Mythbuntu over an existing Gutsy setup, mythbackend wouldn't start.  The problem was, the permissions on mythtv/recordings/nfslockfile.lock were wrong.  Somehow during the install process, owner was set to ntp, group to mythtv, and perms were 644.  The fix:
 
<pre><nowiki>
 
<pre><nowiki>
第131行: 第165行:
 
sudo /etc/init.d/mythtv-backend restart
 
sudo /etc/init.d/mythtv-backend restart
 
</nowiki></pre>
 
</nowiki></pre>
 
 
=== Sound from live TV does not pause ===
 
=== Sound from live TV does not pause ===
 
 
Symptom: You can watch TV and hear the audio. But when TV is paused, the TV audio moves on.
 
Symptom: You can watch TV and hear the audio. But when TV is paused, the TV audio moves on.
 
 
Sourse of problem: The audio signal from your TV tuner card is fed through a cable to your sound card, and played back directly.
 
Sourse of problem: The audio signal from your TV tuner card is fed through a cable to your sound card, and played back directly.
 
 
Solution: You need to mute this input for playback and enable it for capture. You can use the alsamixer utility to change these settings.
 
Solution: You need to mute this input for playback and enable it for capture. You can use the alsamixer utility to change these settings.
 
 
Start alsamixer in a terminal, use left and right cursors to move to your TV audio input, which most likely is Line or CD (check your hardware manual and where the audio cable is connected); press SPACE to set it as the capture soure, and M to mute it (yes, mute it so that it won't appear directly in playback). You may also need to enable Capture as capture. Use up and down cursor to adjust volume. Once everything is set, press ESC to exit.
 
Start alsamixer in a terminal, use left and right cursors to move to your TV audio input, which most likely is Line or CD (check your hardware manual and where the audio cable is connected); press SPACE to set it as the capture soure, and M to mute it (yes, mute it so that it won't appear directly in playback). You may also need to enable Capture as capture. Use up and down cursor to adjust volume. Once everything is set, press ESC to exit.
 
+
This information is based on [[UbuntuHelp:MythTV|MythTV]] offical documentation.
This information is based on MythTV offical documentation.
+
 
+
 
=== Razzing/tinny/metalic sound ===
 
=== Razzing/tinny/metalic sound ===
 
 
This happens with the following combination: Ubuntu 6.10, mythtv 0.20, software encoding tuner card, VIA 8237 chipset. The default sample rate is 32 kHz. However the VIA 8237 chipset only do well with 48 kHz.
 
This happens with the following combination: Ubuntu 6.10, mythtv 0.20, software encoding tuner card, VIA 8237 chipset. The default sample rate is 32 kHz. However the VIA 8237 chipset only do well with 48 kHz.
 
 
To solve the problem, open mythfrondend, go to Utilities/Setup -> Setup -> TV Settings -> Recording Profiles -> Software Encoders -> Live TV and change the audio sample rate to 48 kHz. Test effect. Then do the same to settings in Default, High Quality, Low Quality.
 
To solve the problem, open mythfrondend, go to Utilities/Setup -> Setup -> TV Settings -> Recording Profiles -> Software Encoders -> Live TV and change the audio sample rate to 48 kHz. Test effect. Then do the same to settings in Default, High Quality, Low Quality.
 
+
This solution is based on the [[UbuntuHelp:MythTV|MythTV]] Wiki.
This solution is based on the MythTV Wiki.
+
 
+
 
=== Unable to use Mythweb or phpmyadmin ===
 
=== Unable to use Mythweb or phpmyadmin ===
 
If you are encountering errors where your web browser attempts to open a PHTML file rather than browse phpmyadmin or mythweb properly, you most likely mixed up the order of some installations and lost some dependencies along the way.
 
If you are encountering errors where your web browser attempts to open a PHTML file rather than browse phpmyadmin or mythweb properly, you most likely mixed up the order of some installations and lost some dependencies along the way.
 
 
Here is what this error typically looks like:
 
Here is what this error typically looks like:
 
{|border="1" cellspacing="0"
 
{|border="1" cellspacing="0"
 
| https://help.ubuntu.com/community/MythTV/Install/Troubleshooting?action=AttachFile&do=get&target=phtml.png |||| This is what happens when you try to browse to mythweb or phpmyadmin.  
 
| https://help.ubuntu.com/community/MythTV/Install/Troubleshooting?action=AttachFile&do=get&target=phtml.png |||| This is what happens when you try to browse to mythweb or phpmyadmin.  
 
|}
 
|}
 
 
To resolve the issue, you will need to install '''libapache2-mod-php5''' or '''libapache2-mod-php4'''.
 
To resolve the issue, you will need to install '''libapache2-mod-php5''' or '''libapache2-mod-php4'''.
 
Find out which one you have installed ( '''dpkg -l | grep php''' will show this).
 
Find out which one you have installed ( '''dpkg -l | grep php''' will show this).
第166行: 第187行:
 
sudo apt-get install libapache2-mod-php4
 
sudo apt-get install libapache2-mod-php4
 
</nowiki></pre>
 
</nowiki></pre>
 
 
==== PHP5 ====
 
==== PHP5 ====
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo apt-get install libapache2-mod-php5
 
sudo apt-get install libapache2-mod-php5
 
</nowiki></pre>
 
</nowiki></pre>
 
 
=== data/tv_icons directory is not writable ===
 
=== data/tv_icons directory is not writable ===
 
from http://stacktrace.org/
 
from http://stacktrace.org/
第177行: 第196行:
 
sudo chmod 777 /usr/share/mythtv/mythweb/data/tv_icons
 
sudo chmod 777 /usr/share/mythtv/mythweb/data/tv_icons
 
</nowiki></pre>
 
</nowiki></pre>
 
 
=== Mythbackend setup not saving settings ===
 
=== Mythbackend setup not saving settings ===
 
This problem is caused by a database setup error. Syptoms include capture card setting not saving, and a database error when finishing backend setup. To fix:
 
This problem is caused by a database setup error. Syptoms include capture card setting not saving, and a database error when finishing backend setup. To fix:
 
 
In mySQL drop the data base '''mythconverg'''  ''If not confident with mySQL install phpmyadmin, and you can do it from a web browser''
 
In mySQL drop the data base '''mythconverg'''  ''If not confident with mySQL install phpmyadmin, and you can do it from a web browser''
 
 
Open '''Synaptic Package Manager''' and search for '''myth-database'''. Mark package for re-installation, and apply changes.
 
Open '''Synaptic Package Manager''' and search for '''myth-database'''. Mark package for re-installation, and apply changes.
 
 
Run mythbackend setup again and problems should have gone.
 
Run mythbackend setup again and problems should have gone.
 
 
=== Unable to Upgrade mythtv-backend (edgy to feisty) ===
 
=== Unable to Upgrade mythtv-backend (edgy to feisty) ===
 
 
My issue resulted in mythtv-backend being a broken package which prevented the upgrade from continuing.  Carefully reviewing the log for the mythtv-backend upgrade revealed that the problem occured during the prerm script.  It was attempting to run
 
My issue resulted in mythtv-backend being a broken package which prevented the upgrade from continuing.  Carefully reviewing the log for the mythtv-backend upgrade revealed that the problem occured during the prerm script.  It was attempting to run
 
 
<pre><nowiki>
 
<pre><nowiki>
 
invoke-rc.d mythtv-backend stop
 
invoke-rc.d mythtv-backend stop
 
</nowiki></pre>.
 
</nowiki></pre>.
 
 
This was failing (it could have been a manual edit to '''/etc/init.d/mythtv-backend''' in the past or a prior bug).
 
This was failing (it could have been a manual edit to '''/etc/init.d/mythtv-backend''' in the past or a prior bug).
 
 
To resolve, I replaced /etc/init.d/mythtv-backend with the version in the new mythtv-backend package and verified that
 
To resolve, I replaced /etc/init.d/mythtv-backend with the version in the new mythtv-backend package and verified that
 
 
<pre><nowiki>
 
<pre><nowiki>
 
invoke-rc.d mythtv-backend start
 
invoke-rc.d mythtv-backend start
 
invoke-rc.d mythtv-backend stop
 
invoke-rc.d mythtv-backend stop
 
</nowiki></pre>
 
</nowiki></pre>
 
 
worked.  Then the package and Ubuntu upgraded without any further issues
 
worked.  Then the package and Ubuntu upgraded without any further issues
 
+
<<Include([[UbuntuHelp:MythTV|MythTV]]/Install/Troubleshooting/UPNP)>>
 
+
[[Include(MythTV/Install/Troubleshooting/UPNP)]]
+
 
+
 
+
 
=== Fixing Capture Card Setup Errors ===
 
=== Fixing Capture Card Setup Errors ===
 
+
When removing or adding new capture cards in [[UbuntuHelp:MythTV|MythTV]] setup the database table can become corrupted- causing errors such as "Tuner x set to start on channel 0 which does not exist", etc.  To fix this problem you will need your ''mysql mythtv user's'' password.
When removing or adding new capture cards in MythTV setup the database table can become corrupted- causing errors such as "Tuner x set to start on channel 0 which does not exist", etc.  To fix this problem you will need your ''mysql mythtv user's'' password.
+
 
+
 
If you do not know the password, you can find it in the frontend machine's main user's home directory:
 
If you do not know the password, you can find it in the frontend machine's main user's home directory:
 
+
<pre><nowiki>
<pre><nowiki>$ cat ~/.mythtv/mysql.txt
+
$ cat ~/.mythtv/mysql.txt
</nowiki></pre>
+
</nowiki></pre>
 
+
 
Then:
 
Then:
 
 
* Run mythtv-setup
 
* Run mythtv-setup
 
* Delete '''all''' video sources
 
* Delete '''all''' video sources
第226行: 第226行:
 
* Exit mythtv-setup
 
* Exit mythtv-setup
 
* Open a terminal and do:
 
* Open a terminal and do:
 
 
<pre><nowiki>
 
<pre><nowiki>
 
$ mysql mythconverg -u mythtv -p
 
$ mysql mythconverg -u mythtv -p
</nowiki></pre>
+
</nowiki></pre>
 
+
 
When prompted, enter the '''''mysql''''' password-
 
When prompted, enter the '''''mysql''''' password-
 
 
At the mysql prompt, do:
 
At the mysql prompt, do:
 
 
<pre><nowiki>
 
<pre><nowiki>
 
> truncate table capturecard;
 
> truncate table capturecard;
 
> truncate table cardinput;
 
> truncate table cardinput;
 
> quit
 
> quit
</nowiki></pre>
+
</nowiki></pre>
 
+
 
Then run mythtv-setup again and configure your capture card and video source(s).
 
Then run mythtv-setup again and configure your capture card and video source(s).
 
 
=== Enable Digest Authentication in MythWeb ===
 
=== Enable Digest Authentication in MythWeb ===
For those people who want to have MythWeb access from the open internet the Apache authentication should be enabled.
+
For those people who want to have [[UbuntuHelp:MythWeb|MythWeb]] access from the open internet the Apache authentication should be enabled.
 
*Is the Apache Digest Authentication Module Enabled?
 
*Is the Apache Digest Authentication Module Enabled?
 
<pre><nowiki>
 
<pre><nowiki>
ls -A -l /etc/apache2/mods-enabled/ | grep auth_digest
+
ls -A -l /etc/apache2/mods-enabled/ | grep auth_digest
</nowiki></pre>
+
</nowiki></pre>
 
If you see;
 
If you see;
 
<pre><nowiki>
 
<pre><nowiki>
auth_digest.load -> ../mods-available/auth_digest.load
+
auth_digest.load -> ../mods-available/auth_digest.load
</nowiki></pre>
+
</nowiki></pre>
 
Then it is already enabled, if you do not see it then;
 
Then it is already enabled, if you do not see it then;
 
<pre><nowiki>
 
<pre><nowiki>
sudo a2enmod auth_digest
+
sudo a2enmod auth_digest
</nowiki></pre>
+
</nowiki></pre>
*Do you want to enable authentication only for MythWeb or for then entire Apache server?
+
*Do you want to enable authentication only for [[UbuntuHelp:MythWeb|MythWeb]] or for then entire Apache server?
**Secure MythWeb Only
+
*Secure [[UbuntuHelp:MythWeb|MythWeb]] Only
 
<pre><nowiki>
 
<pre><nowiki>
sudo nano /var/www/mythweb/.htaccess
+
  sudo nano /var/www/mythweb/.htaccess
</nowiki></pre>
+
  </nowiki></pre>
 
Uncomment the following;
 
Uncomment the following;
 
<pre><nowiki>
 
<pre><nowiki>
#    AuthType          Digest
+
  #    AuthType          Digest
#    AuthName          "MythTV"
+
  #    AuthName          "MythTV"
#    AuthUserFile      /var/www/htdigest
+
  #    AuthUserFile      /var/www/htdigest
#    Require            valid-user
+
  #    Require            valid-user
#    BrowserMatch      "MSIE"      AuthDigestEnableQueryStringHack=On
+
  #    BrowserMatch      "MSIE"      AuthDigestEnableQueryStringHack=On
</nowiki></pre>
+
  </nowiki></pre>
 
It should now look like;
 
It should now look like;
 
<pre><nowiki>
 
<pre><nowiki>
AuthType          Digest
+
        AuthType          Digest
AuthName          "MythTV"
+
        AuthName          "MythTV"
AuthUserFile      /var/www/htdigest
+
        AuthUserFile      /var/www/htdigest
Require            valid-user
+
        Require            valid-user
BrowserMatch      "MSIE"      AuthDigestEnableQueryStringHack=On
+
        BrowserMatch      "MSIE"      AuthDigestEnableQueryStringHack=On
</nowiki></pre>
+
  </nowiki></pre>
**Secure the Entire Server
+
*Secure the Entire Server
 
<pre><nowiki>
 
<pre><nowiki>
sudo nano /etc/apache2/sites-enabled/000-default
+
  sudo nano /etc/apache2/sites-enabled/000-default
</nowiki></pre>
+
  </nowiki></pre>
 
Change;
 
Change;
 
<pre><nowiki>
 
<pre><nowiki>
NameVirtualHost *
+
  NameVirtualHost *
<VirtualHost *>
+
  <VirtualHost *>
ServerAdmin webmaster@localhost
+
          ServerAdmin webmaster@localhost
  
DocumentRoot /var/www/
+
          DocumentRoot /var/www/
<Directory />
+
          <Directory />
Options FollowSymLinks
+
                  Options FollowSymLinks
AllowOverride None
+
                  AllowOverride None
</Directory>
+
          </Directory>
</nowiki></pre>
+
  </nowiki></pre>
 
to
 
to
<pre><nowiki>NameVirtualHost *
+
<pre><nowiki>
<VirtualHost *>
+
NameVirtualHost *
ServerAdmin webmaster@localhost
+
  <VirtualHost *>
 
+
          ServerAdmin webmaster@localhost
DocumentRoot /var/www/
+
<Directory />
+
AuthType          Digest
+
AuthName          "MythTV"
+
AuthUserFile      /var/www/htdigest
+
Require            valid-user
+
BrowserMatch      "MSIE"      AuthDigestEnableQueryStringHack=On
+
Options FollowSymLinks
+
AllowOverride None
+
</Directory>
+
</nowiki></pre>
+
  
 +
          DocumentRoot /var/www/
 +
          <Directory />
 +
                  AuthType          Digest
 +
                  AuthName          "MythTV"
 +
                  AuthUserFile      /var/www/htdigest
 +
                  Require            valid-user
 +
                  BrowserMatch      "MSIE"      AuthDigestEnableQueryStringHack=On
 +
                  Options FollowSymLinks
 +
                  AllowOverride None
 +
          </Directory>
 +
  </nowiki></pre>
 
*Make the Authentication File
 
*Make the Authentication File
 
Does the /var/www/htdigest file already exist?
 
Does the /var/www/htdigest file already exist?
**No
+
*No
 
'''Using this command will overwrite an existing file.  Be sure it does not already exist or know that it will be overwritten.'''
 
'''Using this command will overwrite an existing file.  Be sure it does not already exist or know that it will be overwritten.'''
 
<pre><nowiki>
 
<pre><nowiki>
sudo htdigest -c /var/www/htdigest MythTV <User>
+
  sudo htdigest -c /var/www/htdigest MythTV <User>
</nowiki></pre>
+
  </nowiki></pre>
 
Where <User> is the name you want to use to login
 
Where <User> is the name you want to use to login
 
It will ask for the password to be set.
 
It will ask for the password to be set.
**Yes
+
*Yes
 
<pre><nowiki>
 
<pre><nowiki>
sudo htdigest /var/www/htdigest MythTV <User>
+
  sudo htdigest /var/www/htdigest MythTV <User>
</nowiki></pre>
+
  </nowiki></pre>
 
Where <User> is the name you want to use to login
 
Where <User> is the name you want to use to login
 
It will ask for the password to be set.
 
It will ask for the password to be set.
 
*Restart Apache2
 
*Restart Apache2
 
<pre><nowiki>
 
<pre><nowiki>
sudo /etc/init.d/apache2 restart
+
  sudo /etc/init.d/apache2 restart
</nowiki></pre>
+
  </nowiki></pre>
 
+
 
=== Disable the Screen Saver (Causes a Blank Black Screen After 10 Minutes) ===
 
=== Disable the Screen Saver (Causes a Blank Black Screen After 10 Minutes) ===
 
Some people like having the screen saver and some do not, if you don't then here is how to disable it.  The assumption here is that you followed the installation instructions for a non-desktop box.  In this case you only have openbox and all of the setting are harder to get to.
 
Some people like having the screen saver and some do not, if you don't then here is how to disable it.  The assumption here is that you followed the installation instructions for a non-desktop box.  In this case you only have openbox and all of the setting are harder to get to.
 
+
This is written to bring up the GUI for the screen saver on the main screen while [[UbuntuHelp:MythTV|MythTV]] is running.  Run the shell commands either from an [[UbuntuHelp:SSHHowto|SSH]] session or Alt+F1 and the modify the GUI via either the main screen (If you have a mouse hooked up) or a [[UbuntuHelp:VNC|VNC]] session to do it remotely.
This is written to bring up the GUI for the screen saver on the main screen while MythTV is running.  Run the shell commands either from an SSH session or Alt+F1 and the modify the GUI via either the main screen (If you have a mouse hooked up) or a VNC session to do it remotely.
+
 
+
 
*Screen Saver Settings
 
*Screen Saver Settings
 
Change to the mythtv user;
 
Change to the mythtv user;
 
<pre><nowiki>
 
<pre><nowiki>
sudo -H -s
+
  sudo -H -s
su mythtv
+
  su mythtv
</nowiki></pre>
+
  </nowiki></pre>
 
Switch to the bash shell;
 
Switch to the bash shell;
 
<pre><nowiki>
 
<pre><nowiki>
bash
+
  bash
</nowiki></pre>
+
  </nowiki></pre>
 
+
 
Set Display Paremeters
 
Set Display Paremeters
 
<pre><nowiki>
 
<pre><nowiki>
export DISPLAY=:0.0
+
  export DISPLAY=:0.0
</nowiki></pre>
+
  </nowiki></pre>
 
+
 
Set the Screen Saver Preferences
 
Set the Screen Saver Preferences
 
<pre><nowiki>
 
<pre><nowiki>
gnome-screensaver-preferences
+
  gnome-screensaver-preferences
</nowiki></pre>
+
  </nowiki></pre>
 
+
 
Disable the Screen Saver - Uncheck the following;
 
Disable the Screen Saver - Uncheck the following;
 
<pre><nowiki>
 
<pre><nowiki>
'''Activate screensaver when computer is idle'''
+
  '''Activate screensaver when computer is idle'''
</nowiki></pre>
+
  </nowiki></pre>
 
Click Close
 
Click Close
 
 
Get back to the default user session (exit bash shell, exit mythtv user, exit root user);
 
Get back to the default user session (exit bash shell, exit mythtv user, exit root user);
 
<pre><nowiki>
 
<pre><nowiki>
exit
+
  exit
exit
+
  exit
exit
+
  exit
</nowiki></pre>
+
  </nowiki></pre>
 +
=== Corrupt Tables in MySQL after running mythfilldatabase ===
 +
Especially on Ubuntu / Mythbuntu AMD64 on Gutsy, after running mythfilldatabase, tables in the mythconverg database appear corrupt or have key errors which are difficult to repair without dropping tables. This appears to be a bug in the mysql MyISAM AMD64 packages.
 +
To fix this issue, change the database engine for the mythconverg tables from MyISAM to InnoDB:
 +
Backup the mythconverg database. Ensure none of the tables are crashed or have errors first. if need be drop and recreate them from a good backup):
 +
<pre><nowiki>
 +
  mysqldump -u [username] -p [password] mythconverg > mythconverg_backup.sql
 +
  </nowiki></pre>
 +
Stop the mythbackend service and close all mythfrontend's running on the box being editied:
 +
<pre><nowiki>
 +
  sudo \etc\init.d\mythbackend stop
 +
  </nowiki></pre>
 +
Open your backup the backup file in your favourite editor (vi,emacs) and globally replace ""ENGINE == MYISAM;"" with ""TYPE == INNODB;""
 +
Drop mythconverg DB and create a blank mythconverg
 +
<pre><nowiki>
 +
  mysql -u [username] -p [password] mythconverg DROP DATABASE;
 +
  mysql -u [username] -p [password] CREATE DATABASE mythconverg;
 +
  </nowiki></pre>
 +
Restore the modified backup file:
 +
<pre><nowiki>
 +
  mysql -u [username] -p [password] mythconverg < mythconverg_backup.sql
 +
  </nowiki></pre>
 +
Restart MythBackend:
 +
Stop the mythbackend service and close all mythfrontend's running on the box being editied:
 +
<pre><nowiki>
 +
  sudo \etc\init.d\mythbackend start
 +
  </nowiki></pre>
 +
Everything should now function as normal and the table corruptions will stop. This appears to be a MyISAM engine bug, particularly on AMD64 systems. Not using the MyISAM engine remedies the problem.
  
 
[[category:UbuntuHelp]]
 
[[category:UbuntuHelp]]

2009年11月17日 (二) 20:05的最新版本

<<Include(MythTV/Header)>>

Trouble Shooting

Access denied for user: 'mythtv@localhost'

The most common reason for this problem is not properly setting up your group membership for the user you are trying to launch mythtv with.

  • Are you in the mythtv group?
  • You can check who is in the mythtv group by running
grep mythtv: /etc/group
  • If you aren't in the mythtv group, add yourself to the group
sudo usermod -a -G mythtv USERNAME

Where USERNAME is the name of the user being added.

  • After adding yourself to the group, remove ~/.mythtv and /home/mythtv/.mythtv and then log out/in.
rm ~/.mythtv -rf && rm /home/mythtv/.mythtv -rf
  • If you are already in the group, try to remove ~/.mythtv and then try again.
rm ~/.mythtv -rf && rm /home/mythtv/.mythtv -rf
  • When you installed, did you set a root mysql password? If so, you need to
sudo dpkg-reconfigure mythtv-database
sudo dpkg-reconfigure mythtv-common
  • Did you change your mysql mythtv password? If so you need to
sudo dpkg-reconfigure mythtv-common
  • If you still can't connect, you can change the password.
mysql -u root mysql

You will then be asked for a password. the default password is blank so hit enter or if you have changed the root mysql password enter it. You will then see:

Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 13 to server version: 5.0.15-Debian_0.dotdeb.1-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>

you can set mythtv password to the default (mythtv):

UPDATE user SET Password=PASSWORD('mythtv') WHERE user='mythtv';
FLUSH PRIVILEGES;

Access denied for user: 'root@localhost'

Somehow, during setup your root password for mysql that you entered into mythtv doesn't match. Running

mythtv-setup

Will give you a chance to check the password. then in a terminal:

mysql -u root mysql

You will then be asked for a password. the default password is blank so hit enter or if you have changed the root mysql password enter it. You will then see:

Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 13 to server version: 5.0.15-Debian_0.dotdeb.1-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>

now to change the root password:

UPDATE user SET Password=PASSWORD('<password>') WHERE user='root';
FLUSH PRIVILEGES;

then do <ctrl> + 'd' to quite or type quit. You have now 'fixed' the password. It might be a good idea to run

/etc/mythtv/mysql.txt

and make sure that you update the password there as well.

If still no access for 'root@localhost', may need to re-install MySQL

A possible problem seen in (k)Ubuntu 8.04 and possibly other setups is that MySQL is already pre-installed (since it is used by the pre-installed Amarok) but not set up properly for MythTV. A solution is to remove and purge MySQL and any dependent programs, then install MythTV (which will re-install MySQL), and only then re-install other programs that depend on MySQL. This can be done in Synaptic (or Adept) or in a terminal, as follows:

sudo apt-get remove amarok
sudo apt-get purge mysql-common
sudo apt-get install mythtv

The first command "sudo apt-get remove amarok" removes Amarok but keeps the configuration files; substitute the name of any installed programs which you know depend on MySQL and for which you want to keep the configuration. If you forget to do this for any programs (or skip this step), things will still work, but when you re-install your Amarok or other programs, they will be like new installations and not retain any of your previous settings. The second command "sudo apt-get purge mysql-common" removes MySQL and removes any configuration files, so that when you re-install, you have a chance to set your own root password (or leave blank). It will also remove MythTV (which needs MySQL). The third command "sudo apt-get install mythtv" does the actual reinstallation (re-installing MythTV will automatically re-install MySQL). If you removed Amarok or any other programs, you would want to re-install them with a fourth command "sudo apt-get install amarok", etc.

Mythtv sucessfully finds DVB-T channels, but you cannot watch them

This is caused by bug #188473. Mythtv associates the channels it has found (or imported from a channels.conf) with the wrong transponder (basically the frequency the channel is transmitted on). Fortunately the mess is easily fixable. Connect to your database using the mysql command line tool and the login data from /etc/mythtv/mysql.txt (or ~/.mythtv/mysql.txt):

mysql -u mythtv -p

Then list the channels and the transponders:

mysql> select * from dtv_multiplex;
mysql> select * from channel;

Now check the association between the mplexid column of the channels (hope there are not more than a few) and the dtv_multiplex table against the DVB-T transmission data for your region. If you are in Germany or Austria you can use: [1]. If you have a channels.conf file for your country, the second column for each channel should be the frequency. Then correct the association for each channel. I had the following tables before correcting them:

| mplexid | sourceid | transportid | networkid | frequency | inversion | symbolrate | fec  | polarity | modulation | bandwidth | lp_code_rate | transmission_mode | guard_interval | visible | constellation | hierarchy | hp_code_rate | sistandard | serviceversion | updatetimestamp     |
+---------+----------+-------------+-----------+-----------+-----------+------------+------+----------+------------+-----------+--------------+-------------------+----------------+---------+---------------+-----------+--------------+------------+----------------+---------------------+
|       1 |        1 |         500 |      8232 | 858000000 | a         |       NULL | NULL | NULL     | NULL       | 8         | 3/4          | 8                 | 1/4            |       0 | qam_16        | n         | 3/4          | dvb        |              2 | 2008-02-02 20:16:03 | 
|       2 |        1 |         500 |      8232 | 514000000 | a         |       NULL | NULL | NULL     | qpsk       | 8         | auto         | a                 | auto           |       0 | auto          | a         | auto         | dvbt       |             33 | 2008-02-02 20:16:03 | 
|       3 |        1 |         330 |      8232 | 474000000 | a         |       NULL | NULL | NULL     | NULL       | 8         | 3/4          | 8                 | 1/4            |       0 | qam_16        | n         | 3/4          | dvb        |              1 | 2008-02-02 20:16:09 | 
|       4 |        1 |         330 |      8232 | 490000000 | a         |       NULL | NULL | NULL     | qpsk       | 8         | auto         | a                 | auto           |       0 | auto          | a         | auto         | dvbt       |             33 | 2008-02-02 20:16:09 |
| chanid | channum | freqid | sourceid | callsign       | name           | icon | finetune | videofilters | xmltvid | recpriority | contrast | brightness | colour | hue   | tvformat | commfree | visible | outputfilters | useonairguide | mplexid | serviceid | atscsrcid | tmoffset | atsc_major_chan | atsc_minor_chan |
+--------+---------+--------+----------+----------------+----------------+------+----------+--------------+---------+-------------+----------+------------+--------+-------+----------+----------+---------+---------------+---------------+---------+-----------+-----------+----------+-----------------+-----------------+
|  11121 | 10121   | NULL   |        1 | PULS 4         | PULS 4         |      |     NULL |              |         |           0 |    32768 |      32768 |  32768 | 32768 | Default  |        0 |       1 |               |             0 |       3 |     10121 |      NULL |        0 |               0 |               0 | 
|  12302 | 11302   | NULL   |        1 | 3SAT           | 3SAT           |      |     NULL |              |         |           0 |    32768 |      32768 |  32768 | 32768 | Default  |        0 |       1 |               |             1 |       3 |     11302 |      NULL |        0 |               0 |               0 | 
|  12303 | 11303   | NULL   |        1 | ORF Sport Plus | ORF Sport Plus |      |     NULL |              |         |           0 |    32768 |      32768 |  32768 | 32768 | Default  |        0 |       1 |               |             1 |       3 |     11303 |      NULL |        0 |               0 |               0 | 
|  11101 | 10101   | NULL   |        1 | ORF1           | ORF1           |      |     NULL |              |         |           0 |    32768 |      32768 |  32768 | 32768 | Default  |        0 |       1 |               |             1 |       1 |     10101 |      NULL |        0 |               0 |               0 | 
|  11112 | 10112   | NULL   |        1 | ORF2 St        | ORF2 St        |      |     NULL |              |         |           0 |    32768 |      32768 |  32768 | 32768 | Default  |        0 |       1 |               |             1 |       1 |     10112 |      NULL |        0 |               0 |               0 | 
|  11120 | 10120   | NULL   |        1 | ATV+           | ATV+           |      |     NULL |              |         |           0 |    32768 |      32768 |  32768 | 32768 | Default  |        0 |       1 |               |             1 |       1 |     10120 |      NULL |        0 |               0 |               0 | 
|  11132 | 10132   | NULL   |        1 | ORF2 B         | ORF2 B         |      |     NULL |              |         |           0 |    32768 |      32768 |  32768 | 32768 | Default  |        0 |       1 |               |             1 |       1 |     10132 |      NULL |        0 |               0 |               0 | 

The following statements solved my problems:

mysql> update channel set mplexid=2 where mplexid=1;
Query OK, 4 rows affected (0.00 sec)
Rows matched: 4  Changed: 4  Warnings: 0

mysql> update channel set mplexid=4 where mplexid=3;
Query OK, 3 rows affected (0.00 sec)
Rows matched: 3  Changed: 3  Warnings: 0

Mythbackend isn't running at startup right after install

Typically this is caused by incorrect permissions on the directory where the backend will be saving your recordings. You can verify this to be the problem by attempting to restart the backend:

sudo /etc/init.d/mythtv-backend restart

Then checking that the backend successfully started:

ps -p `cat /var/run/mythtv/mythbackend.pid`

If you don't see output like:

  PID TTY          TIME CMD
30711 ?        00:00:00 mythbackend

check the log file for errors:

more /var/log/mythtv/mythbackend.log

The end of the log file will indicate exactly why the backend is no longer running. If it ends up being a permissions or ownership problem, just change the permissions and ownership of the recordings directory:

sudo chown mythtv.mythtv /var/lib/mythtv
sudo chmod u=rwx,g=rwxs,o=rx /var/lib/mythtv

(This assumes that your directory for recordings is /var/lib/mythtv. If you have the recordings stored somewhere else, be sure to replace /var/lib/mythtv in the above command with that location.) The end result is that the ownership and permissions should match /var/lib/mythtv as it was set by the installer. (You might want to replace /var/lib/mythtv with a symbolic link to your custom location if you are using a customized location.)

Ownership of NFS lockfile is wrong

After installing Mythbuntu over an existing Gutsy setup, mythbackend wouldn't start. The problem was, the permissions on mythtv/recordings/nfslockfile.lock were wrong. Somehow during the install process, owner was set to ntp, group to mythtv, and perms were 644. The fix:

sudo rm mythtv/recordings/nfslockfile.lock
sudo /etc/init.d/mythtv-backend restart

Sound from live TV does not pause

Symptom: You can watch TV and hear the audio. But when TV is paused, the TV audio moves on. Sourse of problem: The audio signal from your TV tuner card is fed through a cable to your sound card, and played back directly. Solution: You need to mute this input for playback and enable it for capture. You can use the alsamixer utility to change these settings. Start alsamixer in a terminal, use left and right cursors to move to your TV audio input, which most likely is Line or CD (check your hardware manual and where the audio cable is connected); press SPACE to set it as the capture soure, and M to mute it (yes, mute it so that it won't appear directly in playback). You may also need to enable Capture as capture. Use up and down cursor to adjust volume. Once everything is set, press ESC to exit. This information is based on MythTV offical documentation.

Razzing/tinny/metalic sound

This happens with the following combination: Ubuntu 6.10, mythtv 0.20, software encoding tuner card, VIA 8237 chipset. The default sample rate is 32 kHz. However the VIA 8237 chipset only do well with 48 kHz. To solve the problem, open mythfrondend, go to Utilities/Setup -> Setup -> TV Settings -> Recording Profiles -> Software Encoders -> Live TV and change the audio sample rate to 48 kHz. Test effect. Then do the same to settings in Default, High Quality, Low Quality. This solution is based on the MythTV Wiki.

Unable to use Mythweb or phpmyadmin

If you are encountering errors where your web browser attempts to open a PHTML file rather than browse phpmyadmin or mythweb properly, you most likely mixed up the order of some installations and lost some dependencies along the way. Here is what this error typically looks like:

Troubleshooting?action=AttachFile&do=get&target=phtml.png This is what happens when you try to browse to mythweb or phpmyadmin.

To resolve the issue, you will need to install libapache2-mod-php5 or libapache2-mod-php4. Find out which one you have installed ( dpkg -l | grep php will show this).

PHP4

sudo apt-get install libapache2-mod-php4

PHP5

sudo apt-get install libapache2-mod-php5

data/tv_icons directory is not writable

from http://stacktrace.org/

sudo chmod 777 /usr/share/mythtv/mythweb/data/tv_icons

Mythbackend setup not saving settings

This problem is caused by a database setup error. Syptoms include capture card setting not saving, and a database error when finishing backend setup. To fix: In mySQL drop the data base mythconverg If not confident with mySQL install phpmyadmin, and you can do it from a web browser Open Synaptic Package Manager and search for myth-database. Mark package for re-installation, and apply changes. Run mythbackend setup again and problems should have gone.

Unable to Upgrade mythtv-backend (edgy to feisty)

My issue resulted in mythtv-backend being a broken package which prevented the upgrade from continuing. Carefully reviewing the log for the mythtv-backend upgrade revealed that the problem occured during the prerm script. It was attempting to run

invoke-rc.d mythtv-backend stop
.

This was failing (it could have been a manual edit to /etc/init.d/mythtv-backend in the past or a prior bug). To resolve, I replaced /etc/init.d/mythtv-backend with the version in the new mythtv-backend package and verified that

invoke-rc.d mythtv-backend start
invoke-rc.d mythtv-backend stop

worked. Then the package and Ubuntu upgraded without any further issues <<Include(MythTV/Install/Troubleshooting/UPNP)>>

Fixing Capture Card Setup Errors

When removing or adding new capture cards in MythTV setup the database table can become corrupted- causing errors such as "Tuner x set to start on channel 0 which does not exist", etc. To fix this problem you will need your mysql mythtv user's password. If you do not know the password, you can find it in the frontend machine's main user's home directory:

$ cat ~/.mythtv/mysql.txt
 

Then:

  • Run mythtv-setup
  • Delete all video sources
  • Delete all capture cards
  • Exit mythtv-setup
  • Open a terminal and do:
$ mysql mythconverg -u mythtv -p
 

When prompted, enter the mysql password- At the mysql prompt, do:

> truncate table capturecard;
> truncate table cardinput;
> quit
 

Then run mythtv-setup again and configure your capture card and video source(s).

Enable Digest Authentication in MythWeb

For those people who want to have MythWeb access from the open internet the Apache authentication should be enabled.

  • Is the Apache Digest Authentication Module Enabled?
 ls -A -l /etc/apache2/mods-enabled/ | grep auth_digest
 

If you see;

 auth_digest.load -> ../mods-available/auth_digest.load
 

Then it is already enabled, if you do not see it then;

 sudo a2enmod auth_digest
 
  • Do you want to enable authentication only for MythWeb or for then entire Apache server?
  • Secure MythWeb Only
   sudo nano /var/www/mythweb/.htaccess
   

Uncomment the following;

   #    AuthType           Digest
   #    AuthName           "MythTV"
   #    AuthUserFile       /var/www/htdigest
   #    Require            valid-user
   #    BrowserMatch       "MSIE"      AuthDigestEnableQueryStringHack=On
   

It should now look like;

        AuthType           Digest
        AuthName           "MythTV"
        AuthUserFile       /var/www/htdigest
        Require            valid-user
        BrowserMatch       "MSIE"      AuthDigestEnableQueryStringHack=On
   
  • Secure the Entire Server
   sudo nano /etc/apache2/sites-enabled/000-default
   

Change;

   NameVirtualHost *
   <VirtualHost *>
           ServerAdmin webmaster@localhost

           DocumentRoot /var/www/
           <Directory />
                   Options FollowSymLinks
                   AllowOverride None
           </Directory>
   

to

NameVirtualHost *
   <VirtualHost *>
           ServerAdmin webmaster@localhost

           DocumentRoot /var/www/
           <Directory />
                   AuthType           Digest
                   AuthName           "MythTV"
                   AuthUserFile       /var/www/htdigest
                   Require            valid-user
                   BrowserMatch       "MSIE"      AuthDigestEnableQueryStringHack=On
                   Options FollowSymLinks
                   AllowOverride None
           </Directory>
   
  • Make the Authentication File

Does the /var/www/htdigest file already exist?

  • No

Using this command will overwrite an existing file. Be sure it does not already exist or know that it will be overwritten.

   sudo htdigest -c /var/www/htdigest MythTV <User>
   

Where <User> is the name you want to use to login It will ask for the password to be set.

  • Yes
   sudo htdigest /var/www/htdigest MythTV <User>
   

Where <User> is the name you want to use to login It will ask for the password to be set.

  • Restart Apache2
   sudo /etc/init.d/apache2 restart
   

Disable the Screen Saver (Causes a Blank Black Screen After 10 Minutes)

Some people like having the screen saver and some do not, if you don't then here is how to disable it. The assumption here is that you followed the installation instructions for a non-desktop box. In this case you only have openbox and all of the setting are harder to get to. This is written to bring up the GUI for the screen saver on the main screen while MythTV is running. Run the shell commands either from an SSH session or Alt+F1 and the modify the GUI via either the main screen (If you have a mouse hooked up) or a VNC session to do it remotely.

  • Screen Saver Settings

Change to the mythtv user;

  sudo -H -s
  su mythtv
  

Switch to the bash shell;

  bash
  

Set Display Paremeters

  export DISPLAY=:0.0
  

Set the Screen Saver Preferences

  gnome-screensaver-preferences
  

Disable the Screen Saver - Uncheck the following;

  '''Activate screensaver when computer is idle'''
   

Click Close Get back to the default user session (exit bash shell, exit mythtv user, exit root user);

   exit
   exit
   exit
   

Corrupt Tables in MySQL after running mythfilldatabase

Especially on Ubuntu / Mythbuntu AMD64 on Gutsy, after running mythfilldatabase, tables in the mythconverg database appear corrupt or have key errors which are difficult to repair without dropping tables. This appears to be a bug in the mysql MyISAM AMD64 packages. To fix this issue, change the database engine for the mythconverg tables from MyISAM to InnoDB: Backup the mythconverg database. Ensure none of the tables are crashed or have errors first. if need be drop and recreate them from a good backup):

  mysqldump -u [username] -p [password] mythconverg > mythconverg_backup.sql
  

Stop the mythbackend service and close all mythfrontend's running on the box being editied:

  sudo \etc\init.d\mythbackend stop
  

Open your backup the backup file in your favourite editor (vi,emacs) and globally replace ""ENGINE == MYISAM;"" with ""TYPE == INNODB;"" Drop mythconverg DB and create a blank mythconverg

  mysql -u [username] -p [password] mythconverg DROP DATABASE;
  mysql -u [username] -p [password] CREATE DATABASE mythconverg;
  

Restore the modified backup file:

  mysql -u [username] -p [password] mythconverg < mythconverg_backup.sql
  

Restart MythBackend: Stop the mythbackend service and close all mythfrontend's running on the box being editied:

  sudo \etc\init.d\mythbackend start
  

Everything should now function as normal and the table corruptions will stop. This appears to be a MyISAM engine bug, particularly on AMD64 systems. Not using the MyISAM engine remedies the problem.