Kodi Community Forum

Full Version: How to Install XBMC PVR Xvba for AMD/Nvidia/Intel GPUs
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
mount on boot can also be done via fstab
Yes but it means I have to add each new device I have or someone brings over weekend in to the fstab, or unplug/re-plug back in, too much messing around, surely it should work if you leave device plugged in or reboot xbmc/system it would just work?

uNi
(2012-10-20, 19:43)uNiversal Wrote: [ -> ]
(2012-05-02, 22:37)fritsch Wrote: [ -> ]@weemaaan
create the file /etc/polkit-1/localauthority/50-local.d/custom-actions.pkla
with the following content:
Code:
[Actions for xbmc user]
Identity=unix-user:xbmc
Action=org.freedesktop.upower.*;org.freedesktop.consolekit.system.*;org.freedesktop.udisks.*
ResultAny=yes
ResultInactive=yes
ResultActive=yes

And to make it complete, if you want to mount and umount usb sticks, that are connected during a xbmc sessions
do:
Code:
sudo adduser xbmc users

and create the file /etc/udev/rules.d/11-media-by-label-auto-mount.rules
Code:
# Start at sdb to avoid system harddrive.
KERNEL!="sd[b-z][0-9]", GOTO="media_by_label_auto_mount_end"

# Import FS infos
IMPORT{program}="/sbin/blkid -o udev -p %N"

# Get a label if present, otherwise specify one
ENV{ID_FS_LABEL}!="", ENV{dir_name}="%E{ID_FS_LABEL}"
ENV{ID_FS_LABEL}=="", ENV{dir_name}="usbhd-%k"

# Global mount options
ACTION=="add", ENV{mount_options}="relatime"
# Filesystem-specific mount options
ACTION=="add", ENV{ID_FS_TYPE}=="vfat|ntfs", ENV{mount_options}="$env{mount_options},utf8,gid=100,umask=002"

# Mount the device
ACTION=="add", RUN+="/bin/mkdir -p /media/%E{dir_name}", RUN+="/bin/mount -o $env{mount_options} /dev/%k /media/%E{dir_name}"

# Clean up after removal
ACTION=="remove", ENV{dir_name}!="", RUN+="/bin/umount -l /media/%E{dir_name}", RUN+="/bin/rmdir /media/%E{dir_name}"

# Exit
LABEL="media_by_label_auto_mount_end"

Now Reboot.

Shutdown, logout, suspend, etc. should be fine afterwards. Also mounting and umount of usb drives should now be possible.

@wsnipex:
Perhaps we should add this into the howto? As the polkit console commands are not there anymore?

This may be old but, just installed minimal Ubuntu + XBMC and with this, I only get usb mounting when I plug the usb in, if its plugged in during boot it wont show up!

Is there something that should be installed in Ubuntu minimal? (e.g. automount or autofs perhpas something else, usbmount doesnt work either with or without this.

TIA

uNi

Check is you use proper GID UID becaus in my case i had to change them to 1000 and check if you got the udisks package. For me automount is working with devices connected before boot.
first check what JohnCord said.

second: I don't see your point. Which devices do you leave plugged in? Probably external disks with your media on,
so I guess they don't change so often. Everything else that you use occasionally can just be plugged in with the PC running.
But the point is that it should be unnecessary if a device is plugged in before the machine is running. It should be mounted in both cases...
BTW: Maybe add this to the guide ??

--> USB Wakeup via UDEV Rule on Ubuntu 12.04

http://ubuntuforums.org/showthread.php?t=1968487

http://forum.xbmc.org/showthread.php?tid...pid1203339
(2012-10-20, 21:13)john.cord Wrote: [ -> ]Check is you use proper GID UID becaus in my case i had to change them to 1000 and check if you got the udisks package. For me automount is working with devices connected before boot.

Hi thanks, I checked, my GID and UID is as below.
Code:
:~# id xbmc
uid=1000(xbmc) gid=1000(xbmc) groups=1000(xbmc),4(adm),24(cdrom),27(sudo),29(audio),44(video),46(plugdev),104(fuse)

udisks is installed. perhpas there is a module that needs loading? Here is my lsmod result

(2012-10-20, 21:37)john.cord Wrote: [ -> ]But the point is that it should be unnecessary if a device is plugged in before the machine is running. It should be mounted in both cases...

Yes indeed.

(2012-10-21, 00:26)john.cord Wrote: [ -> ]BTW: Maybe add this to the guide ??

--> USB Wakeup via UDEV Rule on Ubuntu 12.04

Did I miss a post? (going back to find this... Wink my proc/acpi/wakeup pumps out this output

TIA

uNi



@uNiversal:
Code:
:~# id xbmc
uid=1000(xbmc) gid=1000(xbmc) groups=1000(xbmc),4(adm),24(cdrom),27(sudo),29(audio),44(video),46(plugdev),104(​fuse)

You are not member of the users group. If you look at the udev automount script, you will see that it is mounted with the rights for the users group, see:
Code:
ENV{mount_options}="$env{mount_options},utf8,gid=100,umask=002"

Code:
sudo adduser xbmc users
followed by a reboot should fix this.
Done that thx, it now is:

Code:
:~# id xbmc
uid=1000(xbmc) gid=1000(xbmc) groups=1000(xbmc),4(adm),24(cdrom),27(sudo),29(audio),44(video),46(plugdev),100(users),104(fuse)

Rebooted and usb still only shows if i unplug and re-plug, though this is a small problem?

Do I need to change users from 100 to 1000? if so how?

I'm also having a nasty problem, if I enable sync back to display in xbmc, I get no sound.

sorry idk what to do, :/

My advancedsettings.xml has
Code:
    <audio>
            <streamsilence>1</streamsilence>
    </audio>

uNi
@uNiversal:
Please check your advancedsettings.xml

it must read:
Code:
<advancedsettings>
  <audio>
    <streamsilence>1</streamsilence>
  </audio>
</advancedsettings>

Again make sure, you have alsa-utils installed.

No - you don't need to change anything concerning the groups.

Pastebin: aplay -L
make sure there is no ancient .asoundrc left.
Pastebin: xbmc.log with debugging turned on
Yes advancedsettings.xml is as you posted. you can see in log.

Here is my aplay -L http://paste.ubuntu.com/1294805/

I dont have a .asoundrc or a /etc/asound.conf, alsa-ultils is installed

heres a debug.log with trying to play a file with syncback to display enabled and no sound http://paste.ubuntu.com/1294831/

TIA

uNi
@uNiversal:
Everything looks fine. Xbmc finds the following devices:
Analog, spdif, hdmi - so all are there.

Make sure your receiver whatever is connected when you start up.
Code:
13:38:41 T:3045804864   DEBUG: CSoftAE::Run - Sink restart flagged
13:38:41 T:3045804864    INFO: CSoftAE::InternalOpenSink - sink incompatible, re-starting
13:38:41 T:3045804864    INFO: CAESinkALSA::Initialize - Attempting to open device "hdmi:CARD=NVidia,DEV=0"
13:38:41 T:3045804864    INFO: CAESinkALSA - ALSA: pcm_hw.c:1293:(snd_pcm_hw_open) open '/dev/snd/pcmC0D3p' failed (-16): Device or resource busy
13:38:41 T:3045804864    INFO: CAESinkALSA - Unable to open device "hdmi:CARD=NVidia,DEV=0,AES0=0x04,AES1=0x82,AES2=0x00,AES3=0x00" for playback
13:38:41 T:3045804864    INFO: CAESinkALSA - ALSA: pcm_hw.c:1293:(snd_pcm_hw_open) open '/dev/snd/pcmC0D3p' failed (-16): Device or resource busy
13:38:41 T:3045804864    INFO: CAESinkALSA - Unable to open device "hdmi:CARD=NVidia,DEV=0" for playback
13:38:41 T:3045804864   ERROR: CAESinkALSA::Initialize - failed to initialize device "hdmi:CARD=NVidia,DEV=0"
13:38:41 T:3045804864   DEBUG: CSoftAE::InternalOpenSink - NULL Initialized:

Could you try to disable menu sounds? Do you use any additional asound.conf or .asoundrc? Do you start it from the desktop? Is pulseaudio running?
No I said I dont have asound.conf or .asoundrc, I will try to disable menu sounds, no desktop, minimal ubuntu + xbmc no lightdm neither xbmc is started via xinit/upstart, boot straight in, no window manager of any kind.

The receiver is always ON

Pulseaudio is not working, Im using alsa.

I will try with no menu sounds, but if I disable syncback to display sound works, though with or without sound judder is a issue.

Will post back with debug log without menu sounds and without syncback to display enabled.

TIA

uNi
(2012-10-21, 15:33)uNiversal Wrote: [ -> ]I will try with no menu sounds, but if I disable syncback to display sound works, though with or without sound judder is a issue.

TIA

uNi

Wait! what sync method did you choose?
If you chose: Video Clock (Resample Audio) - it won't work for your passthrough setup. Does normal mp3 playback work?
Choose: Video Clock (Drop/ Dup Audio).

drop/dupe enabled mp3/flac etc music plays but I will double check

with nav sounds disabled http://paste.ubuntu.com/1294980/ works, though judder is a bit of an issue and if I bring (o) up the error is going berserk.

Ill have a look with observation about (resample audio) I dont think Im using that at all

Also upgraded video drivers to 304.60

uNi