[Nix-dev] alsa/pulseaudio issue with flash/html5 videos fix found

Joachim Schiele js at lastlog.de
Tue Jan 21 15:46:58 CET 2014


============= what is this about: short version ==============
audio in chromium/html5, chromium/flash or using vlc was somehow broken.

============= what is this about: long version ==============
- youtube.com videos using html5 wouldn't play any audio, no matter what 
i tried
- youtube.com videos using flash would only play audio if all other 
players (like vlc) were shut down prior to to pageload

i tried various things like editing stuff in these locations:
- ~/.pulse/*
- ~/.config/pulse/*
- ~/.asoundrc

now it turns out that i had a old version of chromium/firefox installed, 
so i checked what was wrong and found this:

  environment.systemPackages = with pkgs; [
     zsh
     linuxPackages.virtualbox
     wget
     ...
     kde4.kdemultimedia
     kde4.kdegraphics
     virtviewer
     chromium
     firefox
     bumblebee
  ];

but i still had both installed in my user profile:

   joachim at lenovo-t530 ~ % nix-env -q  | grep chromi
   chromium-28.0.1500.71-with-plugins
   joachim at lenovo-t530 ~ % nix-env -q  | grep fire
   firefox-22.0-with-plugins

so i removed both from my user profile yet found it broken again, as the 
system profile would install chromium without flash! WTH?!!

thanks to #nixos on irc.freenode.net i was given advice to use:

  environment.systemPackages = with pkgs; [
     chromiumWrapper
     firefoxWrapper
   ];

================ how to fix =================
so if someone has the same issue, like i had, do this:
rm -Rf ~/.pulse/*
rm -Rf ~/.config/pulse/*
rm -Rf ~/.asoundrc
nix-env -e firefox
nix-env -e chromium

add this to /etc/nixos/configuration.nix
  environment.systemPackages = with pkgs; [
     chromiumWrapper
     firefoxWrapper
   ];

do:
   nixos-rebuild switch

afterwards you should have chromium with flash installed and with some 
luck everything works out of the box ;-)


================= irc log ==================
(15:31) <   qknight> when i install 'nix-env -i chromium' as normal user 
i get chromium-31.0.1650.57-with-plugins; when i do the same
                      in /etc/nixos/configuration.nix i get a chromium 
without working flash pulugin, why?
(15:32) <  goibhniu> qknight: the attrPath is probably different
(15:32) <    shlevy> qknight: Installing by attribtue vs installing by name
(15:32) <   bennofs> qknight: nix-env -i chromium installs the package 
with the name "chromium". If you do it in configuration.nix,
                      you probably refer to the attribute name, which is 
different from the package name
(15:32) <    shlevy> qknight: you want chromiumWrapper I think



hf



More information about the nix-dev mailing list