Showing posts with label Ubuntu. Show all posts
Showing posts with label Ubuntu. Show all posts

Tuesday, 3 March 2015

Linux kernel updates break TBS TV Tuner driver

Each time the Linux kernel updates, my TBS driver stops working. To get it back in action I need to rebuild it, which takes only about 10 mins, but is a real faff when kernel updates happen regularly.

To prevent this from happening I've placed a hold on kernel updates. So all other security and software updates will still take place, but the kernel will remain on same version. This is fine as long as all your hardware works in the current version of the kernel - for the vast majority of people this will be the case.

Here's what I did to place the hold (Debian-based systems only such as Ubuntu, Mint etc):

(You may need to type sudo su first to run commands with superuser privileges )

Into a terminal enter:
dpkg -l "*$(uname -r)*" | grep image | awk '{print $2}'
This should give you a list of packages e.g. linux-image-3.16.0-29-generic
linux-image-extra-3.16.0-29-generic
Now enter
dpkg -l "*$(uname -r)*" | grep header | awk '{print $2}'
 For each one of those packages and headers you need to do:
echo <PACKAGE> hold | dpkg --set-selections
Change <PACKAGE>  with your package that was output from the first step above, one at a time.
Now type
dpkg -l "*$(uname -r)*"
and you should see output similar to
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============
hi  linux-headers- 3.13.0-46.77 amd64        Linux kernel headers for version
hi  linux-image-3. 3.13.0-46.77 amd64        Linux kernel image for version 3.
hi  linux-image-ex 3.13.0-46.77 amd64        Linux kernel extra modules
The  "hi" before the image and header lines, indicate that the kernel updates will be help, not updated, when you accept security and software updates from your package manager as usual.

Thanks to Tony at http://itslinux.blogspot.co.uk/2015/03/how-to-prevent-packages-from-being.html for this tip. 



Monday, 2 February 2015

Steam-ish machine

Steam Machines' future is reported to be in peril as a result of delayed releases and Windows 10/Valve announcements (http://www.pcworld.com/article/2877281/why-the-steam-machine-revolution-may-fizzle-out-before-it-even-starts.html). However, my Steam(-ish) machine is here right now, and here's a report.

A quick recap: my linux (Ubuntu-based distro) HTPC sits in my lounge in ye-olde case (13 year old, Evesham X case), next to the television. I chose components to get a good balance between performance, low noise and low-power usage. The CPU is an AMD FX-8300 and GPU is an Nvidia GTX-650. This means the system can run games such as The Witcher 2, and Metro Last Light at medium/high settings, yet can be left running 24/7 without high power usage and too much noise (HDD soon to be replaced by SDD, and GPU fan to be replaced, which should reduce noise to practically inaudible).


Steam for Linux is installed on this PC, and runs absolutely fine in Desktop mode. However, Big Picture Mode frequently crashes, usually when viewing video, so I rarely go into Big Picture Mode, which is a problem, as Desktop mode is so hard to read on my television from about 8ft away. This is a real shame as Big Picture mode's layout is very good as part of a living room PC. Big Picture Mode also seems to be very resource-hungry, even after lauching a game; so much so, that when launching Metro or The Witcher 2 from BPM, the frame rate is so low the game is unplayable. Switching to Desktop mode and launching those same games resolves the issue.

I use an Xbox 360 wired gamepad to play most games now. Any games that require mouse and keyboard, particularly FPS, range from virtually impossible to slightly clunky with a Logitech K400 keyboard, as it has a trackpad, and a small one at that. Fortunately, most WASD games I've seen being released on Steam these days, support gamepads.

So what is the experience like compared to dedicated gaming consoles? Well, I'm sorry to say, that whilst I get on well enough with Steam Desktop version (as long as I sit close enough to read text!), Big Picture Mode just doesn't feel as sound as I'd like it to be. Admittedly, my machine is configured to do a lot more than just run Steam, but when I trim down running processes to test Steam I still come across the same issues; the main ones being Big Picture Mode crashing, and its resource-hogging. Once these are resolved, I would be quite happy to boot into Steam BPM by default.

The range of games is on Steam for Linux is growing larger and larger all the time - Steam is now listing 939. With recent major titles such as Metro, Dying Light, Borderlands: The Pre-Sequel, Football Manager, Sid Meier's Civilization series, and The Talos Principle, to name a few, the quality is getting better too. Hopefully this year will see more and more AAA titles being released on Steam for Linux, as this will surely prompt Valve to iron out those bugs on Big Picture Mode sooner rather than later.

Wednesday, 17 December 2014

Kodi and UK Freeview TV

OK - so after a few months of not attempting to fix/get around some roadblocks in terms of streaming live TV to XBMC frontends, and no sound on HD channels, I decided to revisit my nearly complete HTPC for one last stab.

And, hey presto, I've made good progress and I'm really pleased with the setup as it stands - still some tweaks I intend to make, but I have a funny feeling I'll never be satisfied with the status quo.















So, I'm using Ubuntu 14.04.1, Kodi (formerly known as XBMC), MythTV as a primary backend server, UK Freeview DVB-T2 being tuned by TBS6285.

The rest of the kit can be seen in my previous posts.

I managed to resolve the HD audio issue simply by going into Cmyth-PVR addonn settings in Kodi, and under advanced, deselecting the de-mux option. I'm sure I tried this several months ago, to no avail, but it seems to have done the trick this time. So, now I can hear TV audio on all digital channels.

I'm able to stream to another PC in the house running Kodi as a frontend, simply by adding the CMyth-PVR addon. I couldn't achieve this using a Rasperry Pi with Openelec - for some reason that version of Cmyth just wouldn't allow primary backend and Rapsberry Pi to talk to each other.

All in all, I am really impressed. Live TV channel changing in Kodi seems to be quicker than when I last tried with XBMC in summer, and whilst not what I would called instant, it is acceptable - probably 2 - 3 seconds for the new channel to buffer and then play.

The picture quality is excellent, in HD. I did have to play around with a few variations of settings in Kodi's hardware acceleration settings section and in the onscreen display video settings section. I finally settled on auto interlacing, auto interlacing method, and auto video scaling. The quality and frame rate is excellent.

I also spent some time re-ordering channels on the mythbackend. I did this by opening a terminal and typing mythtv-setup. In the options menu that appears, select Channel Editor, and then work through the channels amending as you see fit. I've removed all the shopping channels, dating channels and all SD channels that have an HD alternative, and moved them into my preferred order. After this, mythbackend needs to be restarted, then open Kodi LiveTV settings and ensure "Always use the channel order from the backend/s".

I'm using a Logitech K400 wireless keyboard to control the HTPC and somtimes theYatse android app to control Kodi, This sounds complex, but it works really well. e.g. keyboard is on other side of living room, no problem - you can still control Kodi without the massive effort of rising from your chair and walking 3 steps across a lounge!

Tuesday, 10 June 2014

TBS6285 Part 2

Following on from my previous post http://ubuntulinuxhtpc.blogspot.co.uk/2014/05/tbs6285.html I've received the quad-tuner and installed it, having overcome a few hurdles. I've described the process I followed, below. If you can't get this card to work, feel free to get in touch, and I should be able to help you get up and running.




The first hurdle to overcome was installation of the linux drivers for the TBS6285. These can be downloaded from http://www.tbsdtv.com/download/. After help from Constantine, developer at Turbosight (TBS), it turned out that my motherboard (MSI 990FXA-GD65) is one of many faulty ones floating around (there is a buggy ASM1083 chip soldered between PCIe and PCI bus) which cannot handle IRQ from the card and causes an interrupt storm from the card. To overcome that I did the following (from http://www.tbsdtv.com/forum/viewtopic.php?f=52&t=7631#p24903):

1. Create a .conf file 
sudo gedit /etc/modprobe.d/tbs.conf
2. Edit contents of .conf file by inserting the following two lines and saving file
options saa716x_tbs-dvb int_type=1
options saa716x_tbs-dvb enable_ir=0 
The first line activates MSI (Message Signal Interrupts) instead of the older IRQ. The second disables remote control receiver on the card to make sure the interrupt storm is not coming from there).

3. Reboot to load the driver with MSI loaded.

Then, following intructions from http://www.linuxtv.org/wiki/index.php/TBS6285#Making_it_Work and http://www.linuxtv.org/wiki/index.php/TBS6284 with a few amendments for TBS6285 and some permissions problems, I managed to get the card working. These are the commands I used:

1. Extract the ZIP file tbs-linux-drivers_v[VERSION NUMBER].zip. As of 25 April 2014, the latest version is 140425.
unp -u tbs-linux-drivers_v140425.zip
2. Extract linux-tbs-drivers.tar.bz2 archive
cd tbs-linux-drivers_v140425 
unp linux-tbs-drivers.tar.bz2
3. Change ownership and permissions of extracted files
sudo chown -R <yourusername> tbs-linux-drivers_v140425
sudo chmod -R 777 tbs-linux-drivers_v140425 
4. Change to driver package directory
cd tbs-linux-drivers_v140425
cd linux-tbs-drivers
4.1 (If on fresh install on CentOS or similar)     
yum install kernel-devel-`uname -r`
cd linux-tbs-drivers
make clean
make distclean
 (move to Step 5)
  
5. Select platform architecture
(for any x86_64 kernel only)

enter into a terminal: 
./v4l/tbs-dvbc-x86_64.sh
and then:
./v4l/tbs-x86_64.sh
6. Build the driver. Recompiles v4l for a wide range of cards, around 500, will take many minutes.
make
        (I modify this to make -j7  to use all 6 cores of my CPU)

7. Install driver
sudo make install
8. Reboot, then
(Ubuntu-based distros only. See http://www.linuxtv.org/wiki/index.php/TBS6285#Making_it_Work for other distros)
sudo rm -Rf /lib/modules/<your kernel version>/kernel/drivers/media
9. Reinstall drivers
cd tbs-linux-drivers_v140425 
cd linux-tbs-drivers 
sudo make install
10. Load newly installed driver
sudo modprobe -v tbs62x0fe
insmod /lib/modules/3.(your kernel version)-generic/kernel/drivers/media/dvb/frontends/tbs62x0fe.ko
11. Check it loaded correctly

Reboot:
sudo shutdown -r now
After rebooting and logging back in, check to see if dvb adaptor nodes now exist:
ls -al /dev/dvb
You should see something similar to the following displayed in your terminal:
drwxr-xr-x  2 root root  120 Jul  9 21:12 adapter0
drwxr-xr-x  2 root root  120 Jul  9 21:12 adapter1
drwxr-xr-x  2 root root  120 Jul  9 21:12 adapter2
drwxr-xr-x  2 root root  120 Jul  9 21:12 adapter3
This should give you a correctly installed TBS6285 on Ubuntu 14.04 (after trials and tribulations, it did for me!)

Monday, 6 January 2014

The plan..

I've become unimpressed with the quality of pay TV, and find myself watching mainly free-to-air channels such as BBC, Channel 4 and Film 4. As a result I've decided to have broadband only and recycle an old desktop case I have lying around to build a media centre/HTPC for the living room, serving live and recorded TV and other media to 3 bedrooms.

The main goal is to try and keep the build cost of the living room backend server close to £700 (similar to the the annual cost of my current cable TV package and set top boxes), whilst striking a balance between power (for gaming), low noise and power efficiency as machine will be on 24/7. The bedroom PCs are to be less than £100 each, so probably Raspberry Pis running XMBC.

I'm looking forward to more geeking out on the research, build, and setting up of such a system.

So far, I have the following hardware connected to my living room TV:


  • Case: ATX tower case, £0 (recycled)
  • Storage: An old Western Digital SATA1 160 GB HDD, £0 (recycled)
  • Motherboard: MSI 990FXA-GD65, £57.98
  • CPU: AMD FX-6300 3.5GHz Socket AM3+, £80.99
  • RAM: 8GB Kingston low-profile (so Scythe heatsink fits) RAM, £60
  • PSU: Corsair CX600M, £52.96
  • Graphics: MSI GeForce GTX 650 N650-1GD5/OCV1, £51.98
  • CPU Cooling: Scythe Mugen IV, £37.11

This is a working system, but not the final build. I am outstanding a TV tuner to be able to receive Freeview broadcasts, SSD on which to install the OS (Ubuntu) and Steam files to ensure system is spritely, larger HDD to store media (music, films, TV), and some peripherals such as a wireless keyboard.
  • TV Tuner: TBS 6285 T2 PCIe card, £125.00
  • SSD: Crucial M550 250GB, £107.94
  • HDD: WD Caviar Green 2TB, £65.00
  • Wireless Keyboard: Logitech K400, £29

Total price should be not far off £668.00

In it's current form (i.e. without SSD) Ubuntu and Steam are rapid, even with the motherboard set to ECO mode.

The Scythe Mugen IV was money well spent, as it is virtually silent - the noise that the stock AMD cooler made was really loud!

The machine now emits just a low hum, which is imperceptible when sat more than a few feet away from the case.

I should be in receipt of my TBS 6285 tuner card very soon; once I have I will post a progress update on setting up MythTV as a backend and XBMC as a frontend.