laptops:gigabyte_aero_15x

Gigabyte Aero 15X

Device or feature Status Min. FreeBSD version Comments
Boot using BIOS Not tested
Boot using UEFI Works
Intel GPU (X.Org) Works 12-CURRENT Needs drm-next-kmod or drm-devel-kmod port
NVIDIA GPU (X.Org) Works
Toshiba NVMe SSD Works Included with the laptop
Samsung 960 PRO NVMe SSD Works Added to the extra m.2 slot
Network: Ethernet Works Using re(4)
Network: Wifi Works Using iwm(4)
Sound Works Needs device.hints(5) configuration
Touchpad Works 11.1-STABLE, 12-CURRENT
Suspend Works Only when using the Intel GPU
Resume Works Only when using the Intel GPU
Brightness ctrl. keys Does not work
  • Intel Core i7-7700HQ (7th generation)
  • 16 GiB DDR4-2400 (one slot occupied + one free slot)
  • 15.6” FullHD (1920×1080) display
  • GPUs:
    • Integrated GPU: Intel HD Graphics 630 (Kaby Lake)
    • Dedicated GPU: NVIDIA GeForce GTX 1070 MaxQ dedicated GPU (Optimus enabled)
  • Storage:
    • Toshiba NVMe 512 GB (THNSN5512GPU7)
    • One extra free m.2 slot
  • Network:
    • Ethernet: RealTek 8168/8111 (re(4))
    • Wifi: Intel Dual Band Wireless AC 8265 (iwm(4))
  • Elantech touchpad

There are two display output connectors:

  • HDMI (2160p at 60 Hz with HDMI 2.0 or 2160p at 30 Hz with HDMI 1.3)
  • miniDisplayPort (2160p at 60 Hz with DisplayPort 1.2)

The internal display is connected to the Intel GPU through eDP. Both output connectors are connected to the NVIDIA GPU.

JeanSébastienPédron's laptop:

  • FreeBSD 12-CURRENT installed on the Samsung 960 PRO SSD; it also works with the included Toshiba NVMe SSD.
  • Dual booting with Windows 10.
  • EVDEV_SUPPORT enabled in the kernel.
  • X.Org server configured with xf86-video-modesetting and xf86-input-libinput.

The driver to use is iwm(4). You can load the driver from /etc/rc.onf:

kld_list="iwm8265fw if_iwm"

Out-of-the-box, sound only goes to the headphones jack, even if there is nothing plugged into it, i.e. nothing comes out of the builtin speakers.

To enable the speakers, snd_hda(4) pins must be configured using device.hints(5):

# In /boot/device.hints or /boot/loader.conf.
hint.hdaa.0.nid20.config="as=1" # Speakers
hint.hdaa.0.nid33.config="as=1 seq=15" # Headphones

Node IDs nid20 and nid33 can be deduced from the output of sysctl dev.hdaa.0: look for e.g. device=Headphones conn=Jack and device=Speaker conn=Fixed in this output.

No sound on speakers after rebooting from Windows

After rebooting from Windows, there is no sound on the speakers, even with the correct pin reconfiguration. Only a cold boot fixes the issue.

This is an Elantech multitouch-capable clickpad supported by FreeBSD 11.1-STABLE+. To be specific, it needs the following patches to work properly:

The touchpad needs to be explicitely enabled, so add the following line to /boot/loader.conf:

# In /boot/loader.conf.
hw.psm.elantech_support="1"

Two drivers are available: xf86-video-modesetting (built into xorg-server) and xf86-video-intel.

xf86-video-modesetting

  1. Install drm-next-kmod to get the Intel GPU kernel driver.
  2. Load it from /etc/rc.conf:
kld_list="/boot/modules/i915kms.ko"
  1. Configure X.Org with the following snippet to put in /etc/X11/xorg.conf.d/i915.conf:
Section "Device"
	Identifier  "Card0"
	Driver      "modesetting"
	BusID       "PCI:0:2:0"

	Option      "AccelMethod" "glamor"
EndSection

Section "Module"
       Load "dri2"
       Load "glamoregl"
EndSection

Output from xrandr(1):

$ xrandr 
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 8192 x 8192
eDP-1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 344mm x 193mm
   1920x1080     60.01*+
   1400x1050     59.98  
   1280x1024     60.02  
   1280x960      60.00  
   1024x768      60.04    60.00  
   960x720       60.00  
   928x696       60.05  
   896x672       60.01  
   800x600       60.00    60.32    56.25  
   700x525       59.98  
   640x512       60.02  
   640x480       60.00    59.94  
   512x384       60.00  
   400x300       60.32    56.34  
   320x240       60.05  
DP-1 disconnected (normal left inverted right x axis y axis)

xf86-video-intel

(to be described)

The NVIDIA GeForce GTX 1070 MaxQ GPU is supported by the x11/nvidia-driver port. This port provides a kernel module (nvidia-modeset.ko), an X.Org DDX driver (nvidia), an NVIDIA-specific proprietary OpenGL/EGL/GLES implementation and a VDPAU backend module.

To use libinput and xf86-input-libinput as the input driver on X.Org:

  1. Rebuild your kernel with EVDEV_SUPPORT.
  2. Enable evdev in /etc/sysctl.conf:
# evdev support.
#   bit 0: is set enables sysmouse
#   bit 1: is set enables kbdmux
#   bit 2: is set enables ums
#   bit 3: is set enables atkbd, ukbd
kern.evdev.rcpt_mask=12
  1. Make sure the patch from D13998 is committed.
  2. Use an X.Org configuration snippet such as /etc/X11/xorg.conf.d/inputs.conf. It is probably suboptimal (too many rules) but it works.

JeanSébastienPédron says:

Out-of-the-box, I can get between 3h30 and 4 hours of battery life:

Design capacity:        6200 mAh
Last full capacity:     6200 mAh
Technology:             secondary (rechargeable)
Design voltage:         15200 mV
Capacity (warn):        620 mAh
Capacity (low):         248 mAh
Low/warn granularity:   62 mAh
Warn/full granularity:  0 mAh
Model number:           Aero 15
Serial number:           
Type:                   LI-ION
OEM info:               GIGABYTE
State:                  discharging
Remaining capacity:     88%
Remaining time:         3:26
Present rate:           1604 mA (25461 mW)
Present voltage:        15874 mV

On the go, I don't need the NVIDIA GPU (which drives the external monitor connectors) so I can turn it off. To do that, I use the sysutils/acpi_call port and the following command line:

acpi_call -p '\_SB.PCI0.PEG0.PEGP._OFF' -o i

After turning it off, the battery life almost doubles, I get between 6h30 and 7h:

Design capacity:        6200 mAh
Last full capacity:     6200 mAh
Technology:             secondary (rechargeable)
Design voltage:         15200 mV
Capacity (warn):        620 mAh
Capacity (low):         248 mAh
Low/warn granularity:   62 mAh
Warn/full granularity:  0 mAh
Model number:           Aero 15
Serial number:           
Type:                   LI-ION
OEM info:               GIGABYTE
State:                  discharging
Remaining capacity:     89%
Remaining time:         6:42
Present rate:           828 mA (13304 mW)
Present voltage:        16068 mV

The NVIDIA can even be turned on again without rebooting by using the following command:

acpi_call -p '\_SB.PCI0.PEG0.PEGP._ON' -o i

Beside configuring dumpdev and enabling ddb_enable in /etc/rc.conf as usual, you need to set two sysctls in /etc/sysctl.conf:

debug.debugger_on_panic=0
dev.drm.skip_ddb=1

After rebooting or setting them manually, you can try to run the following command to verify it's working:

sysctl debug.kdb.panic=1

If everything is fine, you should have a core dump saved during the next boot.


  • laptops/gigabyte_aero_15x.txt
  • Last modified: 2018/09/13 20:11
  • by JeanSébastienPédron