Kodi Community Forum

Full Version: Switching from Raspberry Pi to a proper Linux-PC
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
For some time now I've been running Kodi/LibreELEC on a Raspberry Pi 4B. I use it to record TV boardcasts using the Raspberry Pi TV hat. Everything has been working fine and I think it fills it purpose adequately.

Recently I've been thinking about buying more powerful hardware (maybe an Intel NUC), then installing some Linux distro (probably Ubuntu) and then installing KODI on that distro. The reason for this is that I would like to utilize the same device for other purposes as well in addition to being a DVR. I was thinking about using it as a NAS as well and ocassionally browsing the internet through a browser. Maybe even host a website to the LAN. I was thinking about setting the OS to run KODI on system startup automatically but I still could be minimized. TVHeadEnd would have to be installed separately.

Do you think this idea is viable and reasonable? I'm not asking how to do this but should I do this and is there something I should take into consideration if I choose to do this? Can I make  Or should I just stick to a dedicated DVR?
In my personal opinion, you should do this but only if you are not easily frustrated by Linux.  I've been doing almost exactly what you suggest except I've been using an Acer Revo; it will not do 4K as far as I know, but then neither will my receiver or TV but that's okay with me. For a backend I use Tvheadend (also running under Linux) but it runs on a separate machine running Ubuntu server (no desktop).  There are two reasons for that, first I can place it right where the antenna cable enters the house to minimize cable loss, but also because I also use that system as a file storage server and it's not in my way.  Also I use a couple of HDHomeRun Dual devices (an older model) as tuners, each one has two tuners so four tuners total (and yes I realize that means the backend system could be anywhere on my local network, since the HDHomeRuns do not physically connect to the backend).  There is no reason that you can't install and run Kodi on the same machine as Tvheaded, but keep in mind that that you will probably want to keep the system running Tvheadend powered up 24/7 so you don't miss recordings, whereas you might want to power down your devices that run Kodi (yes you can have more than one connecting to the same backend) when you aren't using them.

One thing to take into consideration from personal experience is that if you have nVidia graphics you may need to stay with Ubuntu 18.04 for now, or use a distro not based on Ubuntu, because Ubuntu 20.04 seems to have some real issues with nVidia graphics.  If building or buying new, avoid nVidia graphics or be prepared for possible headaches.  That is just the opposite of the advice I would have given a few years ago but apparently nVidia doesn't want to open source their drivers and that has created a rift between them and the Ubuntu people, or maybe the entire Linux community, I don't really know.

Getting a remote control to work can be a little tricky for some users.  Since the *Elec people have a pretty much locked down system they can install a particular version and pre-configure it to just work.  All I will say about that is that if you are familiar with the lirc program and want to keep using it, you may find you will need to install an older version, see instructions here.  I know those instructions also worked in Ubuntu 20.04 as of a couple of months ago.  I'm guessing that like me you are not a programmer so I'll spare you my usual rant and plea that someone fork that older version of LIRC and rename it to something else so we can keep using it rather than the broken and terribly difficult to install version that's in the repositories now.

The thing I always hated about the *Elec distros is that they try VERY hard to keep you totally out of Linux, to the point that you can't even do a lot of basic Linux tasks.  I don't want to interact with Linux much but when I do I don't want the distro getting in my way.  Some people ONLY want to use Linux for Kodi and I guess for them the *Elecs are great but I tried one once for about ten minutes and quickly because extremely frustrated by the things I could not do, so I overwrote that with Ubuntu and would never go back.  And as you may have guessed I'm not even in love with Linux that much, but the *Elecs were just way too restrictive for my taste.  But on the other hand, Linux occasionally will break in some way (although that happens VERY seldom) and if that will drive you right up the wall then you may not want to go that route.   Ubuntu probably breaks a lot less often than Windows, but fixing a borked Windows install can be a whole lot easier than fixing a borked Linux install if you don't know what you are doing.
If you have a DVR setup that works for that purpose why break it down and build new hardware to support NAS and webhosting?  To me anything internet exposed is not on my home network period.  If you want webhosting there are lots of virtual options.  If you want a NAS that's a bit different.  Your NAS + Kodi could be on the same box.
(2021-01-03, 20:21)der_general Wrote: [ -> ]Do you think this idea is viable and reasonable?
Yup - it's what I did.

There's a guide on there for getting a Kodi box up and running using Ubuntu - I followed it, my small Gigabyte box (https://www.ebay.co.uk/i/114538178328) boots straight into Kodi (so if there's any issues, the missus can just power-cycle it) and I've been building out other services on there since - it now runs DHCP, DNS, Apache, Samba, postfix (mail) plus a whole host of other services.

Note that I'm a Linux geek and pretty familiar with configuring this lot - but for me, getting something up and running as a media centre was the primary goal.  Desktop and graphics stuff I'm not so hot on, so used that guide first.

FWIW, I have a separate NAS hanging off the network so I didn't need a stack of disks in the small atom box - it worked out easier than building a full-scale PC. However, YMMV.

If you're new to Linux, I'd recommend getting your media box up and running first, then get WEBMIN installed so you can do further service setup and configuration via a web-based control panel.
I'm moving this topic to the hardware forum section.

About Ubuntu 20.04 and Nvidia problems, I haven't encountered any of that yet while testdriving that Ubuntu version. Currently I am still hanging onto my 16.04 working daily driver setup...

I am also running Ubuntu 20.04 + Kodi on a passively cooled Asrock J5005 ITX board (4 SATA ports), which is totally silent with a SSD and a pico PSU. I'm not a DVR user at all, so no tips from me in that area.
I'd also vote for the "keep the DVR and Kodi separate" solution.  I used to use a Pi and small laptop hard drive as a DVR running TV Headend and OpenMedia Vault. It just sat there running TV Headend, and occasionally serving some temporary video files. (Open Media Vault was there to simplify accessing the recordings on other devices, and also to let me serve occasional ad hoc videos)

In fact I'd probably suggest separating Kodi duties from DVR, File Server and Web server, keeping the Kodi solution small and silent near your TV, and siting noisier stuff elsewhere.
(2021-01-04, 13:52)graysky Wrote: [ -> ]If you have a DVR setup that works for that purpose why break it down and build new hardware to support NAS and webhosting?  To me anything internet exposed is not on my home network period.  If you want webhosting there are lots of virtual options.  If you want a NAS that's a bit different.  Your NAS + Kodi could be on the same box.

Lately there has been some stuttering and glitching in the TV stream when watching TV through the Raspberry Pi setup. There are no problems in the TV image if I plug the antenna cable straight into my TV and watch broadcasts that way. So I am guessing the RPI4B / TVHat -combo does not function entirely properly. I haven't tried to investigate this issue though.

Another thing is that, while the Raspberry Pi TV Hat is a very good device for it price, it still has only a single tuner in it, meaning only one TV channel group can be viewed/recorded at a time. A dual tuner such as the Hauppauge TV Dual Tuner would be better so I wouldn't have to worry about conflicts between recordings.
(2021-01-04, 01:28)oldtvwatcher Wrote: [ -> ]In my personal opinion, you should do this but only if you are not easily frustrated by Linux.  I've been doing almost exactly what you suggest except I've been using an Acer Revo; it will not do 4K as far as I know, but then neither will my receiver or TV but that's okay with me. For a backend I use Tvheadend (also running under Linux) but it runs on a separate machine running Ubuntu server (no desktop).  There are two reasons for that, first I can place it right where the antenna cable enters the house to minimize cable loss, but also because I also use that system as a file storage server and it's not in my way.  Also I use a couple of HDHomeRun Dual devices (an older model) as tuners, each one has two tuners so four tuners total (and yes I realize that means the backend system could be anywhere on my local network, since the HDHomeRuns do not physically connect to the backend).  There is no reason that you can't install and run Kodi on the same machine as Tvheaded, but keep in mind that that you will probably want to keep the system running Tvheadend powered up 24/7 so you don't miss recordings, whereas you might want to power down your devices that run Kodi (yes you can have more than one connecting to the same backend) when you aren't using them.

One thing to take into consideration from personal experience is that if you have nVidia graphics you may need to stay with Ubuntu 18.04 for now, or use a distro not based on Ubuntu, because Ubuntu 20.04 seems to have some real issues with nVidia graphics.  If building or buying new, avoid nVidia graphics or be prepared for possible headaches.  That is just the opposite of the advice I would have given a few years ago but apparently nVidia doesn't want to open source their drivers and that has created a rift between them and the Ubuntu people, or maybe the entire Linux community, I don't really know.

Getting a remote control to work can be a little tricky for some users.  Since the *Elec people have a pretty much locked down system they can install a particular version and pre-configure it to just work.  All I will say about that is that if you are familiar with the lirc program and want to keep using it, you may find you will need to install an older version, see instructions here.  I know those instructions also worked in Ubuntu 20.04 as of a couple of months ago.  I'm guessing that like me you are not a programmer so I'll spare you my usual rant and plea that someone fork that older version of LIRC and rename it to something else so we can keep using it rather than the broken and terribly difficult to install version that's in the repositories now.

The thing I always hated about the *Elec distros is that they try VERY hard to keep you totally out of Linux, to the point that you can't even do a lot of basic Linux tasks.  I don't want to interact with Linux much but when I do I don't want the distro getting in my way.  Some people ONLY want to use Linux for Kodi and I guess for them the *Elecs are great but I tried one once for about ten minutes and quickly because extremely frustrated by the things I could not do, so I overwrote that with Ubuntu and would never go back.  And as you may have guessed I'm not even in love with Linux that much, but the *Elecs were just way too restrictive for my taste.  But on the other hand, Linux occasionally will break in some way (although that happens VERY seldom) and if that will drive you right up the wall then you may not want to go that route.   Ubuntu probably breaks a lot less often than Windows, but fixing a borked Windows install can be a whole lot easier than fixing a borked Linux install if you don't know what you are doing.

I have been working more and more with Linux in the last couple of years and so far haven't gotten too frustrated with it. So I think the configuration of a Linux environment shouldn't be a problem. Also, the NVidia thing won't be a problem either since I'm not planning to buy any hardware with NVidia graphics.

Yes, I'm aware that you can install the backend (TVHeadEnd) and the frontend (KODI) on separate devices but in my case I haven't had the need to separate them. In my household both the TV and the TV antenna socket outlet are both located right next to each other so it only makes sense to have a single device sitting right next to the TV, plugged in to the TV antenna socket outlet. There are other people in my household who are dependant on the KODI setup so the migration from one device to another would have to be quick so other people won't have to suffer any downtime. Even if I myself could deal with it. Convienience is one of the upsides of the LibreELEC/KODI combination combined with a Raspberry Pi so that's something I'm reluctant on giving up.

All in all, I'm still not quite sure what I'm going to do. What you said about LibreELEC&co being very locked down is true and I get it, that is one of the reasons why I'm tempted to switch to a more general purpose Linux distro as the platform for my KODI setup. Windows is not an option.
Quote:Do you think this idea is viable and reasonable? I'm not asking how to do this but should I do this and is there something I should take into consideration if I choose to do this? Can I make  Or should I just stick to a dedicated DVR?

I'm having great success right now with Xubuntu 20.04 on my living room tv. With auto login and auto start of Kodi it works a treat. I am able to press the \ key and use it as a regular desktop. The machine I'm using is quite capable of doing Steams remote play, been playing my Windows games like that for a few weeks. Works great. May depend on your hardware. I disabled the built in compositor and use Compton. For me it's noticeably better. I don't know how to quantify it.

You can easily do all of this on your single device but be careful of all the eggs in one basket. I'd suggest you use Docker for your SQL & tv backend. I know nothing about tvheadend. I've used Mythtv quite successfully and have for a few years now. I've been using a network based tuner. Never used an internal hardware tuner. Either will work of course but I don't know how the built in tuner will interface with Docker. You could run the backend on bare metal of course with no trouble with hardware devices.  I think a media center case would be more appropriate if you want to do basic nas stuff, if only because internal drives are more reliable than usb. For basic media stuff I use mergerfs + snapraid for my pooling redundancy.


Do not be afraid of Linux. It is easy enough, just different. If you go in with the Windows approach you will fail.
(2021-01-05, 17:44)der_general Wrote: [ -> ]
(2021-01-04, 13:52)graysky Wrote: [ -> ]If you have a DVR setup that works for that purpose why break it down and build new hardware to support NAS and webhosting?  To me anything internet exposed is not on my home network period.  If you want webhosting there are lots of virtual options.  If you want a NAS that's a bit different.  Your NAS + Kodi could be on the same box.

Lately there has been some stuttering and glitching in the TV stream when watching TV through the Raspberry Pi setup. There are no problems in the TV image if I plug the antenna cable straight into my TV and watch broadcasts that way. So I am guessing the RPI4B / TVHat -combo does not function entirely properly. I haven't tried to investigate this issue though.

Another thing is that, while the Raspberry Pi TV Hat is a very good device for it price, it still has only a single tuner in it, meaning only one TV channel group can be viewed/recorded at a time. A dual tuner such as the Hauppauge TV Dual Tuner would be better so I wouldn't have to worry about conflicts between recordings.

I can recommend the HDHomeRun Dual and Quad DVB-T/T2 networked tuners.  They are more expensive than a Pi with a TV Hat - but they work well in my experience.  The advantage is that you can site your small HDHR tuner near your antenna/aerial socket, plug it into a network cable, and run TV Headend on any other suitable device (Pi 4B, NAS etc.) elsewhere on your network.
I can recommend the xbox tv tuners, which you can buy in the UK on eBay for about £6 each. They are DVB-T2, and I have 3 of them attached to my Pi4. I've recorded up to 5 programmes simultaneously to the MicroSD card, and have Kodi running (LibreElec).

I'd echo what others have said. The Pi4 is a good low-power device, so if this is the only thing it does, but it does it well, don't mess with it. If you want a Linux box to do other things, go for it, but why complicate it with a task that you can offload onto the Pi.
(2021-01-06, 19:09)mcelliott Wrote: [ -> ]I can recommend the xbox tv tuners, which you can buy in the UK on eBay for about £6 each. They are DVB-T2, and I have 3 of them attached to my Pi4. I've recorded up to 5 programmes simultaneously to the MicroSD card, and have Kodi running (LibreElec).

I'd echo what others have said. The Pi4 is a good low-power device, so if this is the only thing it does, but it does it well, don't mess with it. If you want a Linux box to do other things, go for it, but why complicate it with a task that you can offload onto the Pi.

I cannot recommend the Xbox One DVB-T2 tuners sadly. They are, in my experience, not that sensitive (so give continuity errors on signals that with other USB DVB-T2 tuners are error-free) and have some significant driver issues that mean they simply refuse to tune certain muxes at all. I bought a bunch of them to build a 6 x DVB-T (3xPS2 Play TV Dual DVB-T tuners) to receive the 6 DVB-T UK muxes and 3 x DVB-T2 (3 x Xbox One DVB-T2 tuners) to receive the then 3 x DVB-T2 UK muxes (now just 2...) - rolling my own kernel to increase the maximum DVB tuners support from 8 to 16 - and found the Xbox One tuners were not up to the job of receiving the UK PSB3, COM7 and COM8 muxes in London (on the pre-700MHz clearance reshuffle frequencies). I replaced them with a Win TV HD Dual (once dual tuner support was added) and an August T230 mk 1 I had knocking around. I've since upgraded to an HD HR Quad DVB-T2 which is 'good enough' (I realised I didn't need the flexibility to record all muxes simultaneously - everything I record, pretty much is on PSB3 or COM7...)
(2021-01-07, 10:18)noggin Wrote: [ -> ]I cannot recommend the Xbox One DVB-T2 tuners sadly.

Maybe I have just been lucky or have particularly good signal. I have considered simplifying my setup with a HD HomeRun, but I cannot justify the expense when I have something that is cheap and is working perfectly.

However, your comments are obviously valid based on your own experience.
(2021-01-07, 11:14)mcelliott Wrote: [ -> ]
(2021-01-07, 10:18)noggin Wrote: [ -> ]I cannot recommend the Xbox One DVB-T2 tuners sadly.

Maybe I have just been lucky or have particularly good signal. I have considered simplifying my setup with a HD HomeRun, but I cannot justify the expense when I have something that is cheap and is working perfectly.

However, your comments are obviously valid based on your own experience.

I get the feeling it depends what frequency your DVB-T2 muxes are on (I think DVB-T is much more reliable with the Xbox One - as most reports I've read mirroring mine are either DVB-C or DVB-T2 related)

"There are several reports that the driver in kernel 4.16 does not work very well for DVB-T2 reception in Germany." https://www.linuxtv.org/wiki/index.php/X...l_TV_Tuner (I'm in the UK but have had real issues with Crystal Palace PSB 3 - the UK HD mux - on a strong signal that is error-free for literally every other USB and non-USB tuner I have. My Sony TV reports zero errors on it's full diagnostic page tuned to that mux from the same aerial/antenna)
(2021-01-03, 20:21)der_general Wrote: [ -> ]Recently I've been thinking about buying more powerful hardware (maybe an Intel NUC), then installing some Linux distro (probably Ubuntu) and then installing KODI on that distro. The reason for this is that I would like to utilize the same device for other purposes as well 
I have 4 raspberries, 1 intel pc running ubuntu and a few mediaplayers of various brands in my home. While I enjoy the ubuntu server for its flexibility being the backbone of my virtual household, I learned to love those small devices dedicated for single tasks. With more stuff running on one system, you might introduce unforseen issues, bugs etc., so I'd vote for sticking to dedicated systems.
Pages: 1 2