New System Info (Dell Precision 3640)

Model number: Dell Precision 3640
Product number: WX520AV
MOBO mfr: Dell Inc.
MOBO Prod Name:0D4MD1
MOBO Version: A00
Processor Pkg: Socket 1200 LGA
Processor: Intel Core i9-10900K (10 Core, 20M cache, base 3.7GHz, up to 5.3GHz) DDR4 2933
Memory: 16GB 2X8GB DDR4 2933MHz UDIMM Non-ECC Memory
PCIe SSD: NVMe Class 40 M.2 SSD (256GB)
Hard disk1: Samsung SSD 860 (256GB)
Hard disk2: WDC WD10EZEX-75W (1TB)
Hard disk3: WDC WD10EZEX-08WN4A0 (1TB)
Graphic Card: Nvidia Quadro P620, 2GB, 4 mDP to DP adapter
Ethernet Card: Intel Corporation Ethernet Connection (11) I219-LM
Sound Card:Intel Corporation Comet Lake PCH cAVS
snd_hda_intel
Sound Card:NVIDIA Corporation GP107GL High Definition Audio Controller (rev a1)
snd_hda_intel
Wifi:Intel Corporation Wi-Fi 6 AX200
iwlwifi

That's all!
-gibb

List of Installed Packages with USE flags

Disclaimer:
The information in this site is the result of my researches on the Internet and of my experiences. This information below is solely used for my purpose and may not be suitable for others.

List of Installed Packages with USE flags:

The command to view the list of installed packages with used or unused USE flags are the following:# emerge -pve world

To view a particular package is to run grep:# emerge -pve world | grep -i rxvt-unicode

That's all!
-gibb

Steps for Maintaining Gentoo Server

Disclaimer:
The information in this site is the result of my researches in the Internet and of my experiences. This information below is solely used for my purpose and may not be suitable for others.

  1. # eix-sync
    This is same as below:
    root #emerge --sync
    root #cp -a /var/cache/eix/portage.eix /var/cache/eix/previous.eix
    root #eix-update
    root #eix-diff
  2. # glsa-check --list
    1. # glsa-check -t all
      When above command returns [N], execute this.
    2. # glsa-check -p $(glsa-check -t all)
      To see what packages would be emerged.
    3. # glsa-check -f $(glsa-check -t all)
      To apply the fix.
  3. # eselect news read
  4. # emerge -uUDavp --with-bdeps=y @world
    -u (--update): Updates pkgs to the best version available
    -U (--changed-use): Include installed pkgs where USE flags have changed since installation.
    -D (--deep): Forces emerge to consider the entire dependency tree of pkgs
    -a (--ask): Display what will take place
    -v (--verbose): Run in verbose mode:
    -p (--pretend): Display what *would* have been installed if -p weren't used
    --with-bdeps=y: Pull in build time dependencies that are not strictly required
    If no problems flagged in above, go to xxx
    Otherwise, fix any problem(s) flagged by the emerge --pretend, then go to #4 again.
  5. # emerge -uUDav --with-bdeps=y @world
    If any issue(s), fix them and go to #5 again.
  6. # emerge @preserved-rebuild
    Run this only if specified in output from above.
    @preserved-rebuild: Update pkgs that still use old libraries with new ones
  7. # emerge --ask --depclean
    Run this only if specified in output from above.
    --depclean: Cleans the system by removing pkgs that are not associated w/explicitly merged pkgs
  8. # dispatch-conf
    Tool that aids in merging the ._cfg0000_[name] files
  9. # eclean-dist --deep
    Clean the source files directory, /var/cache/distfiles
  10. # eix-test-obsolete
    Search for obsolete packages on the system
  11. Wait for at least 24 hours to a week or so, then go from beginning.

That's all!
-gibb

Getting HP Laser Jet Pro 200 color MFP working with Gentoo

Configuring a printer was never successful for me in the past. At one point, I was able to set it up on Slackware but when I did a test print, it came out either skewed or enlarged for some reasons. I couldn't figure out why it behaved that way, so I gave up.

Now, due to the COVID-19 pandemic, my kids are home-schooling and it had become unavoidable that I need to set up a printer on my Gentoo system. After struggling for close to a week, I finally found a way to configure it correctly and was able to print documents. For my future note, I've describe how to set it up on Gentoo.

Disclaimer:
The information in this site is the result of my researches in the Internet and of my experiences. This information below is solely used for my purpose and may not be suitable for others.

User and lp Group:

User need to be part of lp group to be able to print. If User needs to edit via cups web interface, he needs to be part of lpadmin. # gpasswd -a [USER] lp # gpasswd -a [USER] lpadmin

Configure cups:

cups need to be re-configed with zeroconf USE flag. # echo "net-print/cups zeroconf" > /etc/portage/package.use/cups # emerge --ask net-print/cups

Install hplip:

There is a Gentoo Wiki in HPLIP. To sum up, net-print/hplip needs to be installed with the snmp, static-ppds, hpijs and scanner USE flags.# echo "net-print/hplip snmp static-ppds hpijs scanner" > /etc/portage/package.use/hplip # emerge --ask net-print/hplip

Copy PPD:

PPD (PostScript Printer Description)is a file that describes the features and capabilities of the target printer. All PPD files are located in /usr/share/HP/ by default. They are gunzip'ed, so it needs to be decompressed and copied to /etc/cups/ppd/.

My printer is HP LaserJet Pro 200 color MFP M276nw. The closest PPD file I can file is hp-laserjet_200_colormfp_m276-ps.ppd.gz and that's the one I'm going to use. # cd /usr/share/ppd/HP/ # gunzip -d /usr/share/ppd/HP/hp-laserjet_200_colormfp_m276-ps.ppd.gz # cp -d hp-laserjet_200_colormfp_m276-ps.ppd /etc/cups/ppd/

Keyserver for gpg keys:

My printer needs a binary plugin for it to work according to HP's site. To install it, hp-plugin needs to be executed as a regular user with the -i option for the interactive mode.

However, it fails with error: Unable to recieve key from keyserver. This issue stumped me for a few days and I was almost about to give up installing the printer. Then I found a solution in a forum where it suggests to update one of python files with hard-coded keyserver name. Once the keyserver name was changed to something working, the installation of binary plugin went successfully.# nvim /usr/share/hplip/base/validation.py ========== ... class GPG_Verification(DigiSign_Verification): def __init__(self, pgp_site = 'pgp.mit.edu', key = 0x...) Change above where it says "pgp.mit.edu" to something working. For me, changing it to "ha.pool.sks-keyservers.net" worked. def __init__(self, pgp_site = 'ha.pool.sks-keyservers.net', key = 0x...) ... $ hp-plugin -i ... Done.

CUPS and HTTP Interface:

I tried many ways to install my printer from hp-setup with GUI and command line options but they all failed at the end, saying something like "No device found that support this feature." or "No installed printers found (or) Invalid printer device selected".

I stumbled again...

Then, I remembered that CUPS has HTTP Interface where you can add and manage printers. I was a bit skeptical about this but tried anyway.

  1. Start CUPS daemon and make it persistent after each reboot:# rc-service cupsd start # rc-update add cupsd default
  2. Go to http://localhost:631/ in a browser
  3. Go to "Administration" and click on "Add Printer"
  4. Choose "HP LaserJet 200 colorMFP M276nw (HP LaserJet 200 colorMFP M276nw)" and continue
  5. Make sure the connection is set to socket://[ip_address]|HP LaserJet 200 colorMFP M276nw and continue again
  6. Choose the correct model and also click on "Choose File" for PPD File
  7. Select the PPD file copied to /etc/cups/ppd/ and click on "Add printer"
  8. Click on "Set Default Options"
  9. Choose "Print Test Page" option from the "Maintenance" menu

If everything goes well, it starts printing a test page. If it fails for some reasons, I'd delete the printer at the step 4 and choose something else and repeat until it works.

That's all!
-gibb

Rip Music CD to flac, and More

Here is a list of commands to rip music CDs to flac, convert to mp3, and create a music CD.

Disclaimer:
The information in this site is the result of my researches in the Internet and of my experiences. This information below is solely used for my purpose and may not be suitable for others.

Ripping Music CD to flac:

# emerge --ask media-sound/abcde $ cp /etc/abcde.conf ~/.abcde.conf $ cp ~/.abcde.conf ========== ... FLACENCODERSYNTAX=flac FLACOPTS='-s -e -V -8' OUTPUTTYPE=flac ... $ abcde -o flac

Convert flac to mp3:

Here is a script or command line to convert flac files to mp3 using ffmpeg.$ for a in ./*.flac; do > < /dev/null ffmpeg -i "$a" -qscale:a 0 "${a[@]/%flac/mp3}" > done

Create Music CD:

To create a music CD from command line, we need a bit of preparation. If you need to normalize the volume of output files, you'd need to install media-sound/normalize.# emerge --ask media-sound/normalize

This will convert all files in the current directory to .wav files. I usually copy needed flac or mp3 files to /tmp and run these commands.$ for i in $( ls ); do ffmpeg -i $i $i.wav; done $ normalize -m *.wav $ cdrecord -v -fix -eject dev='/dev/sr0' -audio -pad *.wav

ffmpeg
  • -i INPUT: INPUT file(s)

normalize
  • -m: Enable mix mode
  • (-b: Enable batch mode)

cdrecord
  • -v: Increment the level of general verbosity by one
  • -fix: The disk will only be fixated
  • -eject: Eject disk after doing the work
  • dev=TARGET:Set the SCSI TARGET for the CD/DVD/Blu‐Ray-recorder
  • -audio: All subsequent tracks are written in CD-DA audio format
  • -pad: If the track is a data track, 15 sectors of zeroed data will be added to the end of this and each subsequent data track.

In case file names contain spaces, replace them with "_" (or something valid) before executing above commands.$ for f in *; do mv "$f" `echo $f | tr ' ' '_'`; done

That's all!
-gibb