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):

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 should be a sufficient xorg configuration to correctly.

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

KDE
Go to:

System Settings -> Display and Monitor -> Compositor Next, go to:
 * Set Tearing prevention ("vsync") to
 * Leave Allow applications to block compositing unchecked

Nvidia X Server Setting -> Your screen This should give you an experience equal to Windows
 * Check Force Full Composition Pipeline
 * Check Force Composition Pipeline

Intel
If the intel driver does give vsync problems, install the package.

Run the compton daemon

Keyboard Layout
To set the keyboard layout to Dvorak Programmer

tty
For terminal:

Graphical
For X: