|
if I had a time machine I'd go back to 1982 and reimplement unix for the 5150 just to head off all that USL v. everyone bullshit at the pass so we never got to a point where linux had a reason to be used by startups and dial-up ISPs in the 90s also because I have a brain disease that makes that kind of thing fun
|
# ? May 14, 2024 03:58 |
|
|
# ? Jun 6, 2024 02:31 |
|
Kazinsal posted:if I had a time machine I'd go back to 1982 and reimplement unix for the 5150 just to head off all that USL v. everyone bullshit at the pass so we never got to a point where linux had a reason to be used by startups and dial-up ISPs in the 90s great now we know who to blame if we're all suddenly using microsoft xenix on AT&T workstations e: reconstitute the bell system while you're at it Beeftweeter fucked around with this message at 14:26 on May 14, 2024 |
# ? May 14, 2024 14:23 |
|
alternatively this has already happened multiple times where time travelers keep going back to the '80s to start unix ports in order to dethrone Linux but all they succeed in doing is providing the necessary conditions for the commercial unix wars of the '90s which creates the space for Linux to dominate like how time travelers keep going back in time to kill Hitler and keep failing
|
# ? May 14, 2024 18:15 |
|
shackleford posted:alternatively this has already happened multiple times where time travelers keep going back to the '80s to start unix ports in order to dethrone Linux but all they succeed in doing is providing the necessary conditions for the commercial unix wars of the '90s which creates the space for Linux to dominate there are no scenarios in which the unix wars do not happen
|
# ? May 14, 2024 20:01 |
|
dudun dun dudun dudun dun dudun dudun dun dudun dudun dun dudun
|
# ? May 14, 2024 20:29 |
Sapozhnik posted:dudun dun dudun do do do, do do doooo do do do, do do doooo dooooo
|
|
# ? May 14, 2024 21:42 |
|
I installed Zoneminder on my little RockPro64 ARM server, and it seems to be doing fine, though the system isn't fully setup. It'll be capturing 1080p15 from 1 or 2 security cameras, which shouldn't be too demanding. Here's the next part: I want to make a little Chromecast / Firestick device, an HDMI dongle, that displays the video feed from the zoneminder server. I want to do this with a Raspberry Pi Zero 2 W (quad core Cortex-A52 1 GHz, 512 MB RAM). The Zero 2 W doesn't have the RAM to run Chrome in kiosk mode streaming video. Instead, it'll fetch jpgs and throw them up on HDMI using the kernel framebuffer (so no X Windows). So it'll be more like a slideshow, maybe 1 pic/second. Kinda like a digital picture frame of my garage. But I can't do anything until tomorrow when my mini-HDMI cable arrives. So until then, I guess throw out suggestions and/or reasons this will suck. For example, one thing that would be neat would be to tie Zoneminder's event system (motion detection) to an audio output on HDMI. Basically chime when motion is detected. Or maybe the live audio stream from the camera?
|
# ? May 15, 2024 05:29 |
|
if I had a time machine, I would go back in time and standardize all OSes on \n-terminated lines other than that I would change nothing
|
# ? May 16, 2024 03:47 |
|
null terminated strings are worse also skip ascii and go straight to unicode
|
# ? May 16, 2024 04:21 |
|
Poopernickel posted:if I had a time machine, I would go back in time and standardize all OSes on \n-terminated lines I would change all line endings to \n\r just to gently caress with everyone.
|
# ? May 16, 2024 04:58 |
|
ryanrs posted:Here's the next part: I want to make a little Chromecast / Firestick device, an HDMI dongle, that displays the video feed from the zoneminder server. I want to do this with a Raspberry Pi Zero 2 W (quad core Cortex-A52 1 GHz, 512 MB RAM). First enable the kernel framebuffer in config.txt. code:
$ curl -so /tmp/frame.jpg 'http://192.168.5.30/cgi-bin/nph-zms?mode=single&monitor=1' Use ImageMagick to convert to RGBX and copy to the framebuffer. $ convert -resize 1920x1200 -background black -gravity center -extent 1920x1200 /tmp/frame.jpg bgra:/dev/fb0 This works and was really easy! The only downside is the speed: it takes about 0.75 seconds. code:
0.486 to decode/resize the jpeg (this seems very slow) 0.022 to copy to the framebuffer I copied that 'convert' command from some random webpage. Guess I need to look up exactly what it's doing, because 0.9 cpu-seconds sounds like a really long time to be decoding a single jpeg. It looks like it's even using two cores, ha ha. So maybe ImageMagick is doing more work than I thought? Or maybe I need to turn the GPU back on and use that for jpoeg decoding? 0.9s seems so slow as to be broken, tho.
|
# ? May 16, 2024 05:00 |
|
speaking of zoneminder, I’ve been reading up on Shinobi and it seems neat. I’m not sure if I’d want to run it native or risk giving a dockerised version a go (they recommend the native installer over a docker instance). I have a 1070 next to my desk that could be handy for object detection, but given the video install walkthrough used a 3070 I’m worried a 1070 won’t cut it. I also haven’t looked any further into this yet lol
|
# ? May 16, 2024 05:29 |
|
Without doing a lot of work and deep analysis, I would probably look at the following maybe:
saving things to disk is my best guess as to why there is so much latency
|
# ? May 16, 2024 05:36 |
|
zoneminder just works, but it totally has engineer UI and I really wish it had an API that was more composable in order to allow me to jury-rig a better interface maybe it’s improved since I last used it
|
# ? May 16, 2024 05:38 |
|
i saw a relatively recent post on reddit that said they gave zoneminder another try and was pleasantly surprised. I also saw a guide video for it of unknown age that showed a UI that was convoluted on purpose
|
# ? May 16, 2024 05:41 |
|
FlapYoJacks posted:I would change all line endings to \n\r just to gently caress with everyone. it's kind of wild that Windows ended up with CRLF line endings since itself and DOS and its ancestors before that even never had support for output to a teletype afaik.
|
# ? May 16, 2024 05:49 |
|
I used an older deployment of zoneminder from a few years ago and everything is very logical. I should have also put in a motion detection sensor because zoneminder’s system sees changing light levels (due to the natural movement of the sun) as movement so it took awhile to address that issue.
|
# ? May 16, 2024 05:51 |
|
i use frigate. it has pretty dece object detection with a tpu. i got all kinds of kitty cat videos also integrates nicely with home assistant
|
# ? May 16, 2024 05:59 |
|
spankmeister posted:it's kind of wild that Windows ended up with CRLF line endings since itself and DOS and its ancestors before that even never had support for output to a teletype afaik. they did though MS-DOS was originally QDOS, a very direct CP/M knockoff for 8086 and CP/M supported pretty much any serial terminal including teletypes because they were cheap, and also because the DEC operating systems it was modeled on supported teletypes and generally used CRLF too UNIX also started out with teletype support, but it implemented things like automatic CR generation in the line discipline, which is part of why UNIX serial has “raw” and “cooked” modes
|
# ? May 16, 2024 06:40 |
|
yeah I think the original intellec that CP/M was written for was a dev box that intel said "just hook any ol ASCII terminal up to it, she'll be right" so CP/M just naturally assumed that any terminal I/O would need CR+LF
|
# ? May 16, 2024 07:02 |
|
sb hermit posted:I should have also put in a motion detection sensor because zoneminder’s system sees changing light levels (due to the natural movement of the sun) as movement so it took awhile to address that issue. OK, remember back when I got USB working on the Aruba AP? That was to hook up my homemade motion sensor (search forums for "bear radar"). It combines passive thermal and active radar sensors to minimize false alarms. The Bear Radar will talk over USB to a monitoring program on the Aruba AP, which will hook up to zmtrigger somehow. But yes, I have thought of this and I have a homebrew motion detector with sensor fusion ready to go! In jpeg decode news, I came across the promisingly-named libjpeg-turbo. code:
The framebuffer is shared with the console login. Which is actually great, since you can still plug in a keyboard and log in; you aren't locked out of the console. That will be handy a year from now when I've forgotten how this thing works. For example, both of these commands will clear the screen. Physicists refer to this as tty-fb duality. code:
e: Looks like I'll be able to mmap /dev/fb0 and have libjpeg-turbo write to it as the output buffer. Though this is probably also the time to look at using Linux DRM instead of fbdev. ryanrs fucked around with this message at 07:54 on May 16, 2024 |
# ? May 16, 2024 07:15 |
|
code:
I wonder why ImageMagick was running 2 cores flat-out for 500ms when decoding my Zoneminder jpegs? How can their decoder be so poo poo, but also multithreaded? It's not blocking on i/o while trawling the filesystem for plugins, or sleeping. It is burning real user cpu-seconds some computation. e: I guess it is the resizing? Stripping out the resize and centering improves the speed a lot. code:
ryanrs fucked around with this message at 19:26 on May 16, 2024 |
# ? May 16, 2024 19:17 |
|
seems like a waste to do all those exec's why not write a little program in rust or something to do everything? heck even python (possibly with pypy) should be faster
|
# ? May 16, 2024 19:56 |
|
spankmeister posted:why not write a little program in C
|
# ? May 16, 2024 20:27 |
|
https://archie.serialport.org/ somebody found a copy of the archie ftp search engine's source code and posted it online. they also host an instance, one would hope on a vm that is very heavily locked down.
|
# ? May 16, 2024 22:04 |
Sapozhnik posted:https://archie.serialport.org/
|
|
# ? May 16, 2024 22:33 |
|
fbdev vs drm Linux Direct Rendering seems like it will take 3-5x as much C code, and run half the speed of the deprecated fbdev API. There is a LOT of boilerplate setting up memory buffers. The API is designed to support modern GPUs with separate RAM that needs to be DMAed back and forth across PCIexpress, which makes it very complicated. My ARM SoC does not have separate GPU RAM, but I gotta deal with this clumsy API anyway. I think if I had several frames to display, then I wouldn't incur all the setup work every frame, and the runtime would be similar to fbdev. For a single frame, drm will probably never be as fast as fbdev. That all sounds fairly terrible, but here is what DRM does better: - 24-bit color using stock config.txt - double buffering and vsync, no frame tearing - multi-monitor support - better cooperation with cnsole login, X windows I will develop the DRM code a bit more. Maybe I'll start to like it.
|
# ? May 17, 2024 00:16 |
|
why not use SDL with the kmsdrm driver?
|
# ? May 17, 2024 00:49 |
|
ehh i'm not an expert but i'm pretty sure you can mmap a drm buffer object just fine, the only difference between pcie and main memory buffers would be access latency. the boilerplate is certainly true but that's a consequence of a bunch of hardware complexity: you potentially have a bunch of displays, connectors, and signal generators connected to a graphics device connected in surprisingly diverse and constrained ways. take a look at what plymouth does. https://gitlab.freedesktop.org/plymouth/plymouth/-/blob/main/src/plugins/renderers/drm/plugin.c Sapozhnik fucked around with this message at 01:28 on May 17, 2024 |
# ? May 17, 2024 01:22 |
|
Plymouth's drm memory buffer boilerplate looks a lot like my own drm memory buffer boilerplate: ioctls, dumb buffers, mmap, drmModeAddFB, etc.
|
# ? May 17, 2024 01:37 |
|
Me: I understand this conversation! Also me: I understand this conversation.
|
# ? May 17, 2024 02:17 |
|
Goddamn, this DRM API is lacking some extremely basic documentation, like what the functions do and what their return values mean. For example:quote:Only a DRM master is allowed to perform mode-setting or modify core state and only one user can be DRM master at a time. See drmSetMaster(3) for information on how to become DRM master and what the limitations are. But the drmSetMaster() man page hasn't been written yet. There are no comments in libdrm, either in the header or the source. I'm guessing it returns 0 on success and hopefully sets errno if something bad happens. Plymouth doesn't check the return value and Nvidia treats it like a nop. I even checked to see if maybe the API was released recently, but no, it's been around for over a decade. Is there some other place I should be looking for docs? Currently my program doesn't call drmSetMaster() at all, and the kernel seems happy to let me draw on the console as a non-root user on ssh. Maybe nobody implements this functionality?
|
# ? May 17, 2024 04:27 |
|
I think it got replaced by the "render nodes" concept, it's mostly a legacy thing that xorg cares about at this point. I think. These days you can have hardware that can scanout but not render and vice versa. So DRM is stuck being an api for two almost totally unrelated hardware blocks that have nothing in common other than passing buffers between each other, possibly via dma-buf wrapped in some other api like Wayland or whatever. The mode setting /dev node requires privileged access (on desktop I believe systemd-logind passes fds to user processes and can forcefully revoke those fds using the new revoke system call) and the rendering /dev node or nodes plural do not require special access. Both kinds of dev node can be opened using libdrm although render nodes will be opened by hardware specific Mesa graphics drivers and not by applications directly. These access control mechanisms obsolete the old DRM master concept. Disclaimer the above might be complete bullshit but this is my understanding of it
|
# ? May 17, 2024 04:36 |
|
lol, once again lead astray by out-of-date docs and examples Thanks, that does explain things re drmSetMaster(). The DRM example I copied causes heap corruption (double free), so I was looking to understand the API fundamentals a bit more, rather than guessing. The drm-memory man page looks nice, so hopefully there's enough there to workout the bugs.
|
# ? May 17, 2024 04:58 |
|
why are you writing a graphics driver?
|
# ? May 17, 2024 06:02 |
|
I enjoy reading their posts and then spending a lot of time on Google. I’m learning a lot more than I was while not RTFM’ing
|
# ? May 17, 2024 06:07 |
|
pseudorandom name posted:why are you writing a graphics driver? why aren't you?
|
# ? May 17, 2024 06:08 |
|
last weekend I uninstalled Bazzite and went back to windows after having dumb issues with Helldivers 2. did some reading over the week while experiencing new and exciting issues with the game, this time on windows, and realised I need to see if I have the same issues in a different distro or image and then potentially dehumanise myself and face to Win11. installed Nobara tonight, mostly since it’s a low-touch gaming distro that had a handy welcome app that installed a bunch of crap that I hadn’t bothered to try yet (like proton ge since it made the steam window dance around and have weird onClick positioning). then it installed Nvidia drivers for me, with the latest version. I installed HD2 and squad and both ran better than on Bazzite, which already ran games better than on windows. and there was even my beloved gnome variant once work starts slowing down I’d like to tweak around a bit more with stuff and straight up keep windows off the new machine I’m building edit: I don’t actually remember if it had been established that the other thread was the Linux gaming thread or not
|
# ? May 17, 2024 06:18 |
|
Baziite Nobara what
|
# ? May 17, 2024 07:29 |
|
|
# ? Jun 6, 2024 02:31 |
|
Bazzite is a fedora silverblue image, and Nobara is a fedora fork? flavour?, and both come out of the box ready for gaming, and do a pretty impressive job doing it
|
# ? May 17, 2024 07:37 |