Re: Bluetooth wheel mouse and X11

2024-05-23 Thread joelp
>
> Can you run this program on the console (no X; no wsmoused) and see if it
> reports any scroll events when you move the mouse? Run on /dev/wsmouse2
> first, then on /dev/wsmouse. Both should report the same type of events, I
> think.

I confirmed the output is the same with /dev/wsmouse -- no wsmoused or X.

Here is output for 1) some scrolling, 2) left then right button click, and
3) a bunch of moving the mouse around:

cat mousetest.out
move: -1 (left)
  scroll: 256 (down)
 delta-w: -256 (left)
  scroll: -1 (up)
 delta-w: 1 (right)
   press: 0
move: 1 (right)
  scroll: -257 (up)
 delta-w: 257 (right)
 release: 0
move: -1 (left)
  scroll: 256 (down)
 delta-w: -256 (left)
move: -1 (left)
  scroll: 256 (down)
 delta-w: -256 (left)
move: 1 (right)
  scroll: -256 (up)
 delta-w: 256 (right)
move: 1 (right)
  scroll: -256 (up)
 delta-w: 256 (right)
  scroll: -2 (up)
 delta-w: 2 (right)
   press: 2
 release: 2
move: -1 (left)
move: -2 (down)
  scroll: 256 (down)
 delta-w: -256 (left)
move: 1 (right)
  scroll: -256 (up)
 delta-w: 256 (right)
move: -11 (left)
move: 6 (up)
  scroll: 2816 (down)
 delta-w: -2816 (left)
move: -36 (left)
move: 16 (up)
  scroll: 9216 (down)
 delta-w: -9216 (left)
move: -7 (left)
move: 21 (up)
  scroll: 1792 (down)
 delta-w: -1792 (left)
move: 22 (right)
move: 23 (up)
  scroll: -5632 (up)
 delta-w: 5632 (right)
move: 96 (right)
move: 16 (up)
  scroll: -24576 (up)
 delta-w: 24576 (right)
move: 56 (right)
move: -23 (down)
  scroll: -14336 (up)
 delta-w: 14336 (right)
move: 59 (right)
move: -46 (down)
  scroll: -15104 (up)
 delta-w: 15104 (right)
move: 69 (right)
move: -66 (down)
  scroll: -17664 (up)
 delta-w: 17664 (right)
move: 55 (right)
move: -67 (down)
  scroll: -14080 (up)
 delta-w: 14080 (right)
move: 35 (right)
move: -67 (down)
  scroll: -8960 (up)
 delta-w: 8960 (right)
move: 2 (right)
move: -58 (down)
  scroll: -512 (up)
 delta-w: 512 (right)
move: -40 (left)
move: -48 (down)
  scroll: 10240 (down)
 delta-w: -10240 (left)
move: -86 (left)
move: -20 (down)
  scroll: 22016 (down)
 delta-w: -22016 (left)
move: -121 (left)
move: 10 (up)
  scroll: 30976 (down)
 delta-w: -30976 (left)
move: -139 (left)
move: 39 (up)
  scroll: -29952 (up)
 delta-w: 29952 (right)
move: -156 (left)
move: 64 (up)
  scroll: -25600 (up)
 delta-w: 25600 (right)
move: -153 (left)
move: 86 (up)
  scroll: -26368 (up)
 delta-w: 26368 (right)
move: -118 (left)
move: 102 (up)
  scroll: 30208 (down)
 delta-w: -30208 (left)
move: -70 (left)
move: 115 (up)
  scroll: 17920 (down)
 delta-w: -17920 (left)
move: 3 (right)
move: 96 (up)
  scroll: -768 (up)
 delta-w: 768 (right)
move: 54 (right)
move: 86 (up)
  scroll: -13824 (up)
 delta-w: 13824 (right)
move: 112 (right)
move: 72 (up)
  scroll: -28672 (up)
 delta-w: 28672 (right)
move: 176 (right)
move: 48 (up)
  scroll: 20480 (down)
 delta-w: -20480 (left)
move: 226 (right)
move: 16 (up)
  scroll: 7680 (down)
 delta-w: -7680 (left)
move: 216 (right)
move: -19 (down)
  scroll: 10240 (down)
 delta-w: -10240 (left)
move: 186 (right)
move: -57 (down)
  scroll: 17920 (down)
 delta-w: -17920 (left)
move: 134 (right)
move: -93 (down)
  scroll: 31232 (down)
 delta-w: -31232 (left)
move: 61 (right)
move: -122 (down)
  scroll: -15616 (up)
 delta-w: 15616 (right)
move: -21 (left)
move: -113 (down)
  scroll: 5376 (down)
 delta-w: -5376 (left)
move: -90 (left)
move: -99 (down)
  scroll: 23040 (down)
 delta-w: -23040 (left)
move: -141 (left)
move: -74 (down)
  scroll: -29440 (up)
 delta-w: 29440 (right)
move: -192 (left)
move: -44 (down)
  scroll: -16384 (up)
 delta-w: 16384 (right)
move: -222 (left)
move: -8 (down)
  scroll: -8704 (up)
 delta-w: 8704 (right)
move: -249 (left)
move: 34 (up)
  scroll: -1792 (up)
 delta-w: 1792 (right)
move: -223 (left)
move: 63 (up)
  scroll: -8448 (up)
 delta-w: 8448 (right)
move: -199 (left)
move: 88 (up)
  scroll: -14592 (up)
 delta-w: 14592 (right)
move: -156 (left)
move: 111 (up)
  scroll: -25600 (up)
 delta-w: 25600 (right)
move: -96 (left)
move: 126 (up)
  scroll: 24576 (down)
 delta-w: -24576 (left)
move: -18 (left)
move: 148 (up)
  scroll: 4608 (down)
 delta-w: -4608 (left)
move: 59 (right)
move: 117 (up)
  scroll: -15104 (up)
 delta-w: 15104 (right)
move: 133 (right)
move: 103 (up)
  scroll: 31488 (down)
 delta-w: -31488 (left)
move: 193 (right)
move: 84 (up)
  scroll: 16128 (down)
 delta-w: -16128 (left)
move: 237 (right)
move: 42 (up)
  scroll: 4864 (down)
 delta-w: -4864 (left)
move: 279 (right)
move: -1 (down)
  scroll: -5888 (up)
 delta-w: 5888 (right)
move: 243 (right)
move: -55 (down)
  scroll: 3328 (down)
 delta-w: -3328 (left)
move: 204 

Re: Bluetooth wheel mouse and X11

2024-05-20 Thread joelp
> Can you post your Xorg.0.log, that should make things clear.


> xinput list
WARNING: running xinput against an Xwayland server. See the xinput man
page for details.
_ Virtual core pointer  id=2[master pointer  (3)]
_   _ Virtual core XTEST pointerid=4[slave  pointer  (2)]
_   _ xwayland-pointer:19   id=6[slave  pointer  (2)]
_   _ xwayland-relative-pointer:19  id=7[slave  pointer  (2)]
_ Virtual core keyboard id=3[master keyboard (2)]
_ Virtual core XTEST keyboard   id=5[slave  keyboard (3)]
_ xwayland-keyboard:19  id=8[slave  keyboard >

> xinput list-props 
>
xinput list-props 2
WARNING: running xinput against an Xwayland server. See the xinput man
page for details.
Device 'Virtual core pointer':
Device Enabled (113):   1
Coordinate Transformation Matrix (115): 1.00, 0.00,
0.00, 0.00, 1.00, 0.00, 0.00, 0.00,
1.00
macppc:/home/joelp$ xinput list-props 6
WARNING: running xinput against an Xwayland server. See the xinput man
page for details.
Device 'xwayland-pointer:19':
Device Enabled (113):   1
Coordinate Transformation Matrix (115): 1.00, 0.00,
0.00, 0.00, 1.00, 0.00, 0.00, 0.00,
1.00
Device Accel Profile (238): 0
Device Accel Constant Deceleration (239):   1.00
Device Accel Adaptive Deceleration (240):   1.00
Device Accel Velocity Scaling (241):10.00


cat /var/log/Xorg.0.log
[   156.990]
X.Org X Server 1.21.1.9
X Protocol Version 11, Revision 0
[   156.997] Current Operating System: NetBSD macppc 10.0 NetBSD 10.0
(MACMINIG4) #7: Sun May 12 15:16:25 PDT 2024 
joelp@xxx:/home/joelp/netbsd10-src/obj/sys/arch/macppc/compile/MACMINIG4
macppc
[   156.997]
[   157.008] Current version of pixman: 0.38.4
[   157.011]Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
[   157.013] Markers: (--) probed, (**) from config file, (==) default
setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[   157.019] (==) Log file: "/var/log/Xorg.0.log", Time: Mon May 20
18:49:01 2024
[   157.067] (II) Loader magic: 0x1ae0e28
[   157.067] (II) Module ABI versions:
[   157.067]X.Org ANSI C Emulation: 0.4
[   157.067]X.Org Video Driver: 25.2
[   157.067]X.Org XInput driver : 24.4
[   157.067]X.Org Server Extension : 10.0
[   157.082] (WW) xf86EnableIO -1
[   157.082] (II) xf86EnableIO: 0x
[   157.082] (WW) Can't map IO space! (9)
[   157.082] (--) PCI:*(0@0:16:0) 1002:5962:1002:5962 rev 1, Mem @
0x9800/134217728, 0x9000/65536, I/O @ 0x0400/256, BIOS @
0x/131072
[   157.083] (==) Using default built-in configuration (21 lines)
[   157.083] (==) --- Start of built-in configuration ---
[   157.083]Section "Device"
[   157.083]Identifier  "Builtin Default ati Device 0"
[   157.083]Driver  "ati"
[   157.083]EndSection
[   157.083]Section "Screen"
[   157.083]Identifier  "Builtin Default ati Screen 0"
[   157.083]Device  "Builtin Default ati Device 0"
[   157.083]EndSection
[   157.083]Section "Device"
[   157.083]Identifier  "Builtin Default wsfb Device 0"
[   157.083]Driver  "wsfb"
[   157.083]EndSection
[   157.083]Section "Screen"
[   157.084]Identifier  "Builtin Default wsfb Screen 0"
[   157.084]Device  "Builtin Default wsfb Device 0"
[   157.084]EndSection
[   157.084]Section "ServerLayout"
[   157.084]Identifier  "Builtin Default Layout"
[   157.084]Screen  "Builtin Default ati Screen 0"
[   157.084]Screen  "Builtin Default wsfb Screen 0"
[   157.084]EndSection
[   157.084] (==) --- End of built-in configuration ---
[   157.084] (==) ServerLayout "Builtin Default Layout"
[   157.084] (**) |-->Screen "Builtin Default ati Screen 0" (0)
[   157.084] (**) |   |-->Monitor ""
[   157.086] (**) |   |-->Device "Builtin Default ati Device 0"
[   157.086] (==) No monitor specified for screen "Builtin Default ati
Screen 0".
Using a default monitor configuration.
[   157.086] (**) |-->Screen "Builtin Default wsfb Screen 0" (1)
[   157.086] (**) |   |-->Monitor ""
[   157.087] (**) |   |-->Device "Builtin Default wsfb Device 0"
[   157.087] (==) No monitor specified for screen "Builtin Default wsfb
Screen 0".
Using a default 

Re: Bluetooth wheel mouse and X11

2024-05-20 Thread joelp
> 1. Can you post your xorg.conf and /var/log/Xorg.0.log?
Right now I don't have an xorg.conf in /etc/X11.

> 2. See if it has `Option "EmulateWheel"' and/or `Option
> "EmulateWheelButton"'
> is set if the input driver is "mouse"?
I tried those options and I could not get this to change the behavior.
When I created an xorg.conf, I used "wsmouse".

> 3. Run xev -event mouse > /tmp/xev.log, then a) first move the mouse only,
> then
> b) use the scroll-wheel only? Post the xev.log file, too.
Oh nice, Iain also suggested xev. I can now confirm that simply moving the
mouse causes multiple events. I noticed that the scroll action on the
mouse does not produce any events.

Here is the xev log for moving the mouse (made sure I moved X and Y) and
trying to scroll (which did not produce events):

Outer window is 0xa1, inner window is 0xa2

EnterNotify event, serial 25, synthetic NO, window 0xa1,
root 0x3a6, subw 0x0, time 11141270, (175,138), root:(333,315),
mode NotifyNormal, detail NotifyAncestor, same_screen YES,
focus YES, state 0

MotionNotify event, serial 25, synthetic NO, window 0xa1,
root 0x3a6, subw 0x0, time 11141270, (175,138), root:(333,315),
state 0x0, is_hint 0, same_screen YES

ButtonPress event, serial 25, synthetic NO, window 0xa1,
root 0x3a6, subw 0x0, time 11141270, (175,138), root:(333,315),
state 0x0, button 5, same_screen YES

ButtonRelease event, serial 25, synthetic NO, window 0xa1,
root 0x3a6, subw 0x0, time 11141270, (175,138), root:(333,315),
state 0x1000, button 5, same_screen YES

MotionNotify event, serial 25, synthetic NO, window 0xa1,
root 0x3a6, subw 0x0, time 11141281, (173,138), root:(331,315),
state 0x0, is_hint 0, same_screen YES

ButtonPress event, serial 25, synthetic NO, window 0xa1,
root 0x3a6, subw 0x0, time 11141281, (173,138), root:(331,315),
state 0x0, button 5, same_screen YES

ButtonRelease event, serial 25, synthetic NO, window 0xa1,
root 0x3a6, subw 0x0, time 11141281, (173,138), root:(331,315),
state 0x1000, button 5, same_screen YES

MotionNotify event, serial 25, synthetic NO, window 0xa1,
root 0x3a6, subw 0x0, time 11141293, (171,138), root:(329,315),
state 0x0, is_hint 0, same_screen YES

ButtonPress event, serial 25, synthetic NO, window 0xa1,
root 0x3a6, subw 0x0, time 11141293, (171,138), root:(329,315),
state 0x0, button 5, same_screen YES

ButtonRelease event, serial 25, synthetic NO, window 0xa1,
root 0x3a6, subw 0x0, time 11141293, (171,138), root:(329,315),
state 0x1000, button 5, same_screen YES

MotionNotify event, serial 25, synthetic NO, window 0xa1,
root 0x3a6, subw 0x0, time 11141304, (169,138), root:(327,315),
state 0x0, is_hint 0, same_screen YES

ButtonPress event, serial 25, synthetic NO, window 0xa1,
root 0x3a6, subw 0x0, time 11141304, (169,138), root:(327,315),
state 0x0, button 5, same_screen YES

ButtonRelease event, serial 25, synthetic NO, window 0xa1,
root 0x3a6, subw 0x0, time 11141304, (169,138), root:(327,315),
state 0x1000, button 5, same_screen YES

MotionNotify event, serial 25, synthetic NO, window 0xa1,
root 0x3a6, subw 0x0, time 11141315, (168,138), root:(326,315),
state 0x0, is_hint 0, same_screen YES

ButtonPress event, serial 25, synthetic NO, window 0xa1,
root 0x3a6, subw 0x0, time 11141315, (168,138), root:(326,315),
state 0x0, button 5, same_screen YES

ButtonRelease event, serial 25, synthetic NO, window 0xa1,
root 0x3a6, subw 0x0, time 11141315, (168,138), root:(326,315),
state 0x1000, button 5, same_screen YES

MotionNotify event, serial 25, synthetic NO, window 0xa1,
root 0x3a6, subw 0x0, time 11141383, (166,138), root:(324,315),
state 0x0, is_hint 0, same_screen YES

ButtonPress event, serial 25, synthetic NO, window 0xa1,
root 0x3a6, subw 0x0, time 11141383, (166,138), root:(324,315),
state 0x0, button 5, same_screen YES

ButtonRelease event, serial 25, synthetic NO, window 0xa1,
root 0x3a6, subw 0x0, time 11141383, (166,138), root:(324,315),
state 0x1000, button 5, same_screen YES

MotionNotify event, serial 25, synthetic NO, window 0xa1,
root 0x3a6, subw 0x0, time 11141394, (164,138), root:(322,315),
state 0x0, is_hint 0, same_screen YES

ButtonPress event, serial 25, synthetic NO, window 0xa1,
root 0x3a6, subw 0x0, time 11141394, (164,138), root:(322,315),
state 0x0, button 5, same_screen YES

ButtonRelease event, serial 25, synthetic NO, window 0xa1,
root 0x3a6, subw 0x0, time 11141394, (164,138), root:(322,315),
state 0x1000, button 5, same_screen YES

MotionNotify event, serial 25, synthetic NO, window 0xa1,
root 0x3a6, subw 0x0, time 11141405, (162,138), root:(320,315),
state 0x0, is_hint 0, same_screen YES

ButtonPress event, serial 25, synthetic NO, window 0xa1,
root 0x3a6, subw 0x0, time 11141405, 

Re: Bluetooth wheel mouse and X11

2024-05-20 Thread joelp
Hi Iain

> great! which mouse did you use btw?

It seems I collected some Microsoft BT mice over the years! All 3
Microsoft mice I have exhibit the same behavior. The last one I tried is a
portable one called a Wedge Touch Mouse. Here's the btconfig ubt0 inquiry
output:
  1: bdaddr xx:xx:xx:xx:xx:xx (mouse)
   : name "Microsoft Wedge Touch Mouse"
   : class [0x002580] Peripheral Mouse 
   : page scan rep mode 0x01
   : clock offset 87
   : rssi 0
They all have scrolling (the Wedge is touch sensitive).

Here's my USB BT device:
[ 6.109991] ubt0 at uhub2 port 1
[ 6.109991] ubt0: Realtek (0x0b05) ASUS USB-BT500 (0x190e), rev
1.10/2.00, addr 2


> On the Bluetooth front, my question would be does the mouse actually send
> scroll events? You can find this out with sysutils/hcicump in that the
> reports sent will include them. the only way I can conceieve that your
> situation occurs is if it is sending both scroll and movement at the same
> time somehow
>
I installed hcidump and received output. Unfortunately, I don't know
enough about this yet to make sense -- will do some reading. I pasted the
first few lines of output below of me moving (not scrolling) the mouse
around. The output appears the same in X or console.

> On the X fton, is X registering scroll events? you can perhaps find this
> out with xev(1) I'm not sure how..
>
I couldn't get any output for this, but I'll keep trying.

Thanks for your suggestions for debugging, I have some reading to do at
least now :)

-Joel

hcidump output:

hcidump -r wedge.hcidump
HCI sniffer - Bluetooth packet analyzer ver 5.66-netbt
btsnoop version: 1 datalink type: 1002
> HCI Event: Mode Change (0x14) plen 6
status 0x00 handle 4 mode 0x00 interval 0 
   Mode: Active
> HCI Event: Max Slots Change (0x1b) plen 3
handle 4 slots 3
> HCI Event: Mode Change (0x14) plen 6
status 0x00 handle 4 mode 0x02 interval 18
Mode: Sniff
> HCI Event: Mode Change (0x14) plen 6
status 0x00 handle 4 mode 0x00 interval 0
Mode: Active
> HCI Event: Max Slots Change (0x1b) plen 3
handle 4 slots 3
> HCI Event: Mode Change (0x14) plen 6
status 0x00 handle 4 mode 0x02 interval 18
Mode: Sniff
> HCI Event: Mode Change (0x14) plen 6
status 0x00 handle 4 mode 0x00 interval 0
Mode: Active
> HCI Event: Max Slots Change (0x1b) plen 3
handle 4 slots 3
> HCI Event: Mode Change (0x14) plen 6
status 0x00 handle 4 mode 0x02 interval 18
Mode: Sniff
> HCI Event: Mode Change (0x14) plen 6
status 0x00 handle 4 mode 0x00 interval 0
Mode: Active
> HCI Event: Max Slots Change (0x1b) plen 3
handle 4 slots 3
> HCI Event: Mode Change (0x14) plen 6
status 0x00 handle 4 mode 0x02 interval 18
Mode: Sniff
> HCI Event: Mode Change (0x14) plen 6
status 0x00 handle 4 mode 0x00 interval 0
Mode: Active
> HCI Event: Max Slots Change (0x1b) plen 3
handle 4 slots 3
> HCI Event: Mode Change (0x14) plen 6
status 0x00 handle 4 mode 0x02 interval 18
Mode: Sniff
> HCI Event: Mode Change (0x14) plen 6
status 0x00 handle 4 mode 0x00 interval 0
Mode: Active
> HCI Event: Max Slots Change (0x1b) plen 3
handle 4 slots 3
> HCI Event: Mode Change (0x14) plen 6
status 0x00 handle 4 mode 0x02 interval 18
Mode: Sniff
> HCI Event: Mode Change (0x14) plen 6
status 0x00 handle 4 mode 0x00 interval 0
Mode: Active





Bluetooth wheel mouse and X11

2024-05-16 Thread joelp
Hello -- I successfully connected a BT mouse to NetBSD 10 (/dev/wsmouse2).
Cool.

When I launch X11, the BT mouse seems to work by simply moving the cursor
around. But once the cursor is over a window, I noticed that the X,Y
motion is also triggering scrolling. It's as if the mouse motion is
generating scroll wheel events.

My USB mouse works perfectly under X (/dev/wsmouse) and the wheel
scrolling works as expected.

I tried various /etc/X11/xorg.conf mouse settings (including ZAxisMapping)
but nothing prevents the weird scrolling.

Apologies if this is more an Xorg question. My X11 skills are rusty -- I
only recently started using X11 frequently again when I got a Mac Mini G4
working (maccppc). For all of my other NetBSD devices, I just use the
console.

Thanks - Joel



Re: NetBSD 10 headless boot

2024-04-20 Thread joelp
>
> What has changed with GENERIC NetBSD 10 that I now need a monitor
> connected?
>
> [ 3.409208] i915drmkms0: interrupting at msi6 vec 0 (i915drmkms0)
> [ 3.417023] [drm] Initialized i915 1.6.0 20200114 for i915drmkms0 on
> minor 0
> [ 3.447019] intelfb0 at i915drmkms0
> [ 3.447019] [drm] DRM_I915_DEBUG enabled
> [ 3.447019] [drm] DRM_I915_DEBUG_GEM enabled
> [ 3.447019] intelfb0: framebuffer at 0xe0009000, size 1920x1080, depth
> 32, stride 7680
> [ 4.097019] wsdisplay0 at intelfb0 kbdmux 1: console (default, vt100
> emulation), using wskbd0

I solved this thanks to NetBSD's excellent documentation. I happened to
notice an example in man 5 boot.cfg:
   # Disable Direct Rendering Manager (DRM) drivers
   userconf=disable i915drmkms*

Sure enough, adding that userconf to my boot.cfg solves being able to boot
NetBSD 10 without VGA connected, like it behaved in 9.3.

I'm certain I did not add that to my 9.3 boot.cfg for this machine, so
there is still the question of what could have changed from 9.3 to 10.0.

Thanks - Joel



NetBSD 10 headless boot

2024-04-20 Thread joelp
Hello -- I have a NetBSD 10 GENERIC RELEASE AMD64 installed on a Lenovo
i7-4770 desktop that I use for a build machine. I just did a fresh install
after having run 9.3 and everything was great with 10 until I tried to
boot without a monitor.

In my case, I used the VGA port (no keyboard) after noticing it didn't
boot, and sure enough it worked.

I was able to boot (in fact, just a couple hours ago) NetBSD 9.3 without a
monitor just fine.

What has changed with GENERIC NetBSD 10 that I now need a monitor connected?

The machine is located away from my monitors, etc, so I need a headless boot.

Thanks - Joel



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

[ 1.00] NetBSD 10.0 (GENERIC) #0: Thu Mar 28 08:33:33 UTC 2024
[ 1.00]
mkre...@mkrepro.netbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC
[ 1.00] total memory = 16296 MB
[ 1.00] avail memory = 15742 MB
[ 1.00] timecounter: Timecounters tick every 10.000 msec
[ 1.00] Kernelized RAIDframe activated
[ 1.00] timecounter: Timecounter "i8254" frequency 1193182 Hz
quality 100
[ 1.04] mainbus0 (root)
[ 1.04] ACPI: RSDP 0x000F0490 24 (v02 LENOVO)
[ 1.04] ACPI: XSDT 0xDAE3F088 8C (v01 LENOVO TC-03   
1170 AMI  00010013)
[ 1.04] ACPI: FACP 0xDAE4C098 00010C (v05 LENOVO TC-03   
1170 AMI  00010013)
[ 1.04] ACPI: DSDT 0xDAE3F1A0 00CEF7 (v02 LENOVO TC-03   
1170 INTL 20120711)
[ 1.04] ACPI: FACS 0xDB887080 40
[ 1.04] ACPI: APIC 0xDAE4C1A8 92 (v03 LENOVO TC-03   
1170 AMI  00010013)
[ 1.04] ACPI: FPDT 0xDAE4C240 44 (v01 LENOVO TC-03   
1170 AMI  00010013)
[ 1.04] ACPI: LPIT 0xDAE4C288 5C (v01 LENOVO TC-03   
1170 AMI. 0005)
[ 1.04] ACPI: MSDM 0xDAE4C2E8 55 (v03 LENOVO TC-03   
1170 AMI  00010013)
[ 1.04] ACPI: SSDT 0xDAE4C340 000539 (v01 LENOVO TC-03   
1170 INTL 20120711)
[ 1.04] ACPI: SSDT 0xDAE4C880 000AD8 (v01 LENOVO TC-03   
1170 INTL 20120711)
[ 1.04] ACPI: MCFG 0xDAE4D358 3C (v01 LENOVO TC-03   
1170 MSFT 0097)
[ 1.04] ACPI: HPET 0xDAE4D398 38 (v01 LENOVO TC-03   
1170 AMI. 0005)
[ 1.04] ACPI: SSDT 0xDAE4D3D0 00036D (v01 LENOVO TC-03   
1170 INTL 20120711)
[ 1.04] ACPI: SSDT 0xDAE4D740 0032F3 (v01 LENOVO TC-03   
1170 INTL 20091112)
[ 1.04] ACPI: BGRT 0xDAE50A38 38 (v00 LENOVO TC-03   
1170 AMI  00010013)
[ 1.04] ACPI: DMAR 0xDAE50A70 B8 (v01 LENOVO TC-03   
1170 INTL 0001)
[ 1.04] ACPI: 5 ACPI AML tables successfully acquired and loaded
[ 1.04] ioapic0 at mainbus0 apid 2: pa 0xfec0, version 0x20,
24 pins
[ 1.04] cpu0 at mainbus0 apid 0
[ 1.04] cpu0: Use lfence to serialize rdtsc
[ 1.04] cpu0: Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz, id 0x306c3
[ 1.04] cpu0: node 0, package 0, core 0, smt 0
[ 1.04] cpu1 at mainbus0 apid 2
[ 1.04] cpu1: Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz, id 0x306c3
[ 1.04] cpu1: node 0, package 0, core 1, smt 0
[ 1.04] cpu2 at mainbus0 apid 4
[ 1.04] cpu2: Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz, id 0x306c3
[ 1.04] cpu2: node 0, package 0, core 2, smt 0
[ 1.04] cpu3 at mainbus0 apid 6
[ 1.04] cpu3: Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz, id 0x306c3
[ 1.04] cpu3: node 0, package 0, core 3, smt 0
[ 1.04] cpu4 at mainbus0 apid 1
[ 1.04] cpu4: Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz, id 0x306c3
[ 1.04] cpu4: node 0, package 0, core 0, smt 1
[ 1.04] cpu5 at mainbus0 apid 3
[ 1.04] cpu5: Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz, id 0x306c3
[ 1.04] cpu5: node 0, package 0, core 1, smt 1
[ 1.04] cpu6 at mainbus0 apid 5
[ 1.04] cpu6: Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz, id 0x306c3
[ 1.04] cpu6: node 0, package 0, core 2, smt 1
[ 1.04] cpu7 at mainbus0 apid 7
[ 1.04] cpu7: Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz, id 0x306c3
[ 1.04] cpu7: node 0, package 0, core 3, smt 1
[ 1.04] acpi0 at mainbus0: Intel ACPICA 20221020
[ 1.04] acpi0: X/RSDT: OemId , AslId

[ 1.04] acpi0: MCFG: segment 0, bus 0-63, address 0xf800
[ 1.04] ACPI: Dynamic OEM Table Load:
[ 1.04] ACPI: SSDT 0xABAD69144C08 0003D3 

Re: NetBSD vs. smartphones?

2024-03-21 Thread joelp
> On Thu 21 Mar 2024 at 12:20:47 +, nia wrote:
>> Unfortunately I've determined that syncthing is the easiest way to get
>> files on and off a modern smartphone. MTP ain't it.
>
> I use Total Commander (a Norton Commander-like tool) from
> https://www.ghisler.ch/board/viewtopic.php?t=76644 or the google app
> store, to which I have added the "TC Wifi Transfer" and "TotalCmd sftp"
> (client) plugins. With both you can get files into and out from the
> phone.
>

If you have Android, Termux is the most Unix-like experience. Add
Termux:API package and you can access photos, downloads, etc, on your
Android storage.

Once you have Termux set up, you can use rsync!

Note: Don't use the one on Play Store. I use F-Droid, but you can install
package directly.

-Joel



Re: How big should wd0e (/var) be

2023-12-12 Thread joelp


> I look at it in exactly the opposite way - it fills me with joy to
> see that something has gone wild and filled a partition, and I didn't
> even notice, as everything I'm doing is elsewhere, not being bothered.
> [Turn on process accounting, and do a few full builds, and /var/account
> will soon take over whatever space you have allowed it to occupy.]

I stopped using many partitions on my BSD servers (except OpenBSD router
where I use defaults), and my Rock64 type devices have only 1 partition
(plus tmpfs etc); but for those Aarch64 devices that's how the image
comes.

It's interesting though that my (FreeBSD) ZFS server has many mount points
because of various datasets. So, I decreased the OS partitions generally
but more than made up for it in datasets.

-Joel




Re: NetBSD as an NTP stratum 1 server

2023-11-18 Thread joelp

On Thu, Nov 16, 2023 at 06:03:56PM +0100, Manuel Bouyer wrote:
> To do better I think I'd go with an implementation of ntpd on a 

microcontroller
> (maybe an ESP32, which has native ethernet) and use the PPS signal 

with a
> capture channel. Doing true real time on more complex CPUs is really 

hard.

>
> I know there is an implementation on arduino, but I think a 32 bit MCU
> would be a better choice.

That sounded like such a good idea somebody must have done it before, 

and

it seems so (even with cool display):

  https://github.com/liebman/ESPNTPServer

Martin


On Fri, 17 Nov 2023, Brad Spencer wrote:

A followup to myself

So for right now, it looks like you may be out of luck for ntpd PPS use
on a Rock64 system (except for the USB DCD support which would work if
the GPS chip supports it).



Yes, not looking good for the RockChip devices for now. Thanks for the 
help.


Using a 32 bit MCU looks like an interesting project. MCU devices 
these days have crazy CPU and connectivity. I'll add it to the list 
of end-of-year projects (although will compete with trying to get rtl-sdr 
working better on the Rock64).


-Joel


Re: NetBSD as an NTP stratum 1 server

2023-11-17 Thread joelp
>> Greg Troxel  writes:
>>
>>> Brad Spencer  writes:
>>>
>>> (The advice about "use gpio" is good - I am just trying to clarify USB
>>> PPS.)
>>
>> It has worked very well for me, assuming that the GPS module is stable.
>> I had one that would have a tendency to crash in its firmware after
>> being up for a while and totally lose its mind.
>>
>
> Thanks for the detailed information and discussion.
>
> I built a kernel for my Rock64 on its bigger sibling RockPro64 (has a PCIe
> SSD card) -- sorry, okay, that was me just saying how much I enjoy these 2
> devices! Anyway...I ran into a problem initializing gpiopps. Here is the
> Rock64 output when initializing with gpio.conf:
> [1.04] gpiopps0 at gpio1 pins 28
> [1.04] gpiopps0: autoconfiguration error: positive edge interrupt
> not supported for ASSERT
> I also booted single user and it fails using gpioctl. Taking a peek at
> src/sys/dev/gpio/gpiopps.c this would be in the second if-block (1 pin) in
> gpiopps_attach:
> if (!gpio_intr_str(sc->sc_gpio, >sc_map, 0,
>sc->sc_intrs[0].sc_irqmode,
>sc->sc_intrs[0].sc_intrstr,
>sizeof(sc->sc_intrs[0].sc_intrstr))) {
> aprint_error_dev(self,
> "failed to decode interrupt\n");
> gpio_pin_unmap(sc->sc_gpio, >sc_map);
> return;
> Here's what I added to evbarm/conf/GENERIC64:
> gpiopps* at gpio1 offset 28 mask 0x1 flag 0x2
> This is for physical pin 7 which per pine64 wiki is GPIO1_D4. So gpio1 and
> D=3, so 3*8 + 4 = port 28.
>
> I tried also modifying the RockPro64 kernel -- similar issue.
>
> Any idea what am I doing wrong?
>
> Thanks - Joel
>
>
And sorry, wrong code block from gpiopps.c:
} else {
aprint_error_dev(sc->sc_dev,
"%s edge interrupt not supported for ASSERT\n",
assert_edge == GPIO_INTR_POS_EDGE ? "positive"
  : "negative");
gpio_pin_unmap(sc->sc_gpio, >sc_map);
return;
}




Re: NetBSD as an NTP stratum 1 server

2023-11-17 Thread joelp
> Greg Troxel  writes:
>
>> Brad Spencer  writes:
>>
>> (The advice about "use gpio" is good - I am just trying to clarify USB
>> PPS.)
>
> It has worked very well for me, assuming that the GPS module is stable.
> I had one that would have a tendency to crash in its firmware after
> being up for a while and totally lose its mind.
>

Thanks for the detailed information and discussion.

I built a kernel for my Rock64 on its bigger sibling RockPro64 (has a PCIe
SSD card) -- sorry, okay, that was me just saying how much I enjoy these 2
devices! Anyway...I ran into a problem initializing gpiopps. Here is the
Rock64 output when initializing with gpio.conf:
[1.04] gpiopps0 at gpio1 pins 28
[1.04] gpiopps0: autoconfiguration error: positive edge interrupt
not supported for ASSERT
I also booted single user and it fails using gpioctl. Taking a peek at
src/sys/dev/gpio/gpiopps.c this would be in the second if-block (1 pin) in
gpiopps_attach:
if (!gpio_intr_str(sc->sc_gpio, >sc_map, 0,
   sc->sc_intrs[0].sc_irqmode,
   sc->sc_intrs[0].sc_intrstr,
   sizeof(sc->sc_intrs[0].sc_intrstr))) {
aprint_error_dev(self,
"failed to decode interrupt\n");
gpio_pin_unmap(sc->sc_gpio, >sc_map);
return;
Here's what I added to evbarm/conf/GENERIC64:
gpiopps* at gpio1 offset 28 mask 0x1 flag 0x2
This is for physical pin 7 which per pine64 wiki is GPIO1_D4. So gpio1 and
D=3, so 3*8 + 4 = port 28.

I tried also modifying the RockPro64 kernel -- similar issue.

Any idea what am I doing wrong?

Thanks - Joel




NetBSD as an NTP stratum 1 server

2023-11-15 Thread joelp
Hello -- Does NetBSD support PPS output from a USB GPS? I'm
using NetBSD 10 RC1.

I have a USB GT-U7 GPS module attached, and I have gpsd running on
/dev/ttyU0 and receiving GPS data. This looks good.

After configuring ntpd, when I run ntpshmmon, I'm seeing NTP0, but no
NTP2. If I understand correctly, NTP2 is PPS. This seems to be confirmed
with ntpq -p, where I don't see a PPS peer.

I unfortunately couldn't find anything when searching on this topic.

My goal is to replace an aging RPi3 with a Rock64 running NetBSD as an NTP
stratum 1 server.

Thanks - Joel