all repos — site @ d28f0b21e16020dc145d11157141e2ec00caed22

source for my site, found at icyphox.sh

pages/txt/openbsd-hp-envy.txt (view raw)

  1---
  2date: '2020-04-17'
  3subtitle: I put a blowfish in my laptop this week
  4title: OpenBSD on the HP Envy 13
  5url: 'openbsd-hp-envy'
  6---
  7
  8My existing KISS install broke because I thought it would be a great
  9idea to have [apk-tools](https://github.com/alpinelinux/apk-tools)
 10alongside the `kiss` package manager. It's safe to say, that did not end
 11well---especially when I installed, and then removed a package. With a
 12semi-broken install that I didn't feel like fixing, I figured I'd give
 13OpenBSD a try. And I did.
 14
 15installation and setup
 16----------------------
 17
 18Ran into some trouble booting off the USB initially, turned out to be a
 19faulty stick. Those things aren't built to last, sadly. Flashed a new
 20stick, booted up. Setup was pleasant, very straightforward. Didn't
 21really have to intervene much.
 22
 23After booting in, I was greeted with a very archaic looking FVWM
 24desktop. It's not the prettiest thing, and especially annoying to work
 25with when you don't have your mouse setup, i.e. no tap-to-click.
 26
 27I needed wireless, and my laptop doesn't have an Ethernet port. USB
 28tethering just works, but the connection kept dying. I'm not sure why.
 29Instead, I downloaded the [iwm(4)](http://man.openbsd.org/iwm.4)
 30firmware from [here](http://firmware.openbsd.org/firmware/6.6/), loaded
 31it up on a USB stick and copied it over to `/etc/firmware`. After that,
 32it was as simple as running
 33[fw\_update(1)](http://man.openbsd.org/fw_update.1) and the firmware is
 34auto-detected and loaded. In fact, if you have working Internet,
 35`fw_update` will download the required firmware for you, too.
 36
 37Configuring wireless is painless and I'm so glad to see that there's no
 38`wpa_supplicant` horror to deal with. It's as simple as:
 39
 40    $ doas ifconfig iwm0 nwid YOUR_SSID wpakey YOUR_PSK
 41
 42Also see [hostname.if(5)](http://man.openbsd.org/hostname.if.5) to make
 43this persist. After that, it's only a matter of specifying your desired
 44SSID, and `ifconfig` will automatically auth and procure an IP lease.
 45
 46    $ doas ifconfig iwm0 nwid YOUR_SSID
 47
 48By now I was really starting to get exasperated by FVWM, and decided to
 49switch to something nicer. I tried building 2bwm (my previous WM), but
 50that failed. I didn't bother trying to figure this out, so I figured I'd
 51give [cwm(1)](http://man.openbsd.org/cwm.1) a shot. Afterall, people
 52sing high praises of it.
 53
 54And boy, is it good. The config is a breeze, and actually pretty
 55powerful. [Here's
 56mine](https://github.com/icyphox/dotfiles/blob/master/home/.cwmrc). cwm
 57also has a built-in launcher, so dmenu isn't necessary anymore. Refer to
 58[cwmrc(5)](https://man.openbsd.org/cwmrc.5) for all the config options.
 59
 60Touchpad was pretty simple to setup too---OpenBSD has
 61[wsconsctl(8)](http://man.openbsd.org/wsconsctl.8), which lets you set
 62your tap-to-click, mouse acceleration etc. However, more advanced
 63configuration can be achieved by getting Xorg to use the Synaptics
 64driver. Just add a `70-synaptics.conf` to `/etc/X11/xorg.conf.d` (make
 65the dir if it doesn't exist), containing:
 66
 67``` {.conf}
 68Section "InputClass"
 69    Identifier "touchpad catchall"
 70    Driver "synaptics"
 71    MatchIsTouchpad "on"
 72    Option "TapButton1" "1"
 73    Option "TapButton2" "3"
 74    Option "TapButton3" "2"
 75    Option "VertEdgeScroll" "on"
 76    Option "VertTwoFingerScroll" "on"
 77    Option "HorizEdgeScroll" "on"
 78    Option "HorizTwoFingerScroll" "on"
 79    Option "VertScrollDelta" "111"
 80    Option "HorizScrollDelta" "111"
 81EndSection  
 82```
 83
 84There are a lot more options that can be configured, see
 85[synaptics(4)](http://man.openbsd.org/synaptics.4).
 86
 87Suspend and hibernate just work, thanks to
 88[apm(8)](http://man.openbsd.org/apm.8). Suspend on lid-close just needs
 89one `sysctl` tweak:
 90
 91    $ sysctl machdep.lidaction=1
 92
 93I believe it's set to 1 by default on some installs, but I'm not sure.
 94
 95impressions
 96-----------
 97
 98I already really like the philosophy of OpenBSD---security and
 99simplicity, while not losing out on sanity. The default install is
100plentiful, and has just about everything you'd need to get going. I
101especially enjoy how everything just works! I was pleasantly surprised
102to see my brightness and volume keys work without any configuration!
103It's clear that the devs actually dogfood OpenBSD, unlike uh, *cough*
104Free- *cough*. Gosh I hope it's not *the* flu. :\^)
105
106Oh and did you notice all the manpage links I've littered throughout
107this post? They have manpages for *everything*; it's ridiculous. And
108they're very thorough. Arch Wiki is good, but it's incorrect at times,
109or simply outdated. OpenBSD's manpages, although catering only to
110OpenBSD have never failed me.
111
112Performance and battery life are fine. Battery is in fact, identical, if
113not better than on Linux. OpenBSD disables HyperThreading/SMT for
114security reasons, but you can manually enable it if you wish to do so:
115
116    $ sysctl hw.smt=1
117
118Package management is probably the only place where OpenBSD falls short.
119[pkg\_add(1)](http://man.openbsd.org/pkg_add.1) isn't particularly fast,
120considering it's written in Perl. The ports selection is fine, I have
121yet to find something that I need not on there. I also wish they
122debloated packages; maybe I've just been spoilt by KISS. I now have
123D-Bus on my system thanks to Firefox. :(
124
125I appreciate the fact that they don't have a political document---a Code
126of Conduct. CoCs are awful, and have only proven to be harmful for
127projects; part of the reason why I'm sick of Linux and its community. Oh
128wait, OpenBSD does have one: https://www.openbsd.org/mail.html ;)
129
130I'll be exploring [vmd(8)](http://man.openbsd.org/vmd.8) to see if I can
131get a Linux environment going. Perhaps that'll be my next post, but when
132have I ever delivered?
133
134I'll close this post off with my new rice, and a sick ASCII art I made.
135
136          \.-----./  
137          / ^ ^ ^ \
138        (o)(o) ^ ^ |_/|
139         {} ^ ^ > ^| \|
140          \^ ^ ^ ^/
141           /-----\
142                        ~icy
143
144![openbsd rice](https://x.icyphox.sh/zDYdj.png)