Friday, December 06, 2024

Cura Loading Models Slowly/Delay (version 5.6 +)

I recently upgraded UltiMaker Cura from version 5.2.1 to version 5.9.0 and when I did it loads models very slowly, or better said, it has a long delay loading the model.  I was not getting this delay in version 5.2.1.  After some internet researching I learned that it was a preinstalled Marketplace Extension called USB Printing that was causing it.  So to solve this delay, if you don't need USB Printing, you simply just disable it.

First open Cura and in the upper right you'll see a button labeled MARKETPLACE.  Click on it.  


Clicking on MARKETPLACE opens this Marketplace window.  Now click on the GEAR ICON (see red arrow in below image).


Once you've clicked on the Gear Icon you'll see a list of preinstalled extensions one of which is called USB PRINTING.  Simply click on the DISABLE button beside this extension to turn it off.  In the below picture it is turned OFF (blue button labeled "Enable" means it's OFF, black button labeled "Disable" means it's ON)


Now simple Close and Restart Cura and your models will load much faster without an annoying delay.  


NOTES:  I am using Ubuntu 24.04.1 and I was getting this delay behavior in bother the APPIMAGE and FLATPAK versions of Cura.  Cura Version 5.2.1 does NOT have this behavior.  This workaround fixes this delay in both the Appimage and Flatpak versions of Cura.

Sunday, November 10, 2024

Installing A.I. Text to Image FOOOCUS (runs locally)

Want to have your own Text to Image A.I.?  Let's get one up and running on Ubuntu 24.01.1 (I had it running on 22.04 too).  Let's install FOOOCUS (yes that is really three 'O's).  The Fooocus project is built entirely on the Stable Diffusion XL architecture and uses a local web front end.  Under the ADVANCED option on the web front end you can easily just tick a box to change the style and there are a lot of them.  You can also change the resolution of the generated images.  For more information about Fooocus or to find instructions to get it running on a Windows or Mac or different ways to install it on Linux check out their GIT page.

You should have a modern graphics card but you don't have to, it will run on CPU only but slowly.  According to the GIT Page you'll run about 17 times slower without a modern graphics card and you'll need a minimum of 32gb of ram.  I'm using a Nvidia RTX 3060, 32gb ram, AMD 5900X CPU and generate an image in about 30 to 45 seconds depending on settings.   

From their GIT Page here's a list of GPUs, GPU's minimum ram, minimum system ram needed and what you can expect performance wise.

Nvidia on Linux/Windows
GPU Card - GPU - System - Note
RTX 4XXX - 4GB - 8GB - fastest
RTX 3XXX - 4GB - 8GB - faster than RTX 2XXX
RTX 2XXX - 4GB - 8GB - faster than GTX 1XXX
GTX 1XXX - 8GB - 8GB - only marginally faster than CPU
GTX 9XXX - 8GB - 8GB - faster or slower than CPU

Linux AMD GPU
GPU Card - GPU - System - Note
AMD GPU - 8GB - 8GB - Via ROCm, about 1.5x slower than Nvidia RTX 3XXX

Windows/Linux/Mac
GPU Card - GPU - System - Note
CPU Only - 0GB - 32GB - About 17x slower than Nvidia RTX 3XXX

Windows AMD GPU
GPU Card - GPU - System - Note
AMD GPU - 8GB - 8GB - Via DirectML (* ROCm is on hold), about 3x slower RTX 3XXX

MAC 
GPU Card - GPU - System - Note
M1/M2 MPS - Shared - Shared - About 9x slower than Nvidia RTX 3XXX


SAMPLE IMAGE

Enough selling it, lets get it up and running.

We will be using the Linux (Using Python Venv) version.  Your Linux needs to have Python 3.10 or greater installed, and your Python can be called with the command python3 with your venv system working; 

Open a Terminal Window and enter the following command, waiting for each one to finish before executing the next one (some will take a few minutes to execute).

git clone https://github.com/lllyasviel/Fooocus.git

cd Fooocus

python3 -m venv fooocus_env

source fooocus_env/bin/activate

pip install -r requirements_versions.txt


Once that's done you launch the software with:

source fooocus_env/bin/activate

python entry_with_update.py


If you want to open a remote port;

source fooocus_env/bin/activate

python entry_with_update.py --listen

For additional information you should really read the GIT PAGE for FOOOCUS

Saturday, November 09, 2024

Ubuntu 24.04.1 AppImages Not Working

I upgraded from 22.04 to 24.04.1 on my Ubuntu box and some of my AppImages stopped working. Not all of them just a few.  First to get AppImages working at all, you have to install libfuse2t64, which is different from what you need on 22.04.

To install libfuse2t64 open a Terminal Windows and run the following command:

 sudo apt install libfuse2t64

Even after this, some AppImages still won't work.  They give an error something like this:

[:FATAL:setuid_sandbox_host.cc(158)]

The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that /tmp/.mount_ObsidiOpBPaM/chrome-sandbox is owned by root and has mode 4755.

This is a known issue with no time frame listed for a fix.  The only work around for this I could find is to run your AppImage with the  "--no-sandbox" option like this:

./Appimage_File_Name.AppImage --no-sandbox

This allows your appimages to run but they will NOT BE SANDBOXEDKnow that this could be a problem if you get a rouge appimage so only use this solution if you really need the app and are aware of the risks you are taking.

Fixing Virtualbox after upgrading to 24.04.1

 After I did an upgrade from Ubuntu 22.04 to 24.04.1 I received an Error when trying to run my Windows 10 install in Virtual Box.  The fix was easy:

1.  Open a Terminal Window.

2.  Navigate to \sbin\  (in the root directory)

3.  Run the command:

     sudo vboxconfig

After the command completes, you should be good to go now.


 


Error when using sudo apt-get update: N Skipping acquire of configured file 'main/binary-i386/Packages'

I upgraded from 22.04 to 24.04.1 and while fixing some of source files and running a "sudo apt-get update" to make sure my 24.04.1 system files were up to date I received the following "Error" (really not an "error" just a NOTE):

"N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'https://packages.microsoft.com/repos/edge stable InRelease' doesn't support architecture 'i386'"

The "N" at the beginning means NOTE not ERROR (that would be an "E").  Anyway if you want to make this NOTE go away, do the following:

1.  Open a terminal window and type:

     sudo gedit

2.  Use the OPEN Button in Gedit and navigate to the following directory:

     \etc\apt\sources.list.d

3.  Once in that directory, find the .sources file you are getting the NOTE about:
     In my case it was these two .sources:

          google-chrome.sources
          microsoft-edge.sources

4.  Open the offending .sources file in Gedit and ADD the following line:

     Architectures: amd64

     Your .sources file will look like this when done:

         Types: deb
         Architectures: amd64
         URIs: https://packages.microsoft.com/repos/edge/
         Suites: stable
         Components: main
         Signed-By: -----BEGIN PGP PUBLIC KEY BLOCK-----
       
        (Your encoded PGP Key{looks like a block of random letters})


5.  Once you're done editing the .sources files in Gedit save it, run "sudo update" and you should be good to go, no more NOTEs (errors) when updating your system files.


What this NOTE is telling you is that there is no 32 bit version (i386) of the app you are trying to update so it's proving you with a NOTE to tell you this.  Adding the Architectures: amd64 tells update to only check for 64 bit versions of your app.




Thursday, September 26, 2024

Solaar, Logitech Unified Mouse/Keyboard Configuration App

 I bought a new Logitech M720 Mouse.  It can connect via Bluetooth or a Logitech Unified USB Dongle.  In addition, it can connect to three different device.  Since I already have a Logitech keyboard that is using a unified USB dongle I wanted to pair the new mouse with the old unified USB dongle.  There was no way to do this through hardware and the instructions said you had to use the Logitech software on either a MS Windows Machine or and Apple.  After a little research I found a nice little app called Solaar.  It gives you a way to communicate with your Logitech hardware (mouse/keyboard/unified USB receiver) and pair your peripherals with the unified USB receiver.  It also lets you change some of those peripherals settings, basically giving you a Linux version of the Logitech software.

To install it on Ubuntu 22.04 simply open a Terminal Window and type:

sudo apt install solaar

When it's done simply run the solaar app by typing solaar into your terminal window or finding the app in your start menu.  You should see your Logitech Unified USB Dongle listed.  If not just unplug and plug the dongle back in.  Once you see the dongle simply highlight it and click on the "Pair New Device" button in the lower left corner and follow the onscreen instruction.



Clicking on the different devices you will get their configuration setting and see their battery levels.  Click on the Lock Icons to change the setting.  Lock them back when finished.  Notice in my screen shots my old mouse is grayed out because it is turned off.  My unified USB dongle said it can have 6 devices connected to it.  I currently have 3.

My Keyboard Settings

My M720 Mouse Settings



The Solaar App said it can communicate with a lot of Logitech devices so check it's GitHub page for more information https://github.com/pwr-Solaar/Solaar

Wednesday, August 28, 2024

Installing and Trouble Shooting CHIRP Radio Programming Software


I bought a Baofeng UV 21R and needed to program it.  After a little research I figured out I could use a piece of software called CHIRP.  Installing CHIRP on Ubuntu 22.04 is not straight forward as it should be and once it's installed you, may run into issues getting your programming cable to be recognized. I did.  




Let's start with installing CHIRP:

1.  Download CHIRP here.
https://archive.chirpmyradio.com/chirp_next/next-20240821/
(Click on the Download the latest CHIRP-next build here link on the download page)

2. Once on the download page, your want to download the chirp-20240821-py3-none-any.whl version by right clicking on it's link and selecting "SAVE LINK AS" option. Put it in your HOME directory root.

NOTE that the number in the middle of the file name will change as the software is updated over time.  Make a note of the name of the file you downloaded as you will need this file name in the following steps.

3.  Now we need to check to see if you have Python version 3 or greater installed on your system.  Open a Terminal Window and type the following followed by the ENTER key:

python3 --version

If you get an Error after this command then you don't have Python3 installed and you will need to do the following three command to get it installed before continuing:

sudo apt install
sudo apt upgrade
sudo apt install python3

4.  Once Python 3 or greater is installed you now need to install the Python3-wxgtku interface environment to your Python install. Open a Terminal Window and run the following command to install python3-wxgtk4.0:

sudo apt install python3-wxgtk4.0 pipx

5.  Now you will need to add your USER to the "dialout" group by typing the following in Terminal Window (replace <username> with your actual username):

sudo usermod -aG dialout <username>

6.  Now let's install the CHIRP software we downloaded in step 2 (remember the file name I'm using here my be different from the file name you downloaded).  Open a Terminal Window and navigate to the root of your Home directory where you saved the chirp-20240821-py3-none-any.whl file you downloaded in Step 2.  Run the following command

pipx install --system-site-packages ./chirp-20240821-py3-none-any.whl

 NOTE: your file will have a different name then the one I'm using here.  Use your file name, not mine.

7.  Run CHIRP from the Command Line Terminal by typing the following command into a Terminal Window:

~/.local/bin/chirplocal/bin/chirp

8.  Once the software starts connect your USB programming cable to your radio, turn your radio on, and connect your USB cable to your computer.  In CHIRP go to the menu Radio / Down From Radio. You should now see a popup window that looks like this image.  For Port you are looking for something like what I have here "ttyUSB0" the "0" part may be different than mine.  If you do not see something like this for PORT then you need to go to the Addition Steps / Trouble Shooting section below.  For Vendor I have baofeng radios so I picked it.  For Model I have a UV 21R but it is not in the list but the UV-17Pro works for my radio.  Once you click OK you should get an option to Download (read) your radio's memory.  If you get a list of Freqs. in a spreadsheet like layout, congratulation! your good to go and can make any changes you need to your radio and write those changes back to your radio and save your radios file for later recall.  If you don't get the spreadsheet then see the  Addition Steps / Trouble Shooting section below.



Addition Steps / Trouble Shooting


If something went wrong then here are a few things your can try.  

First add permissions for your USER to use the ttyUSBO port by typing the following into a Terminal Window:

sudo usermod -a -G $(stat -c %G /dev/ttyUSB0) $USER

NOTE: Your ttyUSB0 maybe have a different end number, mine here is "0".  If your number is different replace the ttyUSB0 part of the above command with your port name.  The $USER part does NOT need changed unless you are logged on as a different user than the one that needs to use CHIRP.



If that doesn't fix your problem try the following:

In a Terminal Window type the following Command:

lsusb

you should see something that looks like this image


Notice the line:

Bus 005 Device 005: ID 1a86:7523 QinHeng Electronics CH340 serial converter

That is your Programming cable and means that your computer can see it.  This is a good thing but something is interfering with it.


Now run the the following command in a Terminal Window:

sudo dmesg

It will return a long response but the end will look something like this image:


Notice that "brltty" is overriding our ttyUSB0 port (both are trying to claim channel 341) brltty is used by Linux's Virtual Keyboard on my system and I don't need it so I just uninstalled  brltty with the following command from a Terminal Windows

sudo apt remove brltty 


After that everything worked as expected in CHIRP. 


Thursday, April 04, 2024

XZ Utils - Checking the Installed Version

XZ Utils has been affected by a backdoor malware. Versions 5.6.0 and/or 5.6.1 are the affected versions. Want to see what version of the XZ Utils you are running? Open a Terminal Window and type the following:

xz --version

Mine returned the following (I'm running Ubuntu 22.04):

xz (XZ Utils) 5.2.5
liblzma 5.2.5

So I'm running version 5.2.5.  If your's returns versions 5.6.0 or 5.6.1, you have the version that has the backdoor malware in it and you need to take action to downgrade your XZ Utils to an older version that does not contain the backdoor.

I am not a security experts and you should research this issue yourself if your affect, Use this solution at your own risk.  If you're running Ubuntu you can update XZ Utils by typing the following in a Terminal Window:

sudo apt-get update 

sudo apt-get install --only-upgrade xz-utils

In this case the Update with actually downgrade you to a non backdoor version.