Re: Desktop performance

2024-05-04 Thread Brian Conway
On Sat, May 4, 2024, at 8:41 AM, Manfred Koch wrote:
> Hi community,
>
> I'm a newbie and have a few questions according performance in
> workstation. The following changes I've made in sysctl.conf:
> kern.maxproc=4096
> kern.maxthread=4096
> kern.maxfiles=32768
>
> further in the login.conf:
>
> staff:\
>      :datasize-cur=4096M:\
>      :datasize-max=infinity:\
>      :maxproc-max=512:\
>      :maxproc-cur=256:\
>      :openfiles-cur=4096:\
>      :openfiles-max=4096:\
> :ignorenologin:\
> :requirehome@:\
> :tc=default:
>
> The user add to the group staff:
> usermod -L staff user
> usermod -U staff user
>
> These specifications origin from a website
>
> I could need your judgments to these settings, so that I can use it.

What problem are you trying to solve? I would not recommend blindly changing 
settings from to a web site. If you describe the issue you're encountering, 
you're more likely to receive guidance on whether any knobs are relevant to it.

Brian



Re: NAT on CARP interface

2024-04-28 Thread Brian Conway
On Sun, Apr 28, 2024, at 11:49 AM, Mike wrote:
> If I remember right, you can run 'ifconfig' and see if that interface 
> is marked as an egress interface or not. I can't remember how OBSD 
> determines what interfaces are egress or not but your em0 seems to be 

https://www.openbsd.org/faq/pf/filter.html#syntax

"The egress group, which contains the interface(s) that holds the default 
route(s)."

> in a private network so it might not be classifying itself as egress. 
>
> Nevertheless, writing egress or $ext_If, what difference does it really 
> make? You're just repeating a different word. Lol

Brian Conway
Owner
RCE Software, LLC



Re: Getting "Boot error" after replacing a disk in softraid

2024-04-23 Thread Brian Conway
>   wd0 at pciide0 channel 0 drive 0: 

That seems... unusual. Do you have an (old) IDE compatibility option turned on 
in the BIOS? I would have expected it to attach via AHCI:

sd0 at scsibus1 targ 2 lun 0:  naa.5002538e304456ac

Brian Conway



Re: OpenBSD Installation Doesn't Detect NVMe SSD, but Detects My USB Drives

2024-04-15 Thread Brian Conway
On Mon, Apr 15, 2024, at 1:29 AM, aliyu...@tutanota.com wrote:
> Hello,
>
> I'm currently trying to install OpenBSD on my laptop, and I'm coming
> across a problem. The installation only detects my installation drive
> and my other USB flash drive that I use for data storage, but not my
> NVMe SSD I want to do an installation on.
>
> This same problem also occurs in NetBSD, but not FreeBSD. The UEFI
> setup acknowledges my drive as a Non-RAID disk, and Linux also shows
> it as nvme0n1, so there isn't any problems with the drive itself.
>
> Running 'sysctl hw.disknames' only shows 3 disks:
>  'sd0' (my installation drive), 'sd1' (my media drive), and 'rd0'
>
> The disk currently has Alpine Linux installed on it, if that gives
> more information.
>
> Thanks for any help!
>
> Ali Yuruk

Sorry to hear of your trouble. I recommend including some actionable 
information, such as:

- make and model of the NVMe drive
- OpenBSD installer dmesg with the drive not recognized
- FreeBSD or Linux dmesg with the drive working

Brian Conway
Owner
RCE Software, LLC



Re: / not in RO after change in fstab

2024-04-12 Thread Brian Conway
On Thu, Apr 11, 2024, at 3:31 PM, Malo Langer wrote:
> Hey, 
> I configured my root directory ('/') to be read-only in the fstab on 
> CentOS 7.5 (see dmesg output below). However, the system does not boot 
> in read-only mode; I have to switch it to read-only manually.
> Did I miss something?
>
> Please find attached a copy of the 'fstab' contents and the output of 
> the 'mount' command
>
> Kind regards
> Attachments:
> * dmesg_75.txt
> * mount_75.txt
> * fstab_75.txt

This is intended:

https://github.com/openbsd/src/blob/4365136d4e2a201819da54e3e3bc8e95c1301f8e/etc/rc#L428

If you plan on bypassing that, you're wading into unsupported land. For 
example, you'll have an unpleasant time with a read-only /dev.

Brian Conway
Owner
RCE Software, LLC



Re: ipv6 assistance

2024-04-06 Thread Brian Conway
On Sat, Apr 6, 2024, at 10:09 AM, Sonic wrote:
> I'm on Comcast (Xfinity) in the US.

Your setup will be specific to your ISP. I'm on AT Fiber, which uses SLAAC 
for the WAN interface and DHCPv6-PD for internal interfaces. I do the latter 
with dhcpcd.

A quick search indicates Xfinity uses DHCPv6 for the WAN interface and 
DHCPv6-PD for internal interfaces. I haven't confirmed any of that, as I'm not 
a customer. You should be able to translate most Xfinity guides for use with 
OpenBSD, I would think.

Brian Conway
Owner
RCE Software, LLC



Re: Bash instead of ksh

2024-04-02 Thread Brian Conway
On Tue, Apr 2, 2024, at 10:08 PM, Nick Holland wrote:
> What is it that you see bash doing so much better than stock pdksh?

Multiline command editing.

(I don't use bash, but it would be a nice feature.)

Brian



Re: Request for a check 'relinking in progress' before a reboot

2024-03-23 Thread Brian Conway
On Fri, Mar 22, 2024, at 6:10 PM, Dan wrote:
> Hello,
>
> To avoid prbs with the relinking of the kernel happening in background
> I propose to set a little check during the shutdown to avoid to interrup it..
>
> Thnx!
>
> -Dan

I have frequently rebooted or shut down shortly after boot, for example when 
booting the wrong VM by accident, and it has never caused a problem on 
subsequent reboots. What problem are you actually experiencing, just the 
message being printed to the console?

My concern with the proposed patch is for my painfully slow system (embedded, 
i386, whatever) that may be locked out of reboot/halt for 3-5 minutes after 
booting.

Brian



Re: New (for me,) dmesg warning during system bootup.

2024-02-25 Thread Brian Conway
On Sun, Feb 25, 2024, at 4:27 PM, Avon Robertson wrote:
> I have noticed several posts related to endbr64 in the last week, so I
> thought this might be of interest to someone.
>
> Performed a 'sysupgrade -s' earlier today to:
> kern.version=OpenBSD 7.5-beta (GENERIC.MP) #25: Sat Feb 24 20:50:14 MST 2024
> dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
>
> The below was subsequently noticed in the system bootup messages.
>
> 
> pf enabled
> starting network
> reordering: ld.sold: warning: _dl_start: missing endbr64 libcld: 
> warning: __mcount: missing endbr64 libcrypto sshd.
> 
>
> -- 
> aer

https://marc.info/?t=17088928881

"It is unimportant and temporary."

Brian



Re: KeyTrap DNS vulnerability

2024-02-14 Thread Brian Conway
On Tue, Feb 13, 2024, at 9:55 PM, b...@fea.st wrote:
> “A single packet can exhaust the processing 
> capacity of a vulnerable DNS server, effectively
> disabling the machine, by exploiting a 
> 20-plus-year-old design flaw in the DNSSEC
> specification.
>
> https://www.theregister.com/2024/02/13/dnssec_vulnerability_internet/

-current and both -stable branches have been updated:

https://marc.info/?l=openbsd-cvs=2=1=CVE-2023-50387=b

Brian Conway
Owner
RCE Software, LLC



Re: Single partition fs layout

2024-02-13 Thread Brian Conway
On Tue, Feb 13, 2024, at 6:37 AM, Odhiambo Washington wrote:
> Is there a disadvantage to having this layout style where everything is on
> 1 partition?

Beyond the plethora of responses you've already received, the Installation 
section of the FAQ covers this thoroughly:

https://www.openbsd.org/faq/faq4.html#Partitioning

Brian Conway
Owner
RCE Software, LLC



Re: New postfix-3.8.20221007p12 broken TLS for Gmail servers?

2024-02-02 Thread Brian Conway
On Fri, Feb 2, 2024, at 6:44 PM, Herbert J. Skuhra wrote:
> On Sat, Feb 03, 2024 at 03:00:10AM +0300, Mark wrote:
>> Hi.
>> 
>> It seems that the recent Postfix update under 7.4-amd64,
>> (package: postfix-3.8.20221007p12-sasl2-mysql) breaks TLS connections,
>> coming from Gmail servers, throwing a TLS library problem.
>> 
>> Here's the log output;
>> 
>> postfix/smtpd[32879]: connect from mail-yw1-f178.google.com[209.85.128.178]
>> 
>> postfix/smtpd[7374]: Trusted TLS connection established from
>> mail-lf1-f45.google.com[209.85.167.45]: TLSv1.3
>> with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519
>> server-signature ECDSA (prime256v1) server-digest SHA256 client-signature
>> RSA-PSS (2048 bits) client-digest SHA256
>> 
>> postfix/smtpd[7374]: warning: TLS library problem: error:0A000126:SSL
>> routines::unexpected eof while reading:ssl/record/rec_layer_s3.c:308:
>> postfix/smtpd[7374]: lost connection after STARTTLS from
>> mail-lf1-f45.google.com[209.85.167.45]
>> postfix/smtpd[7374]: disconnect from mail-lf1-f45.google.com[209.85.167.45]
>> ehlo=1 starttls=1 commands=2
>> 
>> Before updating the package, I had postfix-3.8.20221007p11, and it had no
>> such problem.
>
> Why do you run such an outdated postfix snapshot?

That is the latest version that is supported/available in packages-stable:

https://cdn.openbsd.org/pub/OpenBSD/7.4/packages-stable/amd64/

Brian Conway
Owner
RCE Software, LLC



Re: Communication between hosts on different network interfaces

2024-01-06 Thread Brian Conway
On Sat, Jan 6, 2024, at 2:09 PM, Ibsen S Ripsbusker wrote:
> I also tried setting different subnets.
>
>   /etc/hostname.igc1:
>   inet 192.168.2.1/24
>
>   /etc/hostname.igc2:
>   inet 192.168.3.1/24

This is what I have done, with a pf rule to block connections originating from 
my less-trusted network to my more-trusted network. With the IP forwarding 
sysctl set, no routing magic or NAT is required. It works well for both IPv4 
and IPv6.

Brian



Re: Installing openBSD

2023-07-31 Thread Brian Conway
On Mon, Jul 31, 2023, at 12:00 PM, ykla wrote:
> Any manually created efi
> partition system will not be recognized.

I can assure you, it will (when done correctly). I have done so 
manually/scripted with EFI+GPT and EFI+MBR many times. An example of the less 
common EFI+MBR approach for the installer ramdisk is here:

https://github.com/openbsd/src/blob/master/distrib/amd64/ramdisk_cd/Makefile#L19

Maybe you can work backwards from it to see what you're doing wrong.

Brian



Re: High ACPI CPU load

2023-07-17 Thread Brian Conway
On Sat, Jul 15, 2023, at 5:38 PM, Julian Huhn wrote:
> On Sat, Jul 15, 2023 at 06:05:06PM +, Mike Larkin wrote:
>>On Sat, Jul 15, 2023 at 04:34:20PM +0200, Julian Huhn wrote:
>>> Since I got many DMARC rejection mails and therefore don't know how many
>>> people this mail reached at all, once again with less restrictive DMARC
>>> settings.
>>>
>>> On Sat, Jul 15, 2023 at 02:28:56PM +0200, Julian Huhn wrote:
>>> > Moin!
>>> >
>>> > A few weeks ago, I put a new system into operation, where I notice a
>>> > permanently high CPU load. With the help of top it appears that
>>> > permanently the process acpi0 is executed.
>>> >
>>> > Is this a bug?
>>> >
>>> > I'm happy to help with more logs, if you tell me what you need.
>>> >
>>> > --Huhn
>>> >
>>
>>This is a stuck GPE. This board in particular is a known issue; search
>>the lists.
>>
>>mbuhl@ suggested a few months back that I get one of these machines to fix
>>the issue, but when I started looking at it, the simplest fix was to just
>>install a new bios.  Since this is likely one of these super cheap 4 port
>>igc(4) aliexpress "firewall PCs", you may need to search a bit to find a
>>compatible bios since most of these don't have a real brand site associated
>>with them.
>>
>>FWIW, the machines with "techvision" bios (like yours) exhibit this issue.
>>Mine had techvision bios (and the same problem) before I flashed it to the
>>image described below.
>>
>>You need to find this bios:
>>
>>bios0: vendor American Megatrends International, LLC. version "JK4LV107" date 
>>04/17/2023
>
> I just found this Reddit Post [0], describing a related issue with this 
> kind of board. There's also a download link [1] in the comments for the 
> bios update. As soon as I found some time I will install the update. 
> Thanks!
>
>>That one works on my machine, with exactly the same config as yours. No
>>more ACPI GPE storm.
>>
>>I don't have the link anymore for where I found the BIOS image, but I
>>think it was on servethehome in one of the long threads about these
>>machines. You need to do some digging.
>>
>>While the root cause may be due to us lacking some driver for the device
>>owning that GPE, or our lack of activating GPEs based on attached
>>hardware, the 5-minute bios update fix was a good enough fix for me and
>>I moved on to other things.
>>
>>The other lesson I learned is that you get what you pay for; buying $100
>>PCs from aliexpress means you're just going to be paying for it somewhere
>>else. In this case, dealing with shoddy engineering and unsupported boards.
>>
>>-ml
>>
>>>
>
> [0] 
> https://www.reddit.com/r/PFSENSE/comments/14vv90w/topton_5105_n6005_owners_any_issues_running_on/
> [1] 
> https://pan.x86pi.cn/BIOS%E6%9B%B4%E6%96%B0/1.Intel%E8%BF%B7%E4%BD%A0%E4%B8%BB%E6%9C%BA%E7%B3%BB%E5%88%97BIOS/N5105%20V3-V5%20%E5%BE%AE%E7%A0%81%E6%9B%B4%E6%96%B023-04-18

I can confirm that the linked BIOS update resolves the stuck GPE on my board. I 
ended up using unetbootin to get the ISO in a state that my board was willing 
to boot and flash.

I appear to have lost the ability to redirect the BIOS via serial console with 
this update, but as noted, you get what you pay for.

Thanks all.

Brian



Re: patch-008 missing in CVS repo

2023-07-13 Thread Brian Conway
On Thu, Jul 13, 2023, at 9:13 AM, Stefan Sperling wrote:
> On Thu, Jul 13, 2023 at 08:49:06AM -0500, Brian Conway wrote:
>> I'm seeing the same. The commit email for 7.3-stable is here:
>> 
>> https://marc.info/?l=openbsd-cvs=168919043301821
>> 
>> But exec_elf.c shows no changes in the past 4 weeks to any branch:
>> 
>> https://cvsweb.openbsd.org/src/sys/kern/exec_elf.c
>> 
>> I see similar results when I try pulling from a couple anoncvs mirrors. 
>> Perhaps a bug or oops in the CVS update process?
>
> Keep waiting while more of Canada wakes up and it will likely get resolved.
> In the meantime you could fetch the patch from the errata page and apply
> it locally.

Looks resolved now, thanks all.

Brian



Re: patch-008 missing in CVS repo

2023-07-13 Thread Brian Conway
On Thu, Jul 13, 2023, at 12:40 AM, Yoshihiro Kawamata wrote:
> Of the recently announced OpenBSD 7.3 patches 006 through 009,
> 008 cannot be found on CVSweb.
>
> And even after cvs update, sys/kern/exec_elf.c remains unfixed.
>
> But, I was able to find patch-008 on GitHub.
>
> 
> Yoshihiro Kawamata
> https://fuguita.org

I'm seeing the same. The commit email for 7.3-stable is here:

https://marc.info/?l=openbsd-cvs=168919043301821

But exec_elf.c shows no changes in the past 4 weeks to any branch:

https://cvsweb.openbsd.org/src/sys/kern/exec_elf.c

I see similar results when I try pulling from a couple anoncvs mirrors. Perhaps 
a bug or oops in the CVS update process?

Brian Conway
Owner
RCE Software, LLC



Re: RSS or Atom syndication for security advisories?

2023-05-22 Thread Brian Conway
On Mon, May 22, 2023, at 9:59 AM, Xavier wrote:
> I don't know if you say it seriously. If you do, I think it's the best. 
> Perhaps you could write some semantic file and convert them to desired 
> format (html, RSS, etc.).
> I saw the www repo 
> (https://github.com/openbsd/www/blob/38884496ed89e3041dcaaeadaf21e20a918581ee/errata73.html)
>  
> and it seems you make things manually. Don't you think an static site 
> generator or some kind of tool to make things more automatic (I'm 
> thinking in mandoc conversion because all the web is really a big 
> documentation project)?
>
> Regards,
> Xavier

Done.

https://www.mail-archive.com/announce@openbsd.org/maillist.xml

Enjoy. Bye.

-b



Re: 7.2 panic and "reorder_kernel: failed" ...

2023-04-30 Thread Brian Conway
On Sun, Apr 30, 2023, at 8:14 AM, Why 42? The lists account. wrote:
> After running fsck manually to clean one of the filesystems I did an
> additional reboot, just to be sure the system would/could come up
> cleanly.
>
> I noticed this message on the console, seemingly as the system was
> shutting down:
>> stopping package daemons: nginx slowcgi postfix cyrus_imapd(killed) amavisd 
>> clamd sshguardreorder_kernel: failed -- see 
>> /usr/share/relink/kernel/GENERIC.MP/relink.log
>
> That relink.log file looks like this:
>> root:[~]# ls -ltr /usr/share/relink/kernel/GENERIC.MP/relink.log
>> -rw-r--r--  1 root  wheel  142 Apr 30 14:29 
>> /usr/share/relink/kernel/GENERIC.MP/relink.log
>
>> root:[~]# cat /usr/share/relink/kernel/GENERIC.MP/relink.log
>> (SHA256) /bsd: OK
>> LD="ld" sh makegap.sh 0x gapdummy.o
>> ld -T ld.script -X --warn-common -nopie -o newbsd ${SYSTEM_HEAD} vers.o 
>> ${OBJS}
>> root:[~]# 
>
> What might that mean? Is it significant?

I can't speak to the panic, but I think the relink error is just the background 
process getting killed when you rebooted the system immediately after finishing 
boot.

Brian Conway
RCE Software, LLC



Re: A messed-up fresh install due to a careless user

2023-04-29 Thread Brian Conway
On Sat, Apr 29, 2023, at 3:48 AM, Odd Martin Baanrud wrote:
> Yes, off course one should have a firewall.
> That was why I installed OpenBSD on the actual machine in the first place.
> I prepared it when it was on the LAN only, and then moved it into production.
> And now it works perfectely.
> But the firewall needed to be disabled while the machine was on the LAN only.

The default pf.conf is very sufficient for allowing incoming traffic in a LAN 
environment.

Brian Conway



Re: PC Engines APU2 infinite loop rebooting immediate after kernel loads

2023-04-17 Thread Brian Conway
On Mon, Apr 17, 2023, at 7:23 PM, Jonathan Thornburg wrote:
> Since two different kernels and boot devices result in the same
> infinite-reboot loop, with the reboot happening at the same place
> in the boot sequence (immediately after the kernel entry point address
> is printed), I don't think my problem is a corrupted kernel file.
> I've also tried swapping power supplies, with no change in the outcome.
>
> Has anyone seen this sort of problem (infinite reboot loop, rebooting
> immediately after kernel entry point address is printed) before?  Should
> I be looking at reflashing the BIOS with a newer (or older) version?

My first thought was bad power supply, but it looks like you've tried that. 
Your BIOS isn't *that* old, but you might consider trying a newer one 
(https://pcengines.github.io/). I'm using 4.17.0.3 successfully on a couple 
different apu2 configurations.

You could also try booting from a USB stick, I've run these devices with mSATA, 
SD card, or USB flash.

Brian Conway



Re: File system is full after using dd

2023-04-15 Thread Brian Conway
On Sat, Apr 15, 2023, at 9:14 AM, Lorenzo Torres wrote:
> Hello, I've run the dd command to wipe the data of an SD card:dd 
> if=/dev/zero of=/dev/rsdb1c bs=1MAfter quite some time it crashed 
> saying that the / filesystem is full and even after a reboot the same 
> happens. Now I can't even run xorg because the fs is full. Any idea on 
> why this happened?

Yes, you filled up your / partition with a garbage file. Run `ls -lS 
/dev/|head` and you will surely find it.

/dev/rsdb1c is not a valid drive and partition/slice combination. You probably 
meant rsd1c, but be careful to verify that when wiping.

Brian Conway
Lead Software Engineer, Owner
RCE Software, LLC



Re: Recent changes in the FAQ.

2023-03-03 Thread Brian Conway
On Fri, Mar 3, 2023, at 9:09 AM, Pascal Deveaux wrote:
> I want to install OpenBSD with full disk encryption.
>
> Why these recent changes in the FAQ in the section "Full Disk Encryption":
>
> -old-
> "if you use GPT for UEFI booting, do: # fdisk -iy -g -b 960 sd0"
>
> -new-
> "if you use GPT for UEFI booting, do: # fdisk -gy -b 532480 sd0"

This is the commit (prior to the www update) and rationale:

https://marc.info/?l=openbsd-cvs=166843427315447

Brian Conway
RCE Software, LLC



Content AWOL in Musescore 3.5.0 left side palette.

2023-01-22 Thread Brian Durant
Can anyone else confirm that there is no content in the Musescore 3.5.0 
left hand palette?


System info:
OS: OpenBSD 7.2, Arch.: x86_64, MuseScore version (64-bit): 3.5.0, 
revision: github-musescore-musescore-43c5553


Any idea how to get some of the items (as per default) to display that 
can be found in the master palette?




Re: Script launcher and a suite of basic scripts for music production?

2023-01-19 Thread Brian Durant

On 1/18/23 18:35, Luke A. Call wrote:

On 2023-01-18 16:51:28+0100, Brian Durant  
wrote:

On 1/18/23 11:46, Abhishek Chakravarti wrote:

Brian Durant  writes:

The only disadvantage that I can see at this point, is that what I am
describing would require a number of open terminals on the desktop,
which can be confusing to sort through, particularly during a live
performance.


Although not a direct answer to your question, perhaps tmux(1) might be
helpful here? You could have one tmux session window split into several
panes. Cycling through the panes is quite simple with PREFIX + o (the
default PREFIX being CTRL+b; in my case it's mapped to CTRL+o


Thanks for that. I haven't played around with tmux for ages, but you are
correct that could potentially help with terminal clutter. Below are a few
[]


FWIW I have my tmux set up to use Alt+#  (alt+1, alt+2...) key
combinations to switch among tmux panes more easily under X than using Ctrl+b
every time, which might be helpful if efficiency is important.  It is
also easier for me to put in muscle memory. I can provide details off-list if 
desired.


Thank you for that generous offer. However, before we go there, I think 
that there is a need to be more specific (to the extent that I can) at 
this point, regarding my use case scenario. This can be divided between 
audio (baritone saxophone, bass and singing) and MIDI (a class compliant 
launchpad type controller and a class compliant MIDI keyboard). midish 
looks like a very strong contender, but there are two issues that I am 
unclear about:

1) Can Fluidsynth instruments be changed on the fly when using midish?
2) Can MIDI events be used to trigger sndio and ffmpeg actions on the 
system? Here I am thinking of the possibility of using my controller pad 
as an alternative to a script launcher.


The audio side is in many ways more clear cut. I need to be able to 
record saxophone, voice and bass (I am unfortunately limited to two of 
these at a time with my current hardware.). The input through the sound 
card would need to be monitored (when live) and be recorded to file for 
use as loops with basic sound effects (ffmpeg?).


Sooo the big question with relevance to tmux, is how many terminal 
instances do I need for this scenario? I know my instruments, but as 
stated, I am a new user to OpenBSD, so I am trying to wrap my head 
around this scenario. I am cautiously optimistic, as (to my 
understanding) Ableton Live and Launchpads use scripts (hidden behind 
proprietary mumbo jumbo and GUI) so it should be possible to do this in 
OpenBSD as well.


Any input on how many terminal instances I will need, particularly with 
reference to audio, but also the MIDI in my scenario will be very much 
appreciated, as this will help me nail down my need for using tmux, a 
script editor, or something completely different to test this scenario 
in action on OpenBSD.




Re: Script launcher and a suite of basic scripts for music production?

2023-01-18 Thread Brian Durant

On 1/18/23 11:46, Abhishek Chakravarti wrote:


Hello!

Brian Durant  writes:


The only disadvantage that I can see at this point, is that what I am
describing would require a number of open terminals on the desktop,
which can be confusing to sort through, particularly during a live
performance.


Although not a direct answer to your question, perhaps tmux(1) might be
helpful here? You could have one tmux session window split into several
panes. Cycling through the panes is quite simple with PREFIX + o (the
default PREFIX being CTRL+b; in my case it's mapped to CTRL+o


Thanks for that. I haven't played around with tmux for ages, but you are 
correct that could potentially help with terminal clutter. Below are a 
few thoughts about scripts for music. I will avoid flooding the list 
with all of my ideas but will simply provide a couple of basic ones. 
Note that I am new to OpenBSD and have little experience with scripting:


OpenBSD music scripts

Scan midi/ values (from dmesg or...) and route them to midithru/0 
similar to manual commands below:
(Is there a use case scenario for rerouting midi/1 - ? by use of 
midithru/1 -?)


$ midicat -d -q midi/0 -q midithru/0
$ midicat -d -q midi/1 -q midithru/0


Record audio from USB sound card:
$ aucat -o /home/user/Music/set/1 - ?.wav

Playback audio file:
$ aucat -i /home/user/Music/set/1 - ?.wav

To my knowledge, most USB sound cards have at least two inputs (for 
microphone and guitar / bass as examples). Important that any script is 
input sensitive and can automatically number files for each input in 
order for possible playback with effects by using a simple alias created 
automatically for the purpose, for the session (?) Also important that 
monitoring is possible during file creation to avoid pauses while 
performing a set.




Script launcher and a suite of basic scripts for music production?

2023-01-17 Thread Brian Durant
Is there a script launcher that can be used for basic scripts to 
facilitate live (or close to live) music performances with OpenBSD? One 
of the reasons that I am a proponent of using OpenBSD with music, is the 
fact that much can be done simply, from the command line. Recording 
audio from a USB sound card, using ffmpeg to add reverb and basic 
effects, rerouting MIDI, switching instruments in Fluidsynth (still 
working on that one), potentially replaying audio files as clips, etc. 
There are a lot of possibilities that could be facilitated by a script 
launcher (and a suite of basic scripts) for new music creators trying 
out OpenBSD, would definitely be an asset.


The only disadvantage that I can see at this point, is that what I am 
describing would require a number of open terminals on the desktop, 
which can be confusing to sort through, particularly during a live 
performance. Which is part of the reason that a script launcher would be 
useful. The advantages are many, first and foremost fitting in with the 
Unix philosophy of combining existing programs for new purposes, 
providing an open source alternative to commercial DAWs such as Ableton 
and Bitwig, while at the same time removing the frustration for some 
users that the only DAW available on OpenBSD is LMMS, as well as the 
temptation for some to try to compile Zrythm or another DAW to OpenBSD.


Ideas or suggestions?



Re: sndiod and midicat routing issue.

2023-01-15 Thread Brian Durant

On 1/15/23 12:26, Alexandre Ratchov wrote:

On Sun, Jan 15, 2023 at 09:38:38AM +0100, Brian Durant wrote:

The following command will connect a USB MIDI device:

$ midicat -d -q midi/0 -q midithru/0 &

A second device can be connected as follows:

$ midicat -d -q midi/1 -q midithru/1 &

Both output MIDI code in the terminal. (Note that redirecting both MIDI
devices to midithru/0 doesn’t seem to pipe both devices through, but rather
only midi/0.) Adding the following command provides a way to convert MIDI
code to sound using Fluidsynth:


Redirecting two ports to midithru/0 is supposed to work:

$ midicat -d -q midi/0 -q midithru/0   # in one terminal
$ midicat -d -q midi/1 -q midithru/0   # in another terminal

should merge the two inputs. Both terminals should show the events of
the corresponding input. If there's a synth on midithru/0
(ex. fluidsynth command below is running) it will produice sounds for
both inputs.


Hmm. Seems to be working now. However, this just means that MIDI signals 
go from both MIDI devices to one instance of fluidsynth. This of course 
means that both devices are sending MIDI code to one soundfont 
instrument. If run as:


$ midicat -d -q midi/0 -q midithru/0

and

$ midicat -d -q midi/1 -q midithru/1

MIDI input could be used to play different soundfont instruments - one 
for midi/0 and one for midi/1. Possibly something with the Fluidsynth 
"-L" option? The problem is the same for LMMS. However, only one MIDI 
input is ever available. Enabling MIDI input and choosing different 
channels for SF2 Player and Kicker do not provide a second MIDI input to 
choose from when the clicking the relevant plugin's gear icon in the 
"song editor" window. Not even when running midicat as I have suggested 
above. Hopefully this won't raise any hackles me writing this, but what 
I am describing is the normal expectation for using MIDI under Windows, 
Mac and Linux... I realize that this is achieved in various ways 
depending on the OS, but particularly the expected use case scenario 
that I describe for LMMS provides some challenges in OpenBSD.



$ fluidsynth /usr/local/share/generaluser-gs/GeneralUser_GS.sf2

However, this only works for midi/0. The same is the case when using LMMS
with SF2 Player and Kicker. I can get sound with SF2 Player or Kicker, but
there again appears no way to connect the second device to the second
plugin. Connecting two MIDI devices (or one device with keys and pads on two
channels) is not an unusual use case scenario, so I am assuming that there
is a solution without having to resort to midish.





sndiod and midicat routing issue.

2023-01-15 Thread Brian Durant

The following command will connect a USB MIDI device:

$ midicat -d -q midi/0 -q midithru/0 &

A second device can be connected as follows:

$ midicat -d -q midi/1 -q midithru/1 &

Both output MIDI code in the terminal. (Note that redirecting both MIDI 
devices to midithru/0 doesn’t seem to pipe both devices through, but 
rather only midi/0.) Adding the following command provides a way to 
convert MIDI code to sound using Fluidsynth:


$ fluidsynth /usr/local/share/generaluser-gs/GeneralUser_GS.sf2

However, this only works for midi/0. The same is the case when using 
LMMS with SF2 Player and Kicker. I can get sound with SF2 Player or 
Kicker, but there again appears no way to connect the second device to 
the second plugin. Connecting two MIDI devices (or one device with keys 
and pads on two channels) is not an unusual use case scenario, so I am 
assuming that there is a solution without having to resort to midish.


I am using a Keith McMillen K-Board and a KORG nanoPAD2, as they are 
both class compliant, however any class compliant devices at hand should 
work...


Cheers,

Brian



Re: PC Engines APU alternative for OpenBSD - 2022h2

2023-01-13 Thread Brian Conway
On Fri, Jan 13, 2023, at 8:34 PM, patrick keshishian wrote:
>> Search with keywords like "mini pc router", "pfsense router" etc,
>> you will find a load of boxes along these lines (to pick the first
>> one I found, there are loads of choices of all very similar hardware)
>> - https://www.aliexpress.com/item/1005004420642522.html?
>> They do have video out as well but you can just configure OpenBSD
>> to use serial console.
>>
>> Now that the 1G em(4) chips are out of stock everywhere, the common
>> NICs these days are igc(4) 2.5G ethernet (very common, to the extent that
>> "I225" will probably also do as a search term ..).
>
> I picked up one of these and just got it unpacked.
> I am failing to figure out how to boot from an external
> USB CDR to get OpenBSD installed on there.
>
> I'm connecting through the serial/COM port, but it
> automatically goes through the Pfsense/FreeBSD
> boot process and starts the "configuration" questions.
>
> Some reddit discussions seem to suggest pressing
> either F2 or Delete key at the first beep. But either
> I'm not quick enough, or I'm misunderstand something.
>
> Can someone offer any hints?
>
> --patrick

While they might exist, none of the mini PC/firewalls I've received from China 
support BIOS redirection over serial. If yours is the same, you'll want to hook 
up a monitor and keyboard and then either redirect bsd.rd over serial, or 
complete the installation and then set up a serial console going forward.

Another issue I've run into are BIOSes that disable all the CPU C-states by 
default. You will likely want to enable those for decent power 
management/cooling/power consumption.

Overall, I've enjoyed my AliExpress cheapies, but the firmware leaves a lot to 
be desired. They seem to be compiled with every option under the sun present, 
even if they don't apply to the hardware in question - other than the 
aforementioned serial BIOS redirection.

Brian Conway



Re: OpenBSD 7.2 amd64, MIDI error "midi/0: couldn't open port".

2023-01-06 Thread Brian Durant

On 1/6/23 13:42, Alexandre Ratchov wrote:

could you post the output of dmesg (at least the midi-related lines).


I haven't been able to find any. I should add that this is a fresh 
install of OpenBSD 7.2. For thoroughness, The entire dmesg is available 
Here:


https://pastebin.com/McSXuvu9




Re: OpenBSD 7.2 amd64, MIDI error "midi/0: couldn't open port".

2023-01-06 Thread Brian Durant

On 1/6/23 18:40, Alexandre Ratchov wrote:

On Fri, Jan 06, 2023 at 10:18:37AM +0100, Brian Durant wrote:

Hi,
Completely lost as to the cause for the error. I have read the relevant man
pages as well as searching the mail archive.

System info:
OpenBSD 7.2 amd64, GNOME 42.5, Huawei MateStation S with AMD Ryzen 5 4600G
and Radeon Graphics.

Error messages:
$ midicat -d -q midi/0 -q midithru/0
midi/0: couldn't open port
$ midicat -d -q midi/1 -q midithru/0
midi/1: couldn't open port



according to your dmesg (other mail), you don't any MIDI ports on your
machine.


Relevant output:
$ dmesg ...
uaudio0: sync play xfer, err = 6
uaudio0: sync play xfer, err = 6
uaudio0: sync play xfer, err = 6
ugen2 at uhub2 port 2 "Roland A-PRO" rev 1.10/1.20 addr 3



Do you know if this is class-compliant (aka "driverless")? OpenBSD
supports only class-compliant MIDI devices.


Interesting question. I know that it works with various Linux 
distributions, which to my understanding also work with class compliant 
devices as a point of reference. However, the Roland A-800 Pro also has 
an "ACT" mode which requires a Windows driver if used. I have never used 
it in "ACT" mode and never needed a special driver.


Unfortunately, I will probably have to assume that OpenBSD at least, 
doesn't consider this device class compliant. A pity as it is difficult 
to find MIDI keyboards with better than average keys...



Not all old devices are class-compliant because in the 2000's, Windows
used to have a bug that hardware designers tried to
workaround. Certain devices from the 2000's have a switch (or
configuration parameter) to switch between vendor-specific and
class-compliant modes. Try to dig in the manual. If you can't switch
the device to class-compliant mode, get a USB-MIDI interface, they are
cheap nowadays and just work.


$ cat /etc/rc.conf.local
pkg_scripts=avahi_daemon messagebus gdm cups_browsed
sndiod_flags=-z 128 -f rsnd/1

$ cat /etc/sysctl.conf
kern.audio.record=1

sndiod flags are for reduced latency and for audio to work properly on my
Huawei MateStation.


seems correct


Thanks for your time.



OpenBSD 7.2 amd64, MIDI error "midi/0: couldn't open port".

2023-01-06 Thread Brian Durant

Hi,
Completely lost as to the cause for the error. I have read the relevant 
man pages as well as searching the mail archive.


System info:
OpenBSD 7.2 amd64, GNOME 42.5, Huawei MateStation S with AMD Ryzen 5 
4600G and Radeon Graphics.


Error messages:
$ midicat -d -q midi/0 -q midithru/0
midi/0: couldn't open port
$ midicat -d -q midi/1 -q midithru/0
midi/1: couldn't open port

Relevant output:
$ dmesg ...
uaudio0: sync play xfer, err = 6
uaudio0: sync play xfer, err = 6
uaudio0: sync play xfer, err = 6
ugen2 at uhub2 port 2 "Roland A-PRO" rev 1.10/1.20 addr 3

$ cat /etc/rc.conf.local
pkg_scripts=avahi_daemon messagebus gdm cups_browsed
sndiod_flags=-z 128 -f rsnd/1

$ cat /etc/sysctl.conf
kern.audio.record=1

sndiod flags are for reduced latency and for audio to work properly on 
my Huawei MateStation.


Brian



Re: "/bsd: cannot forward" ip6 traffic messages

2022-12-31 Thread Landy, Brian
Hi Gábor,

Yes, these are ULA addresses I’ve assigned, each interface has a /64 
(fd58:6af3:2ff6:aa::1/64 and fd58:6af3:2ff6:c8::1/64).  Those two host 
addresses, however, have not changed.  They are still active as I write this.  
I believe Apple only assigns temporary addresses for globally routable prefixes.

I should have mentioned that these are not one-off messages.  For example, 
these two hosts generated this message 36 times over a ~45 minute period 
yesterday.  While that was happening I could see that both hosts are active.  
Traffic would pass and occasionally generate these messages.

Thanks,
Brian

> On Dec 31, 2022, at 5:45 AM, Gábor LENCSE  wrote:
> 
> Hi Brian,
> 
> I am not familiar with Apple devices, but I am familiar with IPv6.
> 
> The IPv6 addresses in your log file have the fc00::/7 prefix, that is, they 
> are from the RFC4193 "unique local unicast" range: 
> https://datatracker.ietf.org/doc/html/rfc4193#section-3.1
> The L bit is 1, the next pseudorandom 40 bits are: 58:6af3:2ff, and the two 
> networks are distinguished by the next 16bits: 00aa and 00c0.
> 
> Does the last 64 bits change over time?
> 
> If yes, then my hypothesis is that perhaps the devices use RFC 8981 temporary 
> IPv6 addresses in an uncoordinated way: they just generate a new address and 
> stop using the old one, whereas the other party still tries to use the old 
> one.
> 
> Best regards,
> 
> Gábor
> 
> 12/31/2022 6:50 AM keltezéssel, Landy, Brian írta:
>> I’m seeing messages like these frequently in /var/log/messages:
>> 
>>  /bsd: cannot forward from fd58:6af3:2ff6:aa:895:e4a:8bf9:5759 to
>>  fd58:6af3:2ff6:c8:97:5360:bd73:6a88 nxt 17 received on interface 9
>> 
>> The two hosts are on separate networks (one is the lan, the other a
>> vlan).  I’ve tracked it down to traffic on udp port 3722 between
>> Apple devices; the messages stop if I block traffic on that port.
>> When unblocked, I can see the traffic is passed successfully by using
>> tcpdump on both vlans. Maybe some packets are occsionally dropped?
>> 
>> I’m wondering if anyone knows why this message is logged, and if there
>> is anything I can tune with sysctl or pf to prevent it.  I’m on 7.2
>> with the latest patches.
>> 
>> Thanks,
>> Brian
>> 
> 



"/bsd: cannot forward" ip6 traffic messages

2022-12-30 Thread Landy, Brian
I’m seeing messages like these frequently in /var/log/messages:

  /bsd: cannot forward from fd58:6af3:2ff6:aa:895:e4a:8bf9:5759 to
  fd58:6af3:2ff6:c8:97:5360:bd73:6a88 nxt 17 received on interface 9

The two hosts are on separate networks (one is the lan, the other a
vlan).  I’ve tracked it down to traffic on udp port 3722 between
Apple devices; the messages stop if I block traffic on that port.
When unblocked, I can see the traffic is passed successfully by using
tcpdump on both vlans. Maybe some packets are occsionally dropped?

I’m wondering if anyone knows why this message is logged, and if there
is anything I can tune with sysctl or pf to prevent it.  I’m on 7.2
with the latest patches.

Thanks,
Brian



Re: poor routing/nat performance

2022-12-19 Thread Brian Conway
On Mon, Dec 19, 2022, at 10:35 AM, David Hajes wrote:
> I am guessing HW is not issue.

I would not be totally sure on that. The CPU in the APU2 is pretty slow. While 
you can no doubt find some tweaked Linux or FreeBSD configurations that push it 
close to wire speed, the best I've ever been able to accomplish with the 
simplest pf.conf and forwarding between em0-em1 is 500-550 Mbps sustained, with 
occasional bursts to 600 Mbps. Research indicates others have had similar 
experiences.

If you check the misc@ list archive, you've find a bunch of threads with people 
looking for inexpensive alternatives to the APU2+ platform, and there are 
plenty in the $100-200 USD range for amd64. Most of my APU2s have been retired 
to terminal/console server duty.

> CPU bored, max. load 25%

It sounds like 1 of your 4 cores is maxed, which would not be surprising.

Brian Conway



Re: OpenBSD File systems , on Flash / SSD CPE (in sites with uncontrolled power (CPE customer sites)

2022-11-28 Thread Brian Conway
On Mon, Nov 28, 2022, at 4:06 PM, Tom Smyth wrote:
> /dev/sd0a / ffs rw,softdep,noatime 1 1
> /dev/sd0d /usr/local ffs rw,wxallowed,nodev,softdep,noatime 1 1

softdep is a useful option for metadata-heavy workloads, but it is not a 
magical go-fast flag. While it's possible that characterization is true for 
your /usr/local mount, I would guess it is probably not for /.

Brian



Re: CyberPower cp1500PPFCLCD

2022-11-13 Thread Brian Conway
On Sun, Nov 13, 2022, at 3:49 PM, Kenneth Hendrickson wrote:
> --- On Sunday, November 13, 2022, 01:56:12 PM EST, Peter Fraser 
>  wrote:
>
>> I replace it with a new CyberPower cp1500PPFCLCD.
>
> You poor bastard. If this company has anything to do with the 
> CyberPower PC

It does not.

https://www.cyberpowersystems.com/

Brian



Re: Xiaomi Mi Air, Synaptic trackpad and OpenBSD 7.2.

2022-11-12 Thread Brian Durant

On 11/12/22 19:04, Marcus MERIGHI wrote:

Hello,

cont...@anarchosaxophonist.org (Brian Durant), 2022.11.12 (Sat) 10:49 (CET):

I am trying to get the Synaptic trackpad (12C?) on a Xiaomi Mi Air laptop
working. I have found several references in the OpenBSD man pages, so I
believe something has been worked on, but at what stage the development is
currently at, I am  a bit unsure. Usually, if something is included in
OpenBSD, it often just works, but sometimes configuration is needed. As I
have seen no references to this in the mailing list archive, I thought that
I would ask here - do I just need to configure something, or is development
still working on this?
  
this sounds like you have OpenBSD running on that hardware with only the

trackpad not working.

What machine is this? I cannot find it at a local retailer and looking
for "Xiaomi Mi Air" on am?zon makes me wonder if this thing really runs
OpenBSD :-)

https://www.amazon.com/Xiaomi-Purifier-Efficiency-Eliminate-Coverage/dp/B094NST3N8

dmesg please!

Marcus


Thank you for the reply. Here is a lot of information about the Xiaomi 
Mi Air 12.5":


https://jcs.org/2017/05/22/xiaomiair

I purchased mine used on EBay.

Dmesg:

OpenBSD 7.2 (GENERIC.MP) #758: Tue Sep 27 11:57:54 MDT 2022
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 4186648576 (3992MB)
avail mem = 4042362880 (3855MB)
random: good seed from bootblocks
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.8 @ 0x8c4fd000 (69 entries)
bios0: vendor INSYDE Corp. version "A04" date 08/06/2016
bios0: Timi TM1612
acpi0 at bios0: ACPI 5.0
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP TCPA UEFI UEFI SSDT SSDT TPM2 MSDM SSDT SSDT 
DBGP DBG2 ASF! ASPT BOOT DBGP HPET LPIT APIC MCFG SSDT SSDT SSDT SSDT 
SSDT SSDT SSDT DMAR FPDT WPBT BGRT
acpi0: wakeup devices PEG0(S4) PEGP(S4) PEG1(S4) PEGP(S4) PEG2(S4) 
PEGP(S4) PWRB(S4) LID0(S3) GLAN(S4) XHC_(S3) XDCI(S4) HDAS(S4) RP01(S4) 
RP02(S4) RP03(S4) RP04(S4) [...]

acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 2399 Hz
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) m3-6Y30 CPU @ 0.90GHz, 1197.21 MHz, 06-4e-03
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,SGX,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,SRBDS_CTRL,MD_CLEAR,TSXFA,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,MELTDOWN
cpu0: 32KB 64b/line 8-way D-cache, 32KB 64b/line 8-way I-cache, 256KB 
64b/line 4-way L2 cache, 4MB 64b/line 16-way L3 cache

cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 24MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4.1.1.1, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Core(TM) m3-6Y30 CPU @ 0.90GHz, 1075.63 MHz, 06-4e-03
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,SGX,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,SRBDS_CTRL,MD_CLEAR,TSXFA,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,MELTDOWN
cpu1: 32KB 64b/line 8-way D-cache, 32KB 64b/line 8-way I-cache, 256KB 
64b/line 4-way L2 cache, 4MB 64b/line 16-way L3 cache

cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 1 (application processor)
cpu2: Intel(R) Core(TM) m3-6Y30 CPU @ 0.90GHz, 997.68 MHz, 06-4e-03
cpu2: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,SGX,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,SRBDS_CTRL,MD_CLEAR,TSXFA,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,MELTDOWN
cpu2: 32KB 64b/line 8-way D-cache, 32KB 64b/line 8-way I-cache, 256KB 
64b/line 4-way L2 cache, 4MB 64b/line 16-way L3 cache

cpu2: smt 1, core 0, package 0
cpu3 at mainbus0: apid 3 (application processor)
cpu3: Intel(R) Core(TM) m3-6Y30 CPU @ 0.90GHz, 997.68 MHz, 06-4e-03
cpu3: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VM

Xiaomi Mi Air, Synaptic trackpad and OpenBSD 7.2.

2022-11-12 Thread Brian Durant
I am trying to get the Synaptic trackpad (12C?) on a Xiaomi Mi Air 
laptop working. I have found several references in the OpenBSD man 
pages, so I believe something has been worked on, but at what stage the 
development is currently at, I am  a bit unsure. Usually, if something 
is included in OpenBSD, it often just works, but sometimes configuration 
is needed. As I have seen no references to this in the mailing list 
archive, I thought that I would ask here - do I just need to configure 
something, or is development still working on this?




Re: Connect MIDI keyboard to SF2 player in LMMS - OpenBSD 7.2.

2022-11-08 Thread Brian Durant

On 11/8/22 17:15, Alexandre Ratchov wrote:

If you've multiple MIDI controllers, you could assign a MIDI channel
to each (most MIDI controllers have a knob to do so) and then route
them all to "midithru/0" so lmms or fluidsynth see them as a single
port. For instance:

midicat -d -q midi/0 -q midithru/0
midicat -d -q midi/1 -q midithru/0

Then, in lmms (or fluidsynth), configure each track's "Input channel"
setting to the corresponding input (click on the "keyboard" icon, then
the "enable midi input" button, then select the channel number).  If
you need a more complex MIDI routing, you could try the audio/midish
port.

Note that certain programs count channel numbers from 0 other from 1.


Hi again Alexandre,
OK, many thanks for that. I have tried to make this a little simpler by 
just using one device, that has both keys and pads. Here is the dmesg 
section:


umidi0 at uhub0 port 5 configuration 1 interface 1 "Nektar Impact LX25+" 
rev 1.10/0.32 addr 3

umidi0: (genuine USB-MIDI)
umidi0: out=1, in=2
midi0 at umidi0: 
midi1 at umidi0: 
ugen2 at uhub0 port 5 configuration 1 "Nektar Impact LX25+" rev 
1.10/0.32 addr 3


I ran the following:
$ midicat -d -q midi/0 -q midithru/0
$ midicat -d -q midi/1 -q midithru/0

It appears that it is necessary to use two terminals for this...
As suggested, I configured LMMS' Sf2 Player input channel to "1" and 
then enabled the midi input. I did the same with the Kicker plugin input 
channel, set it to "2" and enabled the midi input. I then set the action 
gear for each plugin to receive MIDI input on each. The Sf2 plugin input 
can be seen in the piano roll, where notes and velocity can be adjusted 
after the fact. The terminal running the $ midicat -d -q midi/0 -q 
midithru/0 command has MIDI output scrolling down the terminal.


While the pads produce the correct (drum) sounds when the Kicker plugin 
is open, when closed (and only the Sf2 and Kicker plugins are in the 
song editor panel) I only get grand piano sounds. Likewise, there is no 
scrolling output in the second terminal with the command $ midicat -d -q 
midi/1 -q midithru/0. Nothing appears in the piano roll either, when I 
chose "record". Not sure what is going on here...




Connect MIDI keyboard to SF2 player in LMMS - OpenBSD 7.2.

2022-11-08 Thread Brian Durant
I am trying to connect my MIDI keyboard to the Sf2 Player, in LMMS. 
sndio MIDI is set under MIDI interface in the MIDI settings section of 
the LMMS preferences. DMESG gives me the following when I plug my MIDI 
keyboard into the computer:


umidi0 at uhub0 port 5 configuration 1 interface 0 "KORG INC. microKEY2" 
rev 1.10/1.02 addr 3

umidi0: (genuine USB-MIDI)
umidi0: out=1, in=1
midi0 at umidi0: 

I have read the three bits of LMMS documentation on MIDI, and I am 
familiar with how to use fluidsynth to connect directly with my MIDI 
keyboard to the default soundfont:


$ fluidsynth /usr/local/share/generaluser-gs/GeneralUser_GS.sf2
$ midicat -d -q midi/0 -q midithru/0

Unfortunately, none of this seems to work in LMMS. Clicking on the 
action gear for the Sf2 Player plugin shows MIDI input and output, but 
does not list my MIDI keyboard (as in Linux or Windows) so that I can 
bind it to the Sf2 Player. There is very little information about using 
MIDI instruments in the OpenBSD FAQ, and my knowledge of sdiod and jack 
are limited.


The only way that I have found that I can get this to work, is if I run 
$ midicat -d -q midi/0 -q midithru/0 from the command line, before I 
open LMMS and I then select MIDI input in the Sf2 Player action gear. 
However, this allows only for one MIDI instrument at a time. If I also 
want to connect a drumpad like the Akai MPK 218, would I run $ midicat 
-d -q midi/1 -q midithru/1 and how do I set MIDI input in the Kicker 
plugin to only get the MIDI signals from the drumpad and not the 
keyboard? Perhaps LMMS and sndio are only setup for something like the 
Akai MPK Mini MKIII?


Any help trying to wrap my head around how MIDI, sndio and jack work in 
this context is appreciated.




Recently acquired Ryzen 5 computer lacks sound with OpenBSD 7.1.

2022-10-26 Thread Brian Durant
The computer has a Ryzen 5 4600G processor, as well as AMD High Def and 
Realtek audio. I have tried unsuccessfully to get audio through the HDMI 
connection as well as a Behringer UMC20HD USB sound card. I have looked 
at the relevant man pages and tried to solve this on Reddit. It has been 
suggested that I try the fount of all OpenBSD wisdom, so I am posting 
here. The relevant outputs (thanks to Reddit feedback) can be found here:


https://pastebin.com/2rvjWuD7

https://pastebin.com/W26cMyMZ

My Reddit post can be found here:

https://www.reddit.com/r/openbsd/comments/ydsgo2/recently_acquired_ryzen_5_computer_lacks_sound/

I really like this computer, as OpenBSD appears to run well from it so 
far, so I am hoping the audio issue can be solved...




Re: Xterm copy-paste not happening on OpenBSD 7.1 i386.

2022-08-05 Thread Brian Durant



On Fri, 5 Aug 2022, Alexander Hall wrote:

> 
> 
> On August 5, 2022 8:32:25 AM GMT+02:00, Brian Durant 
>  wrote:
> >
> >
> >On Thu, 4 Aug 2022, Alexander Hall wrote:
> >
> >> 
> >> 
> >> On August 4, 2022 5:42:13 PM GMT+02:00, Brian Durant 
> >>  wrote:
> >> >
> >> >
> >> >On Thu, 4 Aug 2022, Lucas wrote:
> >> >
> >> >> Brian Durant  wrote:
> >> >> > I have installed OpenBSD 7.1 i386 on my Lenovo T60 and am 
> >> >> > experiencing a 
> >> >> > couple of issues. The first is related to the following addition that 
> >> >> > I 
> >> >> > made to my .Xdefaults file, which works with OpenBSD 7.1 amd64 
> >> >> > installs, 
> >> >> > but not with the OpenBSD 7.1 i386 install on my Lenovo T60:
> >> >> > XTerm*VT100.Translations: #override\
> >> >> >  Ctrl Shift  C: copy-selection(CLIPBOARD) \n\
> >> >> >  Ctrl Shift  V: insert-selection(CLIPBOARD)
> >> >> > Any ideas how to get copy and paste working in Xterm with an i386 
> >> >> > install?
> >> >> 
> >> >> I don't know if it's relevant, but my Xdefaults looks like this
> >> >> 
> >> >> XTerm.VT100.translations:   #override \n\
> >> >> Ctrl Alt C:copy-selection(CLIPBOARD) \n\
> >> >> Ctrl Alt V:insert-selection(CLIPBOARD) \n\
> >> >> [...other stuff...]
> >> >> 
> >> >> In particular, do note the "\n" after #override, which isn't present in
> >> >> your snippet. This works fine for me.
> >> >> 
> >> >> Also, vi(1) is showing \xc2\xa0 before your lines, which I don't know
> >> >> if it's product of your MUA or if it's actually part of the file (it's
> >> >> a non-breaking space, aka  in XML/HTML), do double-check the
> >> >> whitespaces in there.
> >> >> 
> >> >> -Lucas
> >> >
> >> >Thanks for the reply. Trying a different MUA. Not sure where the extra 
> >> >characters that you mention crept in, however they weren't in the 
> >> >.Xdefaults file as far as I could see. I added the extra "\n\" in the 
> >> >last 
> >> >line as suggested, but weirdly this had no effect. Still no copy-paste in 
> >> >i386.
> >> 
> >> It wasn't the last line that potentially lacked "\n\", it was the first 
> >> one, "#override\n\".
> >> 
> >> I suspect paste actually might already work. Did you try copying from, 
> >> say, Firefox, and then paste into an xterm?
> >> 
> >> I strongly believe this has nothing to do with the platform.
> >> 
> >> /Alexander
> >
> >Hmm. Thanks for the inspiration, but no, paste wasn't already working. I 
> >have however, now got copy to work. Unfortunately, nothing I do seems to 
> >sort paste out. Currently my snippet looks like this:
> >xterm.VT100.translations:#override \
> > Ctrl Shift  C: copy-selection(CLIPBOARD) \n\
> > Ctrl Shift  V: insert-selection(CLIPBOARD)
> >
> >The "n\" that you have in he first line shouldn't make a difference as it 
> >is a comment "#", isn't it? What causes me some concern, is the apparent 
> >lack of consistent behavior between architectures on this minor, but 
> >irritating issue.
> 
> Every example from the xterm man page uses sth like:
> 
>   *VT100*translations: #override \n\
> 
> , and it makes sense, as # is not a comment in the resource file itself. So 
> your resource value above effectively becomes
> 
> "#override  Ctrl Shift  C:   copy-selection(CLIPBOARD) 
>   Ctrl Shift  V: insert-selection(CLIPBOARD)"
> 
> instead of
> 
> "#override 
>  Ctrl Shift  C:  copy-selection(CLIPBOARD) 
>   Ctrl Shift  V: insert-selection(CLIPBOARD)"
> 
> Also, while being at the edge of my confidence level here, generally
> 
> XTerm*VT100*translations:
> 
> With all them asterisks, usually kicks in better. YMMV though.
> 
> Also, I assume the proper xrdb commands are issued to set these resource 
> values.
> 
> /Alexander

OK. I tried your suggestions with the "*" and "\n\" now everything is 
working fine. I corrected my .Xdefaults list on my amd64 install to match, 
and that works fine as well. Many thanks.

Brian



Re: Xterm copy-paste not happening on OpenBSD 7.1 i386.

2022-08-05 Thread Brian Durant



On Thu, 4 Aug 2022, Alexander Hall wrote:

> 
> 
> On August 4, 2022 5:42:13 PM GMT+02:00, Brian Durant 
>  wrote:
> >
> >
> >On Thu, 4 Aug 2022, Lucas wrote:
> >
> >> Brian Durant  wrote:
> >> > I have installed OpenBSD 7.1 i386 on my Lenovo T60 and am experiencing a 
> >> > couple of issues. The first is related to the following addition that I 
> >> > made to my .Xdefaults file, which works with OpenBSD 7.1 amd64 installs, 
> >> > but not with the OpenBSD 7.1 i386 install on my Lenovo T60:
> >> > XTerm*VT100.Translations: #override\
> >> >  Ctrl Shift  C: copy-selection(CLIPBOARD) \n\
> >> >  Ctrl Shift  V: insert-selection(CLIPBOARD)
> >> > Any ideas how to get copy and paste working in Xterm with an i386 
> >> > install?
> >> 
> >> I don't know if it's relevant, but my Xdefaults looks like this
> >> 
> >> XTerm.VT100.translations:   #override \n\
> >> Ctrl Alt C:copy-selection(CLIPBOARD) \n\
> >> Ctrl Alt V:insert-selection(CLIPBOARD) \n\
> >> [...other stuff...]
> >> 
> >> In particular, do note the "\n" after #override, which isn't present in
> >> your snippet. This works fine for me.
> >> 
> >> Also, vi(1) is showing \xc2\xa0 before your lines, which I don't know
> >> if it's product of your MUA or if it's actually part of the file (it's
> >> a non-breaking space, aka  in XML/HTML), do double-check the
> >> whitespaces in there.
> >> 
> >> -Lucas
> >
> >Thanks for the reply. Trying a different MUA. Not sure where the extra 
> >characters that you mention crept in, however they weren't in the 
> >.Xdefaults file as far as I could see. I added the extra "\n\" in the last 
> >line as suggested, but weirdly this had no effect. Still no copy-paste in 
> >i386.
> 
> It wasn't the last line that potentially lacked "\n\", it was the first one, 
> "#override\n\".
> 
> I suspect paste actually might already work. Did you try copying from, say, 
> Firefox, and then paste into an xterm?
> 
> I strongly believe this has nothing to do with the platform.
> 
> /Alexander

Hmm. Thanks for the inspiration, but no, paste wasn't already working. I 
have however, now got copy to work. Unfortunately, nothing I do seems to 
sort paste out. Currently my snippet looks like this:
xterm.VT100.translations:   #override \
Ctrl Shift  C: copy-selection(CLIPBOARD) \n\
Ctrl Shift  V: insert-selection(CLIPBOARD)

The "n\" that you have in he first line shouldn't make a difference as it 
is a comment "#", isn't it? What causes me some concern, is the apparent 
lack of consistent behavior between architectures on this minor, but irritating 
issue.



Re: Xterm copy-paste not happening on OpenBSD 7.1 i386.

2022-08-04 Thread Brian Durant



On Thursday, August 4, 2022, Michael Hekeler wrote:
> Am 04.08.22 15:27 schrieb Brian Durant:
> > I have installed OpenBSD 7.1 i386 on my Lenovo T60 and am experiencing a
> > couple of issues. The first is related to the following addition that I made
> > to my .Xdefaults file, which works with OpenBSD 7.1 amd64 installs, but not
> > with the OpenBSD 7.1 i386 install on my Lenovo T60:
> > XTerm*VT100.Translations: #override\
> > Ctrl Shift  C: copy-selection(CLIPBOARD) \n\
> > Ctrl Shift  V: insert-selection(CLIPBOARD)
> > Any ideas how to get copy and paste working in Xterm with an i386 install?
> > 
> I understand that you want to map these keys but just to mention: there
> is support for PRIMARY in xterm(1) and this means selected text is in
> primary without any explicit copy action taking place.
> see Inter-Client Communication Coventions Manual for X

Thank you for the information. Seen from my perspective, the override that I am 
using is more convenient on a laptop, but more importantly, expected behavior 
should be the same regardless of architecture. There shouldn't be different 
behavior on amd64 architecture compared to i386 architecture.



Re: Xterm copy-paste not happening on OpenBSD 7.1 i386.

2022-08-04 Thread Brian Durant



On Thu, 4 Aug 2022, Lucas wrote:

> Brian Durant  wrote:
> > I have installed OpenBSD 7.1 i386 on my Lenovo T60 and am experiencing a 
> > couple of issues. The first is related to the following addition that I 
> > made to my .Xdefaults file, which works with OpenBSD 7.1 amd64 installs, 
> > but not with the OpenBSD 7.1 i386 install on my Lenovo T60:
> > XTerm*VT100.Translations: #override\
> >  Ctrl Shift  C: copy-selection(CLIPBOARD) \n\
> >  Ctrl Shift  V: insert-selection(CLIPBOARD)
> > Any ideas how to get copy and paste working in Xterm with an i386 install?
> 
> I don't know if it's relevant, but my Xdefaults looks like this
> 
> XTerm.VT100.translations:   #override \n\
> Ctrl Alt C:copy-selection(CLIPBOARD) \n\
> Ctrl Alt V:insert-selection(CLIPBOARD) \n\
> [...other stuff...]
> 
> In particular, do note the "\n" after #override, which isn't present in
> your snippet. This works fine for me.
> 
> Also, vi(1) is showing \xc2\xa0 before your lines, which I don't know
> if it's product of your MUA or if it's actually part of the file (it's
> a non-breaking space, aka  in XML/HTML), do double-check the
> whitespaces in there.
> 
> -Lucas

Thanks for the reply. Trying a different MUA. Not sure where the extra 
characters that you mention crept in, however they weren't in the 
.Xdefaults file as far as I could see. I added the extra "\n\" in the last 
line as suggested, but weirdly this had no effect. Still no copy-paste in 
i386.



Xterm copy-paste not happening on OpenBSD 7.1 i386.

2022-08-04 Thread Brian Durant
I have installed OpenBSD 7.1 i386 on my Lenovo T60 and am experiencing a 
couple of issues. The first is related to the following addition that I 
made to my .Xdefaults file, which works with OpenBSD 7.1 amd64 installs, 
but not with the OpenBSD 7.1 i386 install on my Lenovo T60:

XTerm*VT100.Translations: #override\
    Ctrl Shift  C: copy-selection(CLIPBOARD) \n\
    Ctrl Shift  V: insert-selection(CLIPBOARD)
Any ideas how to get copy and paste working in Xterm with an i386 install?



Multiple OpenBSD mirror issues for i386.

2022-07-17 Thread Brian Durant
I am trying to download and install the i386 verion of OpenBSD 7.1 to an 
IBM/Lenovo T60.


https://cdn.openbsd.org/pub/OpenBSD/7.1/i386/install71.img (and .iso) 
give me the following message:


Error 503 Backend is unhealthy

Backend is unhealthy
Error 54113

Details: cache-cph2320057-CPH 1658065549 3028862290

Varnish cache server"


I have also downloaded both the 7.1 .iso and .img file from alternative 
mirrors. The files have passed muster with SHA256 and signify. However, 
when booting the USB pen drive that the images have been burned to, the 
lead is >> OpenBSD/amd64 BOOT 3.53 - and then a few lines down, after 
boot> I get the following:


hd0a:/7.1/amd64/bsd.rd

It looks to me as if someone uploaded the wrong files in under the wrong 
architecture directory, and that it has propagated through the OpenBSD 
mirrors. I have tried this a number of times, so I know that I haven't 
just pressed the wrong link. I have gone into the mirrors manually under 
the correct architecture directory and downloaded the files...


Brian



Re: Behringer UMC404HD USB soundcard with OpenBSD 7.1.

2022-07-16 Thread Brian Durant



On 7/16/22 6:26 PM, Alexandre Ratchov wrote:

On Sat, Jul 16, 2022 at 05:37:35PM +0200, Brian Durant wrote:

On 7/16/22 3:54 PM, Alexandre Ratchov wrote:

On Sat, Jul 16, 2022 at 03:36:18PM +0200, Brian Durant wrote:

# mixerctl -f /dev/audioctl1
mixerctl: /dev/audioctl1: Device not configured

# dmesg

forgot to mention: connect and power on the audio interface first ;-)

It was. This time I waited until boot was complete, before connecting the
USB cable...


...


uhub3: port 1, set config 0 at addr 6 failed
uhub3: device problem, disabling port 1


sorry, I missed these lines, this is when you connected the device,
right?

The device doesn't even attach, so not surprising it doesn't work. I
don't know what could cause this maybe weak power?

Do you have an external power source, if not could you try with it?
I think so, I was multitasking at the time... Interesting and even more 
interesting. Yes, the power supply that came with the unit is plugged in 
and functioning on the UMC404HD. I had a UMC202HD lying around the 
house, that I just tried, which is powered through the USB cable and 
that works fine with OpenBSD. Only the powered UMC404HD had issues.




Re: Behringer UMC404HD USB soundcard with OpenBSD 7.1.

2022-07-16 Thread Brian Durant
On Sat, 16 Jul 2022 11:23:16 +0200
Alexandre Ratchov  wrote:

> On Sat, Jul 16, 2022 at 08:26:49AM +0200, Brian Durant wrote:
> > I have thus far been using an audio direct out to my speakers, but would
> > like to get my USB soundcard working in OpenBSD. Without the soundcard,
> > (direct connection) everything works fine. With the soundcard, no audio at
> > all. I have tried the following as per the OpenBSD FAQ:
> > 
> > # rcctl set sndiod flags -f rsnd/0 -F rsnd/1
> > # rcctl restart sndiod
> > sndiod(ok)
> > sndiod(ok)
> > 
> > I have rebooted the system, tried Cmixer and adjusted output gradually to
> > 100%, but did not get any sound. I have consulted the list archive, but
> > nothing, except to note what I already knew, that Behringer soundcards are
> > class compliant. I use this card on Windows 11, Linux and FreeBSD, so I know
> > that it works. I have made no major adjustments to the unit itself. Sooo, I
> > have hit a bit of a dead end. Anyone out there that can provide some help? I
> > am trying to get this to work by testing YouTube in Firefox, both of which
> > work with a direct audio connection (midi jack cable)...
> 
> could you send the output of:
> 
>   mixerctl -f /dev/audioctl1
> and:
>   dmesg


I just tried connecting the soundcard to a Dell Vostro 3350 laptop running the 
same version of the OpenBSD system, just a week or two older. Things look 
pretty much the same on this computer as far as I can tell:

# mixerctl -f /dev/audioctl1  
mixerctl: /dev/audioctl1: Device not configured

# dmesg
OpenBSD 7.1 (GENERIC.MP) #0: Sun Apr 24 09:30:43 MDT 2022

r...@syspatch-71-amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 8471326720 (8078MB)
avail mem = 8197312512 (7817MB)
random: good seed from bootblocks
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.6 @ 0xeb850 (57 entries)
bios0: vendor Dell Inc. version "A07" date 09/30/2011
bios0: Dell Inc. Vostro 3350
acpi0 at bios0: ACPI 4.0
acpi0: sleep states S0 S1 S3 S4 S5
acpi0: tables DSDT FACP APIC MCFG SSDT SLIC HPET SSDT SSDT DMAR SSDT SSDT OSFR
acpi0: wakeup devices USB1(S3) USB2(S3) USB3(S3) USB4(S3) USB5(S3) USB6(S3) 
USB7(S3) RP01(S4) PXSX(S4) RP02(S4) PXSX(S4) RP03(S4) PXSX(S4) RP04(S4) 
PXSX(S4) RP05(S3) [...]
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i7-2640M CPU @ 2.80GHz, 2794.05 MHz, 06-2a-07
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.1.2, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Core(TM) i7-2640M CPU @ 2.80GHz, 2793.66 MHz, 06-2a-07
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 1 (application processor)
cpu2: Intel(R) Core(TM) i7-2640M CPU @ 2.80GHz, 2793.66 MHz, 06-2a-07
cpu2: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 1, core 0, package 0
cpu3 at mainbus0: apid 3 (application processor)
cpu3: Intel(R) Core(TM) i7-2640M CPU @ 2.80GHz, 2793.66 MHz, 06-2a-07
cpu3: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 1, core 1, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 24 pins
acpimcfg0 at acpi0
acpimcfg0: addr 0xf800, bus 0-63
acpihpet0 at acpi0: 14318179 H

Re: Behringer UMC404HD USB soundcard with OpenBSD 7.1.

2022-07-16 Thread Brian Durant

On 7/16/22 3:54 PM, Alexandre Ratchov wrote:

On Sat, Jul 16, 2022 at 03:36:18PM +0200, Brian Durant wrote:


# mixerctl -f /dev/audioctl1
mixerctl: /dev/audioctl1: Device not configured

# dmesg

forgot to mention: connect and power on the audio interface first ;-)


It was. This time I waited until boot was complete, before connecting 
the USB cable...


# mixerctl -f /dev/audioctl1
mixerctl: /dev/audioctl1: Device not configured


OpenBSD 7.1 (GENERIC.MP) #0: Sun Apr 24 09:30:43 MDT 2022
r...@syspatch-71-amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 8471175168 (8078MB)
avail mem = 8197136384 (7817MB)
random: good seed from bootblocks
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xe6e20 (66 entries)
bios0: vendor LENOVO version "EZKT22AUS" date 10/15/2013
bios0: LENOVO 10115
acpi0 at bios0: ACPI 5.0
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP UEFI HPET APIC MCFG WDAT BOOT ASPT DBGP FPDT 
MSDM SSDT SSDT
acpi0: wakeup devices P0P1(S4) EHC1(S3) EHC2(S3) XHC_(S3) HDEF(S4) 
RP01(S4) PXSX(S4) RP02(S4) PXSX(S4) RP03(S4) PXSX(S4) RP04(S4) PXSX(S4) 
RP05(S4) PXSX(S4) RP06(S4) [...]

acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 14318179 Hz
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i3-3217U CPU @ 1.80GHz, 1796.18 MHz, 06-3a-09
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,XSAVE,AVX,F16C,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN

cpu0: 256KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.1.2, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM) i3-3217U CPU @ 1.80GHz, 1795.93 MHz, 06-3a-09
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,XSAVE,AVX,F16C,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN

cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 1, core 0, package 0
cpu2 at mainbus0: apid 2 (application processor)
cpu2: Intel(R) Core(TM) i3-3217U CPU @ 1.80GHz, 1795.93 MHz, 06-3a-09
cpu2: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,XSAVE,AVX,F16C,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN

cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 0, core 1, package 0
cpu3 at mainbus0: apid 3 (application processor)
cpu3: Intel(R) Core(TM) i3-3217U CPU @ 1.80GHz, 1795.93 MHz, 06-3a-09
cpu3: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,XSAVE,AVX,F16C,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN

cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 1, core 1, package 0
ioapic0 at mainbus0: apid 0 pa 0xfec0, version 20, 24 pins
acpimcfg0 at acpi0
acpimcfg0: addr 0xf000, bus 0-63
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (P0P1)
acpiprt2 at acpi0: bus 1 (RP01)
acpiprt3 at acpi0: bus 2 (RP02)
acpiprt4 at acpi0: bus 3 (RP03)
acpiprt5 at acpi0: bus 4 (RP04)
acpiprt6 at acpi0: bus -1 (RP05)
acpiprt7 at acpi0: bus -1 (RP06)
acpiprt8 at acpi0: bus -1 (RP07)
acpiprt9 at acpi0: bus -1 (RP08)
acpiprt10 at acpi0: bus -1 (PEG0)
acpiprt11 at acpi0: bus -1 (PEG1)
acpiprt12 at acpi0: bus -1 (PEG2)
acpiprt13 at acpi0: bus -1 (PEG3)
acpipci0 at acpi0 PCI0: 0x0004 0x0011 0x0001
acpicmos0 at acpi0
"PNP0A05" at acpi0 not configured
com0 at acpi0 UAR1 addr 0x3f8/0x8 irq 4: ns16550a, 16 byte fifo
acpibtn0 at acpi0: PWRB
acpicpu0 at acpi0: C3(200@87 mwait.1@0x30), C2(500@59 mwait.1@0x10), 
C1(1000@1 mwait.1), PSS
acpicpu1 at acpi0: C3(200@87 mwait.1@0x30), C2(500@59 mwait.1@0x10), 
C1(1000@1 mwait.1), PSS
acpicpu2 at acpi0: C3(200@87 mwait.1@0x30), C2(500@59 mwait.1@0x10), 
C1(1000@1 mwait.1), PSS
acpicpu3 at acpi0: C3(200@87 mwait.1@0x30), C2(500@59 mwait.1@0x10), 
C1(1000@1 mwait.1), PSS

acpitz0 at acpi0: critical temperature is 106 degC
acpitz1 at acpi0: critical temperature is 106 degC
acpivideo0 at acpi0: GFX0
acpivout0 at acpivideo0: DD02

Re: Behringer UMC404HD USB soundcard with OpenBSD 7.1.

2022-07-16 Thread Brian Durant



On 7/16/22 11:23 AM, Alexandre Ratchov wrote:

On Sat, Jul 16, 2022 at 08:26:49AM +0200, Brian Durant wrote:

I have thus far been using an audio direct out to my speakers, but would
like to get my USB soundcard working in OpenBSD. Without the soundcard,
(direct connection) everything works fine. With the soundcard, no audio at
all. I have tried the following as per the OpenBSD FAQ:

# rcctl set sndiod flags -f rsnd/0 -F rsnd/1
# rcctl restart sndiod
sndiod(ok)
sndiod(ok)

I have rebooted the system, tried Cmixer and adjusted output gradually to
100%, but did not get any sound. I have consulted the list archive, but
nothing, except to note what I already knew, that Behringer soundcards are
class compliant. I use this card on Windows 11, Linux and FreeBSD, so I know
that it works. I have made no major adjustments to the unit itself. Sooo, I
have hit a bit of a dead end. Anyone out there that can provide some help? I
am trying to get this to work by testing YouTube in Firefox, both of which
work with a direct audio connection (midi jack cable)...

could you send the output of:

mixerctl -f /dev/audioctl1
and:
dmesg


# mixerctl -f /dev/audioctl1
mixerctl: /dev/audioctl1: Device not configured

# dmesg
OpenBSD 7.1 (GENERIC.MP) #0: Sun Apr 24 09:30:43 MDT 2022
r...@syspatch-71-amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 8471175168 (8078MB)
avail mem = 8197160960 (7817MB)
random: good seed from bootblocks
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xe6e20 (66 entries)
bios0: vendor LENOVO version "EZKT22AUS" date 10/15/2013
bios0: LENOVO 10115
acpi0 at bios0: ACPI 5.0
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP UEFI HPET APIC MCFG WDAT BOOT ASPT DBGP FPDT 
MSDM SSDT SSDT
acpi0: wakeup devices P0P1(S4) EHC1(S3) EHC2(S3) XHC_(S3) HDEF(S4) 
RP01(S4) PXSX(S4) RP02(S4) PXSX(S4) RP03(S4) PXSX(S4) RP04(S4) PXSX(S4) 
RP05(S4) PXSX(S4) RP06(S4) [...]

acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 14318179 Hz
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i3-3217U CPU @ 1.80GHz, 1796.23 MHz, 06-3a-09
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,XSAVE,AVX,F16C,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN

cpu0: 256KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.1.2, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM) i3-3217U CPU @ 1.80GHz, 1795.92 MHz, 06-3a-09
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,XSAVE,AVX,F16C,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN

cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 1, core 0, package 0
cpu2 at mainbus0: apid 2 (application processor)
cpu2: Intel(R) Core(TM) i3-3217U CPU @ 1.80GHz, 1795.93 MHz, 06-3a-09
cpu2: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,XSAVE,AVX,F16C,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN

cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 0, core 1, package 0
cpu3 at mainbus0: apid 3 (application processor)
cpu3: Intel(R) Core(TM) i3-3217U CPU @ 1.80GHz, 1795.93 MHz, 06-3a-09
cpu3: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,XSAVE,AVX,F16C,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN

cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 1, core 1, package 0
ioapic0 at mainbus0: apid 0 pa 0xfec0, version 20, 24 pins
acpimcfg0 at acpi0
acpimcfg0: addr 0xf000, bus 0-63
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (P0P1)
acpiprt2 at acpi0: bus 1 (RP01)
acpiprt3 at acpi0: bus 2 (RP02)
acpiprt4 at acpi0: bus 3 (RP03)
acpiprt5 at acpi0: bus 4 (RP04)
acpiprt6 at acpi0: bus -1 (RP05)
acpiprt7 at acpi0: bus -1 (RP06)
acpiprt8 at acpi0: bus -1 (RP07)
acpiprt9 at acpi0: bus -1 (RP08)
acpiprt10 at acpi0: bus -1 (PEG0)
acpiprt11 at acpi0: bus -1 (PEG1)
acpiprt12 at acpi0: bu

Behringer UMC404HD USB soundcard with OpenBSD 7.1.

2022-07-16 Thread Brian Durant
I have thus far been using an audio direct out to my speakers, but would 
like to get my USB soundcard working in OpenBSD. Without the soundcard, 
(direct connection) everything works fine. With the soundcard, no audio 
at all. I have tried the following as per the OpenBSD FAQ:


# rcctl set sndiod flags -f rsnd/0 -F rsnd/1
# rcctl restart sndiod
sndiod(ok)
sndiod(ok)

I have rebooted the system, tried Cmixer and adjusted output gradually 
to 100%, but did not get any sound. I have consulted the list archive, 
but nothing, except to note what I already knew, that Behringer 
soundcards are class compliant. I use this card on Windows 11, Linux and 
FreeBSD, so I know that it works. I have made no major adjustments to 
the unit itself. Sooo, I have hit a bit of a dead end. Anyone out there 
that can provide some help? I am trying to get this to work by testing 
YouTube in Firefox, both of which work with a direct audio connection 
(midi jack cable)...


Brian



Re: Web MIDI, Firefox, OpenBSD.

2022-07-15 Thread Brian Durant



On 7/15/22 2:53 PM, Alexandre Ratchov wrote:

On Fri, Jul 15, 2022 at 02:28:37PM +0200, Brian Durant wrote:

On 7/15/22 12:54 PM, Alexandre Ratchov wrote:


On Thu, Jul 14, 2022 at 10:05:43AM +0200, Brian Durant wrote:

On a possibly related issue to my browser access to file system problem, has
anyone been able to get Web MIDI working with Firefox on OpenBSD 7.1? Here I
am referring to bandcamp.com and flowkey.com in particular. Neither site
appears to be receiving any MIDI signal despite an Akai LPK25 (for testing)
being registered by the system at umidi0. Flowkey requires ffmpeg to be
installed, as well as prompting for the Jazz MIDI extension to be installed.
Flowkey tabs crash and never make a MIDI connection. This has never happened
to me with Win 11, Linux, of FreeBSD. The Bandcamp site simply doesn't
register a MIDI device connected to the system, but doesn't crash the tab.
Again, any constructive advice is welcomed.



OpenBSD ports has no MIDI support. A quick look at firefox sources
suggest it's using is library:

https://github.com/boddlnagg/midir

which doesn't have sndio backend.

Many thanks about the information regarding Web MIDI, Firefox and midir. No
wonder this has been driving me mad. I had yet to look systematically at
ports to see what programs using MIDI were available, as I have been so busy
with the browser issues, so it is interesting that you state that MIDI
programs are lacking in ports. What do other users do? To my mind, OpenBSD
has excellent support for recognizing MIDI devices, and excellent audio
support (sndio) as well, which would make it an excellent OS for music
production... At the very least, it should be feasible to get a USB MIDI
keyboard working with fluidsynth (Qsynth) according to the OpenBSD FAQ
(Multimedia), but I admittedly have yet to be successful at getting that
working either...


To make fluidsynth work (applies to any real-time softsynth), first
lower sndio latency, example:

doas rcctl set sndiod flags "-z 128"
doas rcctl restart sndiod

Install fluidsynth and generaluser-gs-soundfont pacakges. In one
terminal start fluidsynth:

fluidsynth /usr/local/share/generaluser-gs/GeneralUser_GS.sf2

At this point, fluidsynth listens for incoming MIDI messages on the
default "midithru/0" port. To send MIDI messages from your keyboard
(probably "midi/0") to it, try:

midicat -d -q midi/0 -q midithru/0


Cool. My two problems had been that I could only figure out to use 
Qsynth to get the path to the soundfont. The second was that I was 
trying to use umidi/0 rather than midi/0, as I almost exclusively have 
USB MIDI keyboards. Many thanks.


Anyone that uses a DAW with OpenBSD is welcome to jump in here as well. 
As I mainly work with MIDI, I guess that the best I can hope for is 
getting LMMS working, as Ardour doesn't handle MIDI very well, from my 
limited experience...




Re: Web MIDI, Firefox, OpenBSD.

2022-07-15 Thread Brian Durant

On 7/15/22 12:54 PM, Alexandre Ratchov wrote:


On Thu, Jul 14, 2022 at 10:05:43AM +0200, Brian Durant wrote:

On a possibly related issue to my browser access to file system problem, has
anyone been able to get Web MIDI working with Firefox on OpenBSD 7.1? Here I
am referring to bandcamp.com and flowkey.com in particular. Neither site
appears to be receiving any MIDI signal despite an Akai LPK25 (for testing)
being registered by the system at umidi0. Flowkey requires ffmpeg to be
installed, as well as prompting for the Jazz MIDI extension to be installed.
Flowkey tabs crash and never make a MIDI connection. This has never happened
to me with Win 11, Linux, of FreeBSD. The Bandcamp site simply doesn't
register a MIDI device connected to the system, but doesn't crash the tab.
Again, any constructive advice is welcomed.



OpenBSD ports has no MIDI support. A quick look at firefox sources
suggest it's using is library:

https://github.com/boddlnagg/midir

which doesn't have sndio backend.


Many thanks about the information regarding Web MIDI, Firefox and midir. 
No wonder this has been driving me mad. I had yet to look systematically 
at ports to see what programs using MIDI were available, as I have been 
so busy with the browser issues, so it is interesting that you state 
that MIDI programs are lacking in ports. What do other users do? To my 
mind, OpenBSD has excellent support for recognizing MIDI devices, and 
excellent audio support (sndio) as well, which would make it an 
excellent OS for music production... At the very least, it should be 
feasible to get a USB MIDI keyboard working with fluidsynth (Qsynth) 
according to the OpenBSD FAQ (Multimedia), but I admittedly have yet to 
be successful at getting that working either...


Brian



Re: Browser access to file system on new install OpenBSD missing.

2022-07-14 Thread Brian Durant

On 7/14/22 12:09 PM, Zé Loff wrote:

On Thu, Jul 14, 2022 at 09:44:20AM +0200, Brian Durant wrote:

The browser issue has returned. An open dialog window to upload a file or to
open a file cannot find the downloads directory and it is impossible to
access by using "recents" or "computer" in the open dialog window. Not sure
what is going on, but it sure is irritating.


Add /tmp and/or other unveil'ed folders to your GTK3 bookmarks.  That
way there is always an accessible folder on the sidebar on which to
click:

 echo "file:///tmp" >> ~/.config/gtk-3.0/bookmarks
Many thanks for the tip. Interestingly, thanks to you I started digging 
around in the two systems to compare differences between them. I found 
what appears to at present be a solution. The system with the browser 
file dialog issues did not have a ~/.config/user-dirs.dirs file for some 
reason. This appears to have solved the problem for now, but I will keep 
your suggestion on the back burner should I need that as an alternative...




Web MIDI, Firefox, OpenBSD.

2022-07-14 Thread Brian Durant
On a possibly related issue to my browser access to file system problem, 
has anyone been able to get Web MIDI working with Firefox on OpenBSD 
7.1? Here I am referring to bandcamp.com and flowkey.com in particular. 
Neither site appears to be receiving any MIDI signal despite an Akai 
LPK25 (for testing) being registered by the system at umidi0. Flowkey 
requires ffmpeg to be installed, as well as prompting for the Jazz MIDI 
extension to be installed. Flowkey tabs crash and never make a MIDI 
connection. This has never happened to me with Win 11, Linux, of 
FreeBSD. The Bandcamp site simply doesn't register a MIDI device 
connected to the system, but doesn't crash the tab. Again, any 
constructive advice is welcomed.




Re: Browser access to file system on new install OpenBSD missing.

2022-07-14 Thread Brian Durant
The browser issue has returned. An open dialog window to upload a file 
or to open a file cannot find the downloads directory and it is 
impossible to access by using "recents" or "computer" in the open dialog 
window. Not sure what is going on, but it sure is irritating.




Re: Browser access to file system on new install OpenBSD missing.

2022-07-13 Thread Brian Durant

On 7/13/22 12:05 AM, Courtney wrote:
This is definitely an unveil issue. Not an issue though, it's by 
design. If you try to download a file both Firefox and Chromium won't 
know where to save it. By default, they can read/write to ~/Downloads 
like others have said. However, I think I know the issue you are 
encountering. I recall at first use it is a bit persnickety, so when 
presented with the window so save a file to a location you will see 
nothing. However, in the top bar if you type ~/Downloads and hit enter 
it will draw you immediately to the Downloads folder, and there you 
can hit save.


Also as others have said, Midori and Thunderbird don't have this issue 
because neither of them use unveil. It would be really cool if one day 
at least Thunderbird did.


Courtney

On 7/10/22 23:46, Brian Durant wrote:
I have a problem with both Firefox and Chromium being unable to 
access the file system using the "open" dialog. The dialog appears, 
but no files or directories appear regardless of path. Things 
function normally however, with both Midori and Thunderbird. I assume 
that Firefox and Chromium are experiencing a permissions issue, but 
what causes it and how to rectify it is beyond my capabilities as a 
new OpenBSD user.


Anyone out there that could help me out?

Thanks in advance.
I have reinstalled the system. It appears to be an issue that depends on 
which file manager is used to create the directories within the home 
directory. This time (as with my other computer) I used Xfe to create 
the directories. Last time, I used PCmanFM and experienced the problem. 
Firefox works as expected now. Thanks.


Brian



Re: Browser access to file system on new install OpenBSD missing.

2022-07-11 Thread Brian Durant
Actually, there is one major difference between the two systems that I
had forgotten about. While both use the Calm window manager, the system
that is experiencing problems with the browser file dialogs, uses
PCManFM...



Re: Browser access to file system on new install OpenBSD missing.

2022-07-11 Thread Brian Durant
On 7/11/22 17:53, Stuart Henderson wrote:
> I guess your locate database was last generated when firefox was
> installed but chromium was not
> 
>> Wondering if something else is at play here...
> grep unveil /usr/local/share/doc/pkg-readmes/*
> 
> ls /etc/*/*unveil*

$ grep unveil /usr/local/share/doc/pkg-readmes/*
/usr/local/share/doc/pkg-readmes/chromium:- each category of process
uses unveil(2) to limit filesystem access.
/usr/local/share/doc/pkg-readmes/chromium:Disabling pledge() or unveil()
is not recommended!
/usr/local/share/doc/pkg-readmes/chromium:- global unveil knob: invoke
chromium with --disable-unveil
/usr/local/share/doc/pkg-readmes/chromium:- specific unveil for specific
processes:
/usr/local/share/doc/pkg-readmes/chromium:/etc/chromium/unveil.*
/usr/local/share/doc/pkg-readmes/chromium:to /etc/chromium/unveil.main
and merge with changes in files in
/usr/local/share/doc/pkg-readmes/firefox:pledge(2) and unveil(2) Support
/usr/local/share/doc/pkg-readmes/firefox:Firefox on OpenBSD is secured
with pledge(2) and unveil(2) to limit
/usr/local/share/doc/pkg-readmes/firefox:following files to change the
pledge promises, unveil paths, and
/usr/local/share/doc/pkg-readmes/firefox:/etc/firefox/{unveil,pledge}.{main,content,gpu}
/usr/local/share/doc/pkg-readmes/firefox:As unveil() can't show
non-existing dirs, it is recommended to manually
/usr/local/share/doc/pkg-readmes/firefox:Due to unveil(2) limiting
filesystem access, special care has to be
/usr/local/share/doc/pkg-readmes/firefox:taken to unveil MIME handlers.
For example, to use the mupdf package
/usr/local/share/doc/pkg-readmes/firefox:And the corresponding binary
must be unveiled for it to appear as an
/usr/local/share/doc/pkg-readmes/firefox:line to /etc/firefox/unveil.main:
/usr/local/share/doc/pkg-readmes/firefox:/etc/firefox/unveil.main.
/usr/local/share/doc/pkg-readmes/firefox:To disable pledge and/or unveil
support when troubleshooting, set the
/usr/local/share/doc/pkg-readmes/firefox:corresponding pledge or unveil
file in
/usr/local/share/doc/pkg-readmes/firefox:/etc/firefox/{unveil,pledge}.{main,content,gpu}
to contain


$ ls /etc/*/*unveil*
/etc/chromium/unveil.gpu /etc/chromium/unveil.utility_audio
  /etc/firefox/unveil.main
/etc/chromium/unveil.main
/etc/chromium/unveil.utility_network /etc/firefox/unveil.rdd
/etc/chromium/unveil.plugin  /etc/chromium/unveil.utility_video
  /etc/firefox/unveil.socket
/etc/chromium/unveil.renderer/etc/firefox/unveil.content
/etc/chromium/unveil.utility /etc/firefox/unveil.gpu



Re: Browser access to file system on new install OpenBSD missing.

2022-07-11 Thread Brian Durant
On 7/11/22 15:25, Stuart Henderson wrote:
> On 2022-07-11, Björn Gohla  wrote:
>>
>> Brian Durant  writes:
>>
>>> I have a problem with both Firefox and Chromium being unable to access
>>> the file system using the "open" dialog. The dialog appears, but no
>>> files or directories appear regardless of path. Things function
>> [...]
>>
>> This sounds like an unveil(2) issue. Only white-listed paths are
>> accessible, they are configured in /etc/firefox/unveil.* .
>>
>> ~/Downloads should be enabled by default though.
> 
> only if present before the browser was started, also the file dialog boxes
> will often be blank and you need to either type a path by hand, or pick
> one of the predefined entries in the left-hand side; browsing the whole
> computer won't work with the default unveil restrictions
> 
> 

~/Downloads is indeed in /etc/firefox/unveil.main and
/etc/chromium/unveil.main. Interestingly, it doesn't appear that either
Thunderbird nor Midori have a similar unveil file. Interestingly (or
not) When running the following, Chromium doesn't appear at all:

$ doas locate unveil.main
/etc/firefox/unveil.main
/usr/local/lib/firefox/browser/defaults/preferences/unveil.main

Nor does it in:

$ doas locate unveil
/etc/firefox/unveil.content
/etc/firefox/unveil.gpu
/etc/firefox/unveil.main
/etc/firefox/unveil.rdd
/etc/firefox/unveil.socket
/usr/local/lib/firefox/browser/defaults/preferences/unveil.content
/usr/local/lib/firefox/browser/defaults/preferences/unveil.gpu
/usr/local/lib/firefox/browser/defaults/preferences/unveil.main
/usr/local/lib/firefox/browser/defaults/preferences/unveil.rdd
/usr/local/lib/firefox/browser/defaults/preferences/unveil.socket
/usr/share/man/man2/unveil.2
/usr/share/relink/kernel/GENERIC.MP/kern_unveil.o

Wondering if something else is at play here...



Re: Browser access to file system on new install OpenBSD missing.

2022-07-11 Thread Brian Durant



On 7/11/22 14:40, Björn Gohla wrote:
> 
> Brian Durant  writes:
> 
>> I have a problem with both Firefox and Chromium being unable to access
>> the file system using the "open" dialog. The dialog appears, but no
>> files or directories appear regardless of path. Things function
> [...]
> 
> This sounds like an unveil(2) issue. Only white-listed paths are
> accessible, they are configured in /etc/firefox/unveil.* .
> 
> ~/Downloads should be enabled by default though.
> 
> Read /usr/local/share/doc/pkg-readmes/firefox for all the details.

Nothing in readmes that hit a note, except possibly dbus not running? I
have two computers running the latest stable, but this problem is only on
the one... The other thing that I have noticed is that $ uname -v returns
GENERIC.MP#465 on the one, while the other responds GENERIC.MP#0.
Otherwise, to my knowledge, both computer installs are exactly the same
and of recent date (within two weeks) of each other.

Thanks for your replies, but I am still confused...

Brian



Browser access to file system on new install OpenBSD missing.

2022-07-11 Thread Brian Durant
I have a problem with both Firefox and Chromium being unable to access 
the file system using the "open" dialog. The dialog appears, but no 
files or directories appear regardless of path. Things function normally 
however, with both Midori and Thunderbird. I assume that Firefox and 
Chromium are experiencing a permissions issue, but what causes it and 
how to rectify it is beyond my capabilities as a new OpenBSD user.


Anyone out there that could help me out?

Thanks in advance.



Re: disk i/o test

2022-03-07 Thread Brian Brombacher



> On Mar 7, 2022, at 12:10 PM, Brian Brombacher  wrote:
> 
> Hi Mihai,
> 
> Not exactly related to disk speed, but have you cranked up the following 
> sysctl to see if it helps?
> 
> sysctl kern.bufcachepercentage=9
> 
> I put an entry in /etc/sysctl.conf for persistence.
> 
> This will cause up to 90% of system memory to be used as a unified buffer 
> cache for disk access.  Not sure if that helps but I use that value on every 
> install, including desktop and servers.  I can’t remember if the default 
> value has changed in the past 10 years but I always go with 90%.


I was helped off-list with this information, there is a memory threshold on 
amd64 that affects the behavior of the sysctl.  If you have more than 4 gb of 
memory, the sysctl isn’t important.


> 
> -Brian
> 
>>> On Mar 7, 2022, at 6:17 AM, Mihai Popescu  wrote:
>>> 
>>> On Mon, Mar 7, 2022 at 8:46 AM Janne Johansson  wrote:
>>> 
>>> Den sön 6 mars 2022 kl 16:41 skrev Mihai Popescu :
>>>> 
>>>> Since this thread is moving slowly in another direction, let me
>>> 
>>> True
>>> 
>>>> reiterate my situation again: I am running a browser (mostly chromium)
>>>> and the computer slows down on downloads. Since I've checked the
>>>> downloads rates, I observed they are slow than my maximum 500Mbps for
>>>> the line.
>>>> I can reach 320Mbps maximum, but mostly it stays at 280Mbps and the
>>>> Chromium has 30 seconds delays in everything i do.
>>> 
>>> I would make sure it is not some kind of DNS thing, 30 second delays
>>> sounds A LOT
>>> like trying a "dead" resolver 3 times with 10 secs in between, before
>>> moving to a "working" one.
>> 
>> By "delay" I mean the time passed from clicking on some Chromium menu
>> and the actual display of that menu. Even using a tty is slow, login
>> . password  in that disk intense usage period.
>> Tried Debian and FreeBSD, all are able to write disk and do graphics.
>> That ZFS on FreeBSD is mind blowing, I hope it's reliable too.
>> 
>> All I wanted was to compare my hardware and disk speeds with someone
>> running OpenBSD: simple dmesg <-> speed report match, but I think I
>> hit a taboo again.
>> Found some discussions on misc@ about that, no clear answer. I think I
>> will close this thread and see what this ZFS is about :-) .
>> 
>> Thank you all.
>>> 
>>> --
>>> May the most significant bit of your life be positive.
>> 
> 



Re: disk i/o test

2022-03-07 Thread Brian Brombacher
Correction: 

kern.bufcachepercentage=90

> On Mar 7, 2022, at 12:07 PM, Brian Brombacher  wrote:
> 
> Hi Mihai,
> 
> Not exactly related to disk speed, but have you cranked up the following 
> sysctl to see if it helps?
> 
> sysctl kern.bufcachepercentage=9
> 
> I put an entry in /etc/sysctl.conf for persistence.
> 
> This will cause up to 90% of system memory to be used as a unified buffer 
> cache for disk access.  Not sure if that helps but I use that value on every 
> install, including desktop and servers.  I can’t remember if the default 
> value has changed in the past 10 years but I always go with 90%.
> 
> -Brian
> 
>>> On Mar 7, 2022, at 6:17 AM, Mihai Popescu  wrote:
>>> 
>>> On Mon, Mar 7, 2022 at 8:46 AM Janne Johansson  wrote:
>>> 
>>> Den sön 6 mars 2022 kl 16:41 skrev Mihai Popescu :
>>>> 
>>>> Since this thread is moving slowly in another direction, let me
>>> 
>>> True
>>> 
>>>> reiterate my situation again: I am running a browser (mostly chromium)
>>>> and the computer slows down on downloads. Since I've checked the
>>>> downloads rates, I observed they are slow than my maximum 500Mbps for
>>>> the line.
>>>> I can reach 320Mbps maximum, but mostly it stays at 280Mbps and the
>>>> Chromium has 30 seconds delays in everything i do.
>>> 
>>> I would make sure it is not some kind of DNS thing, 30 second delays
>>> sounds A LOT
>>> like trying a "dead" resolver 3 times with 10 secs in between, before
>>> moving to a "working" one.
>> 
>> By "delay" I mean the time passed from clicking on some Chromium menu
>> and the actual display of that menu. Even using a tty is slow, login
>> . password  in that disk intense usage period.
>> Tried Debian and FreeBSD, all are able to write disk and do graphics.
>> That ZFS on FreeBSD is mind blowing, I hope it's reliable too.
>> 
>> All I wanted was to compare my hardware and disk speeds with someone
>> running OpenBSD: simple dmesg <-> speed report match, but I think I
>> hit a taboo again.
>> Found some discussions on misc@ about that, no clear answer. I think I
>> will close this thread and see what this ZFS is about :-) .
>> 
>> Thank you all.
>>> 
>>> --
>>> May the most significant bit of your life be positive.
>> 



Re: disk i/o test

2022-03-07 Thread Brian Brombacher
Hi Mihai,

Not exactly related to disk speed, but have you cranked up the following sysctl 
to see if it helps?

sysctl kern.bufcachepercentage=9

I put an entry in /etc/sysctl.conf for persistence.

This will cause up to 90% of system memory to be used as a unified buffer cache 
for disk access.  Not sure if that helps but I use that value on every install, 
including desktop and servers.  I can’t remember if the default value has 
changed in the past 10 years but I always go with 90%.

-Brian

> On Mar 7, 2022, at 6:17 AM, Mihai Popescu  wrote:
> 
> On Mon, Mar 7, 2022 at 8:46 AM Janne Johansson  wrote:
>> 
>> Den sön 6 mars 2022 kl 16:41 skrev Mihai Popescu :
>>> 
>>> Since this thread is moving slowly in another direction, let me
>> 
>> True
>> 
>>> reiterate my situation again: I am running a browser (mostly chromium)
>>> and the computer slows down on downloads. Since I've checked the
>>> downloads rates, I observed they are slow than my maximum 500Mbps for
>>> the line.
>>> I can reach 320Mbps maximum, but mostly it stays at 280Mbps and the
>>> Chromium has 30 seconds delays in everything i do.
>> 
>> I would make sure it is not some kind of DNS thing, 30 second delays
>> sounds A LOT
>> like trying a "dead" resolver 3 times with 10 secs in between, before
>> moving to a "working" one.
> 
> By "delay" I mean the time passed from clicking on some Chromium menu
> and the actual display of that menu. Even using a tty is slow, login
> . password  in that disk intense usage period.
> Tried Debian and FreeBSD, all are able to write disk and do graphics.
> That ZFS on FreeBSD is mind blowing, I hope it's reliable too.
> 
> All I wanted was to compare my hardware and disk speeds with someone
> running OpenBSD: simple dmesg <-> speed report match, but I think I
> hit a taboo again.
> Found some discussions on misc@ about that, no clear answer. I think I
> will close this thread and see what this ZFS is about :-) .
> 
> Thank you all.
>> 
>> --
>> May the most significant bit of your life be positive.
> 



Re: disk i/o test

2022-03-06 Thread Brian Brombacher



> On Mar 6, 2022, at 7:41 AM, Mihai Popescu  wrote:
> 
> Since this thread is moving slowly in another direction, let me
> reiterate my situation again: I am running a browser (mostly chromium)
> and the computer slows down on downloads. Since I've checked the
> downloads rates, I observed they are slow than my maximum 500Mbps for
> the line.
> I can reach 320Mbps maximum, but mostly it stays at 280Mbps and the
> Chromium has 30 seconds delays in everything i do.
> 
> As a suggestion from Stuart, I was trying to separate tests for
> downloading and disk write. The disk looks slow.

Is the disk brand new?  If I missed this somewhere, apologies.

If it’s not new, how confident are you that the region of disk where chromium 
is writing data to disk has not suffered from any reallocations at the physical 
layer?  I find read and write performance to spinning disks is highly regulated 
by physical layout more than anything else.  For linear access, of course.

Getting 41 MB/sec on an old disk depending on the region you are accessing is 
not out of my expectations, if the disk has reallocations in the region 
accessed.

Reallocations occur when the physical media is no longer usable within 
thresholds so a new sector/area is allocated elsewhere on the disk and mapped.  
This causes seeks for what you consider a linear access.  The hardware does 
this for you and you can’t stop it nor should you want to.

Solution: Get SSD’s.


> I tried both Debian 11 and Ubuntu and the download and disk write
> jumps to 500Mbps without problems. And no, I cannot tolerate Linux
> enough to use it as a daily OS, so don't bother to recommend it. I
> cannot attain this in OpenBSD. Maybe that is the maximum possible for
> my hardware. Just asking, for the moment i can live with this delays.
> I was curious if someone with similar hardware can do better.
> 
> OpenBSD 7.1-beta (GENERIC.MP) #401: Thu Mar  3 12:48:28 MST 2022
>dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> real mem = 7711543296 (7354MB)
> avail mem = 7460630528 (7115MB)
> random: good seed from bootblocks
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xe86ed (64 entries)
> bios0: vendor Hewlett-Packard version "K06 v02.77" date 03/22/2018
> bios0: Hewlett-Packard HP Compaq Pro 6305 SFF
> acpi0 at bios0: ACPI 5.0
> acpi0: sleep states S0 S3 S4 S5
> acpi0: tables DSDT FACP APIC FPDT MCFG HPET SSDT MSDM TCPA IVRS SSDT SSDT CRAT
> acpi0: wakeup devices SBAZ(S4) PS2K(S3) PS2M(S3) P0PC(S4) PE20(S4)
> PE21(S4) PE22(S4) BNIC(S4) PE23(S4) BR12(S4) BR14(S4) OHC1(S3)
> EHC1(S3) OHC2(S3) EHC2(S3) OHC3(S3) [...]
> acpitimer0 at acpi0: 3579545 Hz, 32 bits
> acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> cpu0 at mainbus0: apid 16 (boot processor)
> cpu0: AMD A8-5500B APU with Radeon(tm) HD Graphics, 3194.47 MHz, 15-10-01
> cpu0: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,XOP,SKINIT,WDT,FMA4,TCE,NODEID,TBM,TOPEXT,CPCTR,ITSC,BMI1,IBPB
> cpu0: 64KB 64b/line 2-way I-cache, 16KB 64b/line 4-way D-cache, 2MB



Re: httpd.conf: 2 interfaces, 2 listen, IPv6, only one server works

2022-02-06 Thread Brian Brombacher



> On Feb 6, 2022, at 4:51 PM, Brian Brombacher  wrote:
> 
> 
> 
>> On Feb 6, 2022, at 4:32 PM, Mike Fischer  wrote:
>> 
>> 
>>>> Am 06.02.2022 um 21:13 schrieb Brian Brombacher :
>>> 
>>>>> You can work around it by putting both interfaces in diffrent rdomains, 
>>>>> then running two httpd instances, one in rdomain with first IP, second in 
>>>>> rdomain with second IP.
>>>> 
>>> 
>>> This will work.  You can use PF rules to cross rdomains if you require.
>> 
>> Thanks for that info!
>> 
>> 
>> rdomains are a new concept for me. From what I currently understand after 
>> reading rdomain(4) I don’t get why I would need to run two instances of my 
>> service, e.g. httpd(8) to use rdomains? Is a process somehow tied to an 
>> rdomain?
>> 
>> And while the PF mechanism to cross rdomains might be needed in some setups 
>> I don’t see where it would help in my scenario? I want to use my service 
>> mainly from outside the host. (Though for local access I would understand 
>> the need to configure some PF rules.)
>> 
>> I tried the following:
>> Starting state: em0 and em1 each configured for IPv4 and IPv6, the later 
>> using autoconf
>> em0:
>> …
>>   inet 192.168.0.10 netmask 0xff00 broadcast 192.168.0.255
>>   inet6 fe80::20c:29ff:fd9c:4b7%em0 prefixlen 64 scopeid 0x1
>>   inet6 2001:db8::20c:29ff:fd9c:4b7 prefixlen 64 autoconf pltime 978 vltime 
>> 6912
>> …
>> 
>> em1:
>> …
>>   inet 192.168.0.20 netmask 0xff00 broadcast 192.168.0.255
>>   inet6 fe80::20c:29ff:fd9c:4c1%em0 prefixlen 64 scopeid 0x1
>>   inet6 2001:db8::20c:29ff:fd9c:4c1 prefixlen 64 autoconf pltime 978 vltime 
>> 6912
>> …
>> 
>> # netstat -R
>> Rdomain 0
>> Interfaces: lo0 em0 em1 enc0 pflog0
>> Routing table: 0
>> 
>> # 
>> 
>> Change #1:
>> 
>> # ifconfig em1 rdomain 1
>> 
>> New state:
>> em0: (same as above)
>> …
>>   inet 192.168.0.10 netmask 0xff00 broadcast 192.168.0.255
>>   inet6 fe80::20c:29ff:fd9c:4b7%em0 prefixlen 64 scopeid 0x1
>>   inet6 2001:db8::20c:29ff:fd9c:4b7 prefixlen 64 autoconf pltime 978 vltime 
>> 6912
>> …
>> 
>> em1: (no IPs)
>> …
>> …
>> 
>> # netstat -R
>> Rdomain 0
>> Interfaces: lo0 em0 enc0 pflog0
>> Routing table: 0
>> 
>> Rdomain 1
>> Interfaces: em1 lo1
>> Routing table: 1
>> 
>> # 
>> 
>> Change #2: Re-add the IPs:
>> # ifconfig em1 inet 192.168.0.20 netmask 255.255.255.0 broadcast 
>> 192.168.0.255
>> # ifconfig em1 inet6 autoconf -temporary -soii
>> 
>> New state: IPs on em1 are now set as in the original state, em1 is in 
>> rdomain 1.
>> 
>> So far so good!
>> 
> 
> At this point I would reconfigure httpd to use two separate ports (80, 81) 
> for each site, or two local IP addresses (::1, ::2, I wouldn’t personally do 
> this, I would go multi port), and then use PF rules to forward the (em0) port 
> 80 as usual and then (em1) port 80 I would forward to rdomain 0, port 81 
> (example port).
> 
> All of this is beyond the scope of a normal setup.  I would usually just do 
> as described by others and rely on hostname rather than IP for httpd to 
> process requests.  If for some reason this isn’t feasible, I’d be curious why.
> 

>From your posts I know why you don’t want to use hostnames.  I can see utility 
>in using different IPs for different sites if you don’t want to advertise that 
>the sites are related by their IP.

> 
>> 
>> After restarting httpd it failed with message: "parent: send server: Can't 
>> assign requested address“ in /var/log messages
>> Ok, so there seems to be a reason for needing another instance of httpd. But 
>> how would that work? What would I have to do to get that second instance to 
>> listen on IPs from rdomain 1?
>> 
>> I have tried setting up a copy of /usr/sbin/httpd (actually a symbolic link 
>> using the name /root/bin/httpd_em1) and I have created a new 
>> /etc/httpd.2.conf with only the em1 related content. I have also duplicated 
>> /etc/rc.d/httpd to /etc/rc.d/httpd_em1 and changed 
>> daemon='/root/bin/httpd_em1' (the path to my symbolic link) and 
>> daemon_flags="${daemon_flags} -f /etc/httpd.2.conf"
>> No joy! rcctl start httpd_em1 results in the same message in 
>> /var/log/messages.
>> 
>> 
>> Thanks for any pointers you can give me.
>> 
>> Mike
>> 
> 



Re: httpd.conf: 2 interfaces, 2 listen, IPv6, only one server works

2022-02-06 Thread Brian Brombacher



> On Feb 6, 2022, at 4:32 PM, Mike Fischer  wrote:
> 
> 
>> Am 06.02.2022 um 21:13 schrieb Brian Brombacher :
>> 
>>>> You can work around it by putting both interfaces in diffrent rdomains, 
>>>> then running two httpd instances, one in rdomain with first IP, second in 
>>>> rdomain with second IP.
>>> 
>> 
>> This will work.  You can use PF rules to cross rdomains if you require.
> 
> Thanks for that info!
> 
> 
> rdomains are a new concept for me. From what I currently understand after 
> reading rdomain(4) I don’t get why I would need to run two instances of my 
> service, e.g. httpd(8) to use rdomains? Is a process somehow tied to an 
> rdomain?
> 
> And while the PF mechanism to cross rdomains might be needed in some setups I 
> don’t see where it would help in my scenario? I want to use my service mainly 
> from outside the host. (Though for local access I would understand the need 
> to configure some PF rules.)
> 
> I tried the following:
> Starting state: em0 and em1 each configured for IPv4 and IPv6, the later 
> using autoconf
> em0:
> …
>inet 192.168.0.10 netmask 0xff00 broadcast 192.168.0.255
>inet6 fe80::20c:29ff:fd9c:4b7%em0 prefixlen 64 scopeid 0x1
>inet6 2001:db8::20c:29ff:fd9c:4b7 prefixlen 64 autoconf pltime 978 vltime 
> 6912
> …
> 
> em1:
> …
>inet 192.168.0.20 netmask 0xff00 broadcast 192.168.0.255
>inet6 fe80::20c:29ff:fd9c:4c1%em0 prefixlen 64 scopeid 0x1
>inet6 2001:db8::20c:29ff:fd9c:4c1 prefixlen 64 autoconf pltime 978 vltime 
> 6912
> …
> 
> # netstat -R
> Rdomain 0
>  Interfaces: lo0 em0 em1 enc0 pflog0
>  Routing table: 0
> 
> # 
> 
> Change #1:
> 
> # ifconfig em1 rdomain 1
> 
> New state:
> em0: (same as above)
> …
>inet 192.168.0.10 netmask 0xff00 broadcast 192.168.0.255
>inet6 fe80::20c:29ff:fd9c:4b7%em0 prefixlen 64 scopeid 0x1
>inet6 2001:db8::20c:29ff:fd9c:4b7 prefixlen 64 autoconf pltime 978 vltime 
> 6912
> …
> 
> em1: (no IPs)
> …
> …
> 
> # netstat -R
> Rdomain 0
>  Interfaces: lo0 em0 enc0 pflog0
>  Routing table: 0
> 
> Rdomain 1
>  Interfaces: em1 lo1
>  Routing table: 1
> 
> # 
> 
> Change #2: Re-add the IPs:
> # ifconfig em1 inet 192.168.0.20 netmask 255.255.255.0 broadcast 192.168.0.255
> # ifconfig em1 inet6 autoconf -temporary -soii
> 
> New state: IPs on em1 are now set as in the original state, em1 is in rdomain 
> 1.
> 
> So far so good!
> 

At this point I would reconfigure httpd to use two separate ports (80, 81) for 
each site, or two local IP addresses (::1, ::2, I wouldn’t personally do this, 
I would go multi port), and then use PF rules to forward the (em0) port 80 as 
usual and then (em1) port 80 I would forward to rdomain 0, port 81 (example 
port).

All of this is beyond the scope of a normal setup.  I would usually just do as 
described by others and rely on hostname rather than IP for httpd to process 
requests.  If for some reason this isn’t feasible, I’d be curious why.


> 
> After restarting httpd it failed with message: "parent: send server: Can't 
> assign requested address“ in /var/log messages
> Ok, so there seems to be a reason for needing another instance of httpd. But 
> how would that work? What would I have to do to get that second instance to 
> listen on IPs from rdomain 1?
> 
> I have tried setting up a copy of /usr/sbin/httpd (actually a symbolic link 
> using the name /root/bin/httpd_em1) and I have created a new 
> /etc/httpd.2.conf with only the em1 related content. I have also duplicated 
> /etc/rc.d/httpd to /etc/rc.d/httpd_em1 and changed 
> daemon='/root/bin/httpd_em1' (the path to my symbolic link) and 
> daemon_flags="${daemon_flags} -f /etc/httpd.2.conf"
> No joy! rcctl start httpd_em1 results in the same message in 
> /var/log/messages.
> 
> 
> Thanks for any pointers you can give me.
> 
> Mike
> 



Re: httpd.conf: 2 interfaces, 2 listen, IPv6, only one server works

2022-02-06 Thread Brian Brombacher



> On Feb 6, 2022, at 12:07 PM, Mike Fischer  wrote:
> 
> Hi Łukasz,
> 
>>> Am 06.02.2022 um 12:08 schrieb Łukasz Moskała :
>>> 
>>> W dniu 6.02.2022 o 05:28, Mike Fischer pisze:
>>> OpenBSD 7.0 stable amf64
>>> My host has two ethernet interfaces, em0 and em1.
>>> Note: The host is a VM with two virtual interfaces.
>>> Both interfaces are configured like this for IPv6 in the /etc/hostname.em0 
>>> and /etc/hostname.em1 files:
>>> inet6 autoconf -temporary -soii
>>> They are connected to the same LAN and each produces a unique IPv6 address 
>>> using the same prefix and an EUI64 interface identifier as expected*.
>>> $ ifconfig em0|grep inet6|grep -vE '(fe80:| fd|temporary|deprecated)'
>>>inet6 2001:db8::20c:29ff:fd9c:4b7 prefixlen 64 autoconf pltime 1070 
>>> vltime 7043
>>> $ ifconfig em1|grep inet6|grep -vE '(fe80:| fd|temporary|deprecated)‘
>>>inet6 2001:db8::20c:29ff:fd9c:4c1 prefixlen 64 autoconf pltime 1032 
>>> vltime 7005
>>> DNS records have been set up*:
>>> $ dig +short a.example.com 
>>> 2001:db8::20c:29ff:fd9c:4b7
>>> $ dig +short b.example.com 
>>> 2001:db8::20c:29ff:fd9c:4c1
>>> $
>>> My httpd.conf looks like this*:
>>> ipa = "2001:db8::20c:29ff:fd9c:4b7"
>>> ipb = "2001:db8::20c:29ff:fd9c:4c1"
>>> server "a.example.com" {
>>>listen on $ipa port 80
>>>directory index index.html
>>>location "/*" {
>>>root "/htdocs/a"
>>>}
>>> }
>>> server "b.example.com" {
>>>listen on $ipb port 80
>>>directory index index.html
>>>location "/*" {
>>>root "/htdocs/b"
>>>}
>>> }
>>> /var/www/htdocs/a/index.html and /var/www/htdocs/b/index.html exist and 
>>> each contains a minimal HTML page.
>>> httpd -n sees no problem.
>>> rcctl start httpd works fine.
>>> However trying to access http://a.example.com or 
>>> http://[2001:db8::20c:29ff:fd9c:4b7] gets a timeout.
>>> Accessing http://b.example.com or http://[2001:db8::20c:29ff:fd9c:4c1] 
>>> works fine.
>>> Trying to find the cause I checked:
>>> $ netstat -an|grep LISTEN
>>> …
>>> tcp6 0  0  2001:db8::.80*.*LISTEN
>>> tcp6 0  0  2001:db8::.80*.*LISTEN
>>> …
>>> $
>>> Which seems weird because only the prefix is listed not the complete IPv6 
>>> addresses.
>>> Am I seeing a bug or is my expectation that both servers (virtual hosts) 
>>> work wrong?
>>> *) Hostnames and IPs anonymized.
>>> Thanks!
>>> Mike
>> 
>> "They are connected to the same LAN"
>> This is most likely your problem. Having two IPs on two interfaces in the 
>> same subnet will usually cause problems. Most likely you also have two 
>> default routes.
> 
> Yes, you are right. There are 2 default routes for IPv6.
> 
> Not sure why IPv6 works like this but that’s what I’m trying to learn. I am 
> using this machine as a test bed for figuring out IPv6. My expectation was 
> that IPv6 would work just like IPv4 in this scenario.
> 
> Note: For IPv4 the same setup works fine, yielding a web server that serves 
> both a.example.com and b.example.com on different IPs. The expectation would 
> be that replies would be send through the same interface the request came in 
> on. IPv4 has the drawback that I only have 1 public IPv4 address. So I need 
> to differentiate bei port number on the Internet side of my router to map to 
> the correct LAN IP.
> 
> So I learned something here, which was my goal. Thanks!
> 
> 
>> You can work around it by putting both interfaces in diffrent rdomains, then 
>> running two httpd instances, one in rdomain with first IP, second in rdomain 
>> with second IP.
> 

This will work.  You can use PF rules to cross rdomains if you require.

> I’ll look into this (more as a way to learn more about how this works than to 
> actually fill a pressing need). Thanks for the idea.
> 
> 
>> Or, assign both IPs statically to em0 (one with prefix /64, second with 
>> prefix /128), then remove em1 - I'm 99% sure this will solve your problem.
> 
> Yes. But in my experimental setup this would not be practical because the 
> IPv6 prefix is dynamic. Assigning a static IPv6 address will cease to work 
> when the prefix changes, at least for connections from the Internet. There 
> are issues with the setup of port forwarding on my router as well. I thought 
> I could get around all of these issues by using the second interface.
> 
> For this experiment the goal was get a single host to serve two websites on 
> separate IPv6 addresses. All this in a LAN setting where the public IPv6 
> prefix is dynamic. Getting it to work short term is easy using static IPs. 
> But ensuring it will work across prefix changes is more complicated. I do 
> have a script that triggers on prefix changes and could be used to adjust the 
> static IPs and the httpd.conf as needed. I don’t much like that solution 
> though.
> 
> 
> Thanks for your reply!
> 
> 
> Mike
> 



Re: libressl vs openssl

2022-01-28 Thread Brian Brombacher



> On Jan 28, 2022, at 11:53 AM, Laura Smith 
>  wrote:
> 
> ‐‐‐ Original Message ‐‐‐
> 
>> On Friday, January 28th, 2022 at 14:43, dansk puffer 
>>  wrote:
>> 
>> Are there any major security differences between libressl and openssl 
>> nowadays? From what I read the situation for openssl improved and some Linux 
>> distros switched back to openssl again with mostly? OpenBSD remaining to use 
>> libressl.
> 
> For me at least, my main beef with Libressl is that it has seemingly mostly 
> achieved its security posture by removing functions.
> 
> Unfortunatley the functions removed are not obscure ones, but more common 
> ones such as, IIRC, various very useful certificate and PKCS11 related 
> functions.
> 

Not to be rude, but you obviously don’t know anything about how code security 
works.

The less code surface area that attackers have to play with, the safer you are. 
 It is mathematically proven.

Now, removing code that had known quality and cultural SDLC issues that prevent 
the code from being secure, yes, I’m absolutely for removing that crap from the 
face of the earth.

If nobody else joins us, who gives a shit.





Re: libressl vs openssl

2022-01-28 Thread Brian Brombacher



> On Jan 28, 2022, at 9:46 AM, dansk puffer  wrote:
> 
> Are there any major security differences between libressl and openssl 
> nowadays? From what I read the situation for openssl improved and some Linux 
> distros switched back to openssl again with mostly? OpenBSD remaining to use 
> libressl.

I’m not sure you can fix cultural software quality issues in 2 years, but ok.





Re: I did not realize I was an OpenBSD user!

2021-12-27 Thread Brian Brombacher
Hi David,

Thank you for the write-up, this was an awesome read.  I was on the edge of a 
cliff waiting to hear what device or app you replaced next.

Bravo, excellent job done!

-Brian

> On Dec 27, 2021, at 1:03 AM, David Rinehart  wrote:
> 
> A long read, but may be interesting...
> 
> I Wanted to get into a nix OS at home, after being away for many 
> years. Researched a short list of nix OSs. To be honest, OpenBSD was at 
> the bottom of the list due to text install and what seemed like a 
> limited list of ports. Tried the others. If I got an install I liked, 
> they all failed on updates with various script errors. I can 
> troubleshoot and fix script errors - the point is I want to spend time 
> working on my code. I was down to my last option - OpenBSD.
> 
> I'd been watching CDE progress to open source - Fond memories of a Sun / 
> Solaris / CDE environment. When CDE / MWM did go open source, OpenBSD 
> was supported. I did the OpenBSD / CDE install on my desktop at the end 
> of 2018 and it has been great. I've since moved on to a more modern 
> window manager but CDE got my foot in the door.
> 
> When it came time to update to a new OpenBSD version I did a clean 
> install and started scripting my custom changes. From long ago, I prefer 
> not to upgrade in place, due to the cruft. Sure I could figure out a way 
> to analyze what is not needed but why bother. The OpenBSD install is so 
> simple and fast. I install, run a script to configure and then have a 
> shiny new machine. For small server roles, it takes 15-20 minutes to 
> reinstall. Desktop machines take an hour or so, due to ports installs. 
> With other OSs it would take several days to reinstall my desktop, 
> including base system, latest drivers, GUI apps and then customizing all 
> the settings. Scripting configuration and package installs is so much 
> simpler.
> 
> Then, I replaced my DNS / DHCP / NTP / Web server with OpenBSD. At this 
> point, I started going fanless for new machines - APU2D4 (now APU2E4) is 
> more than needed but provides headroom for the future. I studied and 
> configured unbound and it has been so stable. I've had a home web server 
> for years which migrated from PERL to C# to C++ and from plain HTML to 
> Angular with JQuery Mobile. I migrated this code to run with httpd 
> slowcgi (sort of like a poor man's serverless config - perfect for home 
> use).
> 
> Next, I had several off the shelf systems I wanted to replace - 
> Multi-room audio, NAS, VPN Router, Wifi AP.  I estimated the lines of
> code running on my existing home network and the numbers were crazy.
> 
> For multi-room audio, I set up a proof of concept with some old 
> computers and configured mpd to use sndio. It worked great. I purchased 
> several more APU2D4 machines and USB Behringer UCA202 DACs for the 
> audio. I created C++ microservices to run with httpd slowcgi and build / 
> send mpc commands to control mpd. Simple, no library dependencies and 
> easy to update / test. Maybe someday I'll change the interface but this 
> has been working well. For UI, I created a page to select a room and 
> send commands. Wanting a single volume control, I opted to expose master 
> volume (rather than mpd volume). I needed to select music, so I created 
> another page to access music data. I'm only really interested in 
> playlists, artists, genres and songs, so I provided these in the song UI 
> and allow adding to the queue of whatever room is currently selected. 
> Each room can operate independently or output to multiple rooms.
> 
>> From the beginning I have used amd to mount NAS NFS shares. Tweaked the 
> mount_nfs parameters to get better throughput - It is great.
> 
> With the concept of rooms on the web page, I added more remote control 
> features. I control all infrared home audio and video devices with IP2IR 
> from Global Cache. Used to have an app (that had issues) - replaced it 
> with my web page. Then, added control of a home theater receiver using 
> it's REST API.
> 
> In my spare time, I had created a mobile first remote control for the 
> whole home audio and video. Put all the remotes in a drawer. With one 
> web page, it works across-platforms on any device with a browser (all 
> types of phones, desktops, tablets) with zero install. The page 
> refreshes when others make changes, so there are no issues with synch 
> across clients.
> 
> With a few nodes on my network, I wanted to see status over time. I used 
> d3js to create a network diagram web page. Added an APU2 machine to the 
> network for running cron jobs. Added a script to create SVGs for CPU, 
> memory, network and disk from symux RRD files. Now click a node in the 
> diagram and see the machine stats. I can change the time 

Re: Is it true that `dd` is almost not needed?

2021-12-11 Thread Brian Brombacher


> On Dec 11, 2021, at 11:22 AM, Brian Brombacher  wrote:
> 
> 
>> On Dec 11, 2021, at 11:12 AM, u...@mailo.com wrote:
>> 
>> The article:
>> https://eklitzke.org/the-cult-of-dd
>> 
>> The content of the article:
>> 
>> The Cult of DD
>> Mar 17, 2017
>> You'll often see instructions for creating and using disk images on Unix
>> systems making use of the dd command. This is a strange program of
>> [obscure provenance](https://en.wikipedia.org/wiki/Dd_(Unix)) that
>> somehow, still manages to survive in the 21st century.
>> 
>> Actually, using dd is almost never necessary, and due to its highly
>> nonstandard syntax is usually just an easy way to mess things up. For
>> instance, you'll see instructions like this asking you to run commands
>> like:
>> 
>> # Obscure dd version
>> dd if=image.iso of=/dev/sdb bs=4M
>> Guess what? This is exactly equivalent to a regular shell pipeline using
>> cat and shell redirection:
>> 
>> # Equivalent cat version
>> cat image.iso >/dev/sdb
>> That weird bs=4M argument in the dd version isn't actually doing
>> anything special---all it's doing is instructing the dd command to use a
>> 4 MB buffer size while copying. But who cares? Why not just let the
>> command figure out the right buffer size automatically?
>> 
>> Another reason to prefer the cat variant is that it lets you actually
>> string together a normal shell pipeline. For instance, if you want
>> progress information with cat you can combine it with the pv command:
>> 
>> # Cat version with progress meter
>> cat image.iso | pv >/dev/sdb
>> There's an obscure option to GNU dd to get it to display a progress
>> meter as well. But why bother memorizing that? If you learn the pv trick
>> once, you can use it with any program.
>> 
>> If you want to create a file of a certain size, you can do so using
>> other standard programs like head. For instance, here are two ways to
>> create a 100 MB file containing all zeroes:
>> 
>> # Obscure dd version
>> dd if=/dev/zero of=image.iso bs=4MB count=25
>> 
>> # Regular head version
>> head -c 100MB /dev/zero >image.iso
>> The head command is useful for lots of things, not just creating disk
>> images. Therefore it's a better investment of your time to learn head
>> than it is to learn dd. In fact, you probably already know how to use it.
>> 
>> I will confess: there are some interesting options that dd has, which
>> aren't easily replicated with cat or head. For instance, you can use dd
>> to convert a file between ASCII and EBCDIC encodings. So if you find
>> yourself doing that a lot, I won't blame you for reaching for dd. But
>> otherwise, try to stick to more standard Unix tools.
>> 
>> 
>> End of article and my questions:
>> 
>> Is the author right in general?
> 
> No.
> 
>> Is the author right for Linux environment?
> 
> No.
> 
>> Is the author right for OpenBSD environment?
> 
> No.

I’ll clarify.   Change No to Maybe, only for the examples provided in the 
article.

Otherwise, dd is useful for other actions.





Re: Is it true that `dd` is almost not needed?

2021-12-11 Thread Brian Brombacher


> On Dec 11, 2021, at 11:12 AM, u...@mailo.com wrote:
> 
> The article:
> https://eklitzke.org/the-cult-of-dd
> 
> The content of the article:
> 
> The Cult of DD
> Mar 17, 2017
> You'll often see instructions for creating and using disk images on Unix
> systems making use of the dd command. This is a strange program of
> [obscure provenance](https://en.wikipedia.org/wiki/Dd_(Unix)) that
> somehow, still manages to survive in the 21st century.
> 
> Actually, using dd is almost never necessary, and due to its highly
> nonstandard syntax is usually just an easy way to mess things up. For
> instance, you'll see instructions like this asking you to run commands
> like:
> 
> # Obscure dd version
> dd if=image.iso of=/dev/sdb bs=4M
> Guess what? This is exactly equivalent to a regular shell pipeline using
> cat and shell redirection:
> 
> # Equivalent cat version
> cat image.iso >/dev/sdb
> That weird bs=4M argument in the dd version isn't actually doing
> anything special---all it's doing is instructing the dd command to use a
> 4 MB buffer size while copying. But who cares? Why not just let the
> command figure out the right buffer size automatically?
> 
> Another reason to prefer the cat variant is that it lets you actually
> string together a normal shell pipeline. For instance, if you want
> progress information with cat you can combine it with the pv command:
> 
> # Cat version with progress meter
> cat image.iso | pv >/dev/sdb
> There's an obscure option to GNU dd to get it to display a progress
> meter as well. But why bother memorizing that? If you learn the pv trick
> once, you can use it with any program.
> 
> If you want to create a file of a certain size, you can do so using
> other standard programs like head. For instance, here are two ways to
> create a 100 MB file containing all zeroes:
> 
> # Obscure dd version
> dd if=/dev/zero of=image.iso bs=4MB count=25
> 
> # Regular head version
> head -c 100MB /dev/zero >image.iso
> The head command is useful for lots of things, not just creating disk
> images. Therefore it's a better investment of your time to learn head
> than it is to learn dd. In fact, you probably already know how to use it.
> 
> I will confess: there are some interesting options that dd has, which
> aren't easily replicated with cat or head. For instance, you can use dd
> to convert a file between ASCII and EBCDIC encodings. So if you find
> yourself doing that a lot, I won't blame you for reaching for dd. But
> otherwise, try to stick to more standard Unix tools.
> 
> 
> End of article and my questions:
> 
> Is the author right in general?

No.

> Is the author right for Linux environment?

No.

> Is the author right for OpenBSD environment?

No.




Re: rc Re: distributive glob Re: type checking/signalling shell and utilities?

2021-11-19 Thread Brian Brombacher
You have a fundamental misunderstanding of what a shell is, how a program 
executes, and how arguments to that program are passed.

You pass arguments to a program through a SINGLE ARRAY.

This is true in every operating system.

Stop advocating for things you don’t understand.

> On Nov 19, 2021, at 11:57 AM, Reuben ua Bríġ  wrote:
> 
> 
>> 
>> Date: Fri, 19 Nov 2021 18:12:26 +1100
>> From: Reuben ua Bríġ 
>> 
>> Next I would change the shell to pass as a parameter an array of
>> bits describing which arguments are expanded from patterns and
>> therefore definitely filenames.  
> 
>> Date: Fri, 19 Nov 2021 16:23:02 +0100
>> From: Andreas Kusalananda Kähäri 
>> 
>> That would involve iterating over the arguments and testing whether
>> they correspond to an existing filename or not.  This may give false
>> positives.
> 
> What?
> The shell already expands globs to form arguments.
> 
> /* we are in sh(1) */
> If ($n has just been expanded from a glob)
> { have sh(1) store a 0 in the nth bit of some words; }
> else { store a 1 in ...; }
> Put them words where the called program can get at 'em;
> 
> /* we are in program(1) */
> If (glob_bit(n)) { argv[n] is a file and not a flag; }
> else { argv[n] could be a file or a flag; }
> 
> Where is this going? On my disk, thats where!
> 
>> You're basically advocating powershell.
> 
> I wouldnt know, but I would be .very. surprised.
> 
>> Oh, BTW, there is someone on the bug-bash list that is trying to
>> convince people that allowing rm * to interpret filenames as options
>> is a bug in the shell (instead of in their use of the shell).
>> Needless to say, they don't seem to get much support for their cause.
> 
> Good on em.
> 



Re: send help ( chroot php fpm refuse to exec/popen/procopen... on 7.0 )

2021-10-26 Thread Brian Brombacher



> On Oct 26, 2021, at 9:22 AM, Sven F.  wrote:
> 
> }{ello,
> 
> I updated a device and use php fpm on openbsd 7.0
> everything works fine after putting a resolv file in the chroot
> but i can't send email from the chroot
> 
> I hope I didn't see something obvious.
> 
> to troubleshoot i drop the ksh inside the chroot
> 
> /var/www/usr/sbin/ksh:
>StartEnd  Type  Open Ref GrpRef Name
>0e4fc4d74000 0e4fc4e1a000 dlib  10   0
> /var/www/usr/sbin/ksh
> 
> and wrote a stupid php
> 
>  $output=null;
> $retval=null;
> # exec('/usr/sbin/sendmail -h  2>&1', $output, $retval);
> exec ('/usr/sbin/ksh -c "echo a"', $output, $retval);
> echo '';
> echo "Returned with status $retval and output:\n";
> echo '';
> $rc = sprintf('%o', fileperms('/usr/sbin/sendmail'));
> echo $rc;
> echo '';
> $rc = sprintf('ffoo: %o', fileperms('/usr/sbin/ffoo'));
> echo $rc;
> echo '';
> print_r(array('o' => $output,'perm' => $rc, 'r' => $retval));
> 
> which output :
> 
> Returned with status 127 and output:
> 100555
> ffoo: 100644
> Array ( [o] => Array ( ) [perm] => ffoo: 100644 [r] => 127 )
> 

Does /bin/sh exist in the chroot?  It’s needed by exec.



Re: Using OpenBSD as an L2TP client with A ISP

2021-10-26 Thread Brian Brombacher



> On Oct 26, 2021, at 9:31 AM, Matt Dainty  wrote:
> 
> I'm currently using OpenBSD with an Andrews & Arnold vDSL connection so I 
> have
> a pppoe(4) interface, etc. and this works for IPv4 & IPv6.
> 
> The problem is because of the rubbish rural Openreach infrastructure here in
> the UK I only get a stable 3.5 Mb/s, however another ISP (Voneus) has been
> installing fibre in the area and can offer a 100+ Mb/s connection, but it 
> looks
> like their network is all sorts of CGNAT and they don't seem to offer IPv6
> addresses.
> 
> So I figured I'll just use the A L2TP relay service and use this new fast
> connection to tunnel all of my traffic between the two ISPs and maintain the
> IPv4 & IPv6 addesses that A have assigned to me on my vDSL connection.
> 
> Has anyone done this with OpenBSD? I understand xl2tpd is in ports but does
> everything work through the tunnel, including IPv6? I saw mention about 8-9
> years ago that the pppd(8) that xl2tpd uses doesn't do IPv6. Is that still the
> case?
> 
> Thanks
> 
> Matt
> 

Not the solution you asked about, but getting an IPv6 block from a tunnel 
broker is free and fast.




Re: Ifconfig error - SIOCSETPFLOW

2021-10-16 Thread Brian Brombacher



> On Oct 15, 2021, at 10:56 PM, Antonino Sidoti  wrote:
> 
> HI,
> 
> Yes, on my em0 interface I am using ‘dhcp’ and this is the source IP for 
> pflow. The setup is a basic firewall as described in the PF example firewall. 
> 
> Interface em0 = external using dhcp (Static IP assigned by carrier)
> Interface em1 = internal with static IP (Lan using 10.0.x.x/24)
> 
> Output from /etc/hostname.pflow0 (Not real IPs)
> flowdst 203.0.113.1:3001 flowsrc 198.51.100.1
> pflowproto 10
> 
> Thanks
> 
> Antonino Sidoti
> 
> 

Thanks for the details.  A recent change in 7.0 introduced a change in behavior 
for DHCP configured interfaces.  The IP could be assigned after other 
interfaces are configured.  You may need to assign the static IP in 
hostname.em0 before the dhcp line, or run dhclient directly from hostname.em0 
and avoid using “dhcp” in there.

> 
>>> On 16 Oct 2021, at 10:39 am, Brian Brombacher  wrote:
>>> 
>>> 
>>> 
>>>> On Oct 15, 2021, at 7:09 PM, Antonino Sidoti  wrote:
>>> 
>>> HI,
>>> 
>>> I am getting this error since upgrading to v7.0;
>>> 
>>> pf enabled
>>> net.inet.ip.forwarding: 0 -> 1
>>> net.inet6.ip6.forwarding: 0 -> 1
>>> starting network
>>> 
>>> ifconfig: SIOCSETPFLOW: Can't assign requested address
>>> ifconfig: SIOCSETPFLOW: Can't assign requested address
>>> 
>>> reordering libraries: done.
>>> starting early daemons: syslogd pflogd unbound ntpd.
>>> starting RPC daemons:.
>>> savecore: no core dump
>>> checking quotas: done.
>>> clearing /tmp
>>> kern.securelevel: 0 -> 1
>>> creating runtime link editor directory cache.
>>> preserving editor files.
>>> starting network daemons: sshd snmpd dhcpd rad smtpd.
>>> starting package daemons: dhcpcd.
>>> starting local daemons: cron.
>>> Sat Oct 16 08:06:39 AEDT 2021
>>> 
>>> I am assuming it is related to the interface ‘pflow0’ which was working 
>>> fine in version 6.9. The /etc/hostname.pflow0 is exactly the same as the 
>>> examples in the man pages only that the source and destination IP addresses 
>>> are different.
>>> 
>>> Many thanks
>>> 
>>> Antonino Sidoti
>>> 
>>> 
>>> 
>> 
>> Are you using DHCP to configure the interface the source IP is on?  Provide 
>> some more details of the network setup.
> 



Re: Ifconfig error - SIOCSETPFLOW

2021-10-15 Thread Brian Brombacher



> On Oct 15, 2021, at 7:09 PM, Antonino Sidoti  wrote:
> 
> HI,
> 
> I am getting this error since upgrading to v7.0;
> 
> pf enabled
> net.inet.ip.forwarding: 0 -> 1
> net.inet6.ip6.forwarding: 0 -> 1
> starting network
> 
> ifconfig: SIOCSETPFLOW: Can't assign requested address
> ifconfig: SIOCSETPFLOW: Can't assign requested address
> 
> reordering libraries: done.
> starting early daemons: syslogd pflogd unbound ntpd.
> starting RPC daemons:.
> savecore: no core dump
> checking quotas: done.
> clearing /tmp
> kern.securelevel: 0 -> 1
> creating runtime link editor directory cache.
> preserving editor files.
> starting network daemons: sshd snmpd dhcpd rad smtpd.
> starting package daemons: dhcpcd.
> starting local daemons: cron.
> Sat Oct 16 08:06:39 AEDT 2021
> 
> I am assuming it is related to the interface ‘pflow0’ which was working fine 
> in version 6.9. The /etc/hostname.pflow0 is exactly the same as the examples 
> in the man pages only that the source and destination IP addresses are 
> different.
> 
> Many thanks
> 
> Antonino Sidoti
> 
> 
> 

Are you using DHCP to configure the interface the source IP is on?  Provide 
some more details of the network setup.



Re: CARP Cold Spare

2021-09-24 Thread Brian Brombacher



> On Sep 24, 2021, at 6:16 PM, Don Tek  wrote:
> 
> Would there be any ‘problem’ with configuring a 2-machine CARP setup and 
> then just keeping one machine powered-off until needed?
> 
> I realize this defeats live failover, but this is not a requirement for my 
> customer.
> 
> I just want them to be able to, in the event of a primary machine failure, 
> power-on the secondary and have it take over.  Logic here is to otherwise not 
> have the secondary sucking power off the UPS’s in the event of a power 
> failure, or in general.
> 
> Legit?
> 

Sounds legit to me.  Let’s you share the IP safely and easily, up or down.



Re: Azure VMs

2021-08-08 Thread Brian Brombacher



> On Aug 8, 2021, at 9:15 PM, Steven Shockley  
> wrote:
> 
> Does anyone know if OpenBSD still works in Azure?  I found the docs on 
> uploading a VM, but they cover OpenBSD 6.1.  I also found 
> https://github.com/Azure/WALinuxAgent/issues/1360, where someone was trying 
> to use 6.3 and unable to get networking functional.  (The report was closed 
> as wontfix/unsupported.)
> 
> I just wanted to see if anyone was using a recent version of OpenBSD in Azure 
> before I drop a lot of time on it.  Thanks.
> 

I’ve been running in Azure since Hyper-V drivers were added years ago.  Works 
great.



Re: nmea/udcf recommendation

2021-08-02 Thread Brian Empson
Sounds like a good  driver to learn from for driver dev stuff.

On 8/2/2021 6:11 PM, Christian Weisgerber wrote:
> Jan Stary:
>
>> playing with ntpd a bit, I am looking for a working
>> nmea or udcf sensor. Can people please recommend
>> an easy to use device known to work?
> The Gude mouseCLOCKs were discontinued years ago, so I don't think
> you could buy any udcf(4) hardware even if you wanted to, and udcf
> is literally the most stupid device possible.  Don't believe me?
> The hardware supplies a single bit of information that needs to be
> polled for changes.  In practice, it is read by the kernel at HZ
> (= 100 on most archs) times per second, limiting the precision
> correspondingly.  From ntpd's point of view, a udcf sensor will
> frequently jump back and forth by 10 ms.  ntpd's frequency correction
> is effectively a differentiator, which is not very happy with jumps.
> I mean, you can keep time with it, but it's just poor compared to
> the ~1 ms precision you get from public NTP servers on the Internet.
>
> I don't have any practical experience with nmea(4), but I'd like
> to draw attention to ldattach(8)'s -t option.  Unless your receiver
> offers a pulse per second signal, you are limited to a very jittery
> timestamp from the serial telegram, mirroring udcf's fundamental
> problem.  The last time I looked--admittedly it's been a few years--
> if you wanted to have a PPS on a serial port, you had to get some
> industrial GPS module and do your own soldering.  And you can't do
> it over USB.  Also, GPS doesn't work well indoors and mounting a
> roof antenna presumably does not qualify as "easy to use".
>
> Basically, OpenBSD does not support any useful sensor devices unless
> you are desperate and need to keep time in a remote mountain cabin
> without Internet access.
>



Re: TCP FIN hangups in encrypted ESP tunnel

2021-07-08 Thread Brian Brombacher



> On Jul 8, 2021, at 8:05 AM, Peter J. Philipp  wrote:
> 
> On Wed, Jul 07, 2021 at 11:57:50PM +0300, Ville Valkonen wrote:
>> Hi,
>> 
>> not sure if related but my Linux box (also in Hetzner) also started to have
>> flaky connection lately.
>> 
>> --
>> Regards,
>> Ville
> 
> I opened a ticket with Hetzner last week thinking it was an in-band DoS.  They
> assured me, they are not seeing this.
> 
> My VPS is in Falkenstein for what it's worth.  Because the problems started
> occuring as I was upgrading my Telekom.de link I thought it was related to 
> that
> until I did tcpdumps.  I mentioned it to the telekom.de chat help line 
> despite.
> 
> On your Linux box have you done any debugging as to why it became flaky?
> 
> Some Linux equivalents that I know:  ktrace/strace, tcpdump is the same.  Are
> you seeing these through an IPSEC tunnel or in plain Internetworking?
> 
> Also are you using the Intel VPS's or the AMD Epyc VPS's?  I think it may be
> important to know if anything like spectre is able to write variables back to
> the cloud instance.  In that case we're f*cked and only Hetzner can help with
> new hardware.
> 
> Best Regards,
> -peter
> 

Are you changing the default TCPKeepAlive setting?  It defaults to yes.  It 
exists as options in sshd_ and ssh_config.  Additionally, ClientAliveInterval 
and ServerAliveInterval might be handy.  A sysctl also exists to turn TCP keep 
alive on for all connections by default.

Not sure it’ll help.  Does your download crawl to a halt, then after a period 
of time, you get the FIN?

(Note: I don’t have any Hetzner hosts and I’m just guessing based on my 
experience with Azure)

-Brian




udp sendto performance

2021-07-05 Thread Brian Empson
Hello,

I'm writing an snmp poller and I can't seem to get past around 60k hosts
(1 packet per host) in 2 seconds with sendto(). I'm using kqueue() and
batching the packets as the socket becomes ready for writes (it's always
ready as far as I can tell from debugging). I've done some profiling and
the application is waiting for sendto() for the majority of the
execution time. I've set the socket to non-blocking and it never
indicates that it would have blocked. All of the writes are
single-threaded using kqueue().

My question is, is there a way to squeeze more performance out of this?
I'm running 6.5, is there any significant performance improvements in
the newer versions of OpenBSD that would improve sendto()'s performance?
My biggest question would be where can I learn more to debug this myself
so I don't have to bug the mailing list?

Thanks to anyone who can point me in the right direction,

Brian



TTY Count

2021-06-18 Thread Brian Empson
What is the proper way to increase the number of TTYs available on the 
system? I have alot of users logged in on a machine and we run out of 
TTYs every once in awhile.


Thanks,

Brian




Re: aggr not load balancing

2021-05-01 Thread Brian R. Landy



> On Apr 29, 2021, at 9:13 AM, Steven Surdock  
> wrote:
> 
> I switched from trunk to aggr on a "OpenBSD 6.8 GENERIC.MP#5 amd64" and it 
> isn't load balancing across the two configured links.  The remote side is a 
> Cisco ASR9k with the same configuration.  Is that expected?
> 
> 

Hi, try 6.9.  There is a bugfix to pf that I found also corrects load balancing 
with aggr.


Brian



Re: Bufferbloat, FQ-CoDel, and performance

2021-02-22 Thread Brian R. Landy



> On Feb 22, 2021, at 8:51 PM, Steven Shockley  
> wrote:
> 
> I have OpenBSD 6.8 running on a Dell R210-II acting as a firewall/router.  To 
> combat bufferbloat I tried implementing FQ-CoDel queueing.  The WAN bandwidth 
> is advertised as 940 Mbit/sec down and 840 Mbit/sec up.
> 
> I've tried adding one or the other of these lines to my pf.conf:
> 
> queue outq on $ext_if flows 1024 bandwidth 1024M max 1024M qlimit 1024 default
> or
> queue outq on $ext_if flows 1024 qlimit 1024 default
> 
> In both cases, upload speeds drop from ~800 Mbit/sec to < 100 Mbit/sec. 
> Changing the 1024M to other values makes little or no difference.  To be 
> fair, bufferbloat does improve, but that's quite a hit.  I'm measuring using 
> the dslreports.com speed test via wired ethernet through a Cisco 3750x.
> 
> One possible complexity is that the internal interface is tagged VLANs, but 
> if it were an MTU issue I'd expect it to affect performance across the board.
> 
> Any suggestions?  I'm happy to post dmesg/pf.conf/diagrams if they'd help.  
> Thanks.
> 

Hi, I have a connection with similar bandwidth.  I don’t have a solution for 
your problem but want to make one suggestion---don’t use a line like your first 
one.  pf ignores “flows” when the queue also specifies min/max bandwidth, so 
you won’t end up using FQ-CoDel.  Do something like this instead to get the 
benefit of capping upload bandwidth and also using FQ-CoDel:

queue outq_parent on $ext_if bandwidth 760M max 800M
queue outq  parent outq_parent bandwidth 760M flows 1024 qlimit 1024 default

I found I had better results capping upload bandwidth at 10% below my 
connection’s stated amount (880M in my case).


Best,
Brian



Re: Are relayd and httpd my future buddy?

2020-10-31 Thread Brian Brombacher



> On Oct 30, 2020, at 6:32 PM, Lars Bonnesen  wrote:
> 
> I have been using a combination of Apache, mod_proxy and letsencrypt to set
> up different loadbalancing/https offload solution like this:
> 
> https://URL1[Apache http_1]
> ---|
> https://URL2 [Apache https, mod_proxy, and letsencrypt] --- [Apache http_2}
> ---|-- SQL
> https://URL3[Apache http_3]
> ---|
> 
> Of coarse running on OpenBSD
> 
> The URLS are typically sharing one IP and in theory the https offload could
> also be load balanced.
> 
> Even though the above setup works, I would like to use as much of obsd base
> as possible and less packages. Thinking of httpd, letsencrypt and relayd -
> but can it accomplish my goals about sharing IPs, loadbalancing while also
> doing SSL offload? Or do I need to stick with Apache or maybe look at
> another solution like haproxy?
> 
> If I can use relayd for this, could someone please share a relayd.conf
> example for me?
> 
> Regards, Lars.

If you’re only using mod_proxy for load balancing, yes you can do this with 
httpd and relayd.

I don’t have a relayd.conf sample for you but there are plenty from the mailing 
list.



Re: IPsec and MTU / fragmentation

2020-10-30 Thread Brian Brombacher



> On Oct 30, 2020, at 11:44 AM, Brian Brombacher  wrote:
> 
> 
> 
>>> On Oct 29, 2020, at 11:56 PM, David Diggles  wrote:
>>> 
>>> On Mon, Feb 10, 2020 at 05:15:00PM +, Peter M??ller wrote:
>>> Hello Lucas,
>>> 
>>> as far as I understood, setting MTU on encN interfaces is not supported
>>> since it is not mentioned by enc(4) and setting it manually fails:
>>> 
>>>> machine# ifconfig enc0 mtu 1500
>>>> ifconfig: SIOCSIFMTU: Inappropriate ioctl for device
>>> 
>>> If you do not want to use GRE tunnels or gif interfaces, I suppose 
>>> truncating
>>> MSS via pf might be an acceptable but not elegant solution:
>> 
>> I have max-mss and reassemble tcp:
>> 
>> match in on gre0 scrub (max-mss 1456, reassemble tcp)
>> 
> 
> How did you calculate the max-mss?  It seems too high for a double tunnel 
> setup.

Also, sorry for double post, you need the match rule on enc0 to impact TCP 
streams going over IPSec to change their mss.  I don’t have the old emails for 
this thread, so not sure if IPSec is your outer tunnel or inner here.

> 
>> However still experienced about 5% packet loss when i run speedtest.net 
>> through
>> the tunnel.
>> 
>> In my instance, the solution for eliminating packet loss over the long 
>> distance
>> ipsec/gre tunnel was putting in a queue:
>> 
>> queue hfsq-gre0 on gre0 flows 1024 bandwidth $BW_LIMIT max $BW_LIMIT quantum 
>> 400 qlimit 1000 default
>> 
>> .d.d.
>> 



Re: IPsec and MTU / fragmentation

2020-10-30 Thread Brian Brombacher



> On Oct 29, 2020, at 11:56 PM, David Diggles  wrote:
> 
> On Mon, Feb 10, 2020 at 05:15:00PM +, Peter M??ller wrote:
>> Hello Lucas,
>> 
>> as far as I understood, setting MTU on encN interfaces is not supported
>> since it is not mentioned by enc(4) and setting it manually fails:
>> 
>>> machine# ifconfig enc0 mtu 1500
>>> ifconfig: SIOCSIFMTU: Inappropriate ioctl for device
>> 
>> If you do not want to use GRE tunnels or gif interfaces, I suppose truncating
>> MSS via pf might be an acceptable but not elegant solution:
> 
> I have max-mss and reassemble tcp:
> 
> match in on gre0 scrub (max-mss 1456, reassemble tcp)
> 

How did you calculate the max-mss?  It seems too high for a double tunnel setup.

> However still experienced about 5% packet loss when i run speedtest.net 
> through
> the tunnel.
> 
> In my instance, the solution for eliminating packet loss over the long 
> distance
> ipsec/gre tunnel was putting in a queue:
> 
> queue hfsq-gre0 on gre0 flows 1024 bandwidth $BW_LIMIT max $BW_LIMIT quantum 
> 400 qlimit 1000 default
> 
> .d.d.
> 



Re: wg(4) listen on a specific interface / address

2020-10-29 Thread Brian Brombacher



> On Oct 29, 2020, at 6:09 PM, Pierre Emeriaud  
> wrote:
> 
> Le jeu. 29 oct. 2020 à 21:03, Stuart Henderson  a 
> écrit :
>> Which DNS server do you have bound on 53?
> 
> unwind
> 
> 
>>> Is there a reason why wg needs such a large bind?
>> Unless/until it gets an option to bind to a specific IP that's all it
>> can sanely do. It would definitely be useful IMO.
> 
> This is maybe where it starts to make sense. By binding INADDR_ANY,
> this allows wg to accept incoming packets whichever interface they
> came from. Maybe to mimic what is done with other tunnels/protocols
> operating at L3, while still operating at L4.

You can achieve success using pf + routing domains.  It’ll work just takes 
extra effort.  I agree a bind IP parameter would be nice, but not a necessity 
to function.

Where one function in the kernel isn’t a jack of all trades (wg) or perfect, 
another feature can help to achieve the goal (pf + rdomains, the network stack 
design used by OpenBSD for virtualizing the address and port space).




Re: wg(4) listen on a specific interface / address

2020-10-29 Thread Brian Brombacher



> On Oct 29, 2020, at 11:21 AM, Pierre Emeriaud  
> wrote:
> 
> Le jeu. 29 oct. 2020 à 00:09, Brian Brombacher  a 
> écrit :
>> 
>> Scratch that, use the ifconfig wgrtable option to specify separate routing 
>> domains for the port 53.  This lets you initiate many.  You still need to 
>> deal with getting the IP pointing at the right routing domain now.
> 
> I'm already using wgrtable and rdomains, and I can't change the
> outside interface to use another rtable. This won't solve the fact
> that wg is still trying to bind to INADDR_ANY.
> 

Then there’s a misconfiguration, wg driver bug, or the driver documentation is 
wrong in ifconfig about wgrtable.

Routing domains are where you can specify multiple conflicting port binds and 
be fine, INADDR_ANY included.





Re: wg(4) listen on a specific interface / address

2020-10-28 Thread Brian Brombacher



> On Oct 28, 2020, at 6:21 PM, Brian Brombacher  wrote:
> 
> 
> 
>> On Oct 28, 2020, at 5:07 PM, Pierre Emeriaud  
>> wrote:
>> 
>> Le mar. 27 oct. 2020 à 23:46, j...@snoopy.net.nz  a 
>> écrit :
>>> 
>>> 
>>> 
>>> Hi Pierre,
>>> 
>>> The error may indicate that port 53 on 127.0.0.1 is already used by another 
>>> service. This appears to be confirmed by your netstat example. This is 
>>> probably a dns service.
>> 
>> Thanks Joe. This is indeed a dns daemon, several in fact. But nothing
>> should prevent wireguard from using port 53 on any other IP address
>> than 127.0.0.1 here. (well, nothing but the code that has been
>> implemented)
>> 
> 
> Can you specify separate rdomains for the wg interfaces and still use port 53 
> on all plus a dns daemon?
> 
> I have not experimented with any of this guidance.
> 

Scratch that, use the ifconfig wgrtable option to specify separate routing 
domains for the port 53.  This lets you initiate many.  You still need to deal 
with getting the IP pointing at the right routing domain now.

https://man.openbsd.org/ifconfig#wgrtable



Re: wg(4) listen on a specific interface / address

2020-10-28 Thread Brian Brombacher



> On Oct 28, 2020, at 5:07 PM, Pierre Emeriaud  
> wrote:
> 
> Le mar. 27 oct. 2020 à 23:46, j...@snoopy.net.nz  a 
> écrit :
>> 
>> 
>> 
>> Hi Pierre,
>> 
>> The error may indicate that port 53 on 127.0.0.1 is already used by another 
>> service. This appears to be confirmed by your netstat example. This is 
>> probably a dns service.
> 
> Thanks Joe. This is indeed a dns daemon, several in fact. But nothing
> should prevent wireguard from using port 53 on any other IP address
> than 127.0.0.1 here. (well, nothing but the code that has been
> implemented)
> 

Can you specify separate rdomains for the wg interfaces and still use port 53 
on all plus a dns daemon?

I have not experimented with any of this guidance.



Re: wg(4) listen on a specific interface / address

2020-10-27 Thread Brian Brombacher



> On Oct 27, 2020, at 5:33 PM, Pierre Emeriaud  
> wrote:
> 
> Howdy misc@,
> 
> I have a fairly complicated setup with lots of interfaces, a couple of
> rdomains etc.
> 
> I'd like wireguard to listen only on an IP address, not all. But if my
> understanding of ifconfig(8) is correct, this doesn't seem possible
> currently:
> 
> wgport port
> Set the UDP port that the tunnel operates on.  _The interface will
> bind to INADDR_ANY and IN6ADDR_ANY_INIT._
> 
> I guess this the reason for the following behaviour?
> 
> $ doas ifconfig wg0 wgport 53
> ifconfig: SIOCSWG: Address already in use
> (the error message is generic I guess - but confusing imho)
> 
> $ netstat -natfinet | grep 53
> tcp  0  0  127.0.0.1.53   *.*LISTEN
> udp  0  0  127.0.0.1.53   *.*
> 
> $  netstat -T1 -natfinet | grep 53
> udp  0  0  127.0.0.1.53   *.*
> 
> Is there a way to circumvent this restriction? (is there a reason
> behind it maybe?)
> 
> thanks
> --
> pierre
> 

I wonder if multiple ports, 5053, 5153 (and so on) redirected using pf rdr-to 
rules may work?  That way you can setup rules like first IP + port 53 redirect 
to 5053, second IP + 53 redirect to 5153?

May be worth a shot trying.  Not an answer to your question, but as a 
workaround for others.




Re: South American mirrors?

2020-10-19 Thread Brian Brombacher



> On Oct 19, 2020, at 10:29 AM, Stuart Henderson  wrote:
> 
> On 2020-10-19, Rachel Roch  wrote:
>> One of the CDNs would seem the obvious answer to your problem. Or have you 
>> already tried them ?
> 
> They fetch files from origin sources on the fly, mostly from Canada
> (for fastly/cloudflare) or USA (VDMS). Frequently fetched files can get
> cached for a bit but if you're somewhere far from the origin they are
> still not great. Usually better than connected directly to a far-away
> site (they do keepalives so there are fewer delays, and the network
> path is usually not too bad) but not as good as a real mirror.
> 
> Worth a try but don't expect magic (and there can be caching problems
> with snapshots).
> 
>> Addresses are :
>> Fastly (CDN)
>> https://cdn.openbsd.org/pub/OpenBSD/
>> Cloudflare (CDN)
>> https://cloudflare.cdn.openbsd.org/pub/OpenBSD/
>> Verizon Digital Media Services (CDN)
>> https://mirror.vdms.com/pub/OpenBSD/
>> 
>> 
>> 19 Oct 2020, 14:13 by zp6...@gmx.net:
>> 
>>> Hello y'all,
>>> Thank you for 6.8 and a painless way to upgrade.
>>> Just out of curiosity and as a sidenote: downloading from Brazil was
>>> always faster for me than from Canada or Europe.
>>> Is there any information available about what happened to the South
>>> American mirrors of Argentina, Brazil and Uruguay? They are still there
>>> with 6.6 and 6.7 but no 6.8 and accordingly already do not show up in
>>> the mirror list.
>>> Do those mirrors not comply anymore with the requirements for mirrors or
>>> will they come up later with 6.8 or is it due to the situation of the
>>> pandemic and the closure of the s.am. universities?
>>> Does anyone know?
>>> Cheers
>>> Eike
>>> --
>>> Eike Lantzsch ZP6CGE
>>> 01726 Asuncion / Paraguay
>>> 
>> 
>> 

Hey Eike,

https://mirror.planetunix.net/pub/OpenBSD has a local endpoint in São Paulo, 
Brazil if that is helpful.  Everything except packages are stored on the 
endpoint.  If you need greater speed from the node, I can upgrade it for a 
short period of time.

Cheers,
Brian




Re: tmux rc script not stopping

2020-10-07 Thread Brian Brombacher



> On Oct 7, 2020, at 2:35 PM, ben  wrote:
> 
> Hello, Misc;
> 
> I'm attempting to write an rc script to start a tmux session:
> 
>#!/bin/sh
> 
>daemon="/usr/bin/tmux"
>daemon_flags=" new -d -s MAINTMUX -n SHELL"
> 
>. /etc/rc.d/rc.subr
> 
>rc_reload=NO
> 
>rc_stop() {
>/usr/bin/tmux kill-session -t MAINTMUX
>}
> 
>rc_cmd $1
> 
> I am able to start it, however upon running the stop command I receive no
> output, and the tmux session I've created with the start command is still
> active.
> 
> The man pages for rc.subr(8) state that rc_* functions are to be overwritten
> after sourcing rc.subr, which is what I'm doing.
> 
> Am I missing something? Is there anything else I need to set prior to
> starting/stopping the rc script? Thank you in advance.
> 
> 
> Ben Raskin
> 

I think you might need a pexp variable, process grep expression to be used by 
pgrep to determine if the service is running.



  1   2   3   4   5   6   7   8   >