HP Zbook Studio G4

Sound Card
Be sure to enable (snd-hda-intel) and enable the codecs.

Thunderbolt 3
Thunderbolt 3 is a hot pluggable PCIe port, with USB 3.1 support.

Should be enough.

USB
Easy, just enable xHCI.

No need to enable EHCI or OHCI. xHCI is backwards compatible already.

Wifi
Intel Corporation Wireless 8265 / 8275 does not work out of the box.

Look for the iwlwifi firmware in the lib64 directory.

The following kernel config is copied from here.

No need to enable DVM:

Hardware Wifi Button
To enable the Hardware Wifi button (no LED feedback as of yet):

SD Card slot
To enable the PCIe Card Reader:

Nvidia Optimus
Configure according to NVIDIA/Optimus & the NVidia/nvidia-drivers articles.

This is the necessary xorg configuration:

Be sure to switch the OpenGL drivers before starting X:

Intel
See the intel page for up-to-date kernel parameter instructions.

Configure xorg to use intel driver.

Rebuild changed packages.

Emerge the dated Intel HD Graphics driver.

Configure xorg file.

NVidia
First off, add  to VIDEO_CARDS in

Update packages who are influenced by the changed flags

Follow the Nvidia guide for a mostly complete overview.

Below are instructions on what to enable to be able to boot with

This configuration enables brightness control, forces full composition pipeline to decrease vsync issues and forces a dpi of 96, which could otherwise give problems in your wm with incorrect sizes of glyphs.

Bluetooth
Follow the Bluetooth article on configuring and using Bluetooth.

HP 3D Driveguard
HP 3D Driveguard is a feature of HP laptops that turn off the hard drive when the laptop is falling. To enable HP 3D Driveguard, follow the instructions of the HPfall article.

External DisplayPort monitor does not work on PCIe(Thunderbolt 3) port
When using an adapter to connect a DisplayPort monitor to the PCIe port and the monitor does not get recognized, try: Now it should work!
 * 1) Make sure the adapter is not plugged into the PCIe port;
 * 2) Disconnect the DisplayPort cable from the adapter;
 * 3) Plug the adapter into the PCIe port;
 * 4) Connect the DisplayPort cable.

Nvidia brightness control
To enable brightness control, add this line to the conf file

Screen tearing
As the browser is most frequently used: emerge with USE variable. It fixes 99% of smooth scrolling screen tearing. Really a game changer!

For other screen tearing problems, check out.

Keyboard Layout
To set the keyboard layout to Dvorak Programmer

tty
For terminal:

Graphical
For X: