Ubuntu – No sound from laptop speakers in Ubuntu 14.04 after booting into Windows 8.1

14.04alsahda-intelpulseaudiosound

I have a Dell Inspiron 15 7537.

I had installed 14.04 on it, and had no problems with the sound initially. However, like my with ethernet card, it seemed expecting to not have driver/software issues in linux was unrealistic.

I purchased an SSD for the laptop and installed Ubuntu 14.04 on that. Then, I used gparted to copy over the windows partition from the disk that came with the laptop.

Everything still worked just fine, until I booted into Windows 8.1. The sound worked fine while I was in Windows, but after rebooting the laptop, and going back into Ubuntu, the sound stopped working through the internal laptop speakers.

I noticed however, that I was still able to use my headphones to receive sound while in Ubuntu.

From here on, I could boot into Windows 8.1 to receive sound through the internal speakers, but I could no longer get the sound to work again in Ubuntu 14.04 unless using headphones.

I decided to experiment, so I completely wiped the disk, and did a fresh install of Ubuntu 14.04. The sound was back! I then again proceeded to copy over my windows partition. Again, after booting into Windows 8.1, and then coming back to Ubuntu, my internal speakers would no longer produce sound.

I have tried the most common solutions like:

sudo apt-get remove --purge alsa-base pulseaudio
sudo apt-get install alsa-base pulseaudio unity-control-center
sudo alsa force-reload

or

pulseaudio -k

I have also tried making sure that nothing was muted in alsamixer. I have also tried installing the pulse audio volume control tool. If I have a song playing, I can see the audio levels moving for the internal speakers, as if it should be playing.

The pulse audio volume control tool also shows my HDMI card was a sound device, but it recognizes it as off.

It may be worth noting that in alsamixer, the application seems to recognize my PCH/output card as the secondary card, and the HDMI as the first. However, this has always been the case, so I am not sure that is the problem.

I don't know a lot about how this is all engineered, but in my understanding I am having a hard time gathering how booting into another OS could stop the speakers from working in another.

What can I do to restore sound to my system, and determine why booting into windows causes this behaviour? I would very much like to use a dual boot system.

lspci -v output:

00:00.0 Host bridge: Intel Corporation Haswell-ULT DRAM Controller (rev 09)
    Subsystem: Dell Device 05f9
    Flags: bus master, fast devsel, latency 0
    Capabilities: <access denied>

00:02.0 VGA compatible controller: Intel Corporation Haswell-ULT Integrated Graphics Controller (rev 09) (prog-if 00 [VGA controller])
    Subsystem: Dell Device 05fa
    Flags: bus master, fast devsel, latency 0, IRQ 60
    Memory at e3000000 (64-bit, non-prefetchable) [size=4M]
    Memory at c0000000 (64-bit, prefetchable) [size=256M]
    I/O ports at 5000 [size=64]
    Expansion ROM at <unassigned> [disabled]
    Capabilities: <access denied>
    Kernel driver in use: i915

00:03.0 Audio device: Intel Corporation Haswell-ULT HD Audio Controller (rev 09)
    Subsystem: Dell Device 05f9
    Flags: bus master, fast devsel, latency 0, IRQ 63
    Memory at e3610000 (64-bit, non-prefetchable) [size=16K]
    Capabilities: <access denied>
    Kernel driver in use: snd_hda_intel

00:14.0 USB controller: Intel Corporation Lynx Point-LP USB xHCI HC (rev 04) (prog-if 30 [XHCI])
    Subsystem: Dell Device 05f9
    Flags: bus master, medium devsel, latency 0, IRQ 56
    Memory at e3600000 (64-bit, non-prefetchable) [size=64K]
    Capabilities: <access denied>
    Kernel driver in use: xhci_hcd

00:16.0 Communication controller: Intel Corporation Lynx Point-LP HECI #0 (rev 04)
    Subsystem: Dell Device 05f9
    Flags: bus master, fast devsel, latency 0, IRQ 61
    Memory at e3619000 (64-bit, non-prefetchable) [size=32]
    Capabilities: <access denied>
    Kernel driver in use: mei_me

00:1b.0 Audio device: Intel Corporation Lynx Point-LP HD Audio Controller (rev 04)
    Subsystem: Dell Device 05f9
    Flags: bus master, fast devsel, latency 0, IRQ 62
    Memory at e3614000 (64-bit, non-prefetchable) [size=16K]
    Capabilities: <access denied>
    Kernel driver in use: snd_hda_intel

00:1c.0 PCI bridge: Intel Corporation Lynx Point-LP PCI Express Root Port 1 (rev e4) (prog-if 00 [Normal decode])
    Flags: bus master, fast devsel, latency 0
    Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
    Capabilities: <access denied>
    Kernel driver in use: pcieport

00:1c.2 PCI bridge: Intel Corporation Lynx Point-LP PCI Express Root Port 3 (rev e4) (prog-if 00 [Normal decode])
    Flags: bus master, fast devsel, latency 0
    Bus: primary=00, secondary=02, subordinate=02, sec-latency=0
    Memory behind bridge: e3500000-e35fffff
    Capabilities: <access denied>
    Kernel driver in use: pcieport

00:1c.3 PCI bridge: Intel Corporation Lynx Point-LP PCI Express Root Port 4 (rev e4) (prog-if 00 [Normal decode])
    Flags: bus master, fast devsel, latency 0
    Bus: primary=00, secondary=03, subordinate=03, sec-latency=0
    I/O behind bridge: 00004000-00004fff
    Memory behind bridge: e3400000-e34fffff
    Prefetchable memory behind bridge: 00000000bfb00000-00000000bfbfffff
    Capabilities: <access denied>
    Kernel driver in use: pcieport

00:1c.4 PCI bridge: Intel Corporation Lynx Point-LP PCI Express Root Port 5 (rev e4) (prog-if 00 [Normal decode])
    Flags: bus master, fast devsel, latency 0
    Bus: primary=00, secondary=04, subordinate=04, sec-latency=0
    I/O behind bridge: 00003000-00003fff
    Memory behind bridge: e2000000-e2ffffff
    Prefetchable memory behind bridge: 00000000d0000000-00000000e1ffffff
    Capabilities: <access denied>
    Kernel driver in use: pcieport

00:1d.0 USB controller: Intel Corporation Lynx Point-LP USB EHCI #1 (rev 04) (prog-if 20 [EHCI])
    Subsystem: Dell Device 05f9
    Flags: bus master, medium devsel, latency 0, IRQ 23
    Memory at e361d000 (32-bit, non-prefetchable) [size=1K]
    Capabilities: <access denied>
    Kernel driver in use: ehci-pci

00:1f.0 ISA bridge: Intel Corporation Lynx Point-LP LPC Controller (rev 04)
    Subsystem: Dell Device 05f9
    Flags: bus master, medium devsel, latency 0
    Capabilities: <access denied>
    Kernel driver in use: lpc_ich

00:1f.2 SATA controller: Intel Corporation Lynx Point-LP SATA Controller 1 [AHCI mode] (rev 04) (prog-if 01 [AHCI 1.0])
    Subsystem: Dell Device 05f9
    Flags: bus master, 66MHz, medium devsel, latency 0, IRQ 59
    I/O ports at 5088 [size=8]
    I/O ports at 5094 [size=4]
    I/O ports at 5080 [size=8]
    I/O ports at 5090 [size=4]
    I/O ports at 5060 [size=32]
    Memory at e361c000 (32-bit, non-prefetchable) [size=2K]
    Capabilities: <access denied>
    Kernel driver in use: ahci

00:1f.3 SMBus: Intel Corporation Lynx Point-LP SMBus Controller (rev 04)
    Subsystem: Dell Device 05f9
    Flags: medium devsel, IRQ 255
    Memory at e3618000 (64-bit, non-prefetchable) [size=256]
    I/O ports at efa0 [size=32]

02:00.0 Network controller: Intel Corporation Wireless 7260 (rev 73)
    Subsystem: Intel Corporation Dual Band Wireless-N 7260
    Flags: bus master, fast devsel, latency 0, IRQ 64
    Memory at e3500000 (64-bit, non-prefetchable) [size=8K]
    Capabilities: <access denied>
    Kernel driver in use: iwlwifi

03:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. Device 5287 (rev 01)
    Subsystem: Dell Device 05f9
    Flags: bus master, fast devsel, latency 0, IRQ 57
    Memory at e3405000 (32-bit, non-prefetchable) [size=4K]
    Expansion ROM at bfb00000 [disabled] [size=64K]
    Capabilities: <access denied>
    Kernel driver in use: rtsx_pci

03:00.1 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 12)
    Subsystem: Dell Device 05f9
    Flags: bus master, fast devsel, latency 0, IRQ 58
    I/O ports at 4000 [size=256]
    Memory at e3404000 (64-bit, non-prefetchable) [size=4K]
    Memory at e3400000 (64-bit, non-prefetchable) [size=16K]
    Capabilities: <access denied>
    Kernel driver in use: r8168

04:00.0 3D controller: NVIDIA Corporation GK107M [GeForce GT 750M] (rev ff) (prog-if ff)
    !!! Unknown header type 7f

/etc/modprobe.d/alsa-base.conf contents:

# autoloader aliases
install sound-slot-0 /sbin/modprobe snd-card-0
install sound-slot-1 /sbin/modprobe snd-card-1
install sound-slot-2 /sbin/modprobe snd-card-2
install sound-slot-3 /sbin/modprobe snd-card-3
install sound-slot-4 /sbin/modprobe snd-card-4
install sound-slot-5 /sbin/modprobe snd-card-5
install sound-slot-6 /sbin/modprobe snd-card-6
install sound-slot-7 /sbin/modprobe snd-card-7

# Cause optional modules to be loaded above generic modules
install snd /sbin/modprobe --ignore-install snd $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-ioctl32 ; /sbin/modprobe --quiet --use-blacklist snd-seq ; }
#
# Workaround at bug #499695 (reverted in Ubuntu see LP #319505)
install snd-pcm /sbin/modprobe --ignore-install snd-pcm $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-pcm-oss ; : ; }
install snd-mixer /sbin/modprobe --ignore-install snd-mixer $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-mixer-oss ; : ; }
install snd-seq /sbin/modprobe --ignore-install snd-seq $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-seq-midi ; /sbin/modprobe --quiet --use-blacklist snd-seq-oss ; : ; }
#
install snd-rawmidi /sbin/modprobe --ignore-install snd-rawmidi $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-seq-midi ; : ; }
# Cause optional modules to be loaded above sound card driver modules
install snd-emu10k1 /sbin/modprobe --ignore-install snd-emu10k1 $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-emu10k1-synth ; }
install snd-via82xx /sbin/modprobe --ignore-install snd-via82xx $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-seq ; }

# Load saa7134-alsa instead of saa7134 (which gets dragged in by it anyway)
install saa7134 /sbin/modprobe --ignore-install saa7134 $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist saa7134-alsa ; : ; }
# Prevent abnormal drivers from grabbing index 0
options bt87x index=-2
options cx88_alsa index=-2
options saa7134-alsa index=-2
options snd-atiixp-modem index=-2
options snd-intel8x0m index=-2
options snd-via82xx-modem index=-2
options snd-usb-audio index=-2
options snd-usb-caiaq index=-2
options snd-usb-ua101 index=-2
options snd-usb-us122l index=-2
options snd-usb-usx2y index=-2
# Ubuntu #62691, enable MPU for snd-cmipci
options snd-cmipci mpu_port=0x330 fm_port=0x388
# Keep snd-pcsp from being loaded as first soundcard
options snd-pcsp index=-2
# Keep snd-usb-audio from beeing loaded as first soundcard
options snd-usb-audio index=-2

Best Answer

Windows 8 includes a new feature called "Hybrid Shutdown" or "Fast Boot". This process is described in the article "How Windows 8 Hybrid Shutdown / Fast Boot feature works". Basically, on shutdown Windows kills all the user processes, and then hibernates the kernel to disk. It does this to speed up the shutdown and boot up process. Killing all of the user processes is faster than hibernating them to disk, and restoring a hibernated kernel is faster than a fresh boot of the kernel.

Linux users are advised to turn off "Hybrid Shutdown / Fast Boot", otherwise they will be unable to mount NTFS filesystems (because the current state of the NTFS filesystem is not stored on the NTFS partition, but held in the hibernated kernel memory). From this question it also seems that it can interfere with device initialisation - probably by putting the device into a sleep state from which it does not awake when a normal boot process is carried out.

Related Question