Bug 461322

Summary: libdvdnav
Product: [openSUSE] openSUSE 11.1 Reporter: Ulrich Hiller <hiller>
Component: X11 ApplicationsAssignee: Hendrik Vogelsang <hvogel>
Status: RESOLVED DUPLICATE QA Contact: Stefan Dirsch <sndirsch>
Severity: Minor    
Priority: P5 - None CC: axel.braun, AxelKoellhofer, detlef, dkukawka, forgotten_t-K-SYtr-p, franz, lothar60
Version: Final   
Target Milestone: ---   
Hardware: i686   
OS: openSUSE 11.1   
Whiteboard:
Found By: Community User Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Ulrich Hiller 2008-12-21 16:00:47 UTC
Hi all,
I wanted to watch a dvd under opensuse 11.1 with vlc (mplayer gave a similar error):
libdvdnav: Using dvdnav version 4.1.3
libdvdnav: DVD Title: DVDVolume
libdvdnav: DVD Serial Number: bf477576
libdvdnav: DVD Title (Alternative): DVDVolume
libdvdnav: Unable to find map file '/home/hiller/.dvdnav/DVDVolume.map'
libdvdnav: DVD disk reports itself with Region mask 0x00fd0000. Regions: 2
libdvdnav: Cell is in block but did not enter at first cell!
libdvdnav: Cell is in block but did not enter at first cell!
libdvdnav: Cell is in block but did not enter at first cell!
vlc: vm.c:863: vm_get_video_aspect: Assertion `aspect == 0 || aspect ==
3' failed.

and then vlc crashed.
Here is my workaround (not a final solution):
cd /usr/lib
copy the libdvdnav.so.4.0.0 from opensuse 11.0 to here (because under 11.0 it worked fine). Then
mv libdvdnav.so.4.1.2 libdvdnav.so.4.1.2-0
ln -s libdvdnav.so.4.0.0 libdvdnav.so.4.1.2

Now I can watch dvd's under 11.1. Obviously libdvdnav.so.4.1.2 is buggy.

I hope this helps you.
Best wishes, Ulrich
Comment 1 Stephan Binner 2008-12-21 18:40:08 UTC
*** Bug 461342 has been marked as a duplicate of this bug. ***
Comment 2 Detlef Reichelt 2008-12-22 08:14:50 UTC
OK, vlc has a problem with libdvdread, should be fixed next hours.

But also all other player couldn't play a video dvd or an audio cd because of bad rights:

Before inserting a video dvd:

detlef@detlef-pc:~> getfacl /dev/sr0 
getfacl: Removing leading '/' from absolute path names
# file: dev/sr0
# owner: root
# group: disk
user::rw-
user:detlef:rw-
group::rw-
mask::rw-
other::---

After inserting a video dvd:

detlef@detlef-pc:~> getfacl /dev/sr0 
getfacl: Removing leading '/' from absolute path names
# file: dev/sr0
# owner: root
# group: disk
user::rw-
group::rw-
mask::rw-
other::---

The "user:detlef:rw-" are deletet every time i put in a video/audio-cd/dvd.

Detlef
Comment 3 Ulrich Hiller 2008-12-22 08:27:27 UTC
set /dev/sr0 permissions to 0666 or add the user detlef to the group
'disk' and thre permission problem should be solved.
Ulrich
Comment 4 Detlef Reichelt 2008-12-22 09:17:01 UTC
I know, but that's only a workaround, not fixing the problem...
Comment 5 Dr. Franz Nachbar 2008-12-22 11:14:26 UTC
Sorry for me it didn't work to change the rights as proposed and to add the user to the disk group. Only as root playing audio CDs and video DVDs is possible. It seems that a more basic permission problem is present as on opensuse 11.1. Also problems mounting usb-sticks are present (no permession to read them or to write on them). Is there a bugfix in sight?
Franz
Comment 6 Dr. Franz Nachbar 2008-12-22 11:15:35 UTC
Sorry for me it didn't work to change the rights as proposed and to add the user to the disk group. Only as root playing audio CDs and video DVDs is possible. It seems that a more basic permission problem is present as on opensuse 11.1 also problems mounting usb-sticks are present (no permession to read them or to write on them). Is there a bugfix in sight?
Franz
Comment 7 Detlef Reichelt 2008-12-22 15:30:12 UTC
Did the trick:

# hal-device '/org/freedesktop/Hal/devices/volume_label_DVDVolume' | grep info.capabilities
  info.capabilities = { 'volume.disc', 'volume', 'block', 'access_control' } (string list)

OK, search for a match in hal policy:

/usr/share/hal/fdi/policy/10osvendor/20-acl-management.fdi:

    <!-- Removable block devices -->
    <match key="info.capabilities" contains="block">
      <match key="@block.storage_device:storage.removable" bool="true">
        <append key="info.capabilities" type="strlist">access_control</append>
        <merge key="access_control.file" type="copy_property">block.device</merge>
        <merge key="access_control.type" type="string">removable-block</merge>
      </match>
    </match>


Match!

/usr/share/PolicyKit/policy/org.freedesktop.hal.device-access.policy:

 <action id="org.freedesktop.hal.device-access.removable-block">
    <description>Directly access removable block devices</description>
    <message>System policy prevents access to removable block devices</message>
    <defaults>
      <allow_inactive>no</allow_inactive>
      <allow_active>no</allow_active>
    </defaults>
  </action>

Bingo! :(

allow_active -> no



Comment 8 Detlef Reichelt 2008-12-22 15:34:46 UTC
Add Danny to CC

Danny, should we have an extra rule for optical dvd, or only change removable block devices to yes?

Detlef
Comment 9 Dr. Franz Nachbar 2008-12-22 17:23:44 UTC
Sorry I#m not an experienced linux user an d could not entirely follow the steps above. I tried to change /usr/..............<allow_inactive>no</allow_inactive>
      <allow_active>no</allow_active>
    </defaults>
  </action>  allow_active to yes
but still get for all removable devices (cd, dvd, usb-ticks etc.) the warning "no such fie or folder. The device doesn't exist". What can I do alternatively?
Comment 10 Axel Braun 2008-12-22 23:17:31 UTC
Same problem: changed the device permissions, but still no DVD-toaster is found - only a normal DVD drive
Comment 11 Axel Köllhofer 2008-12-24 15:57:09 UTC
I am not very familiar with HAL/PolicyKit, but strangely enough there seems to be such a rule (directly above the rule quoted by Detlef Reichelt in Nr. 7)

/usr/share/PolicyKit/policy/org.freedesktop.hal.device-access.policy:

  <action id="org.freedesktop.hal.device-access.cdrom">
    <description>Directly access optical drives</description>
    <message>System policy prevents access to optical drives</message>
    <defaults>
      <allow_inactive>yes</allow_inactive>
      <allow_active>yes</allow_active>
    </defaults>
  </action>

The first part seems to work fine 

      <allow_inactive>yes</allow_inactive>

as seen by getfacl /dev/sr0 without a medium inside the drive, but the second part 

      <allow_active>yes</allow_active>

seems to be ignored/overridden by the above mentioned rule 

/usr/share/PolicyKit/policy/org.freedesktop.hal.device-access.policy:

 <action id="org.freedesktop.hal.device-access.removable-block">
    <description>Directly access removable block devices</description>
    <message>System policy prevents access to removable block devices</message>
    <defaults>
      <allow_inactive>no</allow_inactive>
      <allow_active>no</allow_active>
    </defaults>
  </action>

Comment 12 Dr. Franz Nachbar 2008-12-25 10:15:14 UTC
Curiousely, but for me, in the end a simple
chmod -R 777 /media 
solved all the problems: VideoDVDs are recognized, and all removable devices are mounted and displayed as /media/... correctly now!? Whatever happened before...
Comment 13 Detlef Reichelt 2008-12-28 23:07:43 UTC

*** This bug has been marked as a duplicate of bug 408252 ***