LXD and Google's Crostini for Chrome OS

I know some of us are continuing to follow development of Crostini.

Noticed this

Maybe this will result in better audio use in LXD? There really wasn’t any detail yet in this Bug to hint how or what is being implemented or whether it will apply at all to Linux/LXD.


Does Chrome OS use Pulseaudio for sound?


I did find out a little more in this Bug report: https://bugs.chromium.org/p/chromium/issues/detail?id=781398

Support audio playback/capture in crosvm with an emulated AC97 codec.

And in this Crostini post on Reddit

It’s been a couple weeks, and already pulseaudio comes installed in a new penguin container. Has anyone be able to get sound working now?

Note: I assume that “penguin” is the term google gives the LXD container inside the crostini VM running in Chrome OS.


In my relevant blog post, it shows they share the Wayland socket using LXD.
It is possible to also share the Pulseaudio socket into the container, if Chrome OS uses Pulseaudio.

In my LXD GUI blog post, I did not show the sharing of the Pulseaudio socket but the I showed enabling the TCP port (not elegant).
I now figured it out and the Pulseaudio Unix socket works fine.

I never got the pulseaudio socket method to work but didn’t spend much time on it before just using tcp.

Did your prev post get updated with how to get the socket to work?

I am writing an updated post that automates as much as possible the creation of a GUI container.

I am on mobile now. The nutshell is that Pulseaudio in the container attempts to use SHM while it is not supported in LXD. It looks as if it is supported though. The solution is to disallow SHM so that it uses ‘shared’ instead.

I never tried disabliing shm as all mentions I’d found said use shm