2014年10月17日金曜日

Suspend (sleep) laptop Arch Linux

To suspend laptop simply run
$ pm-suspend
pm-suspend is pm-utils's command. You can install pm-utils by pacman.
$ pacman -S pm-utils
You can modify /etc/acpi/handler.sh to let your laptop suspend when it is closed.
reference

Enable audio on arch linux

source here
  1. install alsa-utils
  2. Run alsamixer as root
  3. Arrow right util you see four items starting with Left Speaker Mixer, and press M on all four channels to un-mute them.
  4. Arrow right some more until you find four more starting with Right Speaker Mixer and un-mute them as well.
  5. Arrow all the way back left to the Speaker channel and raise the volume a little, Keep it low (< 50ish), since alsa will let you get dangerously high for these speakers.
It seems simple but it wasn't actually.
It says un-mute Left Speaker Mixer and Right Speaker Mixer but for my HP Chromebook 11 there was no exactly "Left Speaker Mixer".
What I found was "Left SPK Mixer" and there were ten of them. Each are
  • Left SPK Mixer INA1
  • Left SPK Mixer INA2
  • Left SPK Mixer INB1
  • Left SPK Mixer INB2
  • Left SPK Mixer Left DAC1
  • Left SPK Mixer Left DAC2
  • Left SPK Mixer MIC1
  • Left SPK Mixer MIC2
  • Left SPK Mixer Right DAC1
  • Left SPK Mixer Right DAC2
These are same for Right SPK Mixer. I unmuted INB2, Left DAC1, Left DAC2, for Left SPK Mixer and INA2, INB1, INB2, Left DAC1, Left DAC2, for Right SPK Mixer. Though I didn't try thoroughly, for many other combinations speaker didn't work or keep beeping loudly.