dnschneid / crouton

Chromium OS Universal Chroot Environment
https://goo.gl/fd3zc?si=1
BSD 3-Clause "New" or "Revised" License
8.57k stars 1.24k forks source link

Chromium OS loses networking when inside chroot #118

Closed rbalch closed 11 years ago

rbalch commented 11 years ago

I've been playing with crouton for a few days now on my chromebook pixel. Everything works great but the audio.

If I open Google music or Amazon and play a song in chrome it's ok. If I then switch to xfce4 it either stops playing the song within 10 seconds, or waits until the end of the song, but will not move on to the next song.

In the Ubuntu side everything acts like it's fine. I get scroll bars and everything, and markers move correctly, but no actual audio comes out of the speakers. YouTube does the same thing.

Am I missing something?

xYuunaX commented 11 years ago

Is the Volume control working in the Linux Panel? It might be muting the sound when you switch.

rbalch commented 11 years ago

Nothing was muted in xfce or alsa. I used alsamixer and everything looked fine. I checked all the alsa configurations and that looked fine. I looked at the sound cards and config and everything looked fine.

After 3 days I was having no luck. I had done nothing to the pixel but reboot to developer-mode and use the crouton scripts - it just never had audio.

In desperation last night I started looking at general alsa problems. I tried settings in ~/.asoundrc, etc, all to no avail. Finally I went into the chroot and ran "sudo alsa force-reload" and got some scary errors I don't remember now and audio still didn't work.

Without thinking about it I decided I would execute an "init 0" on the crouton "vm" forgetting that would take the laptop down. When it booted back up the sound started working.

So I got it working - just not really sure what it was. I'm considering making a new install so I can try to reproduce the problems and steps that ultimately fixed it.

xYuunaX commented 11 years ago

Hmm.. I wouldn't know much about the pixel, as I use the Samsung Series 3. In my experience, sound in ChromeOS and Linux works fine, just need to play around with the Alsa Mixer to get it to work. (I need to do this every reboot)

Reinstallation might work, as I had to re-install like 2-3x to figure out all the stuff that needed fixing.

tedm commented 11 years ago

In #111 some Samsung users needed to install xubuntu-restricted-extras (codecs?) and used programs called Parole and Guayadeck (sp?). You should be able to put your music in ~/Downloads/Music and play it from ChromeOS and have it playing when you are in the chroot as well.

rbalch commented 11 years ago

I installed those too - but that was days ago and didn't seem to be the problem. I ultimately installed the google chrome-browser in xfce and that seems to work fine with everything.

I would prefer to be able to use the browser to stream music in chrome while coding in X. I do a lot of Django coding in python and really only need X for java and running pyCharm. After a few days of running around the chrome store there just isn't a good solution yet for python/django IDE.

I think I'm morally opposed to downloading the music to the tiny HD in order to play it :-P Even my phone can manage to stream music while it does other things.

Streaming music in chrome-browser on the X side is not ideal for me. With the touch screen, tabs, super high-resolution, and fonts chrome-os just works better for the browsing side of things. I'd prefer to keep that for the browsers/streaming and switch back and forth when I need to.

My feeling is that streaming to chrome-browser on the X side is better than getting back to managing which files are downloaded onto the machine.

I've actually been wondering how hard it would be to get X outputting to a browser window, or even just java or X windows, instead of switching desktops using the key combo. I'm sure this is hard and I've done very little coding in this environment at all yet, but it seems like something that would make this perfect. If I could install a fake ubuntu and have X11, or even just windows, pop-up in browser windows in chrome this would be about the perfect OS for me.

On Wed, Apr 17, 2013 at 11:30 AM, tedm notifications@github.com wrote:

In #111 https://github.com/dnschneid/crouton/issues/111 some Samsung users needed to install xubuntu-restricted-extras (codecs?) and used programs called Parole and Guayadeck (sp?). You should be able to put your music in ~/Downloads/Music and play it from ChromeOS and have it playing when you are in the chroot as well.

— Reply to this email directly or view it on GitHubhttps://github.com/dnschneid/crouton/issues/118#issuecomment-16512907 .

-Ryan Balch

tedm commented 11 years ago

do you only have issues with amazon and google music services? They might be using cookies or DRM where the chroot switch changes the fs to them. Can you switch between a non DRM mp3 just sitting on a server like this file: http://www.tedm.com/mp3s/awimbawe.mp3 ?

rbalch commented 11 years ago

Long sorted tale... Started with Google Music. If I run it in chrome-os it's fine. If I then switch to X it plays for about 10 seconds then stops. If I switch back it immediately picks up again.

Thought that was weird so I loaded up Amazon. Once Amazon starts playing I can switch and it will continue playing the entire song until it ends, then it will freeze until I toggle back to chrome-os, at which point it will automatically go to the next song and continue (just like it would do normally, but with no interaction from me at all).

I bring up the Google Music interface and look in labs. Months ago I enabled the HTML5 support. If I disable HTML5 support (so it uses flash), then Google Music reproduces the Amazon effect. Once it starts playing a song it will do so until the song ends, then freeze until I toggle back into chrome-os.

My suspicion at this point is that when I toggle into X that is somehow cutting off the browsers in chrome-os from the network or some other system resource. It will continue playing the audio using flash (because I suspect the flash versions start playing after the entire song has been downloaded), but when the song ends flash is also paused until I toggle back in, then everything picks up like it normally would.

I've not poked at this too much yet but it seems like I was playing with something else and realized in a toggle back it was like the browser had been "paused" the whole time. It may have been a shared document or something. When I switched back it was obviously the "old" version of the document, but it immediately updated to the right one, like it had been running perfectly fine the whole time.

Note: I found the flag on the first day in chrome://flags to have the browsers stop that nonsense where they were auto-refreshing themselves constantly (or stopping themselves). Can't imagine why that thing is on by default. The behavior was the oldest browser windows would get closed randomly so it was constantly "freezing" my music browsers. When you were using only chrome-os switching around browsers I would constantly come across tabs whose content had been blanked out, but switching to the tab seemed to cause an automatic refresh and bring the browsers back.

On Wed, Apr 17, 2013 at 12:34 PM, tedm notifications@github.com wrote:

do you only have issues with amazon and google music services? They might be using cookies or DRM where the chroot switch changes the fs to them. Can you switch between a non DRM mp3 just sitting on a server like this file: http://www.tedm.com/mp3s/awimbawe.mp3 ?

— Reply to this email directly or view it on GitHubhttps://github.com/dnschneid/crouton/issues/118#issuecomment-16517081 .

-Ryan Balch

dnschneid commented 11 years ago

I think you're right; I've heard others have been getting disconnected from gchat and hangouts when switched into crouton. Sounds like network access is being tied to the current VT for some reason.

If you don't need hardware video acceleration in the chroot, or just want to experiment, try installing the xephyr target (the keyboard shortcut to switch becomes ctrl+alt+shift+back/forward) and see how audio works.

rminnich commented 11 years ago

yes, that happens. When you switch to vt3 all kinds of stuff stops working

ron

dnschneid commented 11 years ago

Relevant bug filed here. Star the bug if it affects you, but don't comment.

thirteen37 commented 11 years ago

On a related note, I'm losing audio on cros too, but it appears uncorrelated with network availability. Sometimes, even newly loaded Flash videos will not have sound.

I'm on the beta channel. I've tried restarting cras (the audio daemon) to no effect. However, once the Chrome browser itself did crash completely and upon restart audio was working. FWIW, I'm running pulseaudio in the chroot and audio works fine there.

dnschneid commented 11 years ago

That would be PulseAudio's fault; it is likely grabbing the audio device and then not releasing it. There's a PulseAudio module that releases the audio device when it is idle so that Chromium OS can grab it when it needs it.

dnschneid commented 11 years ago

Folding into #94; this is due to the GPU watchdog indirectly causing Chrome to hang in the background, as far as I can tell.