Sunday, September 15, 2024

geany cursor

Geany's cursor is a standard blinking line, however Geany automatically greys the paragraph being edited. Thus, the cursor becomes invisible in the paragraph being edited, ie Geany makes the cursor invisible precisely where it needs to be visible. This leads to repeated errors and inevitably to headaches, hair pulling and shouting. That is to say, to insanity.

I could find no setting in preferences addressing either: un-greying the paragraph being edited or highlighting the cursor. Thus my decades-reliable Geany editor became enigmatic and useless, and I didn't want alternative apps.

app build or app config?

There is a lot of information on cursor configuration, but is it build file configuration or configuration files for a user using the app? The difference is hard to determine, and slows down efforts to do either. In this case, I'm interested only in configuring an already-compiled running application.

solution

After several drinks to calm my nerves, I found this site and then went to /usr/share/geany/filedefs/filetypes.common (or less permanently to ~/.config/geany/geany.conf), to change the cursor, as directed in this post.

To make the cursor into a block, change the third argument (second to last) to "true", instead of "false". A small blinking block of that color -- all "f"'s for black, all "0"'s for white, or any hex color in between will result. Restart geany to experience the change.

# nano filetypes.common
# comment the original
# caret=caret
caret=0xffffff;0x0;false;false"
$ nano geany.conf
no idea

themes

Another avenue, though requires a download, is to change the color setup using themes.

~/.config/geany/colorschemes/

Let's not overlook this, Britain in the 50's, if feeling low about Geany or anything else. And of course, Charlie.

Monday, August 12, 2024

more key nightmares

Links: Arch - package signing

TLDR: in 2024, one's system, gpg keyservers, and Arch repositories all need to be *up*, properly configured, and current, to accomplish a standard Arch pacman Syu. Solutions given in decreasing order of intervention severity.

overview

"Key" conflicts or expiry during pacman updates have become the most consistent annoyance in Arch, (alongside PulseAudio, more Linux-wide). Eg, in 2024, waiting even two weeks between system updates likely will spawn an unrecoverable, unintuitive pacman key failure during pacman -Syu. What is happening?

Pacman used to just check a hash of the application package. NOW, Arch additionally checks hashed signature keys for each application's creator/repository uploader. The shift to increased verification led to use of an additional application: gpg. A further complication -- gpg stores and retrieves keys from a dedicated repository, a "keyserver", which is separate from the application repository. A yet further complication is that gpg deposits the latest keys into user's system, in /etc/pacman.d/gnupg and does not regularly update these.

pacman is still the update manager, but gpg is now a critical adjuvant app, and which must handshake its keys with pacman during each update, yet does not update its keys between pacman updates. Immense time can be lost navigating this setup; this post only has the bandwith to list solutions. Basically, if any pacman key failures, I first attempt to update the keys (pacman-key --refresh-keys) and then I go nuclear. I don't have days to waste.

Solutions in decreasing order intervention severity.


thermo-nuclear

# nano /etc/pacman.conf
# temporary key solution: add SigLevel never and
# comment-out default "Required"
SigLevel = Never
# SigLevel = Required DatabaseOptional

A regular pacman-Syu now works. After update success, and a reboot, we reset /etc/pacman.conf back to default "Required".

We've accomplished the update, but now we find that the problem with keys still exists. That is, we still can't, eg., run pacman-key --populate, without the same error messages and Catch-22 with 'pacman-key --init' that we experienced earlier:

# pacman-key --populate
==> ERROR: There is no secret key available to sign with.
==> Use 'pacman-key --init' to generate a default secret key.
# pacman-key --refresh
gpg: error reading key: No public key

The Catch 22 is that we're driven to run 'pacman-key --init', but 'pacman-key --init' fails 100% of the time, stating we have no public key, LOL. "I can't make what you need since you don't already have it".  In 2024, I don't know a way to circumvent this keys issue without significant time-wasting alternatives. I just give it a key.

# gpg --gen-key --homedir /home/USER/.gnupg --passphrase "PASSWORD" --pinentry-mode loopback
gpg: WARNING: unsafe ownership on homedir '/home/foo/.gnupg'
GnuPG needs to construct a user ID to identify your key.
Real name:

After all of this, we'll get some success message...

gpg: /home/foo/.gnupg/trustdb.gpg: trustdb created
gpg: directory '/home/foo/.gnupg/openpgp-revocs.d' created
gpg: revocation certificate stored as '/home/foo/.gnupg/openpgp-revocs.d/BFA0F3753DA6EA552E08958F06E36EA3F9E270C0.rev'
public and secret key created and signed.
...after which...
# pacman-key --init
# pacman-key --populate

...work normally. Now we can do regular pacman updates with regular keyring checks. We have to repeat the laborious process however, typically when it's been a few weeks or longer between updates.

nuclear

stackexchange wisdom
# gpgconf --kill gpg-agent
# rm -r /etc/pacman.d/gnupg
# rm -r /root/.gnupg
# rm -r /home/foo/.gnupg
# rm -r /etc/pacman.d/gnupg
# rm -r /root/.gnupg
...after which
# pacman-key --init

light cure

A typical usual cure...

# pacman -Sy archlinux-keyring -
...after which try the stronger
# pacman-key --refresh-keys

catch-22 circular fail

Notice 100% gpg reliance.

# pacman-key --populate
gpg: problem with fast path key listing: No such file or directory - ignored
==> ERROR: There is no secret key available to sign with.
==> Use 'pacman-key --init' to generate a default secret key.
# pacman-key --init
gpg: problem with fast path key listing: No such file or directory - ignored
==> Generating pacman master key. This may take some time.
gpg: Generating pacman keyring master key...
gpg: agent_genkey failed: No such file or directory
gpg: key generation failed: No such file or directory
gpg: Done
==> Updating trust database...
gpg: no need for a trustdb check

directly into gpg: gpgconf

# gpgconf --list-components
gpg:OpenPGP:/usr/bin/gpg
gpgsm:S/MIME:/usr/bin/gpgsm
keyboxd:Public Keys:/usr/lib/gnupg/keyboxd
gpg-agent:Private Keys:/usr/bin/gpg-agent
scdaemon:Smartcards:/usr/lib/gnupg/scdaemon
tpm2daemon:TPM:/usr/lib/gnupg/tpm2daemon
dirmngr:Network:/usr/bin/dirmngr
pinentry:Passphrase Entry:/usr/bin/pinentry
# gpgconf --kill gpg-agent

Friday, June 28, 2024

audio -- DisplayPort

This a post for people who have a DisplayPort connection with functional video, but non-functioning audio from a connected monitor. The situation can be hardware or configuration, or a blend.

short overview

DisplayPort is HDMI quality video, a significant step-up from VGA, but without an audio channel. The output jack is a special shape, so we need an inexpensive adapter cable DisplayPort <--> HDMI. We then connect the HDMI end to any monitor's HDMI port.

DisplayPort does not have an audio channel. So we have to run sound separately using a 3.5mm output cable to connect sound to our monitor. However, even with a separate 3.5mm audio cable plugged in, users can experience the same "no audio" problems they do with an HDMI cable.

I've done other posts on HDMI cable ELD handshake for HDMI audio, and the steps are the same with DisplayPort. I'm repeating the steps here in a dedicated DisplayPort post, since it might be easier to Google search for those suffering through DisplayPort configuration.


helpful commands

Before anything else, a few helpful commands to hopefully avoid rebooting once configured. PulseAudio is killed and restarted with...

$ pulseaudio -k or --kill
$ pulseaudio -D

ALSA usually will reread alsa.conf and restart without a reboot:

# systemctl restart alsa-restore.service

most likely explanation - monitor limitation

Some monitors can't detect true HDMI apart from DisplayPort, since the cable connection is HDMI on the monitor end. The monitor assumes audio is incoming via the HDMI cable per usual. These types of monitors disable the 3.5mm audio input to prevent duplication. There's no way to achieve monitor sound in this circumstance. Users must test their computer's 3.5mm audio output with a set of speakers.

However, the scenario above is horribly underdocumented. Many people go crazy attempting to make the monitor produce sound from the connected 3.5mm input. Even more deceptively, these monitors usually have no 3.5mm audio problems as long as the video input is a VGA cable.

less likely -- ELD problems

Once we obtain ELD-related numbers, my easiest solution for ensuring ELD handshake is via /usr/share/alsa/alsa.conf customization. Updates to ALSA will overwrite our customization, but we can always repeat the steps if we encounter audio problems again.

I like info on how the computer is naming cards and so on, in case I have a long troubleshoot, but the most important step is using grep to verify ELD. Skip to that step below if desired.

Verify DisplayPort is connected to the HDMI port on the video monitor and receiving video. Next, how is the system ordering its analog PCH chip and HDMI digital chip? Simplest check:

$ cat /proc/asound/modules
0 snd_hda_intel
1 snd_hda_intel

... but in this case, we need more. We're only able to tell both chip 0 and 1 were manufactured by intel. So we...

$ cat /proc/asound/cards
0 [HDMI ]: HDA-Intel - HDA Intel HDMI
HDA Intel HDMI at 0xf7c32000 irq 39
1 [PCH ]: HDA-Intel - HDA Intel PCH
HDA Intel PCH at 0xf7c30000 irq 40

...ok the digital card is card 0 and the analog is card 1.

But we still don't which device on the card has handshaked. For that, aplay goes deeper and gives each device number on the cards.

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: HDMI [HDA Intel HDMI], device 3: HDMI 0 [E622VLE]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: HDMI [HDA Intel HDMI], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: HDMI [HDA Intel HDMI], device 8: HDMI 2 [HDMI 2]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 0: ALC3220 Analog [ALC3220 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0

But I prefer to verify ELD is handshaking with device 3.

$ grep eld_valid /proc/asound/card0/eld*
/proc/asound/card0/eld#0.0:eld_valid 0
/proc/asound/card0/eld#0.1:eld_valid 0
/proc/asound/card0/eld#0.2:eld_valid 0
/proc/asound/card0/eld#0.3:eld_valid 1
/proc/asound/card0/eld#0.4:eld_valid 0
/proc/asound/card0/eld#0.5:eld_valid 0

With hw 0,3 confirmed, I carve this in stone in my /usr/share/alsa/alsa.conf file.

# nano /usr/share/alsa/alsa.conf
defaults.pcm.subdevice 3 # -1 is default

step 2 - restart and test

The easiest for me is to reboot, but others may want to restart alsa. Am I getting sound? If so, then I should also be able to normally test the connection this way.

$ aplay -D plughw:0,3 /usr/share/sounds/alsa/Front_Center.wav

There are other sounds, I just use Front_Center out of habit I suppose

Monday, June 10, 2024

Inexpensive appliances

GE Hotpoint RGB526DETBB black oven

2013 manf -- approx $600 :: 2024 replace -- $1,200

Two similar models exist; RGB526 and JGBS30. It appears these were first manufactured in 2013, and were likely c. $600. In 2024 dollars, that's about $800. However, to *replace* the oven in 2024, with a similar feature stove/oven, would run $1,100 easily. Probably more. It's worthy of maintaining the original, if possible.

quirks

Important maintenance and repair documents are printed on paper and placed in an envelope attached to rear of appliance. This includes wiring diagram for igniter

This site has spec and user manual PDF's.


Forty-six inches high and not self-cleaning. The igniter is the rectangular Norton igniter. The thermostat must not touch the oven wall. Note this after cleaning. Also any flame adjustments.

gas connection $150

Expensive because best accomplished by a plumber to avoid house fire. Current code requires that the flex hose be orange, like the old LP lines.

cleaning

If a person has time, the easiest way is baking soda, overnight wait and remove with a spatula. Video:

baking soda and vinegar (8:28) Mr Gizmo, 2021. spray bottle for white vinegar (possibly dilute), non-scratch spatula, non-scratch rags, rubber gloves, baking soda paste. Overnight wait, follow-on with vinegar spray (activate and remove residue), wipe down with non-scratch rags.

Located here:

Also note that the oven door is removeable (more easily than it can be re-attached) to help the cleaning.

This post contains some additional tips and products.

exhausting the fumes

Electrolux/Frigidaire FFTR1814LW4
18 cu ft, top freezer


Links: manf's page :: commercial page w/specs :: parts site

From the sticker ("11/10") these probably were 2011 or 2010 builds. Similar units in 2024 are $700-ish.

quirks

lower door handle breaks, $70. Need to reinforce with fiberglass or some other -- don't throw away original.

Friday, May 24, 2024

real webdev

Honestly, we're needing to look at groupings of information knowledge. It's not just masters in statistics and math and database development, it's connecting these to an interface (web, phone), and then securing them.

We can also look at our own life in terms of a database, the way various government agencies probably do. If we view ourselves and other citizens as entities, attributes, and relationships. In the case of events or incidents, each one one of these might be an entity, eg a car accident, which is a singular event.

formal

Masters in statistics, math, computer science, just to get into other classes.

Is discrete math the intersection of statistics and maths?

database

terminologies, relational, normalization,

database normalization (28:34) Decomplexify, 2022. simple examples and repairs on 1-5nf in RDBMS. columns (attributes), rows (entities). Design normalization can protect against things that cannot be logically true like two dates of birth. Eliminates data that disagrees with itself, and as a side benefit, redundant data.10:20 2nf deletion, update & insertion anomalies. 3nf 17:30 transitive dependency. 19:00 golden rule of boyce-codd.
relational terminology (8:48)Neso Academy, 2022. terminlogy for RDBMS.

sets of information

cobol, php (and whatever replaces it -- can it be done with python?)

Monday, March 25, 2024

color correction video

Most videos need some sort of color correction. Not even sure why. The two main ffmpeg filters are colorbalance and colorchannelmixer.

Don't forget the basic splitting and recombining commands.

colorbalance

The easiest. 9 inputs, no alpha. 3 for each color (RGB). Within each color are (similar to GiMP) shadows, midtones, highlights. So... not too bad. The opposite of Red is Cyan, opposite Green is Magenta, and opposite Blue is Yellow. You can call a thing directly, but I always do all 9.

Zero does nothing. So any of these would do nothing. I like to be in the habit of using quotes, since quotes are used with multiple filters.

$ ffmpeg -i foo.mp4 -vf colorbalance=0:0:0:0:0:0:0:0:0 unchanged.mp4

$ ffmpeg -i foo.mp4 -vf "colorbalance=0:0:0:0:0:0:0:0:0" unchanged.mp4

$ ffmpeg -i foo.mp4 -filter_complex "colorbalance=0:0:0:0:0:0:0:0:0" unchanged.mp4

$ ffmpeg -i foo.mp4 -vf colorbalance=rs=0 unchanged.mp4

The last one illustrates what's in each of the 9 positions. We can call them by RGB name or position... rs:gs:bs:rm:gm:bm:rh:gh:bh: or positions 1-9. A common one on crappy online downloads is blown out red and blue which requires both a color correction call and a saturation call.

process

The settings are very sensitive, typically a person will make changes less than 0.1. Take a screenshot from the video, open GiMP and correct it till you get it right in GiMP, then just mimic the settings in colorbalance.

A typical, fairly strong, correction might be...

$ ffmpeg -i foo.mp4 -vf colorbalance=0:0:0:-.1:0:-.1:0:0:0 rednblue.mp4

....or even less...

$ ffmpeg -i foo.mp4 -vf colorbalance=0:0:0:-0.05:0:0:0:0:0 redmild.mp4

I could have done this last one with...

$ ffmpeg -i foo.mp4 -vf colorbalance=rm=-0.05 redmild.mp4

time-saving

GiMP with a screenshot. Otherwise, start with reds, go to blues, then greens. Getting the reds correct is key, then blues to give a little yellow, and then finally will need to remove some green

gamma

About the time the colors are right, it might be too dark. That's common. I lighten it back up.

$ ffmpeg -i foo.mp4 -vf "colorbalance=-0.03:-0.05:-0.1:-0.05:-0.05:-0.1:0:0:0","eq=gamma=1.2:saturation=0.9" correct.mp4

Once I had a very minimal one...

$ ffmpeg -i foo.mp4 -vf "colorbalance=0:0:-0.03:0:0:-0.05:0:0:0","eq=gamma=1.2:saturation=0.9" correct.mp4

Tuesday, January 30, 2024

2017 Latitude 3379 I5-6200U install

Part 1 basic install: working CLI

1. overview standard install, except touchscreen configuration
2. modify bios OS loads into device from USB. BIOS will not allow that unless UEFI disabled and legacy ROM enabled. Reactivate UEFI after installation, if desired.
3. prep disk UEFI and GPT clearing. Used MBR to avoid GRUB errors.
4. installation various basic configurations

customize: /etc/systemd/system/rc-local.service

Part 2 GUI and tweaks

5. X86 installtweaks to processor specific, other configuration, icewm
6. touchscreenspecial software and configuration

customize: ~/.xprofile, ~/.xinitrc, ~/.icewm/startup


A person likes to have a touchscreen with their music library near the bed: the SO can select whatever music she's looking for.

These old 2-in-1, 2.3GHz i5's will do the trick. Can be found for about $125 (2024) online or about $160 delivered. A person *might* want to upgrade the basic 8Gb DDR4 2133MHz SDRAM (60 pin) to 32Gb, and 128Gb Liteon CV3-8D128-11 (SATA 1) to a Liteon CV3-8D512-11 (SATA 1). The 512Gb M2 ($70) and 32GB RAM ($60) would make the system fully configured for a $300 total. But this isn't necessary to play the movies and music our SO wants to select with her fingertips. $160 does the trick. Put the library on the hard drive and run a 3.5mm connector to a decent speaker system. She might complain, but it's better than nothing.

If a person just wants to do earbuds in bed, the inexpensive Mijiaer/Langsdom JM26 3.5mm earbuds are comfortable, and also good for a hands-free in a vehicle if cut-off one bud.

Touchscreen is an ELAN 283.2mm x 176mm.

1. nothing special... except

The install mostly is the same as a 2020 install into a non-touchscreen Latitude e7270. There are some package updates since that time, and touchscreen-specific packages. I shifted to the XFS file system from EXT2, learned how to add XFS partition labels, but the swap partition remained the annoying UUID. I used a USB tethered phone for the install -- no internet/dhcpcd issues.

The touchscreen. First touchscreen install is time-consuming for enabling right and double click. Ie, kernel recognizes finger touches "out of the box" --using xf86-input-evdev -- but didn't translate these into application functions. The only reasonable answer appeared to be Touchégg to configure touchscreen effects.

2. bios security adjustments :: 15 mins

To install from the USB, we have to disable UEFI and make the device friendly to an inserted USB.

  1. Enter BIOS
  2. Secure Boot -> Secure Boot Enable: Disable, Apply
  3. Security -> PTT (Platform Trust Technology) Security: Uncheck "PTT On", Apply
    NB: No need to check "Clear", but if a person does check it, the warning: "Data encrypted with keys stored in the TPM will be lost. Are you sure you want to clear all keys from the TPM?" I don't know if it's good/irrelevant to delete these keys.
  4. General -> Advanced Boot Options: check "Enable Legacy Option ROMS". I also uncheck "Enable UEFI Network Stack" in case it causes Network over-security issues, even beyond PAM and other ridiculous 'safety' issues.
  5. General -> Boot Sequence: check "Legacy"

After all this, the boot order menu becomes available. Users can then promote "USB" to the top of the menu, and install the OS from the USB. I put the M2 SATA SSD second so that after install, I can remove the USB and it will boot from the SSD.

3. GRUB/disk prep :: 15 mins

Currently (2024) GRUB still seems finnicky when using a GPT ("globally unique identifier partition table") disk. So, in addition to eliminating EFI, I convert all GPT to MBR. This requires three applications: cfdisk (delete all partions), gdisk (to detect GPT and revert to MBR) and fdisk ("fdisk -t" to create an MBR. 0x04.)
  1. # fdisk -l determine the drive name, eg /dev/nvme1
  2. # cfdisk /dev/sda, delete all partitions, which eliminates EFI. Write this partitionless drive and exit
  3. # gdisk /dev/sda note whether GPT is present and MBR protected. Mine notes both and that "using GPT". I selected "x" for "expert command", then "z" to zap the entire GPT structure, which was confirmed. Then it asked if I want to "Blank out MBR"?, to which I replied "yes". When i then retried # gdisk /dev/sda, all (MBR, BSD, APM, and GPT) were not present. This is correct, but "x,z,y" again to be sure.
  4. # cfdisk /dev/sda, select DOS label, and proceed. The main is a linux (83) sda1 and a linux swap (82) sda2,

The only real question is whether to make multiple partitions for different parts of the OS. For this example, I've put them all in a single partition.

4. base CLI (runlevel 2) configuration :: 20 mins

# mkswap /dev/sda1
# swapon /dev/sda1
# free -m [check swap is on]
# mkfs.xfs /dev/sda1
# xfs_admin -L "labelname" /dev/sda1 [optional]
# mount -rw -t xfs /dev/sda1 /mnt
# mkdir /mnt/etc
# genfstab -p /mnt >> /mnt/etc/fstab
# pacstrap /mnt base base-devel linux linux-firmware
# arch-chroot /mnt
# ln -s /usr/share/zoneinfo/US/[zone] /etc/localtime
# mkinitcpio -p linux
# passwd
# pacman -Syu grub dhcpcd xf86-input-evdev
# mkdir /boot/grub
# grub-mkconfig -o /boot/grub/grub.cfg
# grub-install /dev/sda [no partition]
# exit
# reboot

if oversights or mistakes

Let's say I forget to # pacman dhcpcd after pacstrap, and now I'm booting straight off the drive. It's extremely difficult to setup even a wired connection, let alone WiFi with just the tools in # So go back to arch-chroot and install from there.
# mount -rw -t xfs /dev/sda1 /mnt
# arch-chroot /mnt
# pacman -Syu dhcpcd wireless-tools ntp nano xf86-input-evdev [this last for the touchscreen]
# exit
# reboot
Similarly, you want to pull window manager menus and so on prior to starting X the first time...
$ mkdir media
# mount -rw -t ext2 /dev/sda1 /media
$ cd media
[do whatever operations]
# umount /dev/sda1

locale :: 0 mins

I don't set a locale, but here's some information if interested.

useradd :: 5 mins

User 500, name "foo", home directory of "foo", using bash shell.
# useradd -G wheel,lp,audio -u 500 -s /bin/bash -m foo

aur access - yay :: 20 mins/200Mb of other files

AUR access was simple during the yaourt years, but the archlinuxfr repo isn't around since 2023. The best now is yay, albeit built on the 300Mb slug "go" dependency.

To build and install they do it through fakeroot, which ejects if sudoers is not configured.

# nano /etc/sudoers
foo ALL=(ALL) ALL

Then retrieve, compile, and install

# pacman -S git go wget
$ git clone https://aur.archlinux.org/yay.git
$ cd yay
$ makepkg -si
$ yay --version [verifies installed OK]

limit journalctl size :: 5 mins

Systemd will log GB's and GB's of data if left unresetricted.
# nano /etc/systemd/journald.conf
SystemMaxUse=200K

5. X install :: 20 mins

Dells have Intel integrated graphics 945GM; the correct xf86 driver is the Intel VA driver.

# pacman -S xf86-video-intel
This driver now uses DRI3 as the default Direct Rendering
Infrastructure. You can try falling back to DRI2 if you run
into trouble. To do so, save a file with the following
content as /etc/X11/xorg.conf.d/20-intel.conf :
Section "Device"
Identifier "Intel Graphics"
Driver "intel"
Option "DRI" "2" # DRI3 is now default
#Option "AccelMethod" "sna" # default
#Option "AccelMethod" "uxa" # fallback
EndSection
# pacman -S xorg-server xorg-apps xorg-xinit xorg-xrandr
If you scroll down this Arch page discussing Xorg, we can see that we'll want the mesa for Open GL and lib32-mesa for older apps. Also, Intel chips, as we know (scroll down to about item 13), do not support VDPAU, viz:
"Intel Embedded Graphics Drivers do not support VDPAU. VDPAU stands for video decode and presentation API for UNIX*. VDPAU is an open source library and API originally designed by NVIDIA that provides an interface to support hardware-accelerated video decode."
... and so Intel sez libVA is correct. More specific to Arch, there's additional information in their video acceleration page, if you like to read. The only problem with the VA-API is it can't decode MP4 and FLASH containers, but it does all other common formats, and all codecs, including H264 and the new VP8 and 9. I just use MKV and AVI containers and set the VLC codec to VA (instead of its default VDPAU). In spite of inefficiencies on the Intel hardware, some may wish to overlay VDPAU functionality onto their Intel chip, which is an installation beyond this post. If a person does that, any mistakes will defeat X working properly -- no harm, just revert to runlevel 2 and reconfigure until Xorg is working well. FYI, one of the tweaks I've seen for VIDPAU overlaid onto VA, is adding "export VDPAU_DRIVER=r600"in one's ~/.xinitrc file. Anyway, back to pure libVA...
# pacman -S libva libva-intel-driver libva-utils libva-mesa-driver
... then check the install with "$ vainfo".

window manager :: 10 mins

On an old system, I don't waste memory with display managers, instead I login and "startx" from runlevel 2. I like Ice Window Manager, a light interface with simple text configuration, wallpaper, and menu files (look inside ~/.icewm ). Efficient on older systems: perhaps 150M usage after logging-in, connecting to network, and starting X. In Arch, the template files are inside /usr/share/icewm/, including the themes. See the main Arch file.
# pacman -S icewm
$ cp /etc/X11/xinit/xinitrc .xinitrc
$ nano .xinitrc
exec dbus-launch icewm-session
$ startx
I also looked here to get the names of additional drivers, for example to solve the pesky touchpad problem. I couldn't stop the Dell touchpad with synclient TouchPadOff=1 until I # pacman -S xf86-input-synaptics.

QT or Gtk

I used to stick with one or the other to keep a smaller install and shorter update. Nowadays both seem necessary. I prefer GTK (except gvfs), but VLC requires QT. QT is about 400MB, and typically pulls in PyQT, whereas GTK3 is a slick 100MB. But since I'm a fan of VLC ... QT became my baseline API.
# pacman -S qt4
However, you're going to see that udiskie (to avoid gvfs) brings in about 80MB of shit, including basic Gtk.

sound

I avoid PulseAudio as much as I can. See my post from 2016. ALSA is now built-in, so that all that's required is alsamixer in order to control the sound levels (unmute, etc)
# pacman -S alsa-utils
Done.

rc.local

A consolidated place for random startup shit too lazy to configure individually. It's like an initrc in X, but for runlevel 3.
# nano /etc/rc.local
#!/bin/bash
wpa_supplicant etc
dhcpd etc
exit 0
# systemctl enable rc-local.service should make it happen next boot, but you also have to create the service file before enabling it.
# nano /etc/systemd/system/rc-local.service

# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.

[Unit]
Description=/etc/rc.local Compatibility
ConditionPathExists=/etc/rc.local

[Service]
Type=forking
ExecStart=/etc/rc.local start
TimeoutSec=0
StandardOutput=tty
RemainAfterExit=yes
SysVStartPriority=99

[Install]
WantedBy=multi-user.target

6. touchscreen issues

This is really the crux of it. I'd never had a touchscreen and it looked like some of it was system dependent, and with mutual solutions.

When the keyboard is still flipped-out, Shift + F10 emulates R click on mouse. Of course there's no keyboard once we go to touchscreen. The Arch Touchscreen Wiki has some relevant touchscreen info.

Management *may* be possible with synclient, but Touchégg seems to be the best app for managing touchscreen actions. The system runs in two parts, a daemon that gathers clicks, and a client that says what to do with them. The first part, the daemon, is simple enough.

# pacman -S touchegg
# systemctl enable touchegg.service
# systemctl start touchegg

The client spawns connection errors if the daemon is overlooked.

Once the daemon is running, a person runs the client. Eureka, we can use an old skool .config/touchegg/touchegg.conf file to configure the client. There's Touché, a GUI, for this, but I prefer ye olde conf file so as to be portable across installs, and to be sure. It's a basic XML format. The developer's configuration page.

Sunday, January 7, 2024

ffmpeg - concatenation and edits

See also this post.

you are entering HELL if you want to join a few video clips

WHAT SHOULD BE THE SIMPLEST COMMAND IN LINUX VIDEO EDITING CAN ACTUALLY BARELY BE ACCOMPLISHED. MUCH WORSE THAN M3U ANNOYANCES. NO CLI OR GUI. MELT USUALLY FAILS WITH C LIBRARY DEFICITS. HAVE TO USE FFMPEG.

MUST CREATE A TEXT FILE WITH THE WORD "FILE" AND A HARD PATH FOR EVERY FILE TO BE JOINED IF THEY ARE NOT IN THE SAME DIRECTORY, PLACING THEM IN CONCATENATION ORDER. WANT TO TOY WITH ORDER? MAKE ANOTHER ENTIRE FILE. HOURS AND HOURS AND HOURS OF EXTRA WORK.

EVEN WORSE EVERY SINGLE VARIABLE INSIDE EVERY FILE MUST MATCH: BITRATE, PIXEL SIZE, ASPECT, CLOCK, EVERYTHING, MUST MATCH OR EVEN THIS POS METHOD WILL FAIL, WHICH IT MOST OFTEN DOES.

file '/home/foo/file1.mp4'
file '/home/foo/file2.mp4'
file '/home/foo/file3.mp4'

It's that bad. In fact the only thing this process is good for -- whenever it actually works -- is a person knows that each clip independently was fully prepped. So in case I wanted to edit them in some other order -- which happens a LOT for most ppl -- the clips might successfully bond in the new order.

The best results come from combine files with least number of renders. The best way to do this is to do your edits so you end up with a similar tbn, bitrate, and pixel size. There are other problems sometimes with fast concatenations, but the sign that all the edits are done right is that it only takes a list text file and a simple...

$ ffmpeg -f concat -safe 0 -i mylist.txt -c copy output.mp4

Even if you cut these clips from a single larger file without recompiling -- ie, we *know* the DTS and PTS are correct -- you will get shitloads of DTS ("Decoding Time Stamp") errors. The system is absolute SHIT. To avoid the DTS erros, a person would have to re-render *every single clip* BEFORE joining them with an absolute clock, eg.

$ ffmpeg -i clip2.mp4 -video_track_timescale 90000 clip2timed.mp4

...before joining the clips. Can you farking imagine?

best edit process

At least check the edits after done, prior to concatenate, to see they have a reasonably close tbn. Like if you snip off the first 10 seconds of a vid, you definitely don't want to render the vid. But if a check in ffmpeg -i shows a weird tbn, then you have to, or at least try again. eg defaults, 15232, or 11488. I usually use 15232, because I remember it. Phones typically run 90000. And if I have to do a render, I also get some other action done

$ ffmpeg -i messy.mp4 -video_track_timescale 11488 -vf "eq=gamma=1.1:saturation=0.9" output.mp4