Laptop Tweaks


Do not shut down display when lid is closed

How to keep external display devices going while your laptop/notebook's lid is closed.

In file /etc/elogind/logind.conf set

 HandleLidSwitch=ignore

On systems pre-elogind / acpi:

 Have a look at /etc/acpi/events/lidbtn


HDMI and audio output

On Laptops that are running plain ALSA and are configured for analogue audio (AKA internal speakers / headphone jack) but occasionally need to output via HDMI. Most GUI video players probably have an option set the output device.

To find the card and device of the HDMI output run aplay -l | grep HDMI.

 card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]

This translates to 3rd device on card 0: plughw=0.3

Depending on ones graphics hardware the output might differ:

 card 0: HDMI [HDA Intel HDMI], device 3: HDMI 0 [HDMI 0]
 card 0: HDMI [HDA Intel HDMI], device 7: HDMI 1 [HDMI 1]
 card 0: HDMI [HDA Intel HDMI], device 8: HDMI 2 [HDMI 2]

In that case one has give all three a trial to find the proper one. Unfortunately sometimes the device numbers change. (In case someone has a solution to prevent that, please report! (See below))

Non-GUI movie players require a command line option, for mplayer and mpv that'd be:

 -ao alsa:device=plughw=0.3

Creating an alias in ~/.bashrc (/.bash_aliases) does help:

 alias hdmi-mplayer='mplayer -ao alsa:device=plughw=0.3'