HP ProBook 645 G1

Hardware Overview


Professional-oriented, relatively inexpensive (prices start at $780) AMD APU based laptop with some nice features: VESA-standard DP port (no proprietary HDMI), legacy VGA port, four USB 3.0 ports, no discrete video card, socketed APU and RAM, 1G/s Ethernet, WiFi/Bluetooth, SD card reader, easy access to internals for maintainability, upgrade, or repair. Has some extra features like EMV smartcard reader, fingerprint sensor, and TPM support.

Boot-up and bare console behavior

Boots 12.0-CURRENT-r304729 in UEFI mode, not without some issues though (described in PR 202309). After repeated failed attempts to get native 1366×768 resolution to work, I had to fall back to 1024×768 by putting the following line into /boot/loader.rc.local file:

gop set 2

While in efifb(4) mode, laptop suspends, but resumes with black screen (keyboard and beeper work). Loading acpi_video(4) emits the following kernel messages:

acpi_video0: <ACPI video extension> on vgapci0
acpi_video0: unknown notify event 0xd0

but does not fix blank-screen-on-resume issue. Doing sysctl hw.acpi.reset_video=1 apparently makes things even worse: laptop either hangs on resume (no keyboard or beeper reaction) or simply reboots. Loading radeonkms(4) emits a bunch of info messages and two errors:

error: [drm:pidXXX:r600_ring_test] *ERROR* radeon: ring 0 test failed (scratch(0x8504)=0xCAFEDEAD)
drmn0: error: disabling GPU acceleration
error: [drm:pidXXX:r600_acpi_init] *ERROR* Cannot find a backlight controller

Quite surprisingly, after loading KMS driver (VT: replacing driver "efifb" with new "fb"), laptop suspends and resumes seemingly OK (and does it pretty fast). Loading moused(8) enables the console mouse, but pointer is not visible (yet copy-paste works) with any video driver if you forget to do vidcontrol -m on. :)

However, resume sequence emits some more warnings:

acpi0: cleared fixed power button status
ACPI Error: No handler or method for GPE 16, disabling event (20160527/evgpe-834)
drmn0: error: No VRAM object for PCIE GART.
error: [drm:pidXXX:cayman_resume] *ERROR* cayman startup failed on resume

Also, for some reason currently it seems not possible to run OpenCL programs while in X11 (reported as PR 214204).


Generally speaking, keyboard layout leaves favorable impression: Home, End, PgUp, PgDn, Ins, Del, and even Scroll Lock are accessible right away without any helper key. To get more use out of Fn key modifier, you'd have to run xev(1) to gather those keycodes and possibly remap a few of them via xmodmap(1). Note that there are some duplicates reported which makes things a bit inconsistent. E.g., Fn-Esc (unmarked) yields keycode 252 which is the same as Fn-F8 (marked as "microphone mute"). Fn-F3 (marked as "crescent") shares keycode 146 with Fn-F9 ("lower brightness"). Fn-Pause (marked as "break") yields keycode 37 which is shared with left Ctrl (keysym Control_L).

Fn-F6/F7 report keycodes 174/176 respectively, and are correctly mapped to XF86AudioLowerVolume/XF86AudioRaiseVolume keysyms by default; ditto for Fn-Insert (keysym Print). Fn-Delete (marked as "sys rq") yields keycode 92 (unmapped). That said, minimal ~/.Xmodmap might contain the following entries:

keycode 146 = XF86Sleep
! keycode 146 = XF86MonBrightnessDown
keycode 151 = XF86MonBrightnessUp
keycode 238 = XF86Display
keycode 252 = XF86AudioMicMute

ThinkWiki (just as example; there are other good resources) contains some nice recipes how to tame certain bogosities of Fn-affected keys on a laptop.

Media (SD) card reader

In OpenBSD 5.3 and NetBSD 7.0, it should be supported out of the box with the rtsx(4) driver, which had not been ported to FreeBSD yet (see PR 204521). Inserting (or removing, if it was inserted prior to booting) an SD card triggers nasty interrupt storm on irq17 and repeated kernel messages:

interrupt storm detected on "irq17:"; throttling interrupt source

According to vmstat -i, irq17 is assigned to ehci(4). Needless to say, SD card is unusable; messages are unstoppable (I've subsequently tried to cherry-pick revisions r308187, r311660, r311693, and r311727 which looked related to card insert/remove logic, made no difference). :(

EMV Smartcard reader

Should be apparently supported and work with security/opensc via standard PC/SC backend (devel/pcsc-lite), but driver initialization fails for some reason:

00000956 ccid_usb.c:612:OpenUSBByName() Found Vendor/Product: 058F/9540 (Alcor Micro AU9560)
00000023 ccid_usb.c:614:OpenUSBByName() Using USB bus/device: 2/3
04977796 ccid_usb.c:1190:ControlUSB() control failed (2/3): -4 LIBUSB_ERROR_NO_DEVICE
00000026 ccid_usb.c:1121:get_data_rates() IFD does not support GET_DATA_RATES request: -4
10041468 ccid_usb.c:783:WriteUSB() write failed (2/3): -7 LIBUSB_ERROR_TIMEOUT
04891068 ccid_usb.c:783:WriteUSB() write failed (2/3): -7 LIBUSB_ERROR_TIMEOUT
04938927 ccid_usb.c:783:WriteUSB() write failed (2/3): -7 LIBUSB_ERROR_TIMEOUT
00000027 ifdhandler.c:188:CreateChannelByNameOrChannel() failed
00006069 ccid_usb.c:189:close_libusb_if_needed() libusb_exit
00000077 readerfactory.c:1107:RFInitializeReader() Open Port 0x200000 Failed (usb:058f/9540:libusb-1.0:2:3:0)
00000010 readerfactory.c:372:RFAddReader() Alcor Micro AU9560 init failed.
00000008 readerfactory.c:605:RFRemoveReader() UnrefReader() count was: 1
00000007 readerfactory.c:1127:RFUnInitializeReader() Attempting shutdown of Alcor Micro AU9560 00 00.
00000007 readerfactory.c:988:RFUnloadReader() Unloading reader driver.

Fingerprint sensor

Stock security/libfprint and its consumers do not support sensors VFS471, VFS491, and VFS495 (our case). It is possible to get it to work under GNU/Linux, by using a wrapper that talks to Validity Sensors' proprietary components (service and library), but upstream is not interested in this approach and wants fully open source driver to be developed by someone™.

Theoretically it should be possible to get it working under FreeBSD, but I haven't tried it.

Integrated webcam

Works fine with multimedia/webcamd, simply by following this tutorial. Tested with multimedia/pwcview only because I have no need or interest in this piece of potentially dangerous hardware.


In short, it does not work, actually it does, that is, playback. Speakers are properly muted on earphones insertion. However, to get recording working, I had to issue sysctl hw.snd.default_unit=1 command, which in turn breaks playback. Very similar problem observed on HP EliteBook Folio was discussed here, including a working solution, but I didn't try to apply it myself yet. Beeper also works fine (and correctly routed to the earphones when they're plugged in).

CPU frequency scaling

Prior to r308005, this APU was not supported by cpufreq(4); if you see the following lines in the log (dmesg), update your kernel sources and rebuild the cpufreq(4) module (since it is included in GENERIC by default, unless your removed it or use custom config file, you'd probably have to rebuild entire kernel):

hwpstate0: going to fetch info from acpi_perf
hwpstate0: msr and acpi _PSS count mismatch.
hwpstate0: get_info_from_msr: AMD family 21 CPU's are not implemented yet. sorry.


APU is supported by amdtemp(4). ACPI reports five thermal zones; hw.acpi.thermal.tz0.temperature corresponds to APU (typically one degree lower than dev.amdtemp.0.core0.sensor0), while hw.acpi.thermal.tz4.temperature stays constant around 34°C.

Under sustained load, APU temperatures tend to go above 72°C; limiting maximum frequency to 1900 MHz (powerd -M 1900) allows to cap maximum temperatures around 55°C. APU undervolting is recommended to reduce power consumption (and thus heat dissipation) and increase battery life. It is possible to adjust (reprogram) P-states on this APU with AmdMsrTweaker program (available as sysutils/amdmsrtweaker port).

Battery life

There are several battery versions available for this model, per HP data sheet: from 3-cell 33 W⋅h up to 9-cell 100 W⋅h Li-ion; mine came with 6-cell 55 W⋅h one. According to specifications, new battery should provide up to 9 hours of battery life. My numbers were nowhere near: pre-installed Windows 7 reported ≈3:30 of remaining time in idle state, similar to Ubuntu 15.10. Untuned FreeBSD reported ≈2:20 when idle; under heavy load (make -j4 buildworld) estimated remaining time per acpiconf -i0 was ≈1:20.

Running powerd(8) did not have noticeable impact on autonomous life time, possibly because only four P-states are defined per ACPI, spanning 1900-3100 MHz, and/or because AMD family 15h is not being fully supported by cpufreq(4) driver yet.

CategoryLaptop CategoryMobile

Laptops/HP_ProBook_645_G1 (last edited 2017-03-22T03:17:04+0000 by AlexeyDokuchaev)