💾 Archived View for thfr.info › openbsd › OpenBSD-on-Asus-ExpertBook-B9400CEA › index.gmi captured on 2023-11-14 at 07:49:36. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2023-01-29)
-=-=-=-=-=-=-
Article Update Information:
I still remember my first encounters with the *BSDs. This was in 2013, and everything seemed strange, unusual, difficult compared to my prior experiences with Windows and Ubuntu. Installing it on a computer was daunting and took me a while to figure out how to write the USB install drive, set things up, get drivers and software to work...
Fast-forward to 2021 and by now installing OpenBSD on a new machine and the previously difficulty and challenge have given way to more excitement to try out new hardware and push the limits of what OpenBSD can do and what it runs on.
It's hard to deny that in recent years, more and more Asus products have been accumulating in my household. Besides this laptop, I use a 30" Asus FreeSync monitor. I'm also quite fond of the (in my opinion severely overlooked) Asus Zenfone 8.
The Asus Expertbook B9400CEA is an interesting proposition. It is marketed as a "business laptop" (whatever that means - mostly that it's not a gaming device without dedicated GPU). Intel Tiger Lake i7 quad core CPU, 2 Thunderbolt connectors, 1080p display, and long battery life all make this fairly future proof both with and without OpenBSD. However, it wasn't until I found out that there is a secondary hard drive (NVME) slot that I realized this might be a good laptop for my needs - that is to both run Windows and OpenBSD as needed, and ideally without the hassle of a multiboot setup.
There are several models called "ExpertBook B9" with somewhat confusing nomenclature. For example, my laptop is referred to as model B9400 in some, and B9450 in other places. In any case, this is the version withe i7-1165G7 CPU and 16GB RAM.
Of note, there is still work to be done for Intel 11th gen hardware like this one, and I will touch on some of the issues elsewhere in this write-up.
The overall design is very sleek, with a low profile and a (comparatively) big screen. It is 15mm thin. The case itself is matte, with a slightly coarse texture that makes it easy to grip the laptop.
The screen has a matte finish which I prefer tremendously over glossy displays... I've never seen the appeal in the latter; they only make things exceptionally difficulty in outdoor lighting conditions. I find it hard to see any justification other than they may look more "premium" on store shelves.
Screen resolution is 1920x1080 which to me hits the sweet spot between cost and visual quality. While laptops with higher resolution at this form factor exist, I am doubtful about the true benefit of such high DPI. Colors are bright and vivid. While I haven't done any comparisons, the overall impression is that the screen can compete with other high-quality panels.
One thing I really like is that the ventilation is done via a grill on back of the main laptop, between the hinges of the screen. It's so simple, yet something where I now wonder how I've never seen this before on any other laptop. Usually, the hot air is vented on either right or left side... and depending on whether you are right- or left-handed, you have a 50% chance that your brand-new laptop will blow hot air on your mousehand if you use an external pointing device next to the laptop.
Speaking of pointing devices, the touchpad is nice and large... So large indeed that it is relatively common for me to accidentally press the touchpad with my right palm. A minor annoyance, and I recall that at least some operating systems have some workarounds if needed. One nice feature on Windows is that pressing a little calculator picture on the upper right corner of the touchpad turns it into a numberpad. Unfortunately, this seems to require kernel support and doesn't work on OpenBSD at this point.
Probably the biggest downside I can identify is the poorly designed and positioned power button. It has gthe same size as other buttons and is positioned just above Backspace, and just right to Delete... Two very commonly used keys for touch typists - and the power button waiting to be pressed accidentally and shut down your work right next to them! The button is slightly smoother than the others and a light is on when the computer is in use, but not enough to deter accidental presses.
Fortunately, practically all operating systems including OpenBSD allow modifying the function of the power button, including setting it to not do anything. And that is exactly what I did on OpenBSD, by setting the following in sysctl.conf(5):
machdep.pwraction=0
A few words on the keyboard itself: Typing on a keyboard is a relatively subjective experience and my overall feelings with this keyboard are that it is "okay", or "serviceable". This may have some to do with the thin design. The keys are "chiclet style" with decent travel for the thinness of the laptop. My main comparisons are a mechanical keyboard and the keyboard of the Thinkpad X395. The ExperBook's keyboard is a far cry from any mechanical keyboard in terms of feel, and the "travel" of the keys is noticeably less than with the Thinkpad. The keys are still overall responsive and haven't cause any problems with prolonged typing, like with this article here.
Asus claims that the laptop is of "military-grade" build quality and there are some people who reportedly stood or sat on it without causing damage.
The laptop is very light at less than 2 lbs/1 kg. It comes with a sleeve to protect and transport the laptop in that looks like a briefcase. While the look is elegant, the tactile feel is a little "off", with a slightly rough, leather-inspired but clearly not leather surface. There is also no space for any accessories, except for maybe a pair of earphones.
The laptop comes equipped with 1x USB type A on the right and 2x USB type C/Thunderbold ports on the left. Either one of the latter can be used to charge the laptop with the included USB type C charger. There is also a 3.5mm combi headphone/microphone jack on the right (currently not working on OpenBSD), as well as an HDMI and a mini-HDMI port on the left. The laptop comes with an included dongle adapter for ethernet that can be plugged into the mini-HDMI port.
The BIOS is a graphical Asus BIOS with mouse support. I'm one of those who misses the era of text-based BIOS menus. I also like seeing the BIOS/firmware POST messages, but no luck with this device. All you get to see is a big Asus logo on boot.
You can enter the BIOS by pressing F2 during boot. Of note, there is no key that I could identify that takes you directly to a boot menu. If you want to boot from your secondary drive, you always need to press F2 to get into the BIOS, then F8 to pull up the boot menu there.
I have updated the BIOS to version 304 from July 2021 (via Windows).
As is the case with many other modern laptops/motherboards, you can't boot OpenBSD without disabling Fastboot, Secureboot, and VMD hard drive mode.
The BIOS clock is best set to UTC time; letting the operating system make the necessary adjustments based on the timezone. Note with Windows, a registry entry needs to be added to make it use the hardware clock as UTC:
OpenBSD FAQ on time zones and UTC
After updating the BIOS/firmware and making the above-mentioned adjustments to the BIOS, I created a USB install drive with Win32 Disk Imager on Windows.
As mentioned above, the second NVME drive slot was one of the deciding reasons for me to buy this laptop, so I plugged in a 2TB drive for all things OpenBSD.
Prior to installation, I set up softraid(4) disk encryption. Just escape out of the installer to do that as described very well in the FAQ:
OpenBSD FAQ 14: Setting up Full-Disk Encryption
Installation was uncomplicated - just follow the time-tested OpenBSD installer prompts, pick the right hard drive (otherwise bye bye Windows), adjust the partition layout if desired, and create root password and your first user login. I always enable xenodm as I spend most of my time in X11, and I enable sshd by default, so that I can log in from a different machine if something goes wrong and I lose screen output and/or input processing from the keyboard driver.
The default OpenBSD partition layout is designed to work for most out of the box, but I usually make some small adjustments. For one, I tend to increase partition sizes if I have plenty of space like with this 2TB drive - at least for the /usr/local partition, as I tend to fill that one up easily. With my ports work, I also need a separate partition for /usr/ports - mainly so that it can be set to `wxallowed` which is needed for building some ports.
Here the final size of my partitions via disklabel(1):
16 partitions: # size offset fstype [fsize bsize cpg] a: 1.0G 1024 4.2BSD 2048 16384 12960 # / b: 15.9G 2098176 swap # none c: 1907.7G 0 unused d: 20.0G 35484320 4.2BSD 2048 16384 12960 # /tmp e: 35.0G 77433280 4.2BSD 2048 16384 12960 # /var f: 7.0G 150834272 4.2BSD 2048 16384 12960 # /usr g: 2.0G 165517664 4.2BSD 2048 16384 12960 # /usr/X11R6 h: 50.0G 169726720 4.2BSD 2048 16384 12960 # /usr/local i: 0.0G 64 MSDOS j: 3.0G 274599040 4.2BSD 2048 16384 12960 # /usr/src k: 8.0G 280896512 4.2BSD 2048 16384 12960 # /usr/obj l: 40.0G 297684448 4.2BSD 2048 16384 12960 # /usr/ports m: 1600.0G 381575936 4.2BSD 8192 65536 52270 # /home
Windows USB boot drive creation tool
Compared same-disk multibooting, using two separate drives for separate operating systems is much cleaner and less likely to break with (Windows) updates or (other) bootloader corruption. The main thing I have done for it is setting BIOS time to UTC and teaching Windows about it (see above). As previously mentioned, I have to press F2 during boot to get into the BIOS, followed by F8 for the boot menu.
You'd think that this approach should be relatively hassle-free, but it seems that some times "warm" reboots from one operating system into the other lead to some hard-to-pin-down problems. For example lately, I have had instances where the power button light would turn on, but not the screen - and sometimes eventually ending up on a Windows screen later on for no clear reason. I suspect something about suspending/sleep/stand-by leads to issues. Since then, I have made it a point to always shutting down the computer and leaving it turned off for some 20-30 seconds at least rather than rebooting directly when switching operating systems. This way, the issues hasn't recurred lately (fingers crossed).
Same-disk multibooting with Windows 10 (or other operating systems) is possible and I have it set up on another laptop.
After the uneventful OpenBSD installation, I was surprised to encounter some odd problems initially:
dmesg showing wrong CPU speed and dwiic2 timeouts
Interestingly, this didn't seem to occur if I first booted into bsd.rd before booting regularly.
Fortunately, this problem has disappeared with the snapshot from 2021-09-04 and hasn't recurred. I suspect the patch by kettenis@ that fixed CPU clock speed with earlier TSC was the main contributor.
Tiger Lake TSC clock speed commit
One of the first things I do with a new machine is setting up doas.conf(5). In this case, I just copied the example file into /etc/ and uncommented permissions for both :wsrc and :wheel.
In preparation for ports work, I created the following /etc/mk.conf:
SUDO=/usr/bin/doas FETCH_PACKAGES=-Dsnap
On laptop more than desktops, I like to set up apmd(8) early to do automatic performance adjustment (saves some battery life) and suspend or hibernate automatically at low battery levels - to avoid running out of battery accidentally and not shutting down properly then.
$ rcctl get apmd flags -A -z 15
This is how it is currently set, but given the problems with suspend, I might adjust it to `-Z 10`.
Regarding battery life: I haven't done any formal testing, but I can easily work for several hours on the laptop with a full battery charge without dropping to less than 20-25%. It seems to me to be the best compared to any previous laptop with OpenBSD. This is all the more impressive given how small and leightweight this machine is.
There are many options to transfer files between two computers. The most convenient is probably to synchronize via cloud storage, but I have too many concerns about the confidentiality of this approach.
The main directories that I need to resume my work on the new computer are:
Consequently, I ended up with 3 different approaches. I edited configuration files (/etc/) by hand, given the small number and size of those adjustments. Ports were transferred via scp(1) after a restore(1) of a dump(1) of the /usr/ports partition led to some chaotic results (to be investigated). Fortunately, no such issues happened with dump(1) of the home partition to a gzip(1)'d file on a large external USB drive, followed by restore(1). This last step took about 8-10 hours each for dump and restore, in part due to the known slowness of USB-mounted drives.
Here are some sample commands for dump and restore like what I used:
# mount /dev/sdXa /mnt # replace X with the appropriate number for your external drive # /sbin/dump -0auf - /dev/rsd2m | gzip -9 > /mnt/backup.gz # # ... switch to machine to restore to and mount the same drive again ... # umoung /home # newfs /dev/rsd2m # CAUTION! DESTRUCTIVE OPERATION! Deletes everything on this partition! # mount /home # cd /home # gzcat /mnt/backup.gz | restore -rvf -
I mainly work on ports, but sometimes also on src. That's why I set up files for both on all my OpenBSD machines, usually also xenocara. The best resource for that is FAQ 5, and I consult the AnonCVS page to find the CVSROOT of the closest CVS mirror. If you want to do it yourself, just follow FAQ 5. This will guide you through setting up correct ownership of /usr/{ports,src,xenocara} and obtaining source. If you work on source, I suggest you consult release(8).
FAQ 5: Building the System from Source
In order to be able to run build commands (except for `make install`) without root, I had to add myself to wobj group:
# user mod -G wobj thfr
After the initial issues with performance until the 2021-09-04 snapshot, the laptop has been working well for my needs with some lesser issues remaining that I can mostly work around. I will discuss issues that you may be curious about.
The integrated WiFi card attaches to the iwx(4) driver and works quite well most of the time (sic). The iwx driver is relatively new and work is still being done on it. I get fast internet and respectable speeds mosts of the time, but every now and then, the WiFi performance tanks.
Here is speedtest-cli from ports when everything is working well:
$ speedtest-cli Retrieving speedtest.net configuration... Testing from Spectrum (69.144.225.21)... Retrieving speedtest.net server list... Selecting best server based on ping... Hosted by Fort Hays State Univ (Hays, KS) [1343.78 km]: 220.206 ms Testing download speed................................................................................ Download: 20.58 Mbit/s Testing upload speed...................................................................................................... Upload: 6.16 Mbit/s
The occasional dips in performance seem to last only a minute at most. While annoying, they are hardly a dealbreaker at this point. We will see if further improvements to the iwx driver will solve this issue.
Ethernet is unfortunately a bigger problem and downloads via em(4) are pretty unreliable.
Audio playback works well with the integrated speakers. I can't speak much to the quality - probably decent for a tiny laptop like this. I mostly use headphones/earbuds anyway.
While it's great that this is a laptop that still has a 3.5mm combi jack, this part doesn't produce any output so far. mixerctl(1) shows `outputs.hp_sense=plugged` when the headphone is plugged in, but unfortunately to date I haven't had any audio output from it.
Fortunately, my USB wireless earbuds work well. I use EPOS GTW 270 Hybrid earbuds via the included USB-C dongle. This already worked well on my desktop and is still a pleasure to use with this laptop. This is a special low-latency dongle that has noticeably less lag than a standard Bluetooth dongle like the Creative BT-W3 that jcs@ reviewed in 2020. Lower latency is more important in my case when testing games on OpenBSD where lower latency makes a huge difference in the experience and enjoyability.
jcs@'s experience with Creative BT-W3
There are some lesser issues with the USB audio. If the GTW 270 is plugged into the USB-C port on boot, it isn't recognized or loaded from there afterwards. I work around this by unplugging the dongle on shutdown/reboot.
The other issue is that after boot, it takes a couple of minutes after inserting the GTW 270 in the USB-C port until it is ready to work, while the kernel reports a device problem with uhub1:
[...] uhub1: device problem, disabling port 3 uhub1: device problem, disabling port 3 [...] uhub1: device problem, disabling port 3 uhub1: device problem, disabling port 3 uhub1: device problem, disabling port 3 uhub1: device problem, disabling port 3 uaudio0 at uhub1 port 3 configuration 1 interface 1 "Sennheiser EPOS GSA 70S" rev 2.00/3.03 addr 5 uaudio0: class v1, full-speed, sync, channels: 2 play, 0 rec, 0 ctls audio1 at uaudio0 uhidev4 at uhub1 port 3 configuration 1 interface 2 "Sennheiser EPOS GSA 70S" rev 2.00/3.03 addr 5 uhidev4: iclass 3/0, 5 report ids uhid10 at uhidev4 reportid 1: input=106, output=106, feature=0 ucc1 at uhidev4 reportid 4: 8 usages, 4 keys, enum [...]
Fortunately, everything works pretty much flawlessly as soon as as the "device problem" messages are over.
None of the microphones of either 3.5mm audio jack or webcam are recognized at the moment (the webcam video recording works, however).
I have set up sndiod(8) to use the USB audio (rsnd/1) if available, and to also provide a monitoring stream (snd/0.mon):
$ rcctl get sndiod flags -f rsnd/0 -s default -m play,mon -s mon -F rsnd/1
Finally, I would like to share the output of sndioctl(1) and mixerctl(1).
$ sndioctl output.level=1.000 server.device=1
# mixerctl inputs.dac-2:3=126,126 inputs.dac-0:1=126,126 outputs.spkr_source=dac-2:3 outputs.spkr_mute=off outputs.spkr_boost=off outputs.spkr_eapd=on outputs.hp_source=dac-0:1 outputs.hp_mute=off outputs.hp_boost=off outputs.hp_eapd=on outputs.hp_sense=unplugged outputs.spkr_muters=hp outputs.master=126,126 outputs.master.mute=off outputs.master.slaves=dac-2:3,dac-0:1,spkr,hp record.enable=sysctl
The CPU comes with an integrated Intel Xe Graphics GPU. This worked out of the box and hasn't given me any grief to date. After checking that glxgears(1) worked, I quickly went on to try 0 A.D., vkQuake, as well as many FNA and Godot games. Both OpenGL and Vulkan are working as expected. I don't have any benchmark comparisons with the Intel UHD 630 in my desktop, but the performance "feels" comparable, possible a little faster.
Of note, the fan is audible when you stress the computer. This is not a silent laptop under load. I personally don't have a problem with hearing the laptop fan, but I know some people do...
The more demanding games that I tested include 0 A.D., Cryptark (including Vulkan backend), and the recently released indie hit Cruelty Squad that was made with the Godot engine. The latter will need an addition to the Godot port in the form of the "GodotSteam" module. This will likely be added some time after OpenBSD 7.0 release.
I have made ample use of my ffmpeg wrapper script fauxstream in the past, to both record and stream games running on OpenBSD.
https://github.com/rfht/fauxstream
Unfortunately, the ethernet em(4) connection quality is not suitable for streaming. And regarding iwx(4), in my experience, WiFi hasn't been suitable for streaming because of bandwidth fluctuations. I tried recording to local drive, but haven't figured out how to get the monitoring stream with the game's audio into the recording yet. My sndiod(8) flags are different with the use of `-f` and `-F`, so this will need some more trial and error.
On the other hand, the webcam works without issues. Just follow the FAQ for sysctl knobs and permissions on the /dev/video0 device.
There are always things I learn when setting up a new machine. Here are some of my realizations.
0 A.D. starts in fullscreen by default. After initial installation, I tried it from base fvwm, but ended up only seeing a black screen and hearing the music of the game. This was concerning, as I was worried it was an issue with the graphics card. However, I found that forcing window mode allowed 0 A.D. to run wihthout issues. Later, with a different window manager (notion), there were no issues with windowed or fullscreen mode. I suspect fvwm may have problems with other fullscreen applications - just beware.
The touchpad worked out of the box for movement, but tapping didn't work. I apparently had forgotten that this needs to be enabled first. Once I remembered, I added the following lines to /etc/wsconsctl.conf to set up the touchpad to my preferences:
mouse.tp.tapping=1 mouse.reverse_scrolling=1
I'm glad that there is already progress within the few weeks that I have owned this machine, and that it is usable enough to be my daily driver now. I am optimistic that hardware support and performance will only get better as time goes by.
What follows is a summary of the main observations.