Recently: posting, leaving NixOS, meeting DragonflyBSD, ddrescue hacking...


2022-02-06 what I've been doing recently


Resolutioner isn't the only thing i've been doing recently, but since Flounder's gemfeed has a

//Reverse chronological sort
sort.Slice(feed.Entries, func(i, j int) bool {
    return feed.Entries[i].Date.After(feed.Entries[j].Date)
})

so therefore I avoid posting more than one post per day so that they don't end up in reverse order in gemfeed.


The last post of January was written on a tablet supported on two small water bottles and a headphones' case, with a tiny Anker Bluetooth Keyboard from many years ago. The tablet has a very old system and is quite bloated but TEdit worked well enough to make it a quite comfortable lightweight writing environment for sitting on a couch. And I could have picked a HP 2510p running Haiku.


I have then appeared in smolZINE #19! I am very amazed not only to be featured there but that I even have people reading me here!

And I'm grateful to @crusom for bringing that to my attention

(idk ppl write me loosely written emails or anything maybe)


For a change of topic, why am I not using my Palm? (damn I accidentally come back to the tablet topic since I have a Palm Keyboard that requires Keyboard.prc)

The reason for that is that my serial port adapter USB-B dongle turned out to be worn out and I keep losing connection. I need to get a new one.


I am leaving NixOS on desktops. After not only nvidia on one of the laptops, but suspend on both stopped working, I decided that since I am no longer maining them, maintaining the configuration, although freshly migrated to flakes, will not do. And I can no longer main nix in projects because of maining a Windows machine now. And i need machines besides it that I can actually easily compile things on.


The larger not-too-portable laptop, that is somewhat more non-standard maybe, got Pop!OS yesterday which feels pretty nice. Despite all the flatpak which I need to avoid if I want to have any disk space. Soo many things are working now.

For my ThinkPad X220 though... but first things first.


For both laptops, there was a lot of grabbing files from them. That was particularly hard with the X220, since the Type 4337 dock turned out not only to be a bit loose, but also the disk almost didn't work at all on its USB 3.0 port. Constant buffer I/O errors and others. I couldn't even get to mounting it. So I ended up having to use the regular High-Speed ports built-in, and that didn't end up being stable enough either for large-file transfers, not with rsync at least. For some reason it kept starting the file over despite --partial --progress --append-verify, even after once finishing it.


At one point I ended up with it of its full size allocated but unsure if it was whole transferred, and with USB High-Speed checksumming the whole file was too much. So I decided on using cmp instead to compare them.

cmp filepath1 <(pv filepath2)

turned out not to work well for some reason.

The second time, I made a fifo special file with mkfifo and in one terminal I had a pv writing to the fifo and in the other I ran `cmp filepath fifopath`.

That worked fine, until after my ddrescue hacking I ended up with a file pretty sure to be ok after the previous cmp result (the byte number where difference occured). Then I discovered that with `pv -d PID` I can just see the progress at file descriptors of a process, so it turned out that I can use `cmp filepath1 filepath2 -i NNNNNN000000` simple as that and just find out its PID and run `pv -d` on it.


What's that ddrescue hacking I am mentioning? DDrescue is a dd-like program that has features like a mapfile that allows to resume transfers and reading backwards and many times (uses seeking). I found that it had a flag for output file starting position, not sure if it had one for input file starting position and now that I think about it it must have had, but what I did instead was to hand-prepare a mapfile to only copy from some 26-thousandth-something megabyte of the over 39-gigabyte file. It was hard because dd is imprecise and stat/ls *lie*. DDrescue mapfiles are lines like "pos size status" where first pos is 0x00000000 and status for "rescued" is "+" and the other is "?". The pos and size are byte numbers in hex. So I rounded up the earlier cmp result, entered some earlier ddrescue's approximation of total file size, and I had a file like I were to have most of the file "rescued". For some reason that gave me a line in the status output like

(sizes limited to domain from 0 B to 39_734_738_944 B of 64_692_027_392 B)

but it turned out to copy well, I checked it with cmp from the part a bit earlier than I had "rescued already". I didn't just cmp the whole files because reading was just as slow as writing and my mind has convinced itself not to really care that much about the file despite caring.


Ekhm... For my ThinkPad X220 though, I went for my partner's recommendation and just today installed DragonflyBSD.

At first the default graphic mode on the installed system was mangled trash through the upper half of my screen, but then I escaped into the bootloader prompt, and `gop list` then `gop set 2` then `boot` did the trick to have the console right for the first run. I still get that mangled upper half, but now it goes normal once X display manager starts as set up in /etc/ttys.

After I got to running twm, at first my mouse wasn't working but I guess some xorg package's message has warned me about something with that, something about evdev - idk i couldnt scroll the console.

Then I enabled moused and I got absolutely impressed by how X220's touchpad wasn't jumpy on it at all, like I had it be through all these years. But then it turned out that moused's defaults don't handle scrolling for me, or even middle mouse button. So I will have to do more stuff about that after all, maybe with moused maybe not with moused.

Then it turned out that despite sysctl saying S3 is supported, I couldn't suspend with acpiconf -s 3. Lid not sleep nor power button did nothing either. So that's another thing to sit down over.

Also it turned out that on the default keyboard settings I no longer have any of the media keys that are under the Fn button, nor the ThinkVantage button doesn't do XF86Launch1. And I really like that button for locking screen (I know I have Fn+F2 with a padlock symbol which is probably some XF86Lock or something).

I hope at least nothing goes in my way in having Seamonkey on that BSD, I'm tired of how I have no Seamonkey Composer on my HaikuOS laptop. (Of Seamonkey, I use pretty much only composer, i make a .desktop by finding the "editorWindow" icon in its chrome/ directory and having `seamonkey --editor` as the command. Alternatives, anyone?)


And tomorrow morning will be setting up xkblayout and other options in xorg.conf.d? Maybe even for the first time, since it may have been always setxkbmap in scripts or other wrapper stuff like with NixOS lately? But I probably once knew it was there and now I'm relearning that.


I love some stuff about that OS but damn it's something that I will have a lot of fiddling with it and I hope I will manage the effort to document what I'm doing even just a little so that what's not in config repos is documented so that I don't cherish a backup image of this whole installation forever.


Oh and we've got a HP Deskjet F4580 from friends, it's out of cartridge and I struggle to make it work as Wireless. HP Smart app on Android fails, HP Smart app on Windows is nuts. Via USB the printer is supposedly "Not Installed" greying out many tabs of options and there is no place to connect it to a WiFi network even when they are somehow not greyed out for brief moments. Wild shit.



/gemlog/