NetBSD Planet

March 05, 2021

Pullup pkgsrc [pullup-pkgsrc #6434] [[email protected]: CVS commit: pkgsrc/chat/mumble]
Pullup 9 [pullup-9 #1224] sync documentation of iic(4) with -current
Pullup 9 [pullup-9 #1223] sync documentation of spi(4) with -current

March 04, 2021

Pullup 9 [pullup-9 #1222] Fix for PR/55814 (no "root on xxNa" if RB_ASKNAME is specified)
Pullup pkgsrc [pullup-pkgsrc #6433] tor-browser

March 03, 2021

Pullup 9 [pullup-9 #1221] please pullup latest bozohttpd (20210227)
DragonFly BSD Digest New games on DragonFly

New to DragonFly, but not new to games.  Aarom LI has added several oldschool BSD games back to DragonFly mostly via NetBSD.   It’s ching(6), gomoku(6), monop(6), and cgram(6).

March 02, 2021

Pullup 9 [pullup-9 #1220] sync documentation of pad(4) with -current

February 28, 2021

Pullup pkgsrc [pullup-pkgsrc #6432] Fix squid4 build on some platforms

February 26, 2021

Pullup 8 [pullup-8 #1660] patch: fix behaviour of -V none
NetBSD General on DaemonForums mkdir & symlink inside kernel code
Could anyone in the know point me at sample code for implementing (presumably via VOP_MKDIR etc.) mkdir/symlink inside the kernel?

I would like to do something like this in dkwedge_add


/dev/disk/by-partlabel/dkw->dkw_wname link to ../../dkw->dkw_devname
/dev/disk/by-id/dkw->parent+dkw->dkw_offset link to ../../dkw->dkw_devname
/dev/disk/by-owner/dkw->dkw_wname link to ../../dkw->dkw_parent

The relevant sections on are not filled out (VOP_MKDIR)

February 25, 2021

Server Fault chroot not able to start service - not found. What is missing?

I would like to run a service inside a chroot in a NetBSD 9.1 amd64 system. The service runs if invoked from OS. The service in question is dendrite-monolith-server. I just copied the file for ease of use to start sitting inside the chroot in /bin/.

# ldd bin/start 
        -lpthread.1 => /usr/lib/
        -lc.12 => /usr/lib/

They are hard linked:

# ls -l usr/lib
total 8560
-r--r--r--  2 root  pe  2079984 Feb 22 23:40 lc.12
-r--r--r--  2 root  pe  2079984 Feb 22 23:40
-r--r--r--  2 root  pe    93656 Feb 22 23:40
-r--r--r--  2 root  pe    93656 Feb 22 23:40 lpthread.1

In the chroot /dev, did MAKEDEV all to create the devices.

Copied ld.elf_so to the chroot /libexec directory

# ls -l /libexec/
total 324
-r-xr-xr-x  1 0  1000  164344 Feb 22 23:47 ld.elf_so

ksh93 is statically linked:

# chroot ./ /bin/ksh93
# /bin/start 
/bin/ksh93: /bin/start: not found

What's wrong or missing?

Pullup pkgsrc [pullup-pkgsrc #6431] [[email protected]: CVS commit: pkgsrc/www/firefox78-l10n]
Pullup pkgsrc [pullup-pkgsrc #6430] [[email protected]: CVS commit: pkgsrc/www/firefox78]

February 24, 2021

NetBSD General on DaemonForums Computer Crashes
Hi all,

My desktop (i3-2120 from 2012) runs NetBSD 9 for the last 11 months. It runs 24/7 and crashes once a month. This is very bad as I rely on it being remotely accessible.

Before, it was not my computer and I don't know of any known hardware problems.

After the crash:
  • the power LED is still on and the fan continues to spin. This makes me believe it's not a hardware problem.
  • the monitor does not detect a signal from the graphics card. Here I'm not sure what that means. If the kernel crashes, what is supposed to be on the screen? Who is driving the graphics card/monitor?
  • pings are not answered.
  • there was no power outage - all other computers in the household are still running.
  • BIOS is set up to "keep the power-state" after a power-failure, e.g. when it was previously on, it will be turned on. As NetBSD did not boot again, the power was never really lost.
  • it was not a graceful shutdown. When NetBSD came up after a manual power-cycle, filesystem checks took place (well, the journal is replayed)

I follow NetBSD cvs netbsd-9 branch. I believe that is the stable branch. The NetBSD config is the default.

NetBSD XXX 9.1_STABLE NetBSD 9.1_STABLE (GENERIC) #2: Sun Jan 3 11:19:52 PST 2021 [email protected]:/usr/obj/sys/arch/amd64/compile/GENERIC amd64

The last crash must have happened early morning of Feb 24 (I power-cyceled the computer at 9:00am. Last cron job activity at 3:00am.) Log files are "blank" in the early morning. /var/log/messages:

Feb 21 13:16:04 XXX /netbsd: [ 3620751.3847045] kern error: [drm:(/usr/src/sys/external/bsd/drm2/dist/drm/i915/intel_fifo_underrun.c:230)cpt_set_fifo_underrun_reporting] *ERROR* uncleared pch fifo underrun on pch transcoder A
Feb 21 13:16:04 XXX /netbsd: [ 3620751.3847045] kern error: [drm:(/usr/src/sys/external/bsd/drm2/dist/drm/i915/intel_fifo_underrun.c:381)intel_pch_fifo_underrun_irq_handler] *ERROR* PCH transcoder A FIFO underrun
Feb 21 14:33:25 XXX /netbsd: [ 3625392.1028982] kern error: [drm:(/usr/src/sys/external/bsd/drm2/dist/drm/i915/intel_fifo_underrun.c:230)cpt_set_fifo_underrun_reporting] *ERROR* uncleared pch fifo underrun on pch transcoder A
Feb 21 14:33:25 XXX /netbsd: [ 3625392.1028982] kern error: [drm:(/usr/src/sys/external/bsd/drm2/dist/drm/i915/intel_fifo_underrun.c:381)intel_pch_fifo_underrun_irq_handler] *ERROR* PCH transcoder A FIFO underrun
Feb 24 09:03:22 XXX syslogd[184]: restart
Feb 24 09:03:22 XXX /netbsd: [  1.0000000] Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,

No other log files have timestamps around that time (well, besides cron.log).

What do you suspect, hardware problem or kernel crash?

Is there a knob to keep the kernel in a debugger upon a crash?

What can I do to root-cause the crash?
Pullup 8 [pullup-8 #1659] fix for m68k kernel stack overflow panic

February 23, 2021

Pullup 8 [pullup-8 #1658] ksh unable to execute ERR traps (probably since 2016/03/17 - i.e. 8.x and 9.x)

February 22, 2021

Super User BASH: Run function every n seconds, but allow it to be interrupted by another keystroke

I'm looking to create a function for a script where another function will be called every few seconds, however the user should be able to issue other commands to the program while this is happening. Because of this, I doubt I'll be able to use sleep as that holds up the entire script.

I've spent about a day searching for ways to accomplish this, but so far haven't found anything that would work for me.

February 20, 2021

DragonFly BSD Digest In Other BSDs for 2021/02/20

There’s a lot to catch up on!


February 19, 2021

Pullup 8 [pullup-8 #1657] Fix x86 pci_intr_disestablish clean up routine

February 17, 2021

Pullup 8 [pullup-8 #1656] please pullup new xterm 366 to netbsd-8

February 15, 2021

Unix Stack Exchange Why does NetBSD grep slow down nearly 15x on subsequent calls

I'm working through examples in APUE. On a NetBSD 9.0 system, under no major load, I time a call to grep and get an unremarkable result:

apue$ cd /usr/include
apue$ time -p grep __POSIX_SOURCE */*.h > /dev/null
real         0.73
user         0.01
sys          0.63

However, if I repeat the experiment several times, the system time spikes drastically (up to 15x):

apue$ time -p grep _POSIX_SOURCE */*.h > /dev/null
real         0.57
user         0.02
sys          0.54
apue$ time -p grep _POSIX_SOURCE */*.h > /dev/null
real        10.06
user         0.01
sys         10.04
apue$ time -p grep _POSIX_SOURCE */*.h > /dev/null
real         3.57
user         0.01
sys          3.56
apue$ time -p grep _POSIX_SOURCE */*.h > /dev/null
real         4.58
user         0.00
sys          4.58
apue$ time -p grep _POSIX_SOURCE */*.h > /dev/null
real         5.56
user         0.02
sys          5.53
apue$ time -p grep _POSIX_SOURCE */*.h > /dev/null
real         6.57
user         0.00
sys          6.56
apue$ time -p grep _POSIX_SOURCE */*.h > /dev/null
real         2.56
user         0.01
sys          2.54

Is this expected behavior? What could be causing such wide variance?

Update Based on the answer given by @Tim, I took a look at my Buffercache, and saw that it was fully allocated at 100% when grep was struggling with my search. After restarting the VM, the buffer usage had dropped down to around 95%.

$ sysstat bufcache
                    /0   /1   /2   /3   /4   /5   /6   /7   /8   /9   /10
     Load Average   |

      603 metadata buffers using                5565 kBytes of memory ( 0%).
    15512 pages for cached file data using     62048 kBytes of memory ( 3%).
     3034 pages for executables using          12136 kBytes of memory ( 1%).
     6460 pages for anon (non-file) data       25840 kBytes of memory ( 1%).
   468172 free pages                         1872688 kBytes of memory (93%).

File System          Bufs used   %   kB in use   %  Bufsize kB   %  Util %
/                          577  95        5378  97        5418  97      99

Total:                     577  95        5378  97        5418  97      99

January 30, 2021

DragonFly BSD Digest In Other BSDs for 2021/01/30

A FreeBSD-heavy week.

January 29, 2021

Frederic Cambus NetBSD on the EdgeRouter Lite

NetBSD-current now has pre-built octeon bootable images (which will appear in NetBSD 10.0) for the evbmips port, so I decided to finally give it a try. I've been happily running OpenBSD/octeon on my EdgeRouter Lite for a few years now, and have previously published some notes including more detail about the CPU.

Contrary to the OpenBSD/octeon port which is very stable and runs SMP kernels, things are a little less polished on the NetBSD side for this platform. The system runs an uniprocessor kernel and there are still some stability issues.

EdgeRouter Lite

Here is the U-Boot configuration to boot the image:

Octeon ubnt_e100# set bootcmd 'fatload usb 0 $loadaddr netbsd;bootoctlinux $loadaddr coremask=0x3 root=wedge:octeon-root'
Octeon ubnt_e100# saveenv
Saving Environment to Flash...
Un-Protected 1 sectors
Erasing Flash...
. done
Erased 1 sectors
Writing to Flash... 4....3....2....1....done
Protected 1 sectors
Octeon ubnt_e100#

On first boot, the system automatically expands the filesystem:

Resizing / (NAME=octeon-root)
/dev/rdk1: grow cg |*************************************                 |  69%

Here is the login session, for posterity:

Thu Jan 28 23:40:37 UTC 2021

NetBSD/evbmips (octeon) (constty)


Here is the output of running file on executables:

ELF 32-bit MSB pie executable, MIPS, N32 MIPS-III version 1 (SYSV), dynamically
linked, interpreter /libexec/ld.elf_so, for NetBSD 9.99.79, not stripped

For the record, OpenSSL speed benchmark results are available here.

System message buffer (dmesg output):

[     1.000000] Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
[     1.000000]     2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017,
[     1.000000]     2018, 2019, 2020, 2021 The NetBSD Foundation, Inc.  All rights reserved.
[     1.000000] Copyright (c) 1982, 1986, 1989, 1991, 1993
[     1.000000]     The Regents of the University of California.  All rights reserved.

[     1.000000] NetBSD 9.99.79 (OCTEON) #0: Thu Jan 28 18:52:43 UTC 2021
[     1.000000] 	[email protected]:/usr/src/sys/arch/evbmips/compile/OCTEON
[     1.000000] Cavium Octeon CN5020-500
[     1.000000] total memory = 512 MB
[     1.000000] avail memory = 496 MB
[     1.000000] timecounter: Timecounters tick every 10.000 msec
[     1.000000] mainbus0 (root)
[     1.000000] cpunode0 at mainbus0: 2 cores, crypto+kasumi, 64bit-mul, unaligned-access ok
[     1.000000] cpu0 at cpunode0 core 0: 500.00MHz
[     1.000000] cpu0: Cavium CN5020-500 (0xd0601) Rev. 1 with software emulated floating point
[     1.000000] cpu0: 64 TLB entries, 512TB (49-bit) VAs, 512TB (49-bit) PAs, 256MB max page size
[     1.000000] cpu0: 32KB/128B 4-way set-associative L1 instruction cache
[     1.000000] cpu0: 16KB/128B 64-way set-associative write-through coherent L1 data cache
[     1.000000] cpu0: 128KB/128B 8-way set-associative write-back L2 unified cache
[     1.000000] cpu1 at cpunode0 core 1: disabled (uniprocessor kernel)
[     1.000000] wdog0 at cpunode0: default period is 4 seconds
[     1.000000] iobus0 at mainbus0
[     1.000000] iobus0: initializing POW
[     1.000000] iobus0: initializing FPA
[     1.000000] com0 at iobus0 address 0x0001180000000800: ns16650, no ERS, 16-byte FIFO
[     1.000000] com0: console
[     1.000000] com at iobus0 address 0x0001180000000c00 not configured
[     1.000000] octrnm0 at iobus0 address 0x0001180040000000
[     1.000000] entropy: ready
[     1.000000] octtwsi at iobus0 address 0x0001180000001000 not configured
[     1.000000] octmpi at iobus0 address 0x0001070000001000 not configured
[     1.000000] octsmi0 at iobus0 address 0x0001180000001800
[     1.000000] octpip0 at iobus0 address 0x00011800a0000000
[     1.000000] octgmx0 at octpip0
[     1.000000] cnmac0 at octgmx0: address=0x1180008000000: RGMII
[     1.000000] cnmac0: Ethernet address 44:d9:e7:9e:f5:9e
[     1.000000] atphy0 at cnmac0 phy 7: Atheros AR8035 10/100/1000 PHY, rev. 2
[     1.000000] atphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseSX-FDX, 1000baseT-FDX, auto
[     1.000000] cnmac1 at octgmx0: address=0x1180008000000: RGMII
[     1.000000] cnmac1: Ethernet address 44:d9:e7:9e:f5:9f
[     1.000000] atphy1 at cnmac1 phy 6: Atheros AR8035 10/100/1000 PHY, rev. 2
[     1.000000] atphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseSX-FDX, 1000baseT-FDX, auto
[     1.000000] cnmac2 at octgmx0: address=0x1180008000000: RGMII
[     1.000000] cnmac2: Ethernet address 44:d9:e7:9e:f5:a0
[     1.000000] atphy2 at cnmac2 phy 5: Atheros AR8035 10/100/1000 PHY, rev. 2
[     1.000000] atphy2: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseSX-FDX, 1000baseT-FDX, auto
[     1.000000] dwctwo0 at iobus0 address 0x0001180068000000
[     1.000000] dwctwo0: Core Release: 2.65a (snpsid=4f54265a)
[     1.000000] usb0 at dwctwo0: USB revision 2.0
[     1.000000] bootbus0 at mainbus0
[     1.000000] timecounter: Timecounter "mips3_cp0_counter" frequency 500000000 Hz quality 100
[     1.000003] timecounter: Timecounter "clockinterrupt" frequency 100 Hz quality 0
[     1.059978] uhub0 at usb0: NetBSD (0x0000) DWC2 root hub (0x0000), class 9/0, rev 2.00/1.00, addr 1
[     1.059978] uhub0: 1 port with 1 removable, self powered
[     1.069975] aes: BearSSL aes_ct
[     1.069975] aes_ccm: self-test passed
[     1.069975] chacha: Portable C ChaCha
[     1.079979] blake2s: self-test passed
[     3.609971] umass0 at uhub0 port 1 configuration 1 interface 0
[     3.620226] umass0: vendor 13fe (0x13fe) USB DISK 2.0 (0x4200), rev 2.00/1.00, addr 2
[     3.620226] umass0: using SCSI over Bulk-Only
[     3.620226] scsibus0 at umass0: 2 targets, 1 lun per target
[     3.632383] uhub0: autoconfiguration error: illegal enable change, port 1
[     3.639974] sd0 at scsibus0 target 0 lun 0: <, USB DISK 2.0, PMAP> disk removable
[     3.639974] sd0: 3824 MB, 959 cyl, 255 head, 32 sec, 512 bytes/sect x 7831552 sectors
[     3.659974] sd0: GPT GUID: 6e7b1b6a-2e9f-4915-946a-567dad0caaa4
[     3.669969] dk0 at sd0: "octeon-boot", 163840 blocks at 32768, type: ntfs
[     3.669969] dk1 at sd0: "octeon-root", 7626752 blocks at 196608, type: ffs
[     3.683879] WARNING: 1 error while detecting hardware; check system log.
[     3.691430] boot device: sd0
[     3.691430] root on dk1
[     3.709975] root file system type: ffs
[     3.719976] kern.module.path=/stand/evbmips/9.99.79/modules
[     3.719976] WARNING: no TOD clock present
[     3.729990] WARNING: using filesystem time

January 16, 2021

Unix Stack Exchange Why Does the NetBSD System Call Manual Mention the Standard C Library?

I'm reviewing man(2) pages on NetBSD 9, and have seen that all of the documents (write(2), open(2), pipe(2)) mention the Standard C Library at the top.

My understanding was that system calls were independent of library functions (such as those in libc). I don't see a similar mention in the Linux System call Manual. Does this mean that invoking these methods is calling some wrapper function included in libc, instead of directly calling a kernel function? Is this generally true, or just a feature of NetBSD?

January 15, 2021

Super User Wait for process to start on linux/(net)bsd

I'm attempting to make a script which tracks how many times you execute a specific process. I want to detect when the process starts and then log it.

The psuedo-code would be something like this:

while (true) if (process started) then log(process)

Is there an easy way to do this (preferably in shell but C is also fine) on either Linux or NetBSD?

January 09, 2021

DragonFly BSD Digest In Other BSDs for 2021/01/09

This bulked up fast this week.

January 07, 2021

The NetBSD Foundation pkgsrc-2020Q4 released

January 06, 2021

DragonFly BSD Digest timeout(1) in DragonFly

Aaron LI has ported timeout(1) to DragonFly.  It’s a way to run a command with a time limit, and I’m happy to say it is a cross-BSD item, coming from NetBSD by way of FreeBSD.

January 04, 2021

Benny Siegert SSD Rochade
My desktop PC has two NVMe drives, one for Windows and one for NetBSD. With Steam game footprints being what they are, the Windows one (256 GB) has been perpetually overfull, so it was time for something bigger. At the same time, I had bought an NVMe daughter board for my Pinebook Pro. My impression with the PBP is that the I/O performance of the eMMC module is holding it back, so I am excited to give it fast storage :)

December 30, 2020

Ruben Schade Things I was thankful for in 2020

This has been a hard year, and today from a personal perspective has been the cherry on top I fully expected (inb4 confirmation bias). But I’m going to let it get away with sending us off like this, so I’m writing an (incomplete!) list of things I was thankful for this year, written to the sounds of Mori Calliope telling the year what it can do, and reminding us it won’t bring us down.

Clara, and health

Dad didn’t lose his life or home in the Australian bushfires
This was only in January, I already can’t believe it. Helping him pack some essentials and evacuating on advice of the Rural Fire Service was… I can’t summon the words right now. But he and his home survived, and hopefully we’ll have a postponed Xmas again soon!

Reconnecting with friends
Dealing with anxiety over the last few years led me to distance from people I care about. I reconnected with so many of them again this year, from high school to now, and they’re all awesome… and understanding. Thanks everyone.

Me awkwardly presenting my talk on FreeBSD at OrionVM

Becoming more involved with FreeBSD and NetBSD
I spoke at the FreeBSD miniconf at 2020 in January, met some more members of the Australian BSD community, and I was mentioned on the BSD Now podcast! I still have impostor syndrome something fierce, but people have helped coax me out of my /bin/sh.

Hololive EN
People acting anime characters in realtime while playing games like Minecraft sounds niche but not groundbreaking. But their English-speaking generation launched this year have brought us so much joy. Clara and I will always be Investimigators, but Gura and Ina have become de facto councillors given the heavy questions they answer with care and good humour. I only half joke that they’ve probably saved lives during these depressing times.

Screenshot of one of our Minecraft villages

I blame Hololive-EN for getting me into this time sink game that I’d so successfully avoided for a decade. WOW it’s fun. You could do worse than spending your evenings building out villages and exploring with your girlfriend if you can’t travel or go outside.

OpenZFS 2.0
I use and advocate for ZFS everywhere I can, professionally and personally. Merging the disparate branches of open source ZFS into one tree was a huge technical and community achievement, and most importantly signalled the stability, long-term support, and viability of the world’s most trustworthy file system and volume manager now that Oracle holds the other keys. I run it today, and can’t wait for it to be in FreeBSD BASE next year.

I like Vim and have used it for years, but this whole time I didn’t realise that Emacs interfaces to my brain better: read into that as much as you want. Finding all these great tools that can run it has been too much fun.

This blog
I added 490 posts this year, and reached 7,200. Writing each one was a cathartic exercise to write, and even got mentioned on some high-profile news sites, aggregators, and mailing lists. I’ve had so many great emails, comments, and feedback. You’ve even taken time to read my site or RSS feed, and the post I’m writing now. Thank you.

Happy New Year. Ganbatte kudasai! Let’s do our best to make 2021 better.

By Ruben Schade, 2020-12-31.

December 25, 2020

Stack Overflow Which processor would execute hardware interrupt in a muticore system

In general hardware interrupts need to be processed immediately, at least so as to acknowledge it and do some first level of processing. As I understand this is not scheduled activity. Please correct me.

So the question is how to choose a processor that would actually execute this hardware interrupt handler?

One can answer this for Linux and/or BSD systems

December 21, 2020

NetBSD Blog Allen K. Briggs Memorial Scholarship

Allen Briggs was one of the earliest members of the NetBSD community, pursuing his interest in macBSD, and moving to become a NetBSD developer when the two projects merged. Allen was known for his quiet and relaxed manner, and always brought a keen wisdom with him; allied with his acute technical expertise, he was one of the most valued members of the NetBSD community.

He was a revered member of the NetBSD core team, and keenly involved in many aspects of its application; from working on ARM chips to helping architect many projects, Allen was renowned for his expertise. He was a distinguished engineer at Apple, and used his NetBSD expertise there to bring products to market.

Allen lived in Blacksburg Virginia with his wife and twin boys and was active with various community volunteer groups. His family touched the families of many other NetBSD developers and those friendships have endured beyond his passing.

We have received the following from Allen's family and decided to share it with the NetBSD community. If you can, we would ask you to consider contributing to his Memorial Scholarship.

The Allen K. Briggs Memorial Scholarship is an endowment to provide scholarships in perpetuity for summer programs at the North Carolina School of Science & Math, which Allen considered to be a place that fundamentally shaped him as a person. We would love to invite Allen's friends and colleagues from the BSD community to donate to this cause so that we can provide more scholarships to students with financial need each year. We are approximately halfway to our goal of $50K with aspirations to exceed that target and fund additional scholarships.

Two quick notes on donating: Important! When donating, you must select "Allen K. Briggs Memorial Scholarship" under designation for the donation to be routed to the scholarship If you have the option to use employer matching (i.e., donating to NCSSM through an employer portal to secure a match from your employer), please email the NCSSM Foundation's Director of Development, April Horton ([email protected]), after donating to let her know you want your gift and employer match to go to the Allen K. Briggs Memorial Scholarship Thanks in advance for your help. I'd be happy to answer any questions you or any others have about this.

December 08, 2020

Ruben Schade Block copy disk over SSH with gzip

We haven’t had a things you already know, unless you don’t installment since March. So many things have happened in the interim, not least the need to copy disks over a network:

$ dd if=$SOURCE | gzip -1 - | pv | ssh target 'gunzip dd of=$TARGET

This will copy a block device across SSH to a remote server, compressing with gzip to remove empty space, and pv to show progress.

By Ruben Schade, 2020-12-08.

December 07, 2020

Ruben Schade Antranig moving from macOS to FreeBSD

Antranig Vartanian wrote about his jump from macOS to a FreeBSD ThinkPad at the end of November. It comes after a year or so of tweets and comments to my blog here discussing his increasing frustration at where the Mac platform is headed, and I find it hard to fault him.

His main reasons for the switch came down to macOS becoming less Unix-y, with services he doesn’t need and an outdated userland; Big Sur’s frustrating new interface; Linux and Windows having their own problems; and his working knowledge of FreeBSD on the server making the switch easier. I’ve noted the same trends, and have similar views.

Mac users like us have felt the ebbs and flows of the platform over the years, and the announcement of the M1 chip has reaffirmed the company’s interest in the Mac after a lost decade chasing iOS instead. My current Intel 16-inch MacBook Pro is a great machine, and all the benchmarks suggest the M1 based Macs absolutely smoke any PC in their class. Almost all PC laptops have crappy screens with bad colour, poor viewing angles, and low resolutions; and their trackpads don’t come close to matching the sensitivity and precision of what Apple had a decade ago.

(Font rendering is another sticking point. Ironically, *nix desktops still have better looking fonts than Windows. It’s another thing you become accustomed to on macOS, and the standardisation of their Retina screens only makes the difference more stark when you go back to PCs ).

But software is another story, and I’m tending to lean in the direction of Antranig here from a usability perspective. Every Big Sur screenshot I’ve seen has reminded me of how I blanched seeing Windows Aero in Vista/7 and Metro in 8/10. We’re by no means in the minority here; prominent Mac developers have voiced their own frustrations at the seeming iOS 7-ificiation of the platform and the throwing away of their own user interface guidelines.

Apple have their reasons for doing this, but it shows their priorities for the platform are drifting further away from what users like me buy their kit for: a portable Unix workstation where I spend my time working and playing a few games rather than constantly tinkering with window managers and drivers. This wasn’t a coincidence or convenient alignment of our priorities, Apple used to heavily advertise macOS’s certified Unix pedigree. They’re the only ones left doing this after SGI and Sun.

I’ve got it to the point where I can configure a new Mac, save for updates, within an hour. Homebrew Cask lets me install graphical packages, and I lean heavily on NetBSD’s pkgsrc tooling for everything else. I’ve somehow avoided the headaches others in the community have had with VPN configs, firewall rules, OpenSSH, and others. Maybe I’ve just internalised so much of it from two decades of use.

That said, I’ve been careful to only use cross-platform software where I can, save for a few work-specific tools. Emacs, of all things, removed some of the last Mac-specific tools I used for years for note taking, reading RSS, using IRC, and expanding snippets. My Venn diagram of what my on-call Panasonic Let’s Note laptop with FreeBSD can do, and what my Mac can, overlap more than ever before.

I’m glad to see gentleman like Antranig are able to productively move onto a FreeBSD desktop that works better for them. I’m sticking with the Mac for now, but it sounds like all I need is some more compelling hardware. I sure wouldn’t mind more upgradeable ones!

By Ruben Schade, 2020-12-08.

December 05, 2020

UnitedBSD login.conf

Netbsd users, what's in your login.conf? Asking so I can get an idea of what I can do with it .

edited: and sysctl.conf as well. I'm trying to see what's possible with net and get the most out of my hardware

UnitedBSD Help Tuning netbsd

I just installed netbsd on an old desktop with an amd A6 and 8 gb of ram. Obviously it's an old cpu, but the performance on a recent debian install was much better. I've taken a cursory look at the docs to fine tune performance by editing kernel configs etc....

Anyone here have good advice on how to get the most of netbsd?

December 04, 2020

UnitedBSD exec dwm "" not found

I try compile dwm (not in pkgsrc) in NetBSD and run it. I have my file look like this

PREFIX = /usr/local
MANPREFIX = ${PREFIX}/share/man
X11INC = /usr/pkg/include
X11LIB = /usr/pkg/lib
FREETYPELIBS = -lfontconfig -lXft
FREETYPEINC = /usr/pkg/include/freetype2
CFLAGS = -std=c99 -pedantic -Wall -Wno-deprecated-declarations -Os ${INCS} ${CPPFLAGS}
CC = cc

and my .xinitrc

exec dwm

But the output when I startx is:

dwm: Shared object " not found"
/usr/pkg/bin/xinit: connection to X server lost

What did I do wrong?

December 03, 2020

UnitedBSD Thinkpad install finalization

I'm working on a Thinkpad x230 which I've had for a long time. I love it, and NetBSD is working well. However, I can't seem to find good documentation about which pieces of software, or Kernel modules make things work.

I know these laptops see a lot of use, and I'm sure someone can point me in the right direction.

What I am looking for:

I want an icon to self populate onto the desktop which when clicked, opens a file manager window to an already automounted USB or SD card drive.

I'm still working to get all the pieces of FVWM working, but I like it so far. I've not ruled out going back to xfce, but I wanted to try something different.

Hopefully someone can point me in the right directions with some of this.


December 02, 2020

UnitedBSD Can the aarch64 image file provided by netbsd run on rockpis?

Processor SoC RK3308
Quad Cortex-A35 ARM 64bits processor
frequency up to 1.3GHz
Memory 256MB or 512MB DDR3
Storage MicroSD(TF), optional on board 1/2/4/8Gb NAND flash
Wireless 802.11 b/g/n wifi
Bluetooth 4.0(rtl8723DS)
external antenna
USB USB2.0 Type-A HOST x1
USB3.0 Type-C OTG x1
Key maskrom x1
reset x1
Ethernet 100MB ethernet, RTL8201F,optional PoE(additional HAT requried)
IO 26-pin expansion header
I2C x4
PWM x3
SPI x2
I2S0 x1
5V DC power in x2
3.3V DC power in x2
Others ---
Power USB Type-C DC 5V
Size 1.7inch square

November 25, 2020

OS News Before the BSD kernel starts

In this article, I will walk through the early kernel initialization process, defining the meaning of this term. System initialization is a broad topic that ranges from the platform’s hardware design all the way up to typical functions of an operating system such as handling I/O operations. It is not possible to cover the entire topic adequately within the scope of an article. In this first part I will describe the well-known AMD64: 64-bit platform. I am going to highlight a very interesting part of the initialization process the early initialization of the kernel. Later, I will compare it with ARM64. In both cases I will discuss the topic in the context of NetBSD, the operating system known for its portability.

Some light reading.

November 22, 2020

Unix Stack Exchange NetBSD sh -c "echo OK" doesn't give any output? [closed]

I'm testing the portability of some stuff I'm writing to BSD. It's working on Linux, FreeBSD, OpenBSD. It isn't working on NetBSD.

The following is on a fresh VM installation I've made just for the purpose of testing this. I've traced the issue to

NetBSD$ uname -a
NetBSD NetBSD.local 9.1 NetBSD 9.1 (GENERIC) #0: Sun Oct 18 19:24:30 UTC 2020 [email protected]:/usr/src/sys/arch/amd64/compile/GENERIC amd64
NetBSD$ cat /etc/shells                                                                                 
#       $NetBSD: shells,v 1.3 1996/12/29 03:23:07 mrg Exp $
# List of acceptable shells for chpass(1).
# Ftpd will not allow users to connect who are not using
# one of these shells.

NetBSD$ for s in /bin/sh /bin/csh /bin/ksh /usr/pkg/bin/zsh /usr/pkg/bin/bash ; do echo $s; $s -c "echo OK" ; done
NetBSD$ su -
NetBSD# for s in /bin/sh /bin/csh /bin/ksh /usr/pkg/bin/zsh /usr/pkg/bin/bash ; do echo $s; $s -c "echo OK" ; done

Why doesn't sh -c "echo OK" and ksh -c "echo OK" work when I'm a non-root user, and why do they work when I'm root?

Other shells (csh, zsh, bash) work correctly, as shown above.

November 08, 2020

Unix Stack Exchange How to install a torrent client on a NetBSD server with only SSH access [closed]

I have a remote server running NetBSD 6, to which I have access only via SSH. I have very limited Unix/Linux experience but I guess there are some command line torrent cliens available for Unixes like the ones in the BSD family. Could someone help install a torrent client only using SSH access onto a NetBSD 6 server?

Thank you!

October 30, 2020

Ruben Schade NetBSD 9.1, FreeBSD 12.2-R, OpenBSD 6.8

The BSD Daemon

Holiday presents have come early this year! We saw updates for the three biggest BSDs this month, all with something interesting to try. Emphasis added on what my weekend will be spent checking out:

NetBSD 9.1:

The NetBSD Project is pleased to announce NetBSD 9.1, the firstfeature and stability update for the netbsd-9 release branch.

Over the last months many changes have been made to the NetBSD 9 stablebranch. As a stable branch the release engineering team and the NetBSDdevelopers are conservative with changes to this branch and many usersrely on the binaries from our regular auto-builds for production use.

The new release features (among various other changes) many bug fixes,a few performance enhancements, stability improvements for ZFS and LFSand support for USB security keys in a mode easily usable in Firefoxand other applications.


The FreeBSD Release Engineering Team is pleased to announce theavailability of FreeBSD 12.2-RELEASE. This is the third release of thestable/12 branch.

Some of the highlights:

  • Updates to the wireless networking stack and various drivers havebeen introduced to provide better 802.11n and 802.11ac support.

  • The ice(4) driver has been added, supporting Intel(R) 100Gb ethernetcards.

  • The jail(8) utility has been updated to allow running Linux(R) in ajailed environment.

  • OpenSSL has been updated to version 1.1.1h.

  • OpenSSH has been updated to version 7.9p1.

  • The clang, llvm, lld, lldb, compiler-rt utilities and libc++ havebeen updated to version 10.0.1.

I don’t run OpenBSD anywhere, but I keep being given good reasons to finally try it again. OpenBSD 6.8, via the OpenBSD Journal:

On its 25th birthday, the OpenBSD project has released OpenBSD 6.8, the 49th release.

The new release comes with a large number of improvements and debuts a new architecture, OpenBSD/powerpc64, running on the POWER9 family of processors. The full list of changes can be found in the announcement and on the release page.

By Ruben Schade in Sydney.

October 24, 2020

Ruben Schade Firefox 82.0 resolves macOS stuttering scrolling

My new MacBook Pro coincided with the release of Firefox 81.x, which lead me to think there was something wrong with the discrete GPU on this refurbished machine. Each time I loaded a site and scrolled, regardless of how heavy the page was, it would occasionally stop then lurch in an attempt to catch up. I joked with colleagues that it was a *nix VESA desktop emulation mode.

Safari and Vivaldi didn’t have the same issue, which thankfully ruled out a hardware.

Firefox icon

I’m pleased to report now that the issue is gone as of Firefox 82. Either that, or an extension I use also updated in the interim. Either way, I’m unreasonably happy.

I used to use Phoenix/Firebird/Firefox back in the day to push against IE. Now the few of us still using it are at it again, only we use it to push against Chrome hegemony. Please use it; it’s a great browser and especially quick since the Quantum update. We need its user agent in server logs to show the world there’s still value in cross-browser testing and development. We’re already starting to see Chrome-only sites again, presumably written by people who either weren’t alive or don’t remember the lessons of the first browser wars.

Special thanks to these fine contributors for maintaining the Homebrew Cask for Firefox, the FreeBSD Gecko team, and ryoon for pkgsrc. A lot of work goes into people like me being able to install Firefox on our various platforms with a single command.

This post originally appeared on Rubenerd.

October 21, 2020

NetBSD Blog NetBSD 9.1 released

After a small delay*, the NetBSD Project is pleased to announce NetBSD 9.1, the first feature and stability maintenance release of the netbsd-9 stable branch.

The new release features (among various other changes) many bug fixes, a few performance enhancements, stability improvements for ZFS and LFS and support for USB security keys in a mode easily usable in Firefox and other applications.

For more details and instructions see the 9.1 announcement.

Get NetBSD 9.1 from our CDN (provided by fastly) or one of the ftp mirrors.

Complete source and binaries for NetBSD are available for download at many sites around the world. A list of download sites providing FTP, AnonCVS, and other services may be found at

* for the delay: let us say there was a minor hickup and we took the opportunity to provide up to date timezone files for NetBSD users in Fiji.

October 20, 2020

The NetBSD Foundation NetBSD 9.1 released

October 19, 2020

NetBSD Blog Google Summer of Code 2020: [Final Report] Enhancing Syzkaller support for NetBSD
This report was written by Ayushu Sharma as part of Google Summer of Code 2020.

This post is a follow up of the first report and second report. Post summarizes the work done during the third and final coding period for the Google Summer of Code (GSoc’20) project - Enhance Syzkaller support for NetBSD


Sys2syz would give an extra edge to Syzkaller for NetBSD. It has a potential of efficiently automating the conversion of syscall definitions to syzkaller’s grammar. This can aid in increasing the number of syscalls covered by Syzkaller significantly with the minimum possibility of manual errors. Let’s delve into its internals.

A peek into Syz2syz Internals

This tool parses the source code of device drivers present in C to a format which is compatible with grammar customized for syzkaller. Here, we try to cull the details of the target device by compiling, and then collocate the details with our python code. For further details about proposed design for the tool, refer to previous post.

Python code follows 4 major steps:


This step involves fetching the possible ioctl commands for the target device driver and getting the files which have to be included in our dev_target.txt file. We have already seen all the commands for device drivers are defined in a specific way. These commands defined in the header files need to be grepped along with the major details, regex comes in as a rescue for this

	io = re.compile("#define\s+(.*)\s+_IO\((.*)\).*")
	iow = re.compile("#define\s+(.*)\s+_IOW\((.*),\s+(.*),\s+(.*)\).*")
	ior = re.compile("#define\s+(.*)\s+_IOR\((.*),\s+(.*),\s+(.*)\).*")
	iowr = re.compile("#define\s+(.*)\s+_IOWR\((.*),\s+(.*),\s+(.*)\).*")

Code scans through all the header files present in the target device folder and extracts all the commands along with their details using compiled regex expressions. Details include the direction of buffer(null, in, out, inout) based on the types of Ioctl calls(_IO, _IOR, _IOW, _IOWR) and the argument of the call. These are stored in a file named ioctl_commands.txt at location out/&lttarget_name&gt. Example output:

out, I2C_IOCTL_EXEC, i2c_ioctl_exec_t


Preprocessing is required for getting XML files, about which we would look in the next step. Bear plays a major role when it comes to preprocessing C files. It records the commands executed for building the target device driver. This step is performed when script is executed.

Extracted commands are modified with the help of parse_commands() function to include ‘-E’ and ‘-fdirectives’ flags and give it a new output location. Commands extracted by this function are then used by the compile_target function which filters out the unnecessary flags and generates preprocessed files in our output directory.

Generating XML files

Run C2xml on the preprocessed files to fetch XML files which stores source code in a tree-like structure, making it easier to collect all the information related to each and every element of structures, unions etc. For eg:

	&ltsymbol type="struct" id="_5970" file="am2315.i" start-line="13240" start-col="16" end-line="13244" end-col="11" bit-size="96" alignment="4" offset="0">
		&ltsymbol type="node" id="_5971" ident="ipending" file="am2315.i" start-line="13241" start-col="33" end-line="13241" end-col="41" bit-size="32" alignment="4" offset="0" base-type-builtin="unsigned int"/<
		&ltsymbol type="node" id="_5972" ident="ilevel" file="am2315.i" start-line="13242" start-col="33" end-line="13242" end-col="39" bit-size="32" alignment="4" offset="4" base-type-builtin="int"/>
		&ltsymbol type="node" id="_5973" ident="imasked" file="am2315.i" start-line="13243" start-col="33" end-line="13243" end-col="40" bit-size="32" alignment="4" offset="8" base-type-builtin="unsigned int"/>
	&ltsymbol type="pointer" id="_5976" file="am2315.i" start-line="13249" start-col="14" end-line="13249" end-col="25" bit-size="64" alignment="8" offset="0" base-type-builtin="void"/>
	&ltsymbol type="array" id="_5978" file="am2315.i" start-line="13250" start-col="33" end-line="13250" end-col="39" bit-size="288" alignment="4" offset="0" base-type-builtin="unsigned int" array-size="9"/>

We would further see how attributes like - idents, id, type, base-type-builtin etc conveniently helps us to analyze code and generate descriptions in a trouble-free manner .

Final part, which offers a txt file storing all the required descriptions as its output. Here, information from the xml files and ioctl_commands.txt are combined together to generate descriptions of ioctl commands and their arguments.

Xml files for the given target device are parsed to form trees,

for file in (os.listdir(
	tree = ET.parse(

We then traverse through these trees to search for the arguments of a particular ioctl command (particularly _IOR, _IOW, _IOWR commands) by the name of the argument. Once an element with the same value for ident attribute is found, attributes of the element are further examined to get its type. Possible types for these arguments are - struct, union, enum, function, array, pointer, macro and node. Using the type information we determine the way to define the element in accordance with syzkaller’s grammar syntax.

Building structs and unions involves defining their elements too, XML makes it easier. Program analyses each and every element which is a child of the root (struct/union) and generates its definitions. A dictionary helps in tracking the structs/unions which have been already built. Later, the dictionary is used to pretty print all the structs and union in the output file. Here is a code snippet which depicts the approach

            name = child.get("ident")
            if name not in self.structs_and_unions.keys():
                elements = {}
                for element in child:
                    elem_type = self.get_type(element)
                    elem_ident = element.get("ident")
                    if elem_type == None:
                        elem_type = element.get("type") 
                    elements[element.get("ident")] = elem_type

                element_str = ""
                for element in elements: 
                    element_str += element + "\t" + elements[element] + "\n"
                self.structs_and_unions[name] = " {\n" + element_str + "}\n"
            return str(name)

Task of creating descriptions for arrays is made simpler due to the attribute - `array-size`. When it comes to dealing with pointers, syzkaller needs the user to fill in the direction of the pointer. This has already been taken care of while analyzing the ioctl commands in The second argument with in/out/inout as its possible value depends on ‘fun’ macros - _IOR, _IOW, _IOWR respectively.

There is another category named as nodes which can be distinguished using the base-type-builtin and base-type attributes.


Once the setup script for sys2syz is executed, sys2syz can be used for a certain target_device file by executing the python wrapper script ( with :

python -t &ltabsolute_path_to_device_driver_source> -c compile_commands.json -v

This would generate a dev_&ltdevice_driver&gt.txt file in the out directory. An example description file autogenerated by sys2syz for i2c device driver.

#Autogenerated by sys2syz

resource fd_i2c[fd]

syz_open_dev$I2C(dev ptr[in, string["/dev/i2c"]], id intptr, flags flags[open_flags]) fd_i2c

ioctl$I2C_IOCTL_EXEC(fd fd_i2c, cmd const[I2C_IOCTL_EXEC], arg ptr[out, i2c_ioctl_exec])

i2c_ioctl_exec {
iie_op	flags[i2c_op_t_flags]
iie_addr	int16
iie_buflen	len[iie_buf, intptr]
iie_buf	buffer[out]
iie_cmdlen	len[iie_cmd, intptr]
iie_cmd	buffer[out]

Future Work

Though we have a basic working structure of this tool, yet a lot has to be worked upon for leveling it up to make the best of it. Perfect goals would be met when there would be least of manual labor needed. Sys2syz still looks forward to automating the detection of macros used by the flag types in syzkaller. List of to-dos also includes extending syzkaller’s support for generation of description of syscalls.

Some other yet-to-be-done tasks include-


We have surely reached closer to our goals but the project needs active involvement and incremental updates to scale it up to its full potential. Looking forward to much more learning and making more contribution to NetBSD community.

Atlast, a word of thanks to my mentors William Coldwell, Siddharth Muralee, Santhosh Raju and Kamil Rytarowski as well as the NetBSD organization for being extremely supportive. Also, I owe a big thanks to Google for giving me such a glaring opportunity to work on this project.

October 17, 2020

Unix Stack Exchange Does *BSD have the ability to encrypt a system partition with full disk encryption?

Does FreeBSD, NetBSD, or OpenBSD have an encryption feature like Linux's dm-crypt? And will it work for a system partition?

October 13, 2020

The NetBSD Foundation New Security Advisory: NetBSD-SA2020-003

October 09, 2020

The NetBSD Foundation pkgsrc-2020Q3 released

October 07, 2020

NetBSD Blog The GNU GDB Debugger and NetBSD (Part 5)
The NetBSD developers maintain two copies of GDB:

The base-system version of GDB (GPLv3) still relies on local patching to work. I have set a goal to reduce the number of custom patches to bare minimum, ideally achieving the state of GDB working without any local modifications at all.

GDB changes

Last month, the NetBSD/amd64 support was merged into gdbserver. This month, the gdbserver target support was extended to NetBSD/i386 and NetBSD/aarch64. The gdbserver and gdb code was cleaned up, refactored and made capable of introducing even more NetBSD targets.

Meanwhile, the NetBSD/i386 build of GDB was fixed. The missing include of x86-bsd-nat.h as a common header was added to i386-bsd-nat.h. The i386 GDB code for BSD contained a runtime assert that verified whether the locally hardcoded struct sigcontext is compatible with the system headers. In reality, the system headers are no longer using this structure since 2003, after the switch to ucontext_t, and the validating code was no longer effective. After the switch to newer GCC, this was reported as a unused local variable by the compiler. I have decided to remove the check on NetBSD entirely. This was followed up by a small build fix.

The NetBSD team has noticed that the GDB's code contains a portability bug and prepared a local fix. The traditional behavior of the BSD kernel is that passing random values of sun_len (part of sockaddr_un) can cause failures. In order to prevent the problems, the sockaddr_un structure is now zeroed before use. I've reimplemented the fix and successfully upstreamed it.

In order to easily resolve the issue with environment hardening enforced by PaX MPROTECT, I've introduced a runtime warning whenever byte transfers betweeen the debugee and debugger occur with the EACCES errno code.

binutils changes

I've added support for NetBSD/aarch64 upstream, in GNU BFD and GNU GAS. NetBSD still carries local patches for the GNU binutils components, and GNU ld does not build out of the box on NetBSD/aarch64.


The NetBSD support in GNU binutils and GDB is improving promptly, and the most popular platforms of amd64, i386 and aarch64 are getting proper support out of the box, without downstream patches. The remaining patches for these CPUs include: streamlining kgdb support, adding native GDB support for aarch64, upstreaming local modifications from the GNU binutils components (especially BFD and ld) and introducing portability enhancements in the dependent projects like libiberty and gnulib. Then, the remaining work is to streamline support for the remaining CPUs (Alpha, VAX, MIPS, HPPA, IA64, SH3, PPC, etc.), to develop the missing generic features (such as listing open file descriptors for the specified process) and to fix failures in the regression test-suite.

October 01, 2020

The NetBSD Foundation New Developer in September 2020

September 30, 2020

OS News Wayland on NetBSD – trials and tribulations

Related to yesterday’s post about NetBSD switching to ctwm:

After I posted about the new default window manager in NetBSD I got a few questions, including “when is NetBSD switching from X11 to Wayland?”, Wayland being X11’s “new” rival. In this blog post, hopefully I can explain why we aren’t yet!

The short answer? Wayland is too Linux-specific to be easily ported or adapted to NetBSD, so don’t expect it any time soon.

September 29, 2020

Stack Overflow Trouble compiling ncurses-st-menu for BSD

I found a package on github ( and am having trouble compile it for BSD platforms like NetBSD or OpenBSD. The instructions say to do ./, ./configure, and then make. So I install the autoconf, autotools, libtool, gettext, and any other necessary packages and run ./ It works without spitting out any errors. But ./configure says it doesn't support "OS x86_64-unknown-netbsd9.0" if for example on NetBSD. Can someone else try to compile this program? Because if this was done by autotools, it certainly should support any of the four major BSD operating systems.

September 28, 2020

OS News Default window manager switched to CTWM in NetBSD-current

For more than 20 years, NetBSD has shipped X11 with the “classic” default window manager of twm. However, it’s been showing its age for a long time now.

In 2015, ctwm was imported, but after that no progress was made. ctwm is a fork of twm with some extra features – the primary advantages are that it’s still incredibly lightweight, but highly configurable, and has support for virtual desktops, as well as a NetBSD-compatible license and ongoing development. Thanks to its configuration options, we can provide a default experience that’s much more usable to people experienced with other operating systems.

The ctwm website has more information for those interested.

NetBSD Blog Wayland on NetBSD - trials and tribulations

After I posted about the new default window manager in NetBSD I got a few questions, including "when is NetBSD switching from X11 to Wayland?", Wayland being X11's "new" rival. In this blog post, hopefully I can explain why we aren't yet!

Last year (and early this year) I was responsible for porting the first working Wayland compositor to NetBSD - swc. I chose it because it looked small and hackable. You can try it out by installing the velox window manager from pkgsrc.

A Wayland compositor running on my NetBSD laptop, with a few applications like Luakit and Dungeon Crawl Stone Soup open.


In a Wayland system, the "compositor" (display server) is responsible for managing displays, input, and window management. Generally, this means a lot of OS-specific code is contained there.

Wayland does not define protocols for features X11 users expect, like screenshots, screen locking, or window management. Either you implement these inside the compositor (lots of work that has to be redone), or you define your own protocol extension.

The Wayland "reference implementation" is a small set of libraries that can be used to build a compositor or a client application. These libraries currently have hard dependencies on Linux kernel APIs like epoll. In pkgsrc we've patched the libraries to add kqueue(2) support, but the patches haven't been accepted upstream. Wayland is written with the assumption of Linux to the extent that every client application tends to #include <linux/input.h> because Wayland's designers didn't see the need to define a OS-neutral way to get mouse button IDs.

So far, all Wayland compositors but swc have a hard dependency on libinput, which only supports Linux's input API (also cloned in FreeBSD). In NetBSD we have an entirely different input API - wscons(4). wscons is actually fairly simple to write code for, someone just needs to go out there and do it. You can use my code in swc as a reference. :)

In general, Wayland is moving away from the modularity, portability, and standardization of the X server.

Is it ready for production?

No, but you can play with it.

Task list

I've decided to take a break from this, since it's a fairly huge undertaking and uphill battle. Right now, X11 combined with a compositor like picom or xcompmgr is the more mature option.

September 21, 2020

NetBSD Package System (pkgsrc) on DaemonForums samba problem
hi guys ,i need some favour,i install and config samba follow "",
it show " protocol negotiation failed: NT_STATUS_IO_TIMEOUT" when i run "smbclient -Usamba -L localhost" i dont konw what i miss?thanks

and this my step and config file
pkgin install samba
cp /usr/pkg/share/examples/rc.d/smbd /etc/rc.d/
cp /usr/pkg/share/examples/rc.d/nmbd /etc/rc.d/
cp /usr/pkg/share/examples/rc.d/samba /etc/rc.d/
and in /etc/rc.conf
follow is my /usr/pkg/etc/samba/smb.conf

# smbclient -L localhost
protocol negotiation failed: NT_STATUS_IO_TIMEOUT
# vim /usr/pkg/etc/samba/smb.conf
# cat  /usr/pkg/etc/samba/smb.conf
# This is the main Samba configuration file. You should read the
# smb.conf(5) manual page in order to understand the options listed
# here. Samba has a huge number of configurable options (perhaps too
# many!) most of which are not shown in this example
# For a step to step guide on installing, configuring and using samba,
# read the Samba-HOWTO-Collection. This may be obtained from:
# Many working examples of smb.conf files can be found in the
# Samba-Guide which is generated daily and can be downloaded from:
# Any line which starts with a ; (semi-colon) or a # (hash)
# is a comment and is ignored. In this example we will use a #
# for commentry and a ; for parts of the config file that you
# may wish to enable
# NOTE: Whenever you modify this file you should run the command "testparm"
# to check that you have not made any basic syntactic errors.
#======================= Global Settings =====================================

# workgroup = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH
  workgroup = WORKGROUP

# server string is the equivalent of the NT Description field
  server string = Samba Server

# Server role. Defines in which mode Samba will operate. Possible
# values are "standalone server", "member server", "classic primary
# domain controller", "classic backup domain controller", "active
# directory domain controller".
# Most people will want "standalone server" or "member server".
# Running as "active directory domain controller" will require first
# running "samba-tool domain provision" to wipe databases and create a
# new domain.
#  server role = standalone server

# This option is important for security. It allows you to restrict
# connections to machines which are on your local network. The
# following example restricts access to two C class networks and
# the "loopback" interface. For more examples of the syntax see
# the smb.conf man page
  hosts allow = 192.168.31.

# Uncomment this if you want a guest account, you must add this to /etc/passwd
# otherwise the user "nobody" is used
;  guest account = pcguest

# this tells Samba to use a separate log file for each machine
# that connects
  log file = /var/log/log.%m

# Put a capping on the size of the log files (in Kb).
  max log size = 50

# Specifies the Kerberos or Active Directory realm the host is part of
;  realm = MY_REALM

# Backend to store user information in. New installations should
# use either tdbsam or ldapsam. smbpasswd is available for backwards
# compatibility. tdbsam requires no further configuration.
;  passdb backend = tdbsam

# Using the following line enables you to customise your configuration
# on a per machine basis. The %m gets replaced with the netbios name
# of the machine that is connecting.
# Note: Consider carefully the location in the configuration file of
#      this line.  The included file is read at that point.
;  include = /usr/local/samba/lib/smb.conf.%m

# Configure Samba to use multiple interfaces
# If you have multiple network interfaces then you must list them
# here. See the man page for details.
;  interfaces =

# Where to store roving profiles (only for Win95 and WinNT)
#        %L substitutes for this servers netbios name, %U is username
#        You must uncomment the [Profiles] share below
;  logon path = \\%L\Profiles\%U

# Windows Internet Name Serving Support Section:
# WINS Support - Tells the NMBD component of Samba to enable it's WINS Server
;  wins support = yes

# WINS Server - Tells the NMBD components of Samba to be a WINS Client
#      Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
;  wins server = w.x.y.z

# WINS Proxy - Tells Samba to answer name resolution queries on
# behalf of a non WINS capable client, for this to work there must be
# at least one  WINS Server on the network. The default is NO.
;  wins proxy = yes

# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names
# via DNS nslookups. The default is NO.
  dns proxy = no

# These scripts are used on a domain controller or stand-alone
# machine to add or delete corresponding unix accounts
;  add user script = /usr/sbin/useradd %u
;  add group script = /usr/sbin/groupadd %g
;  add machine script = /usr/sbin/adduser -n -g machines -c Machine -d /dev/null -s /bin/false %u
;  delete user script = /usr/sbin/userdel %u
;  delete user from group script = /usr/sbin/deluser %u %g
;  delete group script = /usr/sbin/groupdel %g

#============================ Share Definitions ==============================
  comment = Home Directories
  browseable = no
  writable = yes

comment = Shared
path = /home/zero/work
browseable = yes
writable = yes
guest ok = yes
# Un-comment the following and create the netlogon directory for Domain Logons
; [netlogon]
;  comment = Network Logon Service
;  path = /usr/local/samba/lib/netlogon
;  guest ok = yes
;  writable = no
;  share modes = no

# Un-comment the following to provide a specific roving profile share
# the default is to use the user's home directory
;    path = /usr/local/samba/profiles
;    browseable = no
;    guest ok = yes

# NOTE: If you have a BSD-style print system there is no need to
# specifically define each individual printer
  comment = All Printers
  path = /usr/spool/samba
  browseable = no
# Set public = yes to allow user 'guest account' to print
  guest ok = no
  writable = yes
  printable = yes

# This one is useful for people to share files
;  comment = Temporary file space
;  path = /tmp
;  read only = no
;  public = yes

# A publicly accessible directory, but read only, except for people in
# the "staff" group
;  comment = Public Stuff
;  path = /home/samba
;  public = yes
;  writable = no
;  printable = no
;  write list = @staff

# Other examples.
# A private printer, usable only by fred. Spool data will be placed in fred's
# home directory. Note that fred must have write access to the spool directory,
# wherever it is.
;  comment = Fred's Printer
;  valid users = fred
;  path = /homes/fred
;  printer = freds_printer
;  public = no
;  writable = no
;  printable = yes

# A private directory, usable only by fred. Note that fred requires write
# access to the directory.
;  comment = Fred's Service
;  path = /usr/somewhere/private
;  valid users = fred
;  public = no
;  writable = yes
;  printable = no

# a service which has a different directory for each machine that connects
# this allows you to tailor configurations to incoming machines. You could
# also use the %U option to tailor it by user name.
# The %m gets replaced with the machine name that is connecting.
;  comment = PC Directories
;  path = /usr/pc/%m
;  public = no
;  writable = yes

# A publicly accessible directory, read/write to all users. Note that all files
# created in the directory by users will be owned by the default user, so
# any user with access can delete any other user's files. Obviously this
# directory must be writable by the default user. Another user could of course
# be specified, in which case all files would be owned by that user instead.
;  path = /usr/somewhere/else/public
;  public = yes
;  only guest = yes
;  writable = yes
;  printable = no

# The following two entries demonstrate how to share a directory so that two
# users can place files there that will be owned by the specific users. In this
# setup, the directory should be writable by both users and should have the
# sticky bit set on it to prevent abuse. Obviously this could be extended to
# as many users as required.
;  comment = Mary's and Fred's stuff
;  path = /usr/somewhere/shared
;  valid users = mary fred
;  public = no
;  writable = yes
;  printable = no
;  create mask = 0765

September 19, 2020

NetBSD General on DaemonForums New Shared Lib on i386

NetBSD i386 9.0 (GENERIC) #0: Fri Feb 14 00:06:28 UTC 2020

I have my own personal shared library, which complies and installs fine. When I compile programs that link against that library, the compile succeeds.

But when I attempt to run one of the programs I get:


/usr/local/lib/ text relocations
/usr/local/lib/ Cannot write-enable text segment: Permission denied
I even tried a reboot without luck.

I did many searches but all I found was issues compiling mplayer and to use, but nothing else. I read is no longer needed and man pages has nothing I can find.

Does anyone know what I can do to fix this issue ?

edit: no luck with "-Wl,-R/usr/local/lib" as noted in the elf FAQ


September 17, 2020

NetBSD General on DaemonForums Howto power off usb devices
Under FreeBSD, I can power off a usb device with usbconfig's "power_off" option. How can I do that under NetBSD?


# usbstats
Controller /dev/usb0:
      1069 control
        0 isochronous
 154806725 bulk
  8954336 interrupt
Controller /dev/usb1:
      375 control
        0 isochronous
  33390421 bulk
        2 interrupt

# usbdevs
addr 1: EHCI root hub, NetBSD
 addr 2: Rate Matching Hub, Intel
  addr 5: External USB 3.0, Toshiba
  addr 3: USB Optical Mouse, Primax Electronics
  addr 4: Kensington U+P Keyboard, NOVATEK
addr 1: EHCI root hub, NetBSD
 addr 2: Rate Matching Hub, Intel
  addr 3: USB2.0-CRW, Generic

I want to power off (and later on) External USB 3.0, Toshiba, which I believe is at usb0, addr 5.