
OpenBSD and the modern laptop - protomyth
http://bsdly.blogspot.com/2017/07/openbsd-and-modern-laptop.html
======
ac29
OpenBSD's WiFi support is still the deal breaker keeping me from trying it
out. Per iwm's documentation [0], 802.11n only partially works (no 40MHz
channels, and limited to 1x1), and 802.11ac doesnt work at all. That means a
max link rate of 72Mbps, and a real world speed of maybe half that.

[0] [https://man.openbsd.org/iwm](https://man.openbsd.org/iwm)

~~~
tjoff
That is plenty fast, for practical use the only parameters worth discussing
when it comes to wifi is connection stability and range.

~~~
4ad
That's like, your opinion man. With 802.11ac on 5GHz, on a mac laptop, I
consistently get about 800-1100Mbps. That is gigabit speed. And it's
everywhere in the house and yard because I have the appropriate number of APs
configured with the right signal power and antenna gain. I have no need for
cables anymore on my laptops in any situation where I need speed, and there
are many such situations. All my files at home are on a network share. No
problem, wifi is fast.

I feel people have only used badly configured crappy consumer APs on crappy
laptops (without MIMO) and don't understand that wifi doesn't have to be slow
and unreliable.

~~~
tjoff
I feel that you are sugar coating it a _tad_ bit much...

"A deep dive into why Wi-Fi kind of sucks":
[https://arstechnica.com/information-
technology/2017/03/802-e...](https://arstechnica.com/information-
technology/2017/03/802-eleventy-what-a-deep-dive-into-why-wi-fi-kind-of-
sucks/)

~~~
devwastaken
72 MB, which isn't the real world speed, as stated, isn't a lot. Thats only 9
actual megabytes a second. Now download any sizable source code project, or,
upload many small changes. Or, even just a movie from itunes or something.

Good routers can go over 100Mbps, easily, and I would never think that 'less'
speed is 'okay' in a world where increased speeds are just a requirement of
technology over time, and usage, of said technology.

------
djsumdog
I really wanted to put OpenBSD on this old X1 Carbon 1st gen I had. I had
trouble getting the installation with full-disk encryption working. The peeps
in #openbsd/freenode were amazingly helpful, but after a lot of debugging we
came down to "Is your hardware working correctly? Have you tried to install
anything else?"

I ended up putting FreeBSD on it and it worked great for a while. Then came
the reboots, the lockups ... turns out I really should have run memtest86
first. The memory was bad; probably several other things too. I purchased it
from a dodgy used shop and didn't realize all of this until past the 30 days.
The memory on those models are soldered in too. I ended up eBaying it as a
parts laptop.

Supposedly a fully functional X1 1st gen runs OpenBSD great. :-P

~~~
saghm
I struggled a while back trying to get FDE on an OpenBSD install, and I think
I did eventually get it working, although it took a good amount of time and
effort. For comparison, back when I installed Arch with FDE for the first
time, I found the documentation to be more than sufficient for getting it
working relatively easily. Given OpenBSD's emphasis on security and the fact
that the installer already can autopartition the hard drive its installing to,
it would be awesome if the installer supported FDE in the installation without
needing to manually deal with all the disk commands.

------
ebcode
Just installed OpenBSD 6.1 on an old Lenovo Thinkpad T500, and everything
works. Suspend/Resume when closed/opened, Intel wireless card, wired ethernet
port, sound, trackpad, function keys for adjusting screen brightness, all
work. Well, the fingerprint reader won't work, actually, but that's about it.

Would definitely recommend this setup for folks not needing anything fancy
(not for gaming/3d apps), but for your average web developer, it'll do the
trick.

The caveat is that a T500 isn't exactly "modern" (c. 2006), but it's got a
Core 2 Duo @ 2Ghz and 8G of ram, which is plenty for my admittedly modest
needs.

~~~
dijit
Echo this; I was using an X201s with a bunch of OS's

Linux has the mess of NetworkManager

FreeBSD idled hard and also has wifi-supplicant and crap.

Solaris is a dead end and you can forget wifi.

OpenBSD was perfect, it felt so cleanly engineered with wifi/wpa handled by
ifconfig.

the only concern was the bluetooth- they do not support, in any form,
bluetooth. Because: "We have never seen a clean implementation of bluetooth".
And yes, they trail with wifi support, but on a 7 year old laptop, that's
fine.

Did wonders for my battery life too.

~~~
floatboth
> wifi-supplicant and crap

What's wrong with wpa_supplicant? It works really well, you just write one
config file with all the networks and you can set the networks' priorities…

~~~
dijit
Much easier to just:

    
    
      ifconfig wlan0 scan
    
      ifconfig wlan0 ssid "thingIfound" wpakey "password" up
    
      dhclient wlan0

~~~
floatboth
That's easy for joining random hotspots, yeah. But for a more stable setup,
wpa_supplicant is excellent. I have a config that prefers my home network
(which is EAP-TLS secured, how does ifconfig on OpenBSD handle that?), then
mobile hotspot, then a couple other known networks. It automatically decides
the best network to use.

~~~
dijit
That is indeed cool, I used to rely on my bash history to find my old
ifconfigs for common networks I liked. It's lower power though. Due to lack of
polling.

I guess there are advantages to the wpa_supplicant way of doing things too.
But you have the option on openbsd too at least.

------
jancsika
> and then it takes a bit of demonstrating that yes, the graphics runs with
> the best available resolution the hardware can offer, the wireless network
> is functional, suspend and resume does work, and so forth.

But then from the Gist the author linked wrt getting X working with HiDPI:

> I'm using X in full resolution of 2560x1440 with wsfb (backed by efifb(4)).
> I configured my X session for HiDPI (retina), so I had to calculate and set
> DisplaySize in xorg.conf to get the correct DPI. With my configuration
> below, most but not all fonts display correctly. A few widgets still have
> tiny fonts.

And later in that same Gist:

> I'm using Window Maker (since about 1997). It doesn't fully support HiDPI
> but it is possible to make it useable by tweaking the fonts. Some widgets
> are still tiny but window titles, menus etc. work fine.

So to fill in what comes after the ellipses for the typical respondent of news
of a laptop running OpenBSD: "Really? But... wouldn't that require special
trips to the internet to copy/paste configuration settings that still only
partially solve the problem of a laptop running an OS that wasn't designed to
run on a laptop?" And the answer seems to be: yes.

One more bullet point from that Gist:

> In /etc/sysctl.conf I have to disable suspend when the lid is closed:
> machdep.lidsuspend=0

But the blog author says suspend/resume does indeed work. Is the blog author
manually suspending/resuming, or did he get it to trigger correctly when the
lid is open/closed?

~~~
boomboomsubban
>So to fill in what comes after the ellipses for the typical respondent of
news of a laptop running OpenBSD: "Really? But... wouldn't that require
special trips to the internet to copy/paste configuration settings that still
only partially solve the problem of a laptop running an OS that wasn't
designed to run on a laptop?" And the answer seems to be: yes

These problems seem related to the choice of WindowMaker, not OpenBSD.
Choosing a different window manager or desktop environment won't have the same
issues.

And ACPI events vary wildly, unless the two people are using the exact same
model I wouldn't be surprised if their suspend/resume success is different.

~~~
nerflad
I noticed this with my new XPS laptop last year. After moving to GNOME, things
started Just Working. A lot of what we consider basic functionality is
implemented differently by each DE, and running in userspace, or is completely
absent (like power management or automatic/easy wireless networking).

~~~
paulie_a
I generally agree and also have an XPS but one extremely annoying thing is
switching the screen scaling. I usually am using external monitors but if I
want to use the built-in screen I have to change a few settings and restart
half my applications.

------
onli
Do the BSDs support undervolting? Linux has Linux-PHC, but it seems to be
broken, and in general the modern kernel does not play well with the old
thinkpad I want to run this on. Did find nothing online, maybe someone here
knows more?

~~~
floatboth
FreeBSD has powerd, it works with P-states. You can also write to MSRs with
cpucontrol(8), I think CPUs use that to adjust clock and voltage from the OS.

~~~
onli
Under Linux, P-states are for Intel Core processors I think, but I do mean
older than that. Pentium M. Maybe that's just not the case under BSD, or a
mixup in terminology. cpucontrol could work here (but wow, that's raw). There
seems to have been efforts to support it on other BSDs, [https://mail-
index.netbsd.org/tech-kern/2007/04/14/0003.html](https://mail-
index.netbsd.org/tech-kern/2007/04/14/0003.html) and
[http://www.daemonology.net/freebsd-est/](http://www.daemonology.net/freebsd-
est/) mentions the voltage (but it does not seem to be configurable, and if I
got it right, this later became powerd).

From what I could gather one could use cpucontrol to change the stored
voltages and then let powerd, powerd++ or however OpenBSD handles this do its
work. Thanks for that. But it looks like no one ever tried and reported on
this. Hm.

------
brynet
I'm running OpenBSD on a Skylake-gen ThinkPad E560. There was support recently
added for Skylake graphics to -current snapshots, nvme(4) is quickly replacing
SATA on newer machines and is ready for 6.2. If you have a spare laptop,
follow pitrh and give installing OpenBSD a shot.

[https://twitter.com/canadianbryan/status/867484974953508867](https://twitter.com/canadianbryan/status/867484974953508867)

~~~
equalunique
Interesting! Glad you are having a positive experience. Is your E560 using
Intel graphics or AMD? I believe these models come with both.

~~~
brynet
Intel.

------
keithpeter
What is the best work around for graphical mounting/unmounting of a USB stick
in version 6.1 and after? I'm using a doas line and the xfce-mount panel plug-
in.

[Background: mounting/unmounting by non-root users was removed in 6.0(?) for
security reasons and the toad daemon/hotplug solution became apparently
unavailable)

PS: OpenBSD 6.1 on an older thinkpad (X200) just works fine with xfce4

------
qplex
Why is there a dedicated 10GB partition for /usr/X11R6?

~~~
jeromenerf
Here are some hints from the FAQ :
[https://www.openbsd.org/faq/faq4.html#Partitioning](https://www.openbsd.org/faq/faq4.html#Partitioning)

    
    
      Unlike some other operating systems, OpenBSD encourages users to split their disk into a number of partitions, rather than just one or two large ones. Some of the reasons for doing so are:
    
      Security:
      Some of OpenBSD's default security features rely on filesystem mount(8) options such as  nosuid, nodev, noexec or wxallowed.
      Stability:
      A user or a misbehaved program can fill a filesystem with garbage if they have write permissions for it. Your critical programs, which hopefully run on a different filesystem, do not get interrupted.
      Integrity:
      If one filesystem is corrupted for some reason, then your other filesystems are most likely still OK.
      fsck(8):
      You can mount partitions that you never or rarely need to write to as  readonly most of the time, which will eliminate the need for a filesystem check after a crash or power interruption.
    

Edit: verbatim format

~~~
floatboth
That's fine with soft partitions like ZFS datasets, HAMMER pseudofilesystems
or btrfs subvolumes. But OpenBSD doesn't have anything like that. The pain of
"my /usr is not big enough and it's a hard disklabel partition with a
completely separate filesystem omg how do I resize it" makes the partitioning
sooooo not worth it.

~~~
Gracana
This is not really an issue in practice, it just requires you to consider what
you'll use the system for.

~~~
the_af
This always makes me very anxious with Linux. I don't know beforehand what
I'll use my laptop for, it's not a server! Some development, some gaming, some
general use. Who knows? I always end up creating 3 partitions: /boot (is this
really necessary?), a single huge /, and swap. I know a separate /home is
recommended (something about backups and seamless distro upgrades, which I
never do anyway), but I never know how to size it relative to /.

I admit I do cargo-cult partitioning. I don't really know whether the
recommendations out there are current, outdated, mistaken or what.

I find a lot of recommendations about partitioning, swap, memory etc, at least
for Linux, are cargo cult anyway, or at least outdated and/or poorly
explained, which amounts to the same.

~~~
saghm
One potential solution for this is to use LVM, which lets you resize the
partitions later. Even if you do just want to use /, /boot, and swap, it can
be useful if you later want to change your swap size or reduce the root
partition size to add new partitions if you decide you want to dual boot.

------
ivanbakel
>root is a real user

Is this uncommon enough to need specifying? I've heard something along the
lines of Ubuntu having no actual root user for security reasons, but I got no
impression that this was a common approach. If root isn't a real user, what
are your options when your main user is compromised?

~~~
hedora
It is considered poor practice on Linux to set a password for the root
account. This is not the case on OpenBSD.

You can usually login by editing the grub kernel command line, and setting
init=/bin/sh

Disk encryption may or may not make account recovery more complicated.

~~~
digi_owl
F if i know where this idea came from, though i guess it may be an OSX
import...

------
ianai
After reading this, I want to do it.

~~~
andai
After reading this, I am wondering why anyone would want to do that!

------
rbanffy
> Apparently heavy users of other free operating systems do not always run
> them on their primary workstations.

Yeah right... Some strange demographics in there...

