Matt Jones Tech
  • Blog
  • Video Projects
  • Web Projects
  • Fix Audio on XFCE Chromebook

    Fix Audio on XFCE Chromebook

    The Problem

    After moving from GalliumOS to Xubuntu, I noticed that playing YouTube videos on both Firefox and Chromium would result in decent playback for a few minutes, but suddenly the audio would turn into a solid beeping tone while the YouTube video displayed the white loading circle on top of the video as it continued trying to play.

    The beeping sound would continue until I paused the video for long enough for the beep to stop on its own, or just close the tab. According to some forums around the net, it seemed to be an audio codec or driver issue. After a bit of digging through posts of similar but not exact audio issues, I found one that seemed to match my situation exactly.

    The Solution

    Apparently this was an issue with running a kernel that didn’t support and/or didn’t have a Sound Open Firmware (SOF) driver installed. Someone brought up an issue on their Github page and a solution was found and shared. This solution was also referenced in a few other places, so I gave it a shot and it 100% worked.

    You can install the drivers with this epic bash script (please check it out before running it):

    wget -qO- https://gist.github.com/heikomat/3fe272431b44b580c933bfb901a92257/raw | bash

    And once that script completes, tack on options snd_sof sof_debug=1 to /etc/modprobe.d/alsa-base.conf

    Reboot your computer and that should take care of the audio issues when playing videos or music.

    matt

    May 30, 2023
    Linux, Ubuntu
    linux, open source, ubuntu
  • Adjust Trackpad Sensitivity XFCE

    Adjust Trackpad Sensitivity XFCE
    xinput set-prop "Elan Touchpad" "Synaptics Finger" 1 1 1

    What are the values 1 1 1? This sets the sensitivity as close to the original ChromeOS as possible. Larger numbers will decrease sensitivity of various aspects. I never looked into which individual value represents.

    I’ve really enjoyed using GalliumOS on my Chomebook for genuinely the last 5 years. It’s been an essential modification that has truly unlocked otherwise unattainable capabilities of my pint-sized little ‘puter. However, it looks as if the sun may be setting on this hardware, but it’s pretty hard to tell, as it could be user error or some other bloat that I’m unaware of.

    The only thing I’ve grown concerned about is the fact that it appears that GalliumOS has lost support and/or interest and the project appears to have become abandoned. I tried a few other OS’s, and they just weren’t as good out-of-the box as GalliumOS. I love how they’d mapped out the keyboard to match just about every major function that was in the layout of the laptop keyboard.

    Volume, brightness controls, all the F keys were functioning as expected right after install. So, as time has moved on, I started getting fewer and fewer updates to GalliumOS and so I gradually became more and more concerned about the security of the OS as a whole. As a result, I’ve started exploring alternatives to GalliumOS that had a larger audience and have kept up with all the ongoing updates.

    Update Nov 4, 2023:

    Make this adjustment permanent

    In order to make these trackpad settings permanent, simply add the same command used above as a startup script:

    matt

    May 15, 2023
    Linux
    linux
  • Arch Failed To Commit Transaction (Invalid or corrupted package)

    Long story short, this error popped up when I was running an update in Manjaro using the Add/Remove Software program. As a result, the in-progress update failed, and I wasn’t able to get past it. Even after restarting my computer, restarting Add/Remove Software, I still ran into the same error. After some research, I discovered that apparently, somewhere along the way, one of my updates had gotten interrupted. (Which makes sense when your two year old son just goes around pushing the hard reset button (conveniently?) located on the front of my tower… or the glowing blue power button on my UPS… you get the idea.) So yeah, there was a solid chance a process or two was interrupted. Because of that interruption, there was a temporary file left in my pacman cache. Removing this incomplete temp file was solved as soon as that file was removed and the update was restarted.

    Solved error with sudo rm /var/cache/pacman/pkg/*.part

    Just as a side note, there is a similar error covered on my blog where Arch fails to build Nettle6

    matt

    January 15, 2021
    Uncategorized
    arch, linux, manjaro, package manager
  • Failed to Build Nettle6

    Hey guys, I was trying to build a copy of Local by Flywheel on Manjaro Linux, but ran into this error… ‘ Failed to build nettle6 ‘

    failed to build nettle6

    nettle6 is a dependency of Local, but after the attempted build of the package, I got the error failed to build nettle6 :

    ==> Verifying source file signatures with gpg...
        nettle-3.4.1.tar.gz ... FAILED (unknown public key F3599FF828C67298)
    ==> ERROR: One or more PGP signatures could not be verified!
    Failed to build nettle6

    If you happen to come across this error, just double check the key by running

    gpg --recv-key F3599FF828C67298

    Just plug in the gpg key from the error at the end of your gpg --recv-key call.

    In my case, that didn’t work. The resulting output was:

    ~ >>> gpg --recv-key F3599FF828C67298                                          
    gpg: keyserver receive failed: General error
    ~ >>>     

    If you’re like me and the key validation still fails, you can try a different key from another server using the --keyserver flag. For example:

    gpg --keyserver pool.sks-keyservers.net --recv-key F3599FF828C67298

    In my case, it shows that the new key was successfully imported.

    ~ >>> gpg --keyserver pool.sks-keyservers.net --recv-key F3599FF828C67298   [2]
    gpg: key F3599FF828C67298: public key "Niels Möller <[email protected]>" imported
    gpg: Total number processed: 1
    gpg:               imported: 1
    ~ >>>                                                                          

    Now, when I run the nettle6 package build again… it works! Hope this helps. There’s a great resource on this on the Manjaro forums.

    Again, this is a very specific error and solution, and it just so happened that I was having trouble with my gpg keys. This may not be the case for everyone, but I hope this article is helpful to you.

    matt

    September 21, 2020
    Linux
    arch, linux, manjaro, package manager
  • Open In Unity Not Working

    Open in Unity Not Working

    I’m trying to download some assets from the Unity Asset Store, but clicking ‘open in Unity’ is not working. Chrome prompts me with an “XDG-Open” dialogue. Even after selecting “ok”, nothing happens.

    So far, there are lots of complaints about the Unity Asset Store and how the only way to download some simple PDFs is via a giant, several GB Unity Editor.

    Regardless, if you just want to download some assets for learning like I do, I found a simple workaround:

    Open up the Unity Hub:

    Click Learn:

    Then Select the project you’d like to check out, and hit “Download”:

    The biggest problem with this workaround is that it only works for learning assets. I can’t seem to find a way to download assets that wouldn’t typically be categorized under ‘learn’. If anyone has any suggestions or ideas, feel free to let me know!

    By default, the project landed in my /tmp/ folder. Simply save the project to any location you like from inside the Unity Editor, or copy the contents of /tmp manually. Here’s some more information on how to copy projects. Hope this helps!

    Feel free to check out my first game! Thanks for stopping by.

    UPDATE:

    It appears that this issue is fixable. There’s a solid chance my xdg-open tool is not configured to open Unity when I click the “Open In Unity” link. I’m investigating further via these resources:

    https://askubuntu.com/questions/18418/how-to-set-which-application-is-launched-by-xdg-open

    https://askubuntu.com/questions/18418/how-to-set-which-application-is-launched-by-xdg-open

    matt

    August 4, 2020
    Game Design, Linux, Manjaro
    game design, games, linux, manjaro, Unity, Unity Asset Store
  • Failed to Commit Transaction (Conflicting Files) Manjaro

    How to fix Failed to Commit Transaction (Conflicting Files) Error in Manjaro Linux

    This error is usually thrown after an attempted package upgrade using either pacman, the GUI, or another package manager. Below is an example of the error:

    This can happen with pretty much any package, depending on what else you’ve got installed on your system. Basically, pacman is saying it can’t go through with the upgrade because there are some conflicting files that exist on your machine that is preventing the upgrade from progressing any farther. Here’s what you can do to solve this.

    Step 1

    Check to see which package owns the file in question. You can do this by running pacman -Qo /path/to/the/file. If that prints out the name of a package, then you will have to decide whether or not to uninstall the package with the conflicting package by using sudo pacman -R nameOfThePackage.

    Step 2

    If the file in question is not owned by any package (as was the case for my situation), you can simply delete the file in conflict. You can do this by running sudo rm /path/to/the/file. Once the file has been removed, you’ll need to run the update process again to confirm that all the conflicting files in question have been resolved.

    To find out more about this issue and similar issue when updating packages, feel free to check out the pacman troubleshooting guide on the Manjaro wiki site.

    If you want to use the package manager to install DaVinci Resolve, check out this post

    matt

    May 5, 2020
    General Computing, Linux, Manjaro
    arch, linux, manjaro, package manager, troubleshooting
  • How to Fix Unable to Lock Database Error in Arch Linux

    How to Fix Unable to Lock Database

    When I try to update my machine by running sudo pacman -Syyu I get an error saying it’s unable to lock the database. Below is an example:

    But as you may have noticed, by removing a special database lock file, I was able to solve the issue. You can do this with sudo privileges by running:

    sudo rm /var/lib/pacman/db.lck

    The above method is dangerous

    I’ve done this before, and it’s worked perfectly fine with no issues. But the reason the db.lck file exists is to ensure that only one program can run updates at a time. This prevents partial updates, or interrupted updates, or conflicts, or any other problems that can occur when two programs try to do the same update at the same time.

    So before you go deleting your db.lck file like I did, do yourself a favor and make absolute certain that there are no other programs trying to update anything. You can use the lsof command to check what other programs are using the db.lck file. lsof is short for “list open files”.

    The lsof command will either return nothing or a single number. If it returns nothing, that means that no process is currently using that file. If it does return a number, then that is the ID of the process currently using that file. In order to delete the file safely, you’ll need to kill that process first. You can do that by running sudo kill -9 <process_id>

    Hope that helps! Please leave a comment below if you have any questions. You can find more information on using the command line, check out this awesome book called The Linux Command Line. It’s free!

    matt

    April 28, 2020
    General Computing, Linux, Manjaro
    arch, linux, manjaro, package manager, troubleshooting, ubuntu, update
  • How to Use Yubikey on Linux

    How to Use Yubikey on Linux

    Initial Setup:

    1. Download the YubiKey Manager. This will allow you to modify specific properties of your key, and turn certain features on or off.
    2. Once you’ve installed the manager, you’ll need to make sure that you have U2F mode enabled on your key.
    3. Next, download or create a copy of a special rules file provided by Yubico. It can be found on their Github repository: https://github.com/Yubico/libu2f-host/blob/master/70-u2f.rules. Once you have the file, copy it to /etc/udev/rules.d/. If you already have a file in that directory named 70-u2f.rules, make sure that the content looks like the file from the Github repo.
    4. NOTE: If your version of UDEV is lower than 188, you’ll need the old rules file instead. If you’re unsure of your UDEV version, simply run sudo udevadm --version in a terminal.
    5. Save your file, then reboot your system.
    6. Make sure you’re running Google Chrome version 38 or later. You can use your YubiKey in U2F+HID mode starting in Google Chrome version 39.

    Additional Tools:

    Yubico provides a proprietary 2FA authentication tool that enables use of the key with services such as Protonmail. It can be downloaded from their site.

    Another tip:

    If you’re having trouble getting your YubiKey to show up on Linux (I’m running Manjaro), you’ll want to make sure you’re running a service called pcscd. To run it, just open a terminal and run sudo systemctl start pcscd. Keep in mind, that will only start the daemon running. If you reboot your computer and stick your YubiKey in later, it won’t be recognized unless you start the pcscd daemon on boot. You can do this by running sudo systemctl enable pcscd. This will create a symlink to the pcscd.socket file, and it should start the daemon on boot. Once you’ve done that, you’re good to go!

    June 2023 update:

    Running a fresh install of Xubuntu on an Acer Chromebook, I was able to use Yubikey at Google sign-in on Firefox with zero Yubikey-specific package installs, no drivers, and largely out-of-the box. It would seem that none of the work described above is required anymore

    matt

    March 31, 2020
    General Computing, Lifestyle, Linux
    2FA, cybersecurity, lifestyle, linux, security, yubico, yubikey
  • How To Pause and Resume FFMPEG

    How to Pause and Resume FFMPEG

    This is the story of how I learned how to pause and resume ffmpeg. I’m a pretty big multitasker when it comes to computing. I usually end up with a few hundred tabs open when I’m browsing and I always have a terminal open. Last week I was doing a job using Davinci Resolve.

    In order for me to complete the job, I needed to convert about 60 or so .MTS files into Apple ProRes .MOV files. The entire project contained over 10 hours of content, and every file needed to be converted.

    So I employed my fancy batch script to loop through all the .MTS files in a given folder, transcode them one at a time, and output them to another folder. Such an aweseome script, and I use it very often. But eventually, the way I was working through the project, I ran into a problem.

    I needed to render a timeline out of Resolve, but my resources were already being used on this massive batch render. So how do I solve this problem?

    TLDR; Here’s the Answer

    It pretty much comes down to managing your Linux processes. If you’ve got a lot going on, and you need more control over which process gets the most resources, you have full control over that. And by the way, this trick can be used for ANY Linux process, not just FFMPEG!

    Typically, if you have a running process in a terminal window, you can kill it using CTRL+C. That will kill the process, and you’ll have to start the whole command over again if you want to resume the task. So if I hit CTRL+C in the middle of my ffmpeg transcode… I’d end up with some finished files, a half-encoded file, and an incomplete batch. That sucks.

    But there’s a different command that just stops the process instead of killing it. Basically pausing it in its current state, waiting for you to do something else. CTRL+Z is that magic command. This will pause a running process and send it to the background, and assigns that process a number. This will also return control of the terminal window back to you.

    If you run a different task, then CTRL+Z, you’ll have multiple processes paused in the background, each with a number.

    To see all the paused background jobs, you can simply run jobs to see a list of paused jobs.

    Now that my running ffmpeg process is paused and in the background, I can render out that Davinci Resolve sequence without overloading my system. Awesome!

    The fg Command

    Okay, now my Davinci Resolve render is complete! I’ve delivered that sequence, but I need to continue my batch encode so I can finish the rest of the project. To bring that ffmpeg process back to the foreground and pick up where I left off, all I have to do is use the fg command.

    The fg command can either take a job number as a parameter, or no parameter at all. If you don’t specify a job number, it will bring the default job [1] to the foreground and continue running that job.

    That’s it!

    The bg Command

    If you have a running process that you want to keep running, but regain access to the terminal input, you can simply hit bg. That’ll keep the process going, but send it to the background. Just remember- CTRL+C doesn’t work on background processes. In order to kill it, you’ll need to bring it to the foreground with fg.

    matt

    March 24, 2020
    FFMPEG, Linux, Video Editing
    ffmpeg, jobs, linux, processes, tasks
  • How to Add Swap in Manjaro

    How to Add Swap in Manjaro

    Hey guys! If you’re hear, you probably already know what RAM is and you’re excited to learn how to add swap in Manjaro. If not, this is sort of a follow-up post to how to download more RAM. Anyway, let’s get started!

    Using a Swap File

    There’s a ton of different ways to add swap to your system, some more advantageous than others. In my experience, it’s always been easier to add swap to an existing install by using a swap file. First, just confirm that you don’t already have swap enabled. To do this, just run sudo swapon. If that command does not return any output, then you don’t have swap enabled. Also, if you have and/or use htop, it will actually display your swap status right below your RAM usage bar. if it reads empty and 0/0kb, then you don’t have swap enabled. Great! Now we can add a swap file.

    Creating and initializing a new swap file

    To create an initialize a new swap file, we’ll be using the fallocate command. To initialize a 16GB swap file just run the following in a terminal:

    sudo fallocate -l 16G /swapfile

    then run: sudo mkswap /swapfile

    Setting permissions for your new swap file

    Manjaro will likely give you a warning about changing the permissions of your swap file. You can change permissions using the chmod command. The swap file should only be readable and writable by the root.

    sudo chmod 0600 /swapfile

    Enabling your new swap file

    Enable your new swap file by running the following:

    sudo swapon /swapfile

    Make your changes permanent

    Make sure Manjaro knows to use your swap file every single time it boots up. Do this by running:

    sudo bash -c "echo /swapfile none swap defaults 0 0 >> /etc/fstab"

    And that’s it! The only thing left to do is reboot and just double check to see if your swap is up and running. Again, you can just run those commands from the beginning of the tutorial swapon or htop and you should be good to go! Happy blending!

    matt

    January 8, 2020
    Blender, General Computing, Linux
    Blender, general com, linux, manjaro, RAM, swap memory
1 2 3
Next Page

Prove all things; hold fast that which is good. 1 Thess 5:21