SageTV Community  

Go Back   SageTV Community > SageTV Products > SageTV Linux
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Linux Discussion related to the SageTV Media Center for Linux. Questions, issues, problems, suggestions, etc. relating to the SageTV Linux should be posted here.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12-08-2008, 01:26 PM
cenwesi cenwesi is offline
Sage Aficionado
 
Join Date: Aug 2005
Posts: 311
SageTv and 64bit Ubuntu

Who here has Sage server running under 64bit Ubuntu (8.10 Intrepid).

I recently updated my OS from Ubuntu Hardy (8.04) to Intrepd (8.10). I have installed all necessary Java and I get sagetv up and running. The problem comes when i try to choose the video card.
I have PVR-500mce and i keep getting this error when i try to add the card
Attached Images
File Type: jpg sage_error.JPG (49.9 KB, 322 views)
Reply With Quote
  #2  
Old 12-09-2008, 08:32 AM
cenwesi cenwesi is offline
Sage Aficionado
 
Join Date: Aug 2005
Posts: 311
so i will take it i am the only one running 64bit Intrepid with sage?
Reply With Quote
  #3  
Old 12-09-2008, 11:11 AM
whartsell whartsell is offline
Sage User
 
Join Date: May 2008
Posts: 20
Have you verified that you have your tuner card working properly in Ubuntu before trying to set it up in Sage. Its been a while since i have used tuners in linux but there may be some driver tricks you need to work through to get it to work. Sorry i cant be more specific but you can google how to setup the card in ubuntu. Then give it a try in sage

this wiki has some good info for setting up the tuner http://www.mythtv.org/wiki/index.php/Hauppauge_PVR-500
Reply With Quote
  #4  
Old 12-09-2008, 11:55 PM
cenwesi cenwesi is offline
Sage Aficionado
 
Join Date: Aug 2005
Posts: 311
Card is working fine and drivers all load up just fine. I think this is a problem with sage and for the life of me can not figure out how to fix it. I can use the ivtv/vl42 utility to adjust the settings but somehow sage can't seem to adjust it.

PS: mythtv sees the card and works just fine.
Reply With Quote
  #5  
Old 12-10-2008, 03:05 PM
trueno trueno is offline
Sage User
 
Join Date: May 2003
Posts: 39
This is because 64 bit linux kernels need a patch to the 32bit/64bit compatibility layer in v4l/v4l2.

Basically, sage runs as a 32bit process, and 32 bit processes have to go through a special compatibility layer in a 64 bit kernel for any ioctls they use.

I had created this patch for an older kernel and posted it to another thread here, I had also promised to update the patch for newer kernels and I will get around to that in a week when I have some extended vacation time :-)

The patch applies against the v4l/v4l2 source tree and is attached to this post:
http://forums.sagetv.com/forums/show...3&postcount=38

PS: someone has said previously my patch still applies to latest v4l kernel sources, but with some offsets and such that can probably safely be ignored. Caveat emptor of course
Reply With Quote
  #6  
Old 12-10-2008, 03:11 PM
trueno trueno is offline
Sage User
 
Join Date: May 2003
Posts: 39
Just to explain this all a bit further,

MythTV, driver utils, etc all work fine because they are compiled as 64 bit binaries/processes on 64 bit linux.

SageTV is a special case because Sage has neglected to make a 64 bit native version of their libraries/binaries available, so it runs as 32 bit and must go through a kludgy and seldom used interface in the kernel compatibility internals to operate.

SageTV is the only piece of software I have come across that actually hits this circumstance, and this is why the mainline kernels have not been tested/patched up to support its specific (and valid/correct) uses of the v4l/v4l2 apis.
Reply With Quote
  #7  
Old 12-10-2008, 03:34 PM
drewg drewg is offline
Sage Icon
 
Join Date: Aug 2007
Location: Richmond, VA
Posts: 1,042
I've never seen this (running 8.04 64-bit, and use only digital cards) so I've never seen this. I suspect that one of the drivers involved lacks a 32-bit ioctl shim.

Background: SageTV communicates with the device drivers for capture cards through "ioctls". An ioctl is basically a message passed from the application to the driver and back. The driver and the application have to agree on the size and layout of the data structures used in the ioctls. Most Linux device drivers have 32-bit ioctl shims so that ioctls from 32-bit applications can talk to 64-bit device drivers.

I'd first try a 32-bit installation, and see if Sage worked there with 8.10 and your capture card.

If you're technically sophisticated, I'd suggest running strace on sagetv in 64-bit mode, and looking for failed ioctls. Perhaps support might be able to tell you exactly what failure leads to the message you're seeing.

Drew
Reply With Quote
  #8  
Old 12-10-2008, 03:37 PM
drewg drewg is offline
Sage Icon
 
Join Date: Aug 2007
Location: Richmond, VA
Posts: 1,042
Quote:
Originally Posted by drewg View Post
I suspect that one of the drivers involved lacks a 32-bit ioctl shim.
I revise my suggestion to simply: apply trueno's patch..

Drew
Reply With Quote
  #9  
Old 12-10-2008, 05:20 PM
bcjenkins bcjenkins is offline
SageTVaholic
 
Join Date: Jan 2006
Posts: 3,764
trueno's patch doesn't actually work with the latest pulls from DVB. There is work underway by Hans Verkuil who, I believe, is the owner of the ioctls to update the patchset for the driver changes.

If you're on the video4linux mail list, he posted a diff last night. In my testing though it did not function correctly.

B
__________________
Running SageTV on unRAID via Docker
Tuning handled by HDHR3-6CC-3X2 using OpenDCT
Reply With Quote
  #10  
Old 12-16-2008, 11:44 PM
bcjenkins bcjenkins is offline
SageTVaholic
 
Join Date: Jan 2006
Posts: 3,764
Please see this post for an update: http://forums.sagetv.com/forums/show...4&postcount=84

B
__________________
Running SageTV on unRAID via Docker
Tuning handled by HDHR3-6CC-3X2 using OpenDCT
Reply With Quote
  #11  
Old 12-23-2008, 07:19 AM
cenwesi cenwesi is offline
Sage Aficionado
 
Join Date: Aug 2005
Posts: 311
I just want to take this time to thank bcjenkins for helping me get SageTv working correctly on 64bit OS. I had issues with 64bit and PVR 500mce driver. Turns out you had to do a custom build of the kernel and disabled the multimedia module. After installing you custom kernel AND rebooting, you have to compile the ivtv drivers and install it. Reboot and you should be good to go.

PS: if you have a previous build of the kernel, either backup /lib/modules/`uname -r`/kernel/drivers/media/* or rm -Rf the dir before compiling the ivtv driver. Here is a detailed step i documented to get it working correctly....

1) First Build the current/your Kernel and make sure the
multimedia module is not selected (disabled)

2) Install the kernel and
$ rm -Rf /lib/modules/`uname -r`/kernel/drivers/media/*

3) Reboot!
$ shutdown -r now

4) Make a clean Build of the V4l*
$ cd <ivtv source directory>
$ make distclean
$ make
$ sudo make install #--installs the newly compiled module

5) here we will load up the modules/drivers
$ sudo modprobe ivtv #--Loads the ivtv modules
$ sudo modprobe cx23885 #--Loads the cx23885 (Hauppauge WinTV card)
$ sudo modprobe cx23885 #--Load again incase!

6) check dmesg to see if modules are loaded!
$ dmesg | grep cx | more

7) This is optional if still not working...Reboot again!
$ shutdown -r now

ps: you can get the ivtv tree/source/driver by issueing this command:
$ hg clone http://linuxtv.org/hg/v4l-dvb
and if you don't have mercurial installed then...
$ sudo apt-get install mercurial

Last edited by cenwesi; 12-23-2008 at 07:24 AM.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
To 64bit or not to 64bit teknubic Hardware Support 19 07-25-2006 10:57 AM


All times are GMT -6. The time now is 10:34 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.