I recently sent my HP Pavilion Dv7 laptop back to the HP repair service while it was still under warranty due to what I think was a loose connector or cable between the graphics chip and the LCD screen, causing flickering colors when the screen was moved. This would happen at the BIOS, in the bootloader, and in both Windows and GNU/Linux, so I'm confident it was a hardware problem. (This exact problem had happened before, and I had sent it back to be fixed; the problem started happening again several months later and had been getting steadily worse.) Ever helpful, HP again fixed the problem and this time additionally decided to wipe my hard drive to the factory state.
Luckily, I had backed up all my important files, so nothing was lost. It did, however, give me the opportunity to install Debian again, and try to work out some annoyances I had had before.
On Windows, the Dv7 has a very nice sound (for laptop speakers) due to Beats Audio auxiliary speakers—a subwoofer in the back and extra speakers in the front that complement
In fact, it's quite easy to enable this on Debian (it's not enabled by default, because the default configuration uses the BIOS to detect what pin configuration to use, which erroneously reports the wrong one). Following the process in comment 8 on this thread on the Ubuntu Forums, you can easily turn the Beats Audio speakers on. That process is:
- Open the file /etc/modprobe.d/alsa-base.conf.
- Append the line options snd-hda-intel model=ref.
- Reboot and test.
The subwoofer now automatically starts up. There will be a warning from ALSA during the system boot about trying to load the mixer properties from the old configuration; this is safe to ignore.
There is an additional problem, though: although the normal speakers turn off when headphones are plugged into the computer, the subwoofer stays on, defeating the purpose of the headphones. As was suggested in the thread, I tested with other models (I have the same codec, but I checked using the list in the ALSA distribution) to no avail.
The solution is a very ugly hack. If someone knows how to do this correctly, please alert me. Here's what I did.
Playing around with the ALSA HDA Analyzer, I found that pin 0x10 controls the Beats Audio speakers. Using the Python script output of the analyzer, I wrote a script and hooked it up to the acpid event handler. Whenever the headphones are plugged in or unplugged, the script is run. I've put the script and configuration file in a Git repository. To configure, put the headphones file in the /etc/acpi/events/ directory and put the headphones.py file in the /etc/acpi/ directory and make it executable.
The folder in the repository is here.
After a reboot, this should work. I've tested it with multiple headphones in at once, plugged in a and unplugged in different orders, with suspending and changing headphones while suspended, and it seems to work. The only problem is booting up with headphones in. To make it work, just unplug and replug the headphones.
I'm going to file a report to the ALSA Project, but their bug reporter appears to be down right now.
Wifi after Suspend-to-RAM
I also had difficulty getting my wifi driver, iwlwifi, to allow me to reconnect after Suspend-to-RAM. After being connected to a network and closing the lid of the laptop and causing the laptop to suspend, NetworkManager would loose the ability to connect to any network. It would detect the networks that were in the area, but when trying to connect, it would fail to authenticate and prompt me for different authentication information. After a reboot, NetworkManager would again connect correctly. I had figured this out before but forgot to write down how I did, so for future reference, these are the steps I followed (see comment 27 on this Launchpad bug):
- Create a new file /etc/modprobe.d/iwlwifi.conf.
- Enter the line options iwlwifi bt_coex_active=0 and save. (I recall this line disabling something with Bluetooth, which I don't use (I'm not sure if my model even has Bluetooth hardware), so research that further if you do use Bluetooth.)
- Reboot and test.
Even after a suspend, I was able to connect to wireless networks.
Out of the box, I wasn't able to change the LCD screen backlight via the hotkeys that share the same space as F2 and F3. This was another problem I had fixed and never written down. Luckily, though, the solution was only a few search results away, on comment 27 on this Launchpad bug:
- Open your /etc/default/grub.
- Add acpi_backlight=vendor to the GRUB_CMDLINE_LINUX_DEFAULT line.
- Reboot and test.
An annoyance of mine is that there seems to be no way to have the backlight automatically change power when the AC cable is plugged in versus when it is not on GNOME 3. It seems that it's possible to do this with either pm-utils or with acpid (or with both). I'll post again if I get this to work.