Showing posts with label hdmi. Show all posts
Showing posts with label hdmi. Show all posts

Friday, January 15, 2016

HTPC OS Upgrade

My HTPC was running off a non-LTS distro for a while, finally got around to reinstalling. The process wasn't without hiccups, but overall wasn't too bad.

The two primary applications I run are Kodi (aka XBMC) and MythTV. The Kodi reinstall was easy, MythTV a little trickier to get right. These are the steps I followed:

Initial Install/Setup

  • Reinstall the new OS. I used LinuxMint 17.3 with Cinnamon as I'd been using Mint 15 previously. I also partitioned the existing SSD so that the old install is still available.
  • Set up standard stuff like web browser, terminal config, graphics drivers, etc.
  • Set system audio to appropriate device — as I was using audio over HDMI, the default sound device wasn't the right one.
  • Probably want to turn off the screen saver.

Kodi Install

  • Install Kodi
    sudo apt-get install kodi
  • Copy old ~/.xbmc/userdata directory to new install. Kodi data is stored in ~/.kodi.
  • Start Kodi. User settings like which videos you've watched should be retained. May need to configure the audio settings, I did as I was using HDMI.

MythTV Install

  • Boot back into the old OS install and follow the MythTV database backup procedure. I used:
    /usr/share/mythtv/mythconverg_backup.pl --directory <path_to_shared_drive>
  • Boot back into new OS install.
  • Install MythTV (this will install dependencies like MySQL).
    sudo apt-get install mythtv
  • Recreate the database. Note that this will create the database with a default username and password of "mythtv", which caused problems for me when restoring the database backup in the next step.
    mysql < /usr/share/mythtv/sql/mc.sql
  • Restore the database. Could not get the preferred method to work — it kept failing with a "could not connect to database" error. Could not get mythconverg_restore.pl to connect. At first I thought it was a password issue, but setting the correct password in /home/mythtv/.mythtv/config.xml didn't help. In the end I found this post, which gave the command to manually paste the database backup back. As the mythconverg_backup.pl script gzips by default, I did the gunzip on the backup file before running the following:
    mysql -umythtv -pmythtv mythconverg < backup_filename.sql
  • Run mythtv-setup. I needed to add the TV tuner adapters and sources — so I guess this wasn't part of the backup — and scan for channels. Also add the existing hard drive paths as storage directories.

I had to unplug the tuner (DigitalNow TinyTwin) to get it to appear — not sure why, but other than that the OS upgrade went pretty seamlessly.

Monday, February 9, 2015

Raspberry Pi B: HDMI Resolution and Localisation Fixes

Following up from yesterday's post on the Raspberry Pi B, I've played around with it a little more and noticed under Raspbian the screen resolution was running at 1776x952 rather than 1920x1080, and that the keyboard was set up for British layouts.

Resolution Fix

To fix the resolution I got into the /boot/config.txt and made a few changes as per various suggestions from the web. First of all you need to run tvservice -m CEA to find the preferred monitor settings. Mine was 16, but replace the text below with the appropriate number. (May also need to run tvservice -m DMT depending on your screen type. DMT is hdmi_group=2 for the settings. See: difference between CEA and DMT.

The summary of changes to /boot/config.txt:

disable_overscan=1
hdmi_drive=2

#overscan_left 24
#overscan_right 24
#overscan_top 16
#overscan_bottom 16
#disable_overscan=0

hdmi_group=1
hdmi_mode=16

The first two lines were already in the file, and just needed to be uncommented. The commented out lines about were in the NOOBS generated section at the bottom. NOOBS default seemed overly aggressive, so I took them all out. The last two lines are the results of the CEA output from above for the preferred setting.

Keyboard Localisation Fix

Default to British keyboard layout causes problems here in Aust because the # key is turned into £ and the @ and " keys are transposed. To update, run the following:

dpkg-reconfigure locales
dpkg-reconfigure keyboard-configuration

Both bring up little text-based wizards. For locales, select en_AU.UTF-8 or similar. For the keyboard config, I selected a generic match for the keyboard I was using, but I think the main thing is to change the "GB" setting to "US" keyboard layout.