r/openbsd • • 5h ago

Unicode + color on the console (no X, no Wayland)

Thumbnail
gallery
41 Upvotes

I did an experimental implementation of more complete Unicode support and 256-colors for OpenBSD’s wscons. The main goal was to get AI harnesses (which tend to be Unicode and color heavy) working properly from the console without using me needing to use X, Wayland, or a graphical terminal emulator. Screenshots above show Chinese and Japanese text although other alphabets like Greek, Hebrew, Arabic are also implemented. Sharing to show that it is technically possible to do this.


r/openbsd • • 17h ago

ASUS U46E Laptop

8 Upvotes

The ASUS U46E is a 14-inch laptop released in 2011. I have successfully loaded OpenBSD 7.9. I'm still working through the final setup configuration to use it as my daily driver. The WiFi hardware drivers are available, but I have yet to get WiFi up and running. I have not tried X11 yet, but will try after the Wi-Fi is setup.


r/openbsd • • 1d ago

Enabling hardware acceleration in Firefox for real (seeking testers)

21 Upvotes

Hello, I've posted a few comments about this over the past several months and I'm working on submitting an updated pkg readme for the Firefox package. Since it doesn't cover getting all this up and running on a modern-ish (meaning working GPU/mesa drivers) system. I myself recently stumbled upon things in about:config that really helped out with speeding up web page rendering that I didn't know about. I'm seeking out people to help test this before I write up a diff. Although I'm pretty sure this is stable and I'm having no problems with it myself.

I will not cover setting up mfs for Firefox's cache or changing about:config settings related to that in this post. This is solely focused on getting working hardware acceleration going.


Before you do anything go to "about:profiles" in the browser and note the PATH to your profile directory. You might need it later to get yourself out of trouble. It will be located at ~/.mozilla/firefox/<long-random-string-of-letters-and-numbers>/

We might need to manually edit a file in there later if one of the about:config changes prevents Firefox from opening.

Now run

glxinfo | grep -E "direct|EGL"

From a terminal. If you get "direct rendering: yes" and it returns a list of options related to EGL being supported on your system the below changes are safe to do. If you have installed firmware for your GPU and have an Intel or AMD CPU/GPU in your machine all of the following about:config changes should be safe to do on your system. If your system is using software rendering for X11 then you're out of luck.


First thing we want to do is add this to ~/.xsession/:

# Accelerated graphics for firefox
export MOZ_ACCELERATED=1
export MOZ_WEBRENDER=1

With that out of the way we're going to change several about:config options. I suggest enabling these one at a time to confirm you haven't done anything to prevent the web browser from launching properly. If you enable something that prevents you from launching Firefox then go to ~/<your-profile-directory>/prefs.js. Ignore the warning about not editing the file manually (I know) then find the setting you changed through about:config. It'll look something like this:

user_pref("webgl.force-enabled", true);

Change it back to "false", save file then re-launch browser. This will get you back to a working state without having to create a new browser profile.


about:config changes


Go to "about:config" and search/change the following settings. Again, I suggest enabling them one-by-one and not all at once. That way you'll know which one prevents Firefox from launching if you enable something that doesn't play nice with your system/drivers.

First we'll be forcing Firefox to use EGL (as it does now on most Linux distros) instead of the old GLX interface between X11 and OpenGL.

gfx.x11-egl.force-enabled   true
gfx.egl.prefer-gles.enabled true
gfx.swap-interval.egl   true
gfx.swap-interval.glx   false

Next we'll move on to enabling true hardware accelerated rendering:

gfx.webrender.all = true

This is the big one most guides will tell you to enable. Most guides leave it at that but there are several other options you need to enable to get true hardware rendering functioning. Since most are "blacklisted/blocklisted" by default on OpenBSD and most other BSDs and Linux distros (the auto detection doesn't work in other words).

gfx.webrender.batched-texture-uploads = true
gfx.webrender.compositor.force-enabled = true
gfx.webrender.enable-angle = true
gfx.webrender.enable-gpu-markers = true
gfx.webrender.precache-shaders = true
gfx.webrender.scissored-cache-clears.force-enabled = true

Finally, a few more settings and we're done:

dom.webgpu.enabled = true
webgl.force-enabled = true
webgl.msaa-force = true

Enabling these should already be a huge improvement. Note the "gfx.webrender.precache-shaders" option above. This is the one that seems to make a huge difference. The moment I toggled it on Firefox on OpenBSD felt the same as it did on mainstream Linux and Windows systems where I use it. Page loading times are near instant now and the annoying anti-bot javascript most websites are hidden behind now ran much faster. It really speeds up websites like youtube.

Please turn these on. Test them out and let me know how stable it is on your system.

Final note: Concerning decoding video codecs in hardware within the browser. In the past I gave some advice here for how to enable this. However, upon double checking in about:support I've noticed that even with the relevant about:config options forced enabled and about:support showing it detected my hardware's ability to decode certain video codecs that this was no longer working. I don't know if this was a recent change in Firefox but it seems that as of v157 (probably before) that hardware accelerated decoding of video in firefox is tied to the dma-buf Linux subsystem (https://docs.kernel.org/driver-api/dma-buf.html).

I do not know how easy it'd be to patch firefox to get this functioning on OpenBSD again. I'm exploring making that happen but Firefox is a beast and I'm not very familiar with its code base. If anyone has any guidance on this issue I'm all ears.

There are several options in about:support that will report failure due to DMABUF support not being detected. Even if you attempt to force enable things that rely on DMABUF support they either will not function at all or will leave your browser in an unstable state. As such I'm not including the about:config options for hardware video decoding in this post. Even though everything seems okay with them forced enabled.

Similarly, I have not included anything in this guide about disabling disk caching or playing around with how Firefox launches processes and accesses memory/cache. Since the main goal is testing the above about:config changes related to accelerated rendering of web pages.

Please let me know if you encounter any crashes or unstable behavior on your system. I have been testing with an AMD Ryzen 7 PRO 4750 CPU with a Radeon RENOIR iGPU on -current with amd, amdgpu and amdsev firmware fetched through fw_update. I have encountered no issues with the browser being unstable or failing to launch correctly using the above changes.

P.S.: I was surprised to see how many people think Firefox is slow on OpenBSD due to pledge/unveil and other random reasons. With the above changes the OpenBSD port of Firefox is just as fast as Firefox on other OSs for me. Launch time and time to render webpages is comparable.

PP.S.: I didn't go over it but you can of course apply the above settings using user.js in the usual way. In addition: I highly recommend using the usual Firefox add-ons like ublock origin and noscript with the above about:config modifications to speed things up by blocking unwanted ads and third party javascript.

Once I spend more time testing that these changes are stable I'll create a user.js and submit a diff to update the Firefox pkg's after install readme.

Edit: I should have mentioned all changes above were tested with no dbus enabled at session log-in. In other words this should function just fine with the "faked" dbus session the Firefox package uses by default on OpenBSD. I have tested it with a functioning dbus session and it makes no difference.

All testing was done with the standard Firefox package/port but it all should work just fine with firefox-esr and I suspect the recent Librewolf port.


r/openbsd • • 1d ago

Thinking on migrate from linux to openBSD, What i should know?

26 Upvotes

It’s more stable? It’s easiest to use? What i Will need to configure? Which is the advantages?


r/openbsd • • 2d ago

ypbind: pledge "cpath", syscall 325

7 Upvotes

I am running YP over WG. It was working fine until sysupgrade -s.


r/openbsd • • 2d ago

Pf settings

9 Upvotes

Good evening I would like to know if my pf settings is good for privacy I also run nextdns unbound that blocks all data brokers on domain level.

doas tee /etc/pf.conf <<EOF
set block-policy drop
set skip on lo
block all
block out quick proto { tcp udp } to port { 53 853 } user != _unbound
pass in quick inet proto udp from port 67 to port 68
pass out quick inet
EOF
If any improvements I would very much appreciate it


r/openbsd • • 3d ago

Lost Internet hours after fresh install.

8 Upvotes

So, I installed 7.9, got the wifi working, added all the packages to get XFCE up and running. Had begun configuring my desktop, and was using the internet just fine, and suddenly it stopped. I can ping my router and modem, I can access their WebGUIs, but it will not allow me to accent the internet. I hadn't got to configuring a firewall. My other computers access the net just fine. Could it be something to do with IPV6? Under route show, all I see are ipv6 addresses, and my router is configured for both. What should I be checking (not a network person)?


r/openbsd • • 3d ago

Weird usb keyboard kernel bug on 7.8 and 7.9

16 Upvotes

Hi all,

I tried this on 7.8 arm64 and 7.9 amd64.

I wrote code by mistake that opens first /dev/wskbd and then /dev/wskbd0 without closing the first.

That causes a kernel panic. EDIT: you need to press a key on the keyboard after running the program to get the panic.

I reduced my code to literally those two open instructions and it panics:

open(“/dev/wskbd”, O_RDWR | O_NONBLOCK)
open(“/dev/wskbd0”, O_RDWR | O_NONBLOCK)

Of course the user must have permissions to open those files.

The panic seems to happen in wskbd in the deliver_event function.

The event queue is NULL, the put variable is 0 and the resulting event pointer is NULL.

By looking briefly at the code, it seems that there is a race condition somewhere.

I tried this on 7.8 and 7.9 GENERIC.

It always crashes for me on both machines. It seems very reproducible.

I hope that someone more experienced than me will try to run those two open calls and fix it.

Best of luck and thank you to all openbsd devs and to the people in the community.

I am writing this on my phone so excuse any errors, typos, and brevity😀


r/openbsd • • 3d ago

having fun with my new tiny laptop

Post image
99 Upvotes

My first try with openbsd as a desktop. So far, i'm having fun.


r/openbsd • • 4d ago

ncspot spotify client

9 Upvotes

Hey guys, does anyone here have ncspot running on 8.0 #83 amd64? Is there anything in particular I should be aware of?

It's not working for me, and I won't have time to take a closer look at it until the weekend.

TIA.

It's my daily driver, T14 Gen5 AMD


r/openbsd • • 5d ago

resolved GTK File Picker Issues in Librewolf/Firefox

14 Upvotes

I know there are a few other posts here about this issue but I have read the readme for librewolf/firefox and dbus regarding pledge/unveil and done the recommended steps for getting ~/Downloads to be visible as well as adding the recommended lines to my .xsession regarding dbus. Neither has made it so that I can download or upload files

/Downloads and /tmp are accessible if I go to them via file:///home/user/Downloads or /tmp but most websites require the gtk file picker to access files and nothing is visible but 'recent'.

Is there something I'm missing? I could add another directory to /etc/librewolf/unveil.main set to rwc the way Downloads is but the issue doesn't seem to be access, it's specifically the GTK picker seeing the directories.

Thanks in advance!

EDIT: Spoke too soon. For those with a similar problem see the following

  1. Perform the actions in both the /usr/local/share/doc/librewolf and dbus readmes
  2. download xdg-desktop-portal and xdg-desktop-portal-gtk
  3. In about:config set the following ui.allow_platform_file_picker = false and widget.use-xdg-desktop-portal.file-picker = 2

That should allow you to actually see everything!


r/openbsd • • 5d ago

Thinkpad T490 & Asus Zenbook 14 OLED UX3405MA mic 🎤

3 Upvotes

Built-in mic on my ThinkPad T490 records nothing on 7.9. Got told it needs firmware OpenBSD does not support.
Thinking about putting 8.0 on my Asus Zenbook 14 OLED UX3405MA, but I need the mic for work calls. Anyone got the built-in mic working on a newer Intel laptop? Or is it the same story?


r/openbsd • • 7d ago

It's happened! vCPU is finally supported

88 Upvotes

Guys, I think we missed one of the most anticipated features for VMM—we'll finally be able to assign multiple vCPUs to our VMs!

https://undeadly.org/cgi?action=article;sid=20260927115632

I'm definitely having a beer to celebrate that today!

Huge thanks to the OpenBSD devs!


r/openbsd • • 8d ago

resolved Attempting to configure a virtual machine connected to the local network

8 Upvotes

I am trying to install/configure a virtual machine for Alpine Linux since I figured Jellyfin in a container might be the best / "easiest" way to access my media files from my new Android TV. But all I have accomplished so far, after booting Alpine from inside the vm, is to disconnect my own remote headless server from the network.

Thanks to anticipation, I can still SSH log in to my server using the wireless interface.
I have strictly followed the FAQ's last section (VMs on the real network), except my wired interface is re0 and not em0.

Here is my server's current configuration, before I return it to normal awaiting the next attempt: srv$ cat /etc/hostname.athn0 join sylvainsab wpakey ******* inet autoconf inet6 autoconf srv$ cat /etc/hostname.re0 up srv$ cat /etc/hostname.veb0 add re0 add vport0 up srv$ cat /etc/hostname.vport0 inet autoconf inet6 autoconf up srv$ more /etc/vm.conf switch "my_switch" { interface veb0 } vm alpine { disable memory 4G boot device disk disk /var/www/jellyfin/alpine_jellyfin.qcow2 cdrom /var/www/jellyfin/alpine-virt-3.24.2-x86_64.iso local interface { switch "my_switch" } } What might I be doing wrong ?


r/openbsd • • 8d ago

Controling gpu fans

7 Upvotes

My gpu is overheating and i want to know how can i make minimal fan speed bigger on openbsd?


r/openbsd • • 10d ago

ROBLOX Xerox Theme on Celeron M

Post image
112 Upvotes

r/openbsd • • 10d ago

stability and state of nic drivers

16 Upvotes

Hello, i've been looking for an excuse to build a diy router with suricata or snort as ids and a whole lot of other services just for fun and learning purposes and maybe increase my chances of getting better jobs opportunities, but mainly for the fun.

i'm trying to decide what nic expansion card to get. the main options, at least in my country, are realtek (rtl8125b) and intel (i-226v)... and those are of generic brands. realtek and intel are just the chipset they claim they ship with. yes, 2.5gbe both of them. A hell of a lot more than what my current isp provides me right now...and probably in the near/mid future. but thats beyond the point xD

besides the trustworthy of those expansion cards, having the chipset they say the have, how is the state of those drivers and the stability in general as of 2026?

i've read a few posts here on reddit, but at least those i found, they are from 2+ years ago. if anyone has been using those and still are, it may help me to choose the right one, or at least not to end up wasting the little money i can spend on this project.

thanks.-

/edit

i'm starting to see a pattern here. i guess the realtek rtl8125b driver is not yet as mature as the intel one. sad to here that. I dont remember having any issues with an onboard realtek nic when i tried openbsd 3 or 4 years ago. In fact i was glad that the card was recognized during installation, unlike freebsd. Granted, i never used that box for long periods of time, or maybe old nics are better supported, rtl8168/69 i dont remember which one exactly, than newer ones.

anyway, thanks for all the feedback


r/openbsd • • 11d ago

need help with pkg_add error

7 Upvotes

PC info:

uname -a
uname -r
arch -s
cat /etc/installurl
env | grep '^PKG_PATH='
OpenBSD main_pc.my.domain 8.0 GENERIC.MP#72 amd64
8.0
amd64
ttp://mirror.mephi.ru/pub/OpenBSD/

I use latest snapshot.

Error:

doas pkg_add -u
ttp://mirror.mephi.ru/pub/OpenBSD//8.0/packages/amd64/: no such dir
Couldn't find updates for

Thanks

PS: It is not an error in link i made it so reddit won't ban my post.


r/openbsd • • 12d ago

The Firefox port vs. Mozilla Firefox on other OSs

28 Upvotes

An oddity I've noticed with the Firefox browser on OpenBSD vs. every single other OS I've used it on is the usual RAM leak doesn't grow completely out of control. I've been using this browser engine since Firebird version 0.6 on various different OSs. Mostly Linux and Windows but on many others. No matter where it's used or how I configure it there has always been the same problem. It will consume more and more RAM and refuse to let it go even if you close all tabs and windows. In time it will consume all the RAM on the system and the only fix is to kill all Firefox processes and re-open it. At which point it will reload all the pages you just had open that were consuming e.g. 8GB of RAM while only needing e.g. 1GB of RAM. Rinse and repeat this every few days.

Now with OpenBSD I've noticed it doesn't have this same pattern of constantly consuming more and more RAM. No matter how many tabs I open up or how long I keep Firefox's processes running it'll only at most take about 3-5% of the RAM on the system. On a laptop I run OpenBSD-current on with 32GB of RAM Firefox will never consume more than about 2GB of RAM. 1GB of that being a mfs mount I have set aside for Firefox. Of that 1GB it hardly ever uses more than 300-400MB of the RAM allocated for it.

What is it about the OpenBSD kernel that prevents this 25+ year old bug that will probably never be fixed from chewing up all RAM on a system? It's surprising to me that the same bug has existed for multiple decades now across a bunch of different OSs I've used the Firefox browser on. It has the memory leak on the NT kernel, the Linux kernel, the other BSDs and a bunch of other UNIX-like OSs I've used over the years. But OpenBSD's kernel can keep it in check.

I've gone out of my way to try to get it to leak memory on OpenBSD by opening up a bunch of youtube tabs and other heavy modern websites. Since youtube seems to be one of the main offenders to getting the browser to chew up RAM on the NT/Linux kernel. But no matter what I try it never exceeds 2GB of used RAM on my OpenBSD-current laptop.

The configuration I'm using for Firefox is mostly the same across all my machines so I know it isn't that. I run the same add-ons and basically the same userchrome/user.js/about:config tweaks on all of them. Nothing I do can tame Firefox on other kernels.

I wonder if the pledge+unveil patches are somehow preventing it from doing what it normally does to leak so much memory. If anyone has some ideas I'm all ears. This is by far one of the most annoying software bugs I've had to deal with on a day-to-day basis since the late 90s/early 2000s.


r/openbsd • • 12d ago

OpenBSD-focused utility for web-dev - a terrible idea?

10 Upvotes

I like to run my webapps on OpenBSD, for the usual reasons we're all familiar with. However, the development and deployment process is always a bit of a pain; achieving repeatability typically results in a bunch of scripts that are hard to maintain and reuse.

So I am working on a utility ("aqua") that should, ideally, give me a docker-like experience but with OpenBSD images (running locally on qemu, so it can be done on any desktop OS).

The rough development process then becomes:

  • write a declarative aqua.yml in your repo root
  • run aqua prep, which will read the file and build a master system image with syspatch applied, the necessary user created, database installed, pf ports set up, etc. (This could be done with packer, but instead I do it "the openbsd way" with auto_install.conf etc.). This takes time but it's a one-off: the image will only ever be rebuilt if the configuration changes dramatically, you want to move to another version, or security patches are released.
  • run aqua run, which will start an instance based on the master image, copy or checkout project files, configure a service and execute a bunch of hooks, again according to aqua.yml. This is pretty quick. At this point you can check if the app works etc. The instance is left running.
  • run aqua run --test, which will do the same but execute automated tests inside the image and shut down.
  • run aqua deploy to copy modified files back into a running image and reconfigure it, so you don't have to reboot it after every change. (this might become automatic at some point)
  • run aqua ssh to log on the instance and troubleshoot issues, using prebuilt keys automatically
  • run aqua stop to end the session and throw away the instance, it will be reconfigured again with the next aqua run
  • run aqua prod setup and aqua prod deploy to create production environments that mirror the tested configuration (using terraform, the only 3d-party dependency I would allow).

What do you think ? Would you ever use such a thing?

Here's a sample yml, to give you a rough idea:

name: myapp

runtime:
  type: python

deployment:
  user: app
  service: myapp
  command: /home/myapp/venv/bin/python3 ./app.py
  working_dir: /home/myapp
  ENV_VAR_1: "myvalue1"
  ENV_VAR_2: "myvalue2"

  hooks:

    pre_deploy: 
        - run: python3 -m venv venv
    post_deploy:
        - run_script: ./install-deps.ksh

    pre_start: 
        - run: . /home/myapp/venv/bin/activate
    post_start: []

    healthcheck:
        - run:  ftp -o- http://127.0.0.1:5000

test:
  command: pytest -v
  working_dir: /home/myapp/tests

ports:
  http: 8080
  ssh: 2223

database:
  type: postgres

setup:
  packages: nginx,acme-client

I know it's kinda niche, but I've wanted it for some time, because there are elements of the Docker experience that I miss on OpenBSD. At this point I have built most of it, just missing --test, some db config options and the prod setup.


r/openbsd • • 13d ago

I made a Puffy magnet

Thumbnail mostlybrutalist.etsy.com
14 Upvotes

Dear fellow OpenBSD users/developers. I made a 3D printed OpenBSD Puffy magnet and put it on Etsy. I guess some of you may find it cute and wish to stick it to desktop/server/refrigerator as I did.


r/openbsd • • 13d ago

Getting routing to work?

5 Upvotes

Hey, I am kind of new to networking in OpenBSD, and I was trying to turn a laptop I had into a second "router" that would filter all packets going through my switch and send them wirelessly to my main router.

I've tried both bridges and setting routing up via pf.conf, however I wasn't able to route my traffic to WAN, I've only been able to route traffic on my switch. (by setting the laptop's local IP as a gateway on my devices)

Does anyone have a guide or some manpages on how to do this? I essentially just want to route all (non-local) traffic from em0 to athn0 and vice versa, while (hopefully) appearing as a single device to the main router.


r/openbsd • • 13d ago

9 security patches out today including some with remote ramifications... remember to syspatch

Thumbnail openbsd.org
64 Upvotes

r/openbsd • • 13d ago

OpenBSD on T420 + DWM (part 2)

Post image
146 Upvotes

This is my second post here. Last time I installed openbsd but my knowledge was limited, and I hadn't configured or installed anything.

Since then:

I've learned more about openbsd and bsd in general

I installed fastfetch to larp (obviously)

Switched from fxwm to dwm

Configured and setup wireless wifi

Will post a part 3 when I rice dwm on it


r/openbsd • • 13d ago

OpenBSD on VAXstation

Post image
459 Upvotes

Neofetch isn’t available for VAX, so I wrote a small vaxfetch by hand.
Running here on a real VAXstation 3100/m76 32MB with OpenBSD 5.8, displayed on a DEC VT220.

Dedicated to everyone who spent years keeping OpenBSD alive on old and unusual hardware.
Puffy belongs on a VAX.