Ticket #7302 (closed defect: fixed)

Opened 6 years ago

Last modified 6 years ago

audio playback broken in olpc3 (gstreamer broken?)

Reported by: dsd Owned by: jg
Priority: normal Milestone:
Component: distro Version: olpc-3
Keywords: olpc3-19:- olpc3-20:- joyride-2081:+ Cc: mstone, dsaxena
Action Needed: never set Verified: no
Deployments affected: Blocked By:


sugar is having trouble dealing with the speaker icon stuff. I think gstreamer is unable to play anything. speaker-test does work, so audio is functional on some level.


rainbowperms.patch Download (480 bytes) - added by dsd 6 years ago.
potential fix for /etc/security/console.perms.d/51-rainbow.perms

Change History

  Changed 6 years ago by dsd

here's a way to test playback through gstreamer:

gst-launch filesrc location=/usr/share/sounds/alsa/Front_Left.wav ! wavparse ! alsasink

Under olpc3 it works as root but not as olpc. This is because of the permissions of the device nodes in /dev/snd (root:root). Under update1, the nodes were owned by olpc (but it's not immediately obvious where such ownership comes from)

follow-up: ↓ 3   Changed 6 years ago by dsd

In update1 (pam-, pam_console is responsible for applying permissions to /dev/snd/* (ugh)

/etc/security/console.perms.d/50-default.rules defines <sound> and 51-rainbow.rules does: <console> 0666 <sound> 0666 root

In olpc3 (pam-1.0.1-4.fc9.i386), 50-default.rules no longer defines <sound> so the rainbow rules for both sound and v4l are invalid. Fedora's configuration for these nodes was removed because "most devices are handled by hal now":  https://fedorahosted.org/pam-redhat/changeset/297%3Ab4b641df0611

Changed 6 years ago by dsd

potential fix for /etc/security/console.perms.d/51-rainbow.perms

in reply to: ↑ 2   Changed 6 years ago by dsd

  • cc mstone added
  • keywords olpc3-20:- added

Replying to dsd:

Fedora's configuration for these nodes was removed because "most devices are handled by hal now":  https://fedorahosted.org/pam-redhat/changeset/297%3Ab4b641df0611

HAL (+ PolicyKit) does this in a pretty intelligent way: when a user logs in it applies a set of ACLs to device nodes. So all sound nodes remain owned by root:root but an ACL is added for each user session that allows each user to access the relevant nodes.

This is perhaps a bit heavyweight for the XO (single user system) and also ACLs on JFFS2 are disabled in our kernel. Even when enabled, they don't seem to be working. And I guess this system might not play nice with rainbow.

One easy way of solving this is to fix up the pam_console rules to include the <sound> definition again. I have confirmed this is also suitable for the update1 systems (i.e. pam_console does not choke on a duplicate definition of <sound>). Michael, any thoughts?

  Changed 6 years ago by marco

My understanding from a conversation with Bernie is that the only reason we need a display manager is to get audio device permissions right. If that's correct, the pk approach would have the advantage of allowing us to run without a dm.

I don't really have much clues about this kind of stuff, but I wanted to mention it...

  Changed 6 years ago by dsaxena

  • cc dsaxena added

  Changed 6 years ago by dsd

  • keywords joyride-2081:+ added
  • status changed from new to closed
  • next_action set to never set
  • resolution set to fixed

fixed in joyride-2081 with new rainbow release

  Changed 6 years ago by gregorio

  • milestone Never Assigned deleted

Milestone Never Assigned deleted

Note: See TracTickets for help on using tickets.