Showing posts with label install. Show all posts
Showing posts with label install. Show all posts

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.

Saturday, April 1, 2023

optiplex 9020 sff details

Reliable and whisper quiet. $90 refurbed Core i7, 3.6GHz, typically manf around 2016. For sure, pacman usbutils and wireless_tools into these Optiplex's. Clear the back for ventilation

DisplayPort - $5

This is an advantage over HDMI. It splits the video from the sound, allowing a person to easily send the audio to their speaker system instead of the farking TV.

For video, purchase the DisplayPort to HDMI cable adapter $5 (above). The OS will detect the HDMI and adjust. For sound, run a standard 3.5mm audio line to the speaker system. Done.

WiFi - $15

Dell factory-configures WiFi on some MB's. None of the refurbs I've bought have it. As for USB dongles 99% of the ones on EBay are worthless Realteks RTL1881cu. Its USB signature (c811) is below. They're sold from $3 to $15 depending on how venal the seller is. The web is flooded with these pieces of garbage. I couldn't get them to work with special drivers off the AUR and wasted a day.

$ lsusb
ID 0bda:c811 Realtek Semiconductor Corp. 802.11ac NIC

We want the "au" or "bu" chipset, not the worthless "cu" chipset (above), and we'll have to pay for it. Typically, we're paying $20-30. I found an Israeli supplier. The USB signature looks like this:

$ lsusb
ID 0bda:b82c Realtek Semiconductor Corp. 802.11ac NIC

This is the Realtek RTL8822bu.

The dongle should be detected by the kernel without installing a driver, eg...

$ iwconfig
< snip >
wlp0s20u11i2 IEEE 802.11 ESSID:off/any

A quick check of CONF file accuracy inside /etc/wpa_supplicant/ and all is good.

# wpa_supplicant -i wlp0s20u11i2 -B -D wext -c /etc/wpa_supplicant/wpa_supplicant.conf
# dhcpcd wlp0s20u11i2

Nice eh? Check this out. So I went through all the steps, which are useful to learn in some circumstances. Here's a relatively important screenshot, arguably

RAM - 32G $45

My refurb came with 8Gb (2x4G cards. The MB can take up to 64. Eight Gb certainly worked (Arch w/Ice WM), however there were occasional delays with memory hogs like Chromium, so I eventually bought 4 x 8Gb cards. There are 4 x 1600Mhz 240pin DDR3 slots. Alternating banks. One bank has white clips, the other has black.

One guy's RAM upgrade.

UEFI

I changed the BIOS to allow legacy BIOS for GRUB ease.

rant: Legacy BIOS have a password option, making it very hard for a physical hacker (typically only govt) to put in a USB and quickly duplicate one's HDD/SSD. So we got UEFI: there's no impediment to LEA's. But if we turn off UEFI, we lose the ability to password protect our BIOS. This makes it easy for both civilian and gov't physical access hackers. What to do?

rant (cont): Because the gov't likes UEFI, the situation going forward will likely be *only* UEFI. A post here seems to describe the future. It's annoying AF, sorta like a perpetual tax season. /rant

Back to GRUB -- we're going to have problems. There will likely be some workarounds, perhaps like this post, or this post. But we will have to learn them. Computers used to just work, in the pre-911 world. And UEFI will always need at least gparted to handle the GPT partitioning. All our old (hard-earned) partitioning skills with MBR, cfdisk, and fdisk will be out the window. Plus we will have to trick or drill into GRUB to make it install itself properly. A lot of reading, just to be able to run a BIOS password.

Sunday, February 12, 2023

install -- HP Laserjet Pro MFP M426fdw (03f0:5a2a)

Continuing to look to scan without lines. My CCD Epsons (V30, V370) both have faint vertical lines -- still great for documents, but unacceptable for photos. Buddy let me use this HP MFD, since its printer doesn't work anymore and that's all he used it for. All I need are scan functions. 2007 vintage. Unfortunately MFD HP's require installing the entire HP print kludge (CUPS and HPLIP) just to use the scanner.

hardware

Standard USB scanner cable and power cord.

$ lsusb 03f0:5a2a HP, Inc HP LaserJet MFP M426fdw

software - driver

I took out the V370 software to prevent conflicts and put in the HP bloatware.

# pacman -Rsn iscan-plugin-perfection-v370
Packages (4) iscan-2.30.4.2-3 iscan-data-1.39.2.1-1 libstdc++5-3.3.6-9 iscan-plugin-perfection-v370-2.30.4-1

Total Removed Size: 2.75 MiB
$ yay -Ss hp printer
aur/hpoj 0.91-21 (+91 0.00) (Out-of-date: 2020-07-28)
Hewlett-Packard OfficeJet, PSC, LaserJet, and PhotoSmart printer multi-function peripherals (MFPs) drivers
$ yay -S hpoj
Packages (13) foomatic-db-engine-4:20220521-1 hplip-1:3.22.10-3 perl-alien-build-2.77-1
perl-alien-libxml2-0.19-1 perl-capture-tiny-0.48-6 perl-dbi-1.643-4
perl-ffi-checklib-0.31-2 perl-file-chdir-0.1011-4 perl-path-tiny-0.144-1
perl-xml-libxml-2.0208-1 perl-xml-namespacesupport-1.12-5 perl-xml-sax-1.02-1
perl-xml-sax-base-1.09-5

Total Download Size: 22.82 MiB
Total Installed Size: 38.80 MiB

software - printer

Use whatever lsusb provides, in this case 1 and 4. It should install with some Qt5 errors. This AUR version still runs on Qt5, when Qt6 is the current release.

$ hp-setup -i --auto 001:004
error: No module named 'PyQt5.QtCore'
error: Unable to load Qt4/Qt5 support. Is it installed?

error: No module named 'PyQt5.QtWidgets'
# pacman -S python-pyqt5

software - proprietary

1) uninstall the printer and fax using lpadmin (lookup its name in CUPS). 2) reinstall it again using hp-setup. This should work b/c you've now got all the Qt in place. After hp-setup, then 3) click the HP prompt to download their proprietary scanning file.

# lpadmin -x HP_LaserJet_MFP_M426fdw
# lpadmin -x HP_LaserJet_MFP_M426fdw_fax
$ hp-setup -i --auto 001:004
It's possible we can get a list of the files at Alternatively go HP website, which will auto-detect the OS from the browser of course. SMH. Anyway, just select the model, in this case

...which will simply bounce to the HPLIP. This is their goal. And now they don't have HPLIP in the form of an unzippable file. Now its a script that has to download the file itself. Data gathering, see?

software - proprietary plugin

The first scan activation (eg with xsane), HP's national security features arise. There is no way to anonymously scan. HP downloads a proprietary file, otherwise the scanner will not operate. A watermark unavailable to the naked eye will be added to all scans and the installer does not reveal where it installed on the system. There's no getting around it, but this is how to navigate it, hopefully without breaking your pacman index, like any 3rd party installer will. It does not say where these files are.

...and then choose the option here.

Sunday, June 14, 2020

toolbox :: appslist

contents
cli-misc a lot of the install stuffmedia playback, creation, editing
coding Python, misc APInetwork basic connectivity
documentssafety
math/stats minus calculator

Arch :: list of applications


Items marked with an asterik "*" below should be accomplished during install prior to leaving arch-chroot. Remember that $ strace > catchit.txt 2>&1 [command] is our friend, and that there can be some pacman judo required. To safely uninstall without dependency breaking, # pacman -Rs [app] is typically enough. Our old post on cleaning up orphan space is also useful.

system configuration

During install, a few details prior to downloading apps makes life easier. I went over some of these in 2015. Limiting journal size...

# nano /etc/systemd/journald.conf
Storage=auto
SystemMaxUse=200K

CLI (misc)

  • diff: 1MB, # base :: typical: $ diff -s file1.txt file2.txt You can also send it to a file a,s,c.see here. If the result is 180c180 means that we would have to copy line 180 from file1 to line 180 in file2 to make file 2 be like file 1.
  • fdupes: 1MB, # pacman -S fdupes :: cleans ridiculous amounts of duplicate files prior or after backups.
  • htop: 1MB # pacman -S htop :: color informative version of top
  • jmtpfs: 1MB, $ yay -S jmtpfs :: support to plug move files on and off an Android.
  • lshw: 1MB, # pacman -S lshw :: provide info on MB components better than lspci.
  • * nano: 1MB, # pacman -S nano :: light text editor
  • strace: 1MB, # pacman -S strace :: typical: $ strace > catchit.txt 2>&1 [command]
  • * usbutils: 1MB, # pacman -S usbutils :: lsusb, some others
  • archiving utilities. In addition to xarchiver, install all of the various formats or you're just going to get pissed on the occasion when you need a manual or something and have to update your entire system just to get one zip library. Among these are bzip, qzip, lrzip, lz4, lzip, lzop, xz, zstd, zip, unzip, p7zip, and unarchiver, among others.
  • yt-dlp: 1MB, $ yay -S yt-dlp :: seems lately to work more reliably than the parent youtube-dl from which it's forked.

coding

With the advent of Google Collab (essentially Google version of Jupyter notebook but with TensorFlow and so on for deep), this seems less important, however we still occasionally need a sane offline environment.

  • pipenv: 3MB, # pacman -S pipenv :: critical so can do projects (eg TTS) requiring special pip updates and so on without hurting the OS install
  • geany: 1MB, # pacman -S geany :: coding editor.
  • umlet: 1MB, $ yay -S umlet :: a light UML editor. Filetype UXF
  • rclone: 2MB, # pacman -S rclone :: encrypted cloud backups. GUI rclone-browser

documents

LaTeX needs to be installed from, eg, TexLive in a separate directory in ~ somewhere.

  • cups: 12MB, # pacman -S cups, necessary evil if printing. Get the PPD files from the AUR.
  • evince: 14MB, # pacman -S evince basic PDF reading. This comes with the price of gvfs, so another option is okular, which doesn't have the problem of gvfs.
  • xournalpp: 4MB, # pacman -S xournalpp. editing and creating PDF with Huion
  • xsane: 5MB, # pacman -S xsane scanning documents

A problematic aside is what to do with old DOC and DOCX documents possibly on one's system. LibreOffice can do the conversion with a command line , but a person has to install LibreOffice writer (300MB) to get this one feature.

# pacman -S libreoffice-fresh
$ lowriter --convert-to pdf somefile.doc

math/stats

  • PSPP: $ yay -S pspp. GNU version of SPSS. Does most of the functions. GUI: psppire
  • gretl: $ yay -S gretl. Econometrics
  • octave: # pacman -S octave GNU version of MatLab
  • RStudio: R-specific IDE

media

playback

  • vlc: 100MB, # pacman -S vlc :: necessary for speed variance, some obscure filetypes. Also plays playlists and reaches to non-drm streams.
  • xplayer: 7MB, 15 min compilation $ yay -S xplayer :: much lighter than anything else, plays clean, loops.
  • libdvdcss (backup) 8MB # pacman -S libdvdcss :: any kind of backup off a DVD (eg. an old Newhart episode on a 2000 DVD) requires this. Unintuitive errors result without this. Possibly also consider $ yay -S vobcopy, which will decrypt as it copies it over.
  • pipelight, widevine - TBD. support for DRM protected media a la silverlight

creation & editing

  • audacity (sound) 20MB # pacman -S audacity :: necessary for voice recording to view levels in real time. uses PortAudio
  • ffmpeg (sound, video) CLI 20MB # pacman -S ffmpeg:: screencast audio and video capture. ffplay to precheck video.
  • flowblade (video) 20MB $ yay -S flowblade:: does cross-fades of multiple files far too complex in ffmpeg. Open a project, then import MP4's. Avidemux no good for cross-fades. Openshot crashes. Pitivi crashes. However, all of the Pitivi dependencies.... 
    ... are also good for Flowblade. Install them before getting Flowblade off the AUR. Of these, the only critical item is python-cairo. The AUR Flowblade install does not always check for python-cairo and Flowblade will no-start with errors without python-cairo.
  • gimp (JPG, PNG) 20MB # pacman -S gimp:: Swiss army knife
  • goldwave.exe (WAV) 5MB 1 hr due to WINE installation. This 90's app still the easiest and most thorough for polishing sound. See Wine configuration vid below.
  • mlt (video)3MB # pacman -S mlt:: needed for melt command as as well as Flolwblade. Be sure to add # pacman -S rubbberband if using melt commands. melt FAQ.
  • obs-studio (video) 20 MB # pacman -S obs-studio :: mixing media on the fly if want live productions and saving to file.
  • shotcut (slideshow) 20 MB # pacman -S shotcut :: supposedly this is good for making slideshows though I have never tried it. This would be the only reason to install as it's (per Linux usual) worthless for cross-fades (can't adjust overlap consistently). MLT-based.

Wine Configuration (19:58) Chris Titus Tech, 2019. WINE converts Windows system calls to POSIX system calls. Make a bottle for every Windows app.

network

  • * dhcpcd: 3MB, # pacman -S dhcpcd :: important to add before leaving chroot or no internet after post-install reboot. Also disable it in systemd or possible boot hangs.
  • umlet: 1MB, $ yay -S umlet :: a light UML editor. Filetype UXF
  • * ntp: 1MB, # pacman -S ntp :: typical: # ntpdate pool.ntp.org
  • rclone: 2MB, # pacman -S rclone :: encrypted cloud backups. GUI rclone-browser
  • * wpa-supplicant: 1MB, # pacman -S wpa-supplicant ::

graphic

Wine: Google SketchUp. The old
Wine: ConceptDraw ($99)
Wine: VideoMeld64: fonts-corefonts,tahoma DLL's-none,

audio

Wine: GoldWave: fonts-arial,corefonts,tahoma DLL's-none, however errors on ntdll

safety

  • glasswire :: monitor net usage
  • zoneminder :: security camera management

safety - security devices, rules

Our phones and yubico keys are security devices. A cell phone's primary function is a security device, however its communication functions have been conveniently conflated and incorporated. These should be separated of course, and a security device provided for free by the government, since they are the ones who access and benefit from these functions. The phone itself should return to a secure, non-traceable way (unless search warrant) to communicate. Obviously this would inconvenience security agencies, and the collaboration aspects of government and immensely profitable communication agencies. So it will never happen. That is to say, it will happen just as soon as education is reformed for national benefit.

TLDR: These are security devices so that 1) PAM is involved, therefore 2) Udev rules must be written or they will not even be detected by the kernel in lsusb

phone example

  1. #pacman
  2. # nano /etc/udev/rules.d/90-android-tethering.rules
    # Execute pairing program when appropriate
    ACTION=="add|remove", SUBSYSTEM=="net", ATTR{idVendor}=="22d9", ATTR{idProduct}=="276a", ENV{ID_USB_DRIVER}=="rndis_host", SYMLINK+="android"
  3. # udevadm control --reload

Yubikeys

In 2020, I bought a Yubikey 5 NFC, for $50. It inserts into a standard old USB port (1,2,3), unlike the newer "Android" (USB-C) type connector.

In Arch, ykman is our friend. Its use is described in an Arch page and -- at least when it comes to PIN issues -- on Yubico's own setup page.

# pacman -S yubikey-manager

For basic info

$ ykman info
WARNING: PC/SC not available. Smart card (CCID) protocols will not function.
Device type: YubiKey 5 NFC
Serial number: 22471452
Firmware version: 5.4.3
Form factor: Keychain (USB-A)
Enabled USB interfaces: OTP, FIDO, CCID
NFC transport is enabled

Applications   USB   NFC
Yubico OTP   Enabled Enabled
FIDO U2F     Enabled Enabled
FIDO2       Enabled Enabled
OATH         Enabled Enabled
PIV         Enabled Enabled
OpenPGP     Enabled Enabled
YubiHSM Auth   Enabled Enabled

On older systems, a udev rule might have to be configured. According to their website...

  1. # pacman -S yubico pam
  2. # nano /etc/udev/rules.d/70-u2f.rules
    # Execute pairing program when appropriate
    ACTION=="add|remove", SUBSYSTEM=="net", ATTR{idVendor}=="22d9", ATTR{idProduct}=="276a", ENV{ID_USB_DRIVER}=="rndis_host", SYMLINK+="android"
  3. # udevadm control --reload

The legacy security standard for the oldest YubiKeys was FIPS, but is now FIDO, a private business consortium. Not sure if an older FIPS key and a newer FIDO key can be used on all USB ports, eg if FIDO is back-compatible. The NFC key I bought was a newer FIDO.

Saturday, April 18, 2020

[solved] Brother HL-L2315DW USB install ( 04f9:0092)

2022 update: due to evolving colord conflicts with CUPS color-setting, it's best to follow the instructions in my most recent post on this install. There's plenty of relevant older info below, but it probably depends on one's time and inclination whether to move onto the other post or start below.


Typical printing links and commands:

  • http://localhost:631 CUPS admin page
  • # lpadmin -x Brother remove a printer by its installed name, eg. "Brother"
  • $ lpinfo -v get info on all connected printers
  • # lpstat -o list all print jobs
  • # cancel -a cancel all print jobs
  • # systemctl [enable/disable/start/stop/restart] cups.service
  • /var/log/cups/error_log CUPS error logs

The printers are priced $90 clearance (c. 2020) or sometimes $70 refurbished. Refurbished with 2-year warranty is best. Eg, "refurbished" from Wal-Mart ($70), with an Allstate 2 year plan ($6), costs less than a new model ($90) yet with deeper protections, such as free shipping for repairs.

Links: Openprinting.org database :: Brother L2315DW downloads page


solution

Go to the Brother L2315DW downloads page and select Linux -> RPM's. Note in the screenshot below that, even though they have three available downloads, both the PPD and LPD are contained in the single 0.2MB PPD download circled in red. The file is hll2315dwcupswrapper-3.2.1-1.i386.rpm.

Use xarchiver to open the RPM and extract its single folder, "opt" Inside opt, I continued drilling down into its subdirectories. I located both necessary files in /opt/brother/Printers/HLL2315DW/cupswrapper/. The CUPS PPD is named brother-HLL2315DW-cups-en.ppd, feel free to rename to [whatever].ppd. As for the LPD, it must retain its name, and you might want to save it (its a Perl script), but you could also just create the file, since its contents are just a single line (see further down).

owner and permission

Ownership will automatically become root b/c these can't be copied into their directories as user -- when you 'su'-up to copy them, they'll move over as owned by root. I have a working system with 755 on the filter but the instructions say it should 751.

  • CUPS (PPD) 755 $ chmod 755 file
  • LPD text file 751 $ chmod 751 file

locations

  • CUPS (PPD) /usr/share/cups/model/foo.ppd
  • LPD file /usr/lib/cups/filter/brother_lpdwrapper_HLL2315DW

LPD file

The ONLY way I could get to print was to use default options, which meant creating a custom brother_lpdwrapper_HLL2315DW file. Duplex printing -- an option physically available on the printer -- might be possible from some printer setting, but it cannot be accomplished in the CUPS software without errors that prevent printing altogether. Let the printer report its defaults to CUPS for successful printing. The file which makes CUPS adopt printer defaults is a single shebang line, with no line breaks (it is multiple line below due to column width word-wrapping). Don't forget permissions must be 751.
#! /opt/brother/Printers/HLL2315DW/cupswrapper/brother_lpdwrapper_HLL2315DW

PPD file

The PPD part is like years prior.
  • assigned read/execute (5) permissions that have worked with prior PPD's... $ chmod 755 printer.ppd
  • copied it to the Arch PPD directory... # cp printer.ppd /usr/share/cups/model/printer.ppd
  • verify the USB-attached printer is detected $lsusb
  • verify CUPS is running... # systemctl
  • install the printer # lpadmin -p Brother -E -v usb:/dev/usb/lp0 -m printer.ppd
  • alternatively, if having problems, you can use the bus ID's in lsusb and be more specific about the PPD locations as well (all one line):
    lpadmin -p Brother -E -v usb:/dev/bus/usb/lp0 -m printer.ppd
  • check it in CUPS http://localhost:631, and verify or assign it default printer
  • still in CUPS, verify the printer is awaiting print jobs and not paused
  • print a test page
  • copy the PPD to one's installation USB key so they needn't download it again for an OS/CUPS re-install

wifi install

Not worth it for a home-use stand-alone printer. It's too flaky. Eg, the next power outage, the WiFi router assigns the printer with a new DHCP address and one has to install the printer again.

somewhat common filter problem

There's a fail where the filter does not print over to the /opt directory.

$ ls/opt/brother/Printers': No such file or directory

The error log looks like this:

cat /var/log/cups/error_log W [14/Dec/2022:22:24:51 -0800] CreateProfile failed: org.freedesktop.ColorManager.AlreadyExists:profile id \'Brother-Gray..\' already exists

What has happened? The printer driver PPD attempted to create a settings file in /opt/brother/Printers/[model], but part of the PPD attempt included setting printer colors. The desktop ColorManager (ICC files) settings from free desktop (files are in /usr/share/dbus-1/interfaces) conflict with the PPD color. Due to the conflict, CUPS aborts creation of the printer configuration file in /opt and then fails to print based on lack of that filter.

These color manager related failures are based on colord ICC profiles for each device and are complex.

colormgr is the command line device for changing colord ICC files.

additional

There's been changes in CUPS, such as requiring the LPR translation file, and PPD's may disappear entirely at some point.
  • cannot select Duplex and have it print. If I could, I'd want "DuplexNoTumble". Duplex with tumble inverts the top and bottom of the front/back of a page like for clipboard use. However, the printer only works in single page mode.
  • after installation, it's efficient to set it as the default printer in case one has an application that sends to an LPR default, not to a printer name (eg. geeqie).
  • Some failures require a CUPS restart...
    # systemctl restart cups.service

Thursday, April 9, 2020

[unsolvable] disable passwords for Zoom Basic meetings (Arch, Android)

If one's about to install Zoom on any device, first open a browser and create an account at the Zoom website. Other than the "hands-free" note further down, I would limit myself to changing any Zoom settings only from this website account, rather from a device. If done from the website account, settings will waterfall into whichever downstream device(s) one uses with a Zoom client.

I like to disable the Zoom Personal ID ("PID") . The PID is similar to a personal phone number. I have never given mine out, and I disabled PID meetings via the web account (shown below). The effect on my phone is neither PID meetings nor the PID itself appear. De-clutter.

largest problems

The largest problems on Zoom are the hidden ones, probably obscured at the order of some marketing hack?
  • no way to disable passwords for scheduled meetings in the basic account. If you'd like to meet with grandpa joe without a password to make it easier on him, be prepared to pay $15 per month; basic users have no ability to disable the password requirement. Send him the entire link with the embedded password, or devise a simple password scheme, say the letter "j", for all meetings.
  • opaque appropriation of email domains. There's a screen warning, but I failed to get a screenshot of it before it disappeared. Say one has an email address at their employer, Acme:
      chump@acme.com
    Chump goes to the Zoom website, creates a basic account, and is Zooming to their job. Maybe he even pays $15 for extra features. But now Acme decides as a corporation to purchase an enterprise Zoom account. Without informing Acme or Chump, Zoom restricts control over any Zoom logins with emails ending in "acme.com". The next time Chump logs in for a Zoom work meeting, a pop-up warns Chump he cannot login and misleads him with a choice between accepting all the Acme settings or simply change his account email address. Chump updates with another email address. Unknown to Chump, or likely to Chump's boss, when Chump changed his email to keep his settings, his Zoom login lost acceptance into Acme-hosted Zooms. Through no fault of his own, Chump can't log-in, and he can't figure out why, since Zoom didn't provide that information (at this writing). This means Chump also lacks an explanation for his boss, who likely feels Chump is a liar, lazy or incompetent for the missed meeting(s). Chump madly rifles through the hundreds of his Zoom account settings, and still, all login attempts are rejected. The only solution is apparently for Chump to make a new account, as Cornell eventually learned.
  • Numerous, sometimes overlapping settings. COVID will long be over by the time we figure-out these combinatorics: 4 levels, 3 roles, and 40 or 50 settings. Some settings only apply to a certain level, others apply to all, and it's pretty much trial and error. The Four levels are, meeting, user, group, account. Now add the 3 roles, user, admin, owner. The entire 16 minutes of video in the link below only deals with the blue-selected "Settings" button in the menu seen to the left. Notice that there is an entire "Admin" menu area, and that this is expandable with many other menu setting areas available. All these settings may be necessary or beneficial to some users, but it's also time-consuming, complex, and therefore error-prone, for all

    Advanced Zoom settings - Basic and Pro (16:50) Lifelong Learning at VTS, 2020. Pedantic, side by side run-down of settings for Basic and Pro features.

  • Features locked by default require identity verifcation to unlock. Verification is accomplished via a credit card or PayPal, including a home address. Now they have your zip code

Android - phone

Go to the Google Play Store, and download and install Zoom. Zoom has step-by-step instructions for getting started, but there's nothing weird except one thing: disable the hands free option in settings or it's a serious nagware problem every time the app is opened.

When opening the application a "sign-in" and "sign up" prompt appear. "Signing up" is the one-time event I recommend doing at the Zoom website. The website has far more settings than on the phone app. I ignore the "sign-up" prompt no matter the device b/c I already accomplished it on the website. "Signing-in" I do each time I use the application.

If one has already created a web account, one can simply "sign-in" to the current device and have all the settings which one configured at the website. Create the account at the website, install the app, sign-in to the app.

creating and joining meetings

I create all meetings on the Zoom website. I do not create meetings through the phone application, I just attend or host them through it. If one intends to use Zoom, it's helpful to try a practice meeting with a friend before going live to a conference and so forth.

Arch - desktop

No one wants to install this 256Mb lead weight because it brings in PulseAudio, which is effectively a virus. Some apps, eg, recordmydesktop), will fail to be able to directly access the soundcard. If you need to screen-capture during a Zoom a person can either turn on recording for the Zoom itself, or use ffmmpeg

THere are the (7.45Mb)dependencies noted during the (AUR) Zoom installation, via...

$ yay zoom
... (of course, remove with # pacman -Rns zoom)
  • alsa-plugins
  • pulseaudio
  • pulseaudio-alsa
  • rtkit
  • web-rtc-audio-processing

ffmpeg :: screen and sound capture

One should know their screensize, eg 1366x768, and cut off the bottom 30pixels or however many consistitute a toolbar. This allows switching between windows via the toolbar offscreen. Syntax: These three flags should come first and in this order
-video_size 1366x738 -f x11grab -i :0
...else you'll probably get only a small left corner picture or errors. Then come all your typical bitrate and framerate commands
$ ffmpeg -video_size 1366x738 -f x11grab -i :0 -r 30 output.mp4
I've never been able to set a bitrate in a screencast without fatal errors (eg, b:v 1M) b:a 192k. And then to add the sound...well you're stuck with PulseAudio if you installed Zoom, so just add -f pulse -ac 2 -i default...
$ ffmpeg -video_size 1366x738 -f x11grab -i :0 -r 30 -f pulse -ac 2 -i default output.mp4
There are also ways to get it to record a specific app only, using the name of the window, not covered here.

2016 Latitude E7270 6600U Install

Safety: BitLocker (encryption), UEFI, Fingerprint. Uninstall packages:

# pacman -Rsn

NB:Headphones (also hands-free) Mijiaer/Langsdom JM26 3.5mm earbuds


Problem: your situation requires reliable Zoom (or other) teleconferencing but you're not a first responder, professional athlete, nor an investment banker. If you can carry one (2.74 lbs), 2016 carbon fiber, non-touch screen version Latitude E7270's are available on EBay for about $250 delivered. These are not display showoffs, w/ 12.5" screens, and only integrated Intel HD Graphics(520), but they are solid business grade: 16 GB DDR4, i7 6600U Skylake w/100Mhz FSB, and 1080P webcam: they will do the job reliably. Think 256G PCIe3 SSD, Arch Linux and IceWM: for that $250, one has a laptop which will teleconference, plus audio might be edited -- a single 3.5mm combined jack. Watching movies or editing pics on a 12.5" however, is suboptimal.

upgrade/replacement notes: Please scroll down to bottom for sections on replacement, esp batteries and SSD. The laptop takes an M.2 card style NVME SSD so its a little complicated.

Packaging appeared good, visual inspection was clean and the charger and battery tests went well (1 hr). The subsequent Arch installation was an additional 4 hours.

bootable USB :: 20 mins

  1. Download the latest ISO. Necessary or the signature keys might error during install.
  2. # fdisk -l find the drive name, eg /dev/sdc OR...
  3. $ lsblk | grep -i sd
  4. # cfdisk /dev/sdc, delete all partitions and write, exit
  5. # dd bs=4M if=/home/foo/Downloads/archlinux-2020.03.01-x86_64.iso of=/dev/sdc oflag=sync The sync flag takes a little longer but you can be sure it will be properly on the usb.

BIOS shifts :: 15 mins

Two equally important adjustments must be made in BIOS: 1) booting from USB for install and, 2) when booting from HDD, non-windows, non-secure, booting and no disk encryption.
  • Enter BIOS, press F12 repetitively during power up.
  • Secure Boot Enable -> "Disabled"
  • General -> Advanced Boot Options -> "Enable Legacy ROM's"
  • General -> Boot Sequence -> Enable "Legacy"
Also, I noted I luckily had the latest BIOS version 1.20.3 (7/2016) but there's a process if not. Link: configure BIOS for USB boot :: update the BIOS

GRUB/safety problem :: 15 mins

Currently (2020) however, GRUB 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/nvme1, delete all partitions, which eliminates EFI. Write this partitionless drive and exit
  3. # gdisk /dev/nvme1 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/nvme1, all (MBR, BSD, APM, and GPT) were not present. This is correct, but "x,z,y" again to be sure.
  4. # cfdisk /dev/nvme1, select DOS label, and proceed. The main is a linux (83) nvme1p1 and a linux swap (82) nvme1p2,
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.

base CLI (runlevel 2) configuration :: 20 mins

# mkswap /dev/nvme1p2
# swapon /dev/nvme1p2
# free -m [check swap is on]
# mke2fs /dev/nvme1p1
# mount -rw -t ext2 /dev/nvme1p1 /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
# mkdir /boot/grub
# grub-mkconfig -o /boot/grub/grub.cfg
# grub-install /dev/sda [no partition]
# exit
# reboot

go back to install disk

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 ext2 /dev/nvme1p1 /mnt
# arch-chroot /mnt
# pacman -Syu dhcpcd wireless-tools
# 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/nvme1p1 /media
$ cd media
[do whatever operations]
# umount /dev/nvme1p1

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 :: 30 mins

Used to be so simple with yaourt, however it hasn't been maintained since 2018. The best option now is yay, built on the 300Mb behomoth go dependency. This first part is the same:
# nano /etc/pacman.conf
[archlinuxfr]
SigLevel = Never
Server = http://repo.archlinux.fr/$arch

# pacman -S go wget git base-devel
$ git clone https://aur.archlinux.org/yay.git
To build and install they do it through fakeroot, which looks at the god-damned sudoers file. Unfortunately, editing sudoers is done through the visudo command, which every stinking website tells users not to circumvent, and which uses the ridiculous VIM editor. Here's the workaround...
# nano /etc/sudoers
foo ALL=(ALL) ALL
... and once that's done...
$ cd yay
$ makepkg -si
If you have to hand install the TAR.XZ, use pacman with a "U" flag. The "U" flag has pacman looking into the current directory instead of out over the Net. Prior to building any AUR helper (yaourt, aurman), you'll need to first build "package-query", also from the AUR.
# pacman -U package-query[version]tar.xz
And then the same with yaourt thereafter.

limit journalctl size :: 5 mins

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

X install :: 20 mins

These Dells have the 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. 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

replacement info

batteries - 55wh(4 Cell) LPD-J60J5 $30

Li-Ion, power is 7.6VDC. These go bad. When I first opened the case, the battery was swollen and pushing against the case cover. The charging circuit is built-in, which might have failed. Or the battery has a place for heat paste on the bottom, which might not have been seated. If only there were a LiPo which fit it for less than $100. Replacement Li-Ion J60J5 costs $25 (2022) but 2.5 bucks tax, then thermal paste and cleaner another $15. We're looking at $40+.

After install, there are several ways to check the battery, but this is perhaps the easiest way:

$ upower -i /org/freedesktop/UPower/devices/battery_BAT0

Thermal paste application (8:48) Laptop Performance Tricks, 2019. Appears this is solution video with all relevant tips. Vid is for a Dell G7 rather than the Dell E7270.

storage: ssd pcie $30

Nowadays, we're not dealing with 2.5" SATA HDD's that spin-up. The installed card is a 256Gb NVMe PCIe Gen3 x 4, so 2 lanes are not used. That's because PCIe bus (FSB) is standard 100Mhz, but is discount model with 2 lanes. It's upgradeable to 1TB for probably $70, and to simply replace the 256Gb Gen3 about $30.

Sunday, December 29, 2019

wine -- can we do this better?

Wine works but has been useless to me since its creation. Each app requires a custom installation -- that's fine -- but when we start the actual app with the "wine" command preceeding the EXE file, Wine "updates"(overwrites) the custom settings, and one receives the same suboptimal performance as if customization hadn't been accomplished in the first place. Because it's been entirely eliminated. It's essentially a repeat of the old problem we used to have with Python when running "pip" instead of a package manager. But Wine doesn't ask first.

Summary of iRoot steps

See backstory below for the steps regarding this USB connected device.
  1. Download PC version from website.
  2. Enter the ~/.wine and delete all files
  3. Prepare Wine and .NET using winetricks
    $ mkdir .wine/Win7
    $ WINEARCH=win32 WINEPREFIX=/home/$USER/.wine/Win7 winetricks dotnet452 vcrun2010 corefonts wininet
  4. Unzip the downloaded installation file somewhere, eg ~/.wine/Win7install.exe
  5. Install the iRoot program using wine.
    $ WINEPREFIX=/home/$USER/.wine/Win7 wine explorer /desktop=somename,720x480 "/home/$USER/.wine/Win7/iRoot_1.8.9.21144_cid1005.exe"
  6. Connect the tablet via USB and be sure screenlock is off, and data transfer enabled.
  7. Run the program, using wine. You could make an iDesk icon or menu entry with same info.
    $ WINEPREFIX=/home/$USER/.wine/Win7 wine explorer /desktop=somename,720x480 "/home/$USER/.wine/Win7/iRoot/1.8.9.21144/Root.exe"

Summary of audio editor steps

  1. $ mkdir .wine/Win7/audio
  2. $ cp audio.exe .wine/Win7/audio/audio.exe
  3. $ WINEPREFIX=/home/$USER/.wine/Win7 wine explorer "/home/$USER/.wine/Win7/audio/audio.exe"

backstory

For me, there are four applications with operating system complexity inside Linux use: Linux itself, LaTeX, Wine, and Blender. Plus perhaps the only slightly lesser issues of ALSA audio and CUPS printing. This time it was Wine, due to the need for two Windows PC apps, one for audio editing, another (iRoot) for rooting a cheap tablet. The former was straightforward, but the tablet rooting app was apparently developed using the .NET framework, and requires a USB connection to the tablet. As is well known, even in Windows proper, .NET dependent USB connections are horrible. Then add Wine complexity. The plan was to work through the errors to get a good Wine installation, then do the same thing for a good application installation.

part 1 :: wine (12+ hrs)

Strategy: follow someone else. Bracing for turbulence and a lost weekend, I downloaded the iRoot PC app and began Googling. The closest I could find was the Garmin Nüvi PC application for updating maps. It is .NET framework dependent, with a USB connection. Chris Titus has a helpful video (11:45) and a helpful web page on the Garmin. I followed his steps, only with the iRoot app, but wasn't successful. It's important to be specific about failures, the USB device was detected but then...
... and the tablet did not appear in the iRoot app, in spite of being detected beneath the hood.

directory structure

Unless two applications can run on the same version of Windows, each application requires a separate installation of windows. I put them in folders as seen here.
That is, although I keep wine and winetricks in the system, I completely eliminate all their files inside of /home/foot/.wine/. I then add directories for each version of Windows required. Based on my iRoot application, and Chris Titus' stuff above, I knew I wanted to work it into Windows 7.
$ mkdir .wine/Win7
$ WINEARCH=win32 WINEPREFIX=/home/$USER/.wine/Win7 winetricks dotnet452 vcrun2010 corefonts

installation errors

During the .NET (dotnet452) portion of the installation, several files are downloaded from Microsoft. A status box (left) also appears, and displays the error that I lack "Windows Modules Installer Service" (C:\Windows\servicing\TrustedInstaller.exe). I sought this executable afterward, but could not locate it. Based on the terminal, it appears the lack of this file prevented a certain level of software use.
0060:fixme:service:QueryServiceConfig2W Level 6 not implemented
I hoped to perhaps remedy this via the cleanup tool, once the Win7 was in, the next step.
$ WINEARCH=win32 WINEPREFIX="/home/$USER/.wine/Win7" winetricks win7

registry cleanup

This doesn't have to be run, but I was curious about it. With Windows 7 in, I placed the cleanup tool just inside the Windows 7 installation, in /home/foo/.wine/win7/drive_c/. It should look like this:
I had read about the (.NET framework cleanup tool) and wanted this operating. Cleanup would also have to be placed in any other installed folders -- XP, 10, whatever -- in which a person wanted to check their .NET install. The prefix is the OS folder, and then I gave it a 720x480 desktop to run inside, in case the Cleaner requires one.
$ WINEPREFIX="/home/$USER/.wine/win7" wine explorer /desktop=cleaner,720x480 "/home/foo/.wine/win7/drive_c/cleanup_tool.exe"
As it ran, the Cleaner, among many thousands of errors it revealed, noted the lack of level 6 implementation. Here are some of the error notifications...
Level 6 is not implemented.
HKLM\Software\Microsoft\Windows\CurrentVersion\Installer\Components key is not present.
No product/patch data was found.

part 2 :: application (12+ hrs)

First run indicated some missing pieces from my installation
0054:err:wininet:open_http_connection create_netconn failed: 12029
... it appeared the program needed to dial home. So, I added the missing wininet.
$ WINEARCH=win32 WINEPREFIX="/home/$USER/.wine/Win7" winetricks wininet
Here's more of the garbled mess that popped up. The program itself indicated a bug.

dead ends

A collection of various things I tried and which were apparently irrelevant.

lack of Windows Module Installer Service

During .Net (aka. "dotnet452") installation, if the installer is unable to find the Windows Module Installer Service,then it provides an error window. There is a noticeable effect downstream from this.
For example, error messages will appear if one attempts to attach a USB device via USB. This is because Level 6 of the .Net installation was not met. The USB device will successfully be detected, but the device will not be able to send file information or be written to. The complaints will take a form similar to...
0060:fixme:service:QueryServiceConfig2W Level 6 not implemented
The situation has been encountered by others, for example as documented here.

linux library checks - AUR

One of my dead ends was checking the Linux libraries. Mine turned out to be fine, but I read of them being a problem for others and having similar problems. Eg, a Battlenet article noted some missing Linux libraries had led to fails. The only one I thought might be mine was hal, so I checked for it...
$ ldconfig -p | grep hal
... returning nothing. Hal is in the AUR,so it has to be built.I'd want the 32 bit version. My luck, yaourt is no longer functioning.
$ yaourt -Ss hal
package-query: error while loading shared libraries: libalpm.so.11: cannot open shared object file: No such file or directory
$ ldconfig -p | grep alpm
libalpm.so.12 (libc6,x86-64) => /usr/lib/libalpm.so.12
libalpm.so (libc6,x86-64) => /usr/lib/libalpm.so

... so it's annoying as heck. Time to move to yay, I suppose; yaourt getting just too unmaintained -- I'm not going to create softlinks to libraries and such. Buh-bye...

yay build

# nano /etc/sudoers
foo ALL=(ALL) ALL
... otherwise the build will fail. Then...
$ cd Downloads
$ git clone https://aur.archlinux.org/yay.git
$ cd yay
$ makepkg -si

Sunday, December 22, 2019

video card replacement - hdmi

Although it looks imposing and is potentially a solid choice, I became tired (2019) of the 2Gb nVidia GeForce GTX770 (GK104 Audio Controller onboard) that came with my system.
Maybe it's an nVidia thing, but it had the nasty habit of ramping-up sound instead of turning audio on immediately. This meant that, after any silence, sound always returned smoothly, however it made video editing impossible. Sound needs to match video precisely and, since we're not going to play back video on only this nVidia system, we need to know volumes exactly, not with system-specific audio ramping.

nVidia vs Radeon

According to the proprietary utility nvidia-settings (in the nVidia driver), my motherboard has a PCIe Gen3(16bit) slot. I'm not a gamer, but for Blender's sake, I doubled GPU RAM with a 4Gb Polaris based AMD Radeon RX560D.
Again, however, the main factor is having audio that works correctly. There was simply nothing I could do to stop the nVidia card audio ramping. All automuting, all of that was disabled, but the nVidia sound always ramped instead of immediate.

Remove nVidia software

Once replaced, i uninstalled the nVidia module in favor of amdgpu module.It's just sitting there and not being used so it doesn't really hurt anything, but it's a 200Mb of orphaned stuff. I ran # pacman -Ss nvidia to see what I had installed and removed all of them...
# pacman -Rdd libvdpau libxnvctrl nvidia nvidia-utils

audio

When I had the nVidia card, I was never able to pass the dreaded same-named sound card issue...
$ cat /proc/asound/modules
0 snd_hda_intel
1 snd_hda_intel
...which would sometimes provide sound and sometimes static.

libva v libvdpau

I still don't understand if I'm supposed to have both the Intel and the nVidia video hardware acceleration. I knew that va was intel and vdpau nVidia, so which/what to use on with the amdgpu and a Radeon. At some point, because Chromium appeared to favor vdpau, I installed vdpau, and did so by installing its utility, vdpauinfo...
# pacman -S vdpauinfo
... which also brought in libvdpau. Following this, Chromium opened normally, and YouTube functioned.

xorg

With the nVidia software removed and the amdgpu package installed, X refused to initialize. The error and the solution discussion are here. The solution required a change to /etc/mkinitcpio.conf...
MODULES=(amdgpu)
... and then
# mkinitcpio -p linux
After this, X loaded normally.

Wednesday, January 10, 2018

Latitude D520 Arch install

Problem: your grandparent or a teacher's assistant needs a work-a-day laptop, but you're not a first responder, professional athlete, or an investment banker. If you can carry one (5lbs), 2007 Latitude D520's are available on EBay for about $60. They are 64bit 2 core processors. Load 'em up with 2 Gigs of RAM, Arch Linux and IceWM: within an $80 budget, you've got a laptop that'll do common functions without much lag. It'll show movies, edit photos and audio. High CPU tasks like rendering Blender output, or other video editing, takes ages (so just avoid video editing).

CD (10 mins)

Download an ISO and check the MD5. Put in a fresh disc. I found it's best to burn using root -- some systems bark, even with group permissions configured, at cdrecord at user level. I typically add "eject" as a simple completion notification, but it's not needed.
$ cdrecord -scanbus
# cdrecord -dao -eject dev=0,0,0 install.iso
$ md5sum /dev/sr0

base CLI (runlevel 2) configuration :: 20 mins

There's no UEFI or other boot complexities on older systems. But if you have a newer system, get rid of UEFI. Format the disk with "fdisk -t" to create an MBR. 0x04. The only real question is whether to make multiple partitions. The instructions below include multiple partitions. If multiple partitions aren't desired, just make two primary partitions in cfdisk: a linux (83) SDA1 and a linux swap (82) SDA2, and jump from the step mounting on /mnt to the step with mkdir /mnt/etc
# mkswap /dev/sdb3
# swapon /dev/sdb3
# free -m [check swap is on]
# mount -rw -t ext3 /dev/sdb2 /mnt
# mkdir /mnt/home
# mount -rw -t ext3 /dev/sda1 /mnt/home
# mkdir /mnt/boot
# mount -rw -t ext3 /dev/sdb1 /mnt/boot
# 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
# mkdir /boot/grub
# grub-mkconfig -o /boot/grub/grub.cfg
# grub-install /dev/sda
# exit
# reboot

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 :: 30 mins

Used to be so simple, so I'm including it again here in case it returns some day:
# nano /etc/pacman.conf
[archlinuxfr]
SigLevel = Never
Server = http://repo.archlinux.fr/$arch

# pacman -Sy yaourt
However, even in past, one had to have base-devel installed, and to add oneself to the sudoers file. Unfortunately, editing sudoers is done through the visudo command, which uses those stupid vim commands:
# visudo
foo ALL=(ALL) ALL
However, yaourt hasn't been maintained since 2018, so the (only) way to get it is to build it from scratch out of AUR source, as in olden times. The AUR website has aur source. Be sure you've got wget installed (# pacman -S wget), retrieve the package, untar it, morph it into a pacman version ("makepkg"), then install it using pacman with a "U" flag. The "U" flag has pacman looking into the current directory instead of out over the Net. Prior to building any AUR helper (yaourt, aurman), you'll need to first build "package-query", also from the AUR.

Also there is a wikipedia page and reddit conversations. In spite of its weaknesses, I continued to use yaourt. I downloaded aurman, but was unable to compile it.
$ mkdir pkgs
$ cd pkgs
$ wget https://aur.archlinux.org/cgit/aur.git/snapshot/package-query.tar.gz
$ wget https://aur.archlinux.org/cgit/aur.git/snapshot/yaourt.tar.gz
$ tar xzvf package-query.tar.gz
$ cd package-query
$ makepkg -s
# pacman -U package-query[version]tar.xz
And then the same with yaourt thereafter.

dhcpcd timeouts/limit journalctl size :: 5 mins

If you're having dhcpcd timeout problems, they can show up in pacman and curl, and are usually due to IPV6. This ipv6 request mod has to be re-accomplished after every dhcpcd package update.
# nano /etc/dhcpcd.conf
# custom to stop ipv6 service request timeouts
noipv6rs
Systemd will log GB's and GB's of data if not limited
# nano /etc/systemd/journald.conf
SystemMaxUse=200K

X install :: 20 mins

These Dells have the 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.

wifi digression :: 60 mins

Some of these old Latitudes have the dreaded Broadcom 43 series card. For example, if users run lspci and the wifi readout line is this or similar...
Network controller: Broadcom Limited BCM4311 802.11b/g WLAN (rev 01)
... then it's unlikely the typical fix for older cards, # pacman -S wireless_tools will have effect. It's also unlikely anything will appear in either of these two verification steps...
# iw dev
# cat /proc/net/wireless
If this is the case, the easiest move is installing yaourt and building a b43 driver, but take note:
"BCM4306 rev.3, BCM4311, BCM4312 and BCM4318 rev.2 have been noticed to experience problems with b43-firmware. Use b43-firmware-classicAUR for these cards instead."
During that b43-firmware-classicAUR install, the following warning was displayed...
Please add $VISUAL to your environment variables
for example:
export VISUAL="vim" (in ~/.bashrc)
(replace vim with your favorite editor)
...and you may also encounter
~/.config/aurvote must have username and password. Run: aurvote --configure
...if you installed the yaourt rating app but hadn't configured it. You can use any username and pass you like. Reboot after this install, and something like this is normal:
# iw dev
phy#0
Interface wlan0
ifindex 3
wdev 0x1
etc..

QT or Gtk

I try to stick with one or the other to keep a smaller install and shorter update. Sometimes both become necessary. I prefer GTK (except gvfs), but VLC requires QT. QT is about 400MB, and typically pulls in PyQT. 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