I have rebooted my machine yesterday and headphones stopped working on NixOS 17.09.
cc @fpletz @grahamc who confirm the same issue started about 1-2 weeks ago.
Kernel 4.14.15 and 4.9.78 both have the same issue.
With help of @cillianderoiste and comments in https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/1575078 I was able to fix it with a suspend (actually hibernate).
One fixes windows with a reboot
One fixes linux with suspend
WE ARE SO AGILE
Oh, I though you meant bluetooth headphones. I actually have a problem with bluetooth audio, not with headphones connected via the headphone jack. Great. \o/
Once upon a long time, some audio level gets zeroed for me mysteriously, resulting into no sound, but I could always just find the muted channel in audio mixer. (Completely unrelated to your issues, possibly.)
My headphone audio just stopped working after a reboot in 18.03.
I couldn't test the suspend workaround, because my machine didn't recover from the suspend.
Removed boot.kernelPackages = pkgs.linuxPackages_latest; from my config and rebooted, now I'm working again.
my headphone audio broke between 18.03.git.e860b65 (Impala) and 18.03.132217.c56ebaba1b0 (Impala).
I checked the volume levels (although they are getting set to zero on boot now, oddly). I also changed from the 4.14.38 kernel and tried 4.9:
boot.kernelPackages = pkgs.linuxPackages_4_9;
but it still doesn't work:
working (18.03 pre): Linux bsmith-desktop 4.9.80 #1-NixOS SMP Sat Feb 3 16:05:43 UTC 2018 x86_64 GNU/Linux broken: Linux bsmith-desktop 4.9.97 #1-NixOS SMP Sun Apr 29 09:32:03 UTC 2018 x86_64 GNU/Linux
I checked lspci and all the devices still seem to show up too.
I had the same problem yesterday.
This simple command helped in the end ...
$ alsactl restore
Thank you for your contributions.
This has been automatically marked as stale because it has had no activity for 180 days.
If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.
Here are suggestions that might help resolve this more quickly:
Most helpful comment
I had the same problem yesterday.
This simple command helped in the end ...