This is Gentoo's testing wiki. It is a non-operational environment and its textual content is outdated.

Please visit our production wiki at https://wiki.gentoo.org

HP Zbook Studio G4

From Gentoo Wiki (test)
Jump to:navigation Jump to:search
Resources

Hardware

root #lspci -k
00:00.0 Host bridge: Intel Corporation Device 5910 (rev 05)
	Subsystem: Hewlett-Packard Company Device 826b
00:02.0 VGA compatible controller: Intel Corporation Device 591b (rev 04)
	Subsystem: Hewlett-Packard Company Device 826c
	Kernel driver in use: i915
00:04.0 Signal processing controller: Intel Corporation Skylake Processor Thermal Subsystem (rev 05)
	Subsystem: Hewlett-Packard Company Skylake Processor Thermal Subsystem
00:14.0 USB controller: Intel Corporation Sunrise Point-H USB 3.0 xHCI Controller (rev 31)
	Subsystem: Hewlett-Packard Company Sunrise Point-H USB 3.0 xHCI Controller
	Kernel driver in use: xhci_hcd
00:14.2 Signal processing controller: Intel Corporation Sunrise Point-H Thermal subsystem (rev 31)
	Subsystem: Hewlett-Packard Company Sunrise Point-H Thermal subsystem
00:15.0 Signal processing controller: Intel Corporation Sunrise Point-H Serial IO I2C Controller #0 (rev 31)
	Subsystem: Hewlett-Packard Company Sunrise Point-H Serial IO I2C Controller
00:16.0 Communication controller: Intel Corporation Sunrise Point-H CSME HECI #1 (rev 31)
	Subsystem: Hewlett-Packard Company Sunrise Point-H CSME HECI
00:17.0 SATA controller: Intel Corporation Sunrise Point-H SATA controller [AHCI mode] (rev 31)
	Subsystem: Hewlett-Packard Company Sunrise Point-H SATA controller [AHCI mode]
	Kernel driver in use: ahci
00:1c.0 PCI bridge: Intel Corporation Sunrise Point-H PCI Express Root Port #1 (rev f1)
	Kernel driver in use: pcieport
00:1c.1 PCI bridge: Intel Corporation Sunrise Point-H PCI Express Root Port #2 (rev f1)
	Kernel driver in use: pcieport
00:1c.4 PCI bridge: Intel Corporation Sunrise Point-H PCI Express Root Port #5 (rev f1)
	Kernel driver in use: pcieport
00:1d.0 PCI bridge: Intel Corporation Sunrise Point-H PCI Express Root Port #9 (rev f1)
	Kernel driver in use: pcieport
00:1f.0 ISA bridge: Intel Corporation Sunrise Point-H LPC Controller (rev 31)
	Subsystem: Hewlett-Packard Company Sunrise Point-H LPC Controller
00:1f.2 Memory controller: Intel Corporation Sunrise Point-H PMC (rev 31)
	Subsystem: Hewlett-Packard Company Sunrise Point-H PMC
00:1f.3 Audio device: Intel Corporation Device a171 (rev 31)
	Subsystem: Hewlett-Packard Company Device 826b
	Kernel driver in use: snd_hda_intel
00:1f.4 SMBus: Intel Corporation Sunrise Point-H SMBus (rev 31)
	Subsystem: Hewlett-Packard Company Sunrise Point-H SMBus
	Kernel driver in use: i801_smbus
00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (2) I219-LM (rev 31)
	Subsystem: Hewlett-Packard Company Ethernet Connection (2) I219-LM
	Kernel driver in use: e1000e
01:00.0 VGA compatible controller: NVIDIA Corporation GM107GLM [Quadro M1200 Mobile] (rev a2)
        Subsystem: Hewlett-Packard Company GM107GLM [Quadro M1200 Mobile]
        Kernel driver in use: nvidia
        Kernel modules: nvidia_drm, nvidia
02:00.0 Network controller: Intel Corporation Wireless 8265 / 8275 (rev 78)
	Subsystem: Intel Corporation Wireless 8265 / 8275
	Kernel driver in use: iwlwifi
03:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS525A PCI Express Card Reader (rev 01)
	Subsystem: Hewlett-Packard Company RTS525A PCI Express Card Reader
        Kernel driver in use: rtsx_pci
6f:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller SM961/PM961
	Subsystem: Samsung Electronics Co Ltd NVMe SSD Controller SM961/PM961
	Kernel driver in use: nvme
Device Make/model Status Kernel driver(s)
CPU Intel Core i7-7700HQ Works N/A
Ethernet Intel Corporation Ethernet Connection I219-LM Works e1000e
USB Intel Corporation Sunrise Point-H USB 3.0 xHCI Controller Works xhci_hcd
Video card Intel Corporation Device 591b Works i965
Video card Nvidia Quadro M1200 Works nvidia
Wifi Intel Corporation Wireless 8265 / 8275 Works iwlwifi
Sound Card Intel Corporation Device a171 Works snd_hda_intel
Hard Drive Samsung Electronics Co Ltd NVMe SSD Controller SM961/PM961 Works nvme
Bluetooth Intel Corporation 0a2b Works N/A
Thunderbolt 3 Intel Corporation Sunrise Point-H PCI Express See troubleshooting pcieport
SD Card Slot Realtek RTS525A Works rtsx_pci


Sound Card

root #lspci | grep Audio
00:1f.3 Audio device: Intel Corporation Device a171 (rev 31)

Be sure to enable HD Audio PCI (snd-hda-intel) and enable the codecs.

KERNEL
Device Drivers --->
    <*> Sound card support
        <*> Advanced Linux Sound Architecture --->
            HD-Audio  --->
                <*> HD Audio PCI
                [*] Build Realtek HD-audio codec support
                [*] ...
                [*] Build Silicon Labs 3054 HD-modem codec support
                [*] Enable generic HD-audio codec parser
General setup --->
    [*] System V IPC

Thunderbolt 3

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

KERNEL Thunderbolt 3 Support
Bus options (PCI etc.)  --->
    [*] PCI support
    [*]   PCI Express Port Bus support
    [*]     PCI Express Hotplug driver
    [*] Support for PCI Hotplug  --->

Should be enough.

USB

Easy, just enable xHCI.

KERNEL
Device Drivers  --->
    [*] USB support  --->
        <*>     xHCI HCD (USB 3.0) support

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

Wifi

root #lspci | grep Network
02:00.0 Network controller: Intel Corporation Wireless 8265 / 8275 (rev 78)

Intel Corporation Wireless 8265 / 8275 does not work out of the box.
Look for the iwlwifi firmware in the lib64 directory.

user $ls /lib64/firmware | grep iwlwifi-8265
iwlwifi-8265-21.ucode
iwlwifi-8265-22.ucode
iwlwifi-8265-27.ucode
...
Note
If the output is empty, install sys-kernel/linux-firmware or download the driver from here
Warning
Some people experience problems connecting to a 5GHz network with iwlwifi-8265-27.ucode firmware.[1]

The following kernel config is copied from here.

KERNEL iwlwifi kernel support
Device Drivers  --->
    Generic Driver Options  --->
        -*- Userspace firmware loading support
        (iwlwifi-8265-22.ucode) External blobs to build into the kernel binary
        (/lib64/firmware) Firmware blobs root directory
    [*] Network device support  --->
        [*]   Wireless LAN  --->
            [*]   Intel devices
            <*>     Intel Wireless WiFi Next Gen AGN - Wireless-N/Advanced-N/Ultimate-N (iwlwifi)
            < >       Intel Wireless WiFi DVM Firmware support
            <*>       Intel Wireless WiFi MVM Firmware support
[*] Networking support  --->
    [*] Wireless  --->
        <*>   cfg80211 - wireless configuration API
        [*]     enable powersave by default
        <*>   Generic IEEE 802.11 Networking Stack (mac80211)
        [*]   Minstrel
        [*]     Minstrel 802.11n support

No need to enable DVM:

KERNEL
< >       Intel Wireless WiFi DVM Firmware support

Hardware Wifi Button

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

KERNEL
Device Drivers --->
    [*] X86 Platform Specific Device Drivers --->
        <M> HP wireless button

SD Card slot

To enable the PCIe Card Reader:

KERNEL
Device Drivers --->
    Multifunction device drivers --->
        <*> Realtek PCI-E card reader
    <*> MMC/SD/SDIO card support --->
        <*> Realtek PCI-E SD/MMC Card Interface Driver

Video

Nvidia Optimus

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

Note
There is no need to add nvidia to the VIDEO_CARDS variable in /etc/portage/make.conf

This is the necessary xorg configuration:

FILE /etc/X11/xorg.conf.d/20-nvidia.conf
Section "Module"
    Load "modesetting"
EndSection

Section "Device"
    Identifier "nvidia"
    Driver "nvidia"
    BusID "01:00:0"
    Option "AllowEmptyInitialConfiguration"
EndSection

Be sure to switch the OpenGL drivers before starting X:

root #eselect opengl set nvidia

Intel

See the intel page for up-to-date kernel parameter instructions.
Configure xorg to use intel driver.

FILE /etc/portage/make.conf
VIDEO_CARDS="intel i965"

Rebuild changed packages.

root #emerge -DaquN @world

Emerge the dated Intel HD Graphics driver.

root #emerge -qan x11-drivers/xf86-video-intel

Configure xorg file.

FILE /etc/X11/xorg.conf.d/10-intel.conf
Section "Device"
    Identifier "intel"
    Driver "intel"
EndSection
Warning
Be sure to keep the /etc/X11/xorg.conf.d/ directory clean! Do not have a configuration file for Nvidia optimus & Intel HD Graphics

NVidia

First off, add nvidia to VIDEO_CARDS in /etc/portage/make.conf

FILE /etc/portage/make.conf
VIDEO_CARDS="intel i960 nvidia"

Update packages who are influenced by the changed flags

root #emerge -DaquN @world

Follow the Nvidia guide for a mostly complete overview.

Important
Disable all Framebuffer devices except the EFI framebuffer. Others may interfere with the boot process, in which you'll may experience a boot freeze.[2].
Note
If you experience a GRUB freeze on boot, try rebooting using ctrl+alt+del and select UMA Graphics or Hybrid Graphics in the BIOS

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

KERNEL Linux 4.9.76-gentoo-r1
Device Drivers --->
    Graphics support --->
        Frame buffer Devices --->
            -*- Support for frame buffer devices --->
            [*] EFI-based Framebuffer Support

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.

FILE /etc/X11/xorg.conf.d/10-nvidia.conf
Section "Device"
    Identifier "nvidia"
    Driver "nvidia"
    Option "RegistryDwords" "EnableBrightnessControls=1"
EndSection

Section "Screen"
    Identifier "Screen0"
    Device "nvidia card"
    Monitor "Monitor0"
    Option "metamodes" "nvidia-auto-select +0+0 {ForceFullCompositionPipeline=On}"
EndSection

Section "Monitor"
	Identifier "Monitor0"
	Option "DPI" "96 x 96"
EndSection

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.

Troubleshooting

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:

  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.

Now it should work!

Nvidia brightness control

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

FILE /etc/X11/xorg.conf.d/10-nvidia.conf
Section "Device"
    ...
    Option "RegistryDwords" "EnableBrightnessControl=1"
EndSection

Screen tearing

As the browser is most frequently used: emerge www-client/firefox with USE variable hwaccel. It fixes 99% of smooth scrolling screen tearing. Really a game changer!

For other screen tearing problems, check out x11-misc/compton.

Keyboard Layout

To set the keyboard layout to Dvorak Programmer

tty

For terminal:

FILE /etc/conf.d/keymaps
keymap="dvorak programmer"
...

Graphical

For X:

FILE /etc/X11/xorg.conf.d/40-keyboard.conf
Section "InputClass"
    Identifier "keyboard-all"
    Driver "evdev"
    Option "XkbLayout" "us"
    Option "XkbVariant" "dvp"
    MatchIsKeyboard "on"
EndSection

References

  1. [1], Arch Linux forum thread about the 5GHz problem.
  2. [2], The thread explaining the boot hang using an nVidia GPU & the wrong kernel framebuffer configuration