<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:base="https://illuminatedcomputing.com/">
  <id>https://illuminatedcomputing.com/</id>
  <title>Illuminated Computing</title>
  <updated>2026-01-02T00:00:00Z</updated>
  <link rel="alternate" href="https://illuminatedcomputing.com/" type="text/html"/>
  <link rel="self" href="https://illuminatedcomputing.com/tags/linux/atom.xml" type="application/atom+xml"/>
  <author>
    <name>Paul A. Jungwirth</name>
    <uri>https://illuminatedcommputing.com/</uri>
  </author>
  <entry>
    <id>tag:illuminatedcomputing.com,2026-01-02:/posts/2026/01/nvidia-geforce-rtx-5070-ti-on-linux/</id>
    <title type="html">GeForce RTX 5070 Ti on Linux (Debian 13)</title>
    <published>2026-01-02T00:00:00Z</published>
    <updated>2026-01-02T00:00:00Z</updated>
    <link rel="alternate" href="https://illuminatedcomputing.com/posts/2026/01/nvidia-geforce-rtx-5070-ti-on-linux/" type="text/html"/>
    <content type="html">
&lt;p&gt;I got a GeForce RTX 5070 Ti GPU for Christmas. I want to do some AI stuff with it. Maybe I’ll have something about that to post soon. But getting it to work on my system was really a chore! I’m running Debian 13 with a ROG STRIX B550-F motherboard (not the wifi version).&lt;/p&gt;

&lt;p&gt;After I put it in and tried to boot, I saw Grub’s selection screen, but almost immediately my monitor went black, and within 10 or 20 seconds it lost its connection entirely.&lt;/p&gt;

&lt;p&gt;By adding an extra &lt;code&gt;echo&lt;/code&gt; line after &lt;code&gt;initrb&lt;/code&gt; in grub I could see that at least that part was running. But it was dying soon after, and I had no messages to diagnose the problem. Doing something like &lt;code&gt;journalctl -b -1&lt;/code&gt; gave nothing (or rather info from the boot prior).&lt;/p&gt;

&lt;p&gt;Adding modeset stuff to grub didn’t help. Adding &lt;code&gt;noacpi&lt;/code&gt; or &lt;code&gt;pci=noacpi&lt;/code&gt; didn’t help. Turning off ACPI altogether with &lt;code&gt;acpi=off&lt;/code&gt; let me boot though. I didn’t have working graphics, but I could Ctrl-Alt-F3 to a console and run commands.&lt;/p&gt;

&lt;p&gt;Even after installing nVidia’s driver, I didn’t have a working display. I followed &lt;a href="https://docs.nvidia.com/datacenter/tesla/driver-installation-guide/index.html"&gt;their instructions for the open-source driver&lt;/a&gt;, which gave me version 590.48.01. (Their old closed-source driver doesn’t support newer cards like the 5070 Ti.) This &lt;a href="https://www.reddit.com/r/debian/comments/1jyzgrx/the_correct_way_to_install_newer_nvidia_drivers/"&gt;reddit thread&lt;/a&gt; helped too. Basically I did this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;apt-get install linux-headers-amd64
apt-get install linux-headers-$(uname -r)
wget https://developer.download.nvidia.com/compute/cuda/repos/debian13/x86_64/cuda-keyring_1.1-1_all.deb
dpkg -i cuda-keyring_1.1-1_all.deb
apt-get update
apt-get install nvidia-open&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Then I could run &lt;code&gt;nvidia-smi&lt;/code&gt;, and &lt;code&gt;lsmod | awk 'NR==1||/nvid/'&lt;/code&gt; showed &lt;code&gt;nvidia_uvm&lt;/code&gt;, &lt;code&gt;nvidia&lt;/code&gt;, and &lt;code&gt;drm&lt;/code&gt;. Also I could see from &lt;code&gt;mokutil --sb-state&lt;/code&gt; that I was running with SecureBoot disabled, which Google AI thinks is a good idea.&lt;/p&gt;

&lt;p&gt;But my display problems continued. When I ran &lt;code&gt;startx&lt;/code&gt; by hand I could see a segfault in &lt;code&gt;/var/log/Xorg.0.log&lt;/code&gt;. Later I got this to go away (perhaps it was adding grub commands to blacklist nouveau sooner?), and then X would start, and with &lt;code&gt;pstree&lt;/code&gt; I could see that xfce was running and even restoring commands from my session, like terminals and firefox. But the display wouldn’t switch: I was still looking at the console, with some messages printed by X.&lt;/p&gt;

&lt;p&gt;In the boot log I saw errors about not finding the DRM device, and before that there were messages about IRQ problems for the PCI device. There was a recommendation to use &lt;code&gt;pci=biosirq&lt;/code&gt;, but that didn’t help. (I think that hint is for really old systems anyway.) I figured probably &lt;code&gt;acpi=off&lt;/code&gt; was messing things up.&lt;/p&gt;

&lt;p&gt;I tried upgrading my motherboard BIOS. It was a few years out-of-date. I installed the latest version (3635, published 2025-11-06 with build date 2025-09-30). After unzipping, I renamed the file to &lt;code&gt;RSB550FG.CAP&lt;/code&gt;. Then I formatted an 8GB USB drive with &lt;code&gt;mkfs.vfat --mbr=yes -I -F 32 /dev/disk/by-id/usb-SanDisk_Cruzer_Fit_4C532000030816101033-0\:0&lt;/code&gt;. Then I copied the file to the root of the drive, ran &lt;code&gt;sync&lt;/code&gt;, and yanked the USB stick. With case power on but the computer off, I stuck the USB into the Flash BIOS port in the back and held down the Flash BIOS button for a few seconds. When I let go, the USB activity light started blinking. If I shaded the motherboard panel I could see that the Flash BIOS light was blinking too. So I let it run for 5 or 10 minutes, and when I checked the blinking had stopped. I booted, and the BIOS still worked!&lt;/p&gt;

&lt;p&gt;Somehow this made grub much slower. Every keystroke took a second or two to register, and I easily lost letters. I tried some BIOS tweaks, like turning off Legacy USB support. But the only thing that worked was changing &lt;code&gt;GRUB_GFXMODE&lt;/code&gt; to &lt;code&gt;1024x768&lt;/code&gt;. Actually &lt;code&gt;640x480&lt;/code&gt; was even better, but all the lines wrapped and it was unreadable. I’m pretty sure a lower resolution shouldn’t be needed. I think flashing the BIOS wiped all my old settings, so maybe there is some better way to restore grub’s performance, but I haven’t found it yet.&lt;/p&gt;

&lt;p&gt;Anyway, the BIOS upgrade didn’t solve my problems. Allowing ACPI still caused a failure right after starting the kernel. I suspected that a proper fix to &lt;code&gt;acpi=off&lt;/code&gt; would do the trick. I found &lt;a href="https://medium.com/@mbonsign/complete-guide-for-nvidia-rtx-5070-ti-on-linux-with-pytorch-358454521f04"&gt;this article about using the 5070 Ti on Linux&lt;/a&gt;, and I started changing BIOS settings. The issue turned out to be “Above 4G Encoding” (under “Advanced &amp;gt; PCI Subsystem Settings”). For me it was disabled. When I enabled it, suddenly everything worked.&lt;/p&gt;

&lt;p&gt;That’s it. I haven’t tried installing &lt;code&gt;cuda-toolkit&lt;/code&gt; yet, but that’s next. I’ve had an AMD card for years. A year or two ago I got ROCm compiled, after much struggle, but pytorch would just segfault. I’m excited to play around with AI a bit now.&lt;/p&gt;

&lt;p&gt;Anyway, “Above 4G Encoding” was definitely not in Google AI’s many, many recommendations as I searched for solutions, so perhaps this blog entry will go into its next training and help someone out.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <id>tag:illuminatedcomputing.com,2010-03-20:/posts/2010/03/rsync-and-exclude-from/</id>
    <title type="html">rsync and --exclude-from</title>
    <published>2010-03-20T00:00:00Z</published>
    <updated>2010-03-20T00:00:00Z</updated>
    <link rel="alternate" href="https://illuminatedcomputing.com/posts/2010/03/rsync-and-exclude-from/" type="text/html"/>
    <content type="html">
&lt;p&gt;Lately I’ve been looking for a better backup solution, and I settled on rsync. If you want a good tutorial, you can find one easily enough by googling. But I had a lot of trouble finding good documentation about the &lt;code&gt;--exclude-from&lt;/code&gt; option. What I found was either too cursory or just plain wrong. So I did some tests, and here are my results. I’m pleased to say that rsync’s &lt;code&gt;--exclude-from&lt;/code&gt; option has very full functionality!&lt;/p&gt;

&lt;p&gt;This option names a file, as in &lt;code&gt;--exclude-from=my-excludes.txt&lt;/code&gt;. That file contains a list of patterns, and if one of the patterns matches a given file or directory, rsync leaves that file/directory out of the backup.&lt;/p&gt;

&lt;p&gt;These patterns may be full filenames, as in &lt;code&gt;log&lt;/code&gt;, or they may use wildcards, as in &lt;code&gt;*.bak&lt;/code&gt;. If a directory is excluded, then all the files within it are excluded, too. (This sounds obvious, but I’ve seen other programs with exclude files that just leave out the directory!)&lt;/p&gt;

&lt;p&gt;You can even include bits of a path in your exclude file to further limit what gets excluded. For instance, if you say &lt;code&gt;photos/thumb&lt;/code&gt;, then the &lt;code&gt;thumb&lt;/code&gt; directory will be excluded whenever it appears inside a folder called &lt;code&gt;photos&lt;/code&gt;. It will not be excluded if it appears in, say, &lt;code&gt;body-parts&lt;/code&gt;. Also, rsync will still include your &lt;code&gt;photos&lt;/code&gt; folders; just their &lt;code&gt;thumbs&lt;/code&gt; folders will be left out.&lt;/p&gt;

&lt;p&gt;Finally (and this is the part I was really interested in and found wrongly-documented elsewhere), you can include specific paths. You do this by starting the path with a slash: &lt;code&gt;/root/tmp&lt;/code&gt;. This forward slash does &lt;em&gt;not&lt;/em&gt; indicate a file at the root of your filesystem, like a normal unix path. Rather it tells rsync to anchor this path to the base of the top-level source folder.&lt;/p&gt;

&lt;p&gt;Note that if you’re using this feature, you must use it consistently with how you specify your source folder. Remember that in rsync, if you name your source folder without a trailing slash, rsync copies that folder and everything in it, whereas if you give it a trailing slash, rsync copies just the folders’ contents. Well, anchored paths in the &lt;code&gt;--exclude-from&lt;/code&gt; file must take account of this. Suppose your source folder is &lt;code&gt;root&lt;/code&gt;. Then your excludes file would have a line like &lt;code&gt;/root/tmp&lt;/code&gt;. If if your source folder is &lt;code&gt;root/&lt;/code&gt;, then your excludes file needs a line like &lt;code&gt;/tmp&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;To put this all into an example, suppose you have this file structure and you want to exclude all the red files:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;root/
     important.txt
     &lt;span style="color:red;"&gt;important.txt.bak&lt;/span&gt;
     mysql/
           ecom.db
           &lt;span style="color:red;"&gt;log/mysql.log&lt;/span&gt;
     &lt;span style="color:red;"&gt;photos/thumb/&lt;/span&gt;
     &lt;span style="color:red;"&gt;tmp/note.txt&lt;/span&gt;
     www/
         index.html
         &lt;span style="color:red;"&gt;log/www.log&lt;/span&gt;
         &lt;span style="color:red;"&gt;photos/thumb/&lt;/span&gt;
         tmp/index-ver2.html
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In other words, you want to exclude: * All &lt;code&gt;*.bak&lt;/code&gt; files. * All &lt;code&gt;log&lt;/code&gt; directories. * All &lt;code&gt;photo/thumb&lt;/code&gt; directories. * The top-level &lt;code&gt;tmp&lt;/code&gt; directory.&lt;/p&gt;

&lt;p&gt;Then you could either call rsync like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;rsync -avz --exclude-from=excludes.txt root backups&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;with &lt;code&gt;excludes.txt&lt;/code&gt; as follows:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;*.bak
log
photos/thumb
/root/tmp&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Or you could call rsync like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;rsync -avz --exclude-from=excludes.txt root/ backups&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;with an &lt;code&gt;excludes.txt&lt;/code&gt; like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;*.bak
log
photos/thumb
/tmp&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt; One more note: You might think that ending a line in the excludes file with a trailing slash would work analogously to naming a source directory with a trailing slash: “include this directory but not its contents.” That way if you were backing up your whole filesystem, you could have a line like &lt;code&gt;/mnt/&lt;/code&gt; that would create a &lt;code&gt;/mnt&lt;/code&gt; directory but ignore all its contents. But in fact, rsync just seems to ignore trailing slashes in the excludes file. If you want to exclude everything in the &lt;code&gt;/mnt&lt;/code&gt; directory, you need a line like this instead: &lt;code&gt;/mnt/*&lt;/code&gt;.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <id>tag:illuminatedcomputing.com,2010-03-02:/posts/2010/03/sort-by-file-size-with-du/</id>
    <title type="html">Sort by File Size with du</title>
    <published>2010-03-02T00:00:00Z</published>
    <updated>2010-03-02T00:00:00Z</updated>
    <link rel="alternate" href="https://illuminatedcomputing.com/posts/2010/03/sort-by-file-size-with-du/" type="text/html"/>
    <content type="html">
&lt;p&gt;Here is a handy Perl script I wrote a while back to sort the output from &lt;code&gt;du -sh&lt;/code&gt; by file size. The standard &lt;code&gt;sort&lt;/code&gt; command can’t do this because it doesn’t know how to compare values like “488M” and “5.0K.” My code will sort any lines where this values appear in the first field. I’m sure the Perl could be more compressed, but keeping it easy to read like this is more my style:&lt;/p&gt;

&lt;div class="CodeRay"&gt;&lt;div class="code"&gt;&lt;pre&gt;&lt;code class="language-perl"&gt;#!/usr/bin/perl -w
use strict;
use Data::Dumper;

my @lines;

while (&amp;lt;&amp;gt;) {
  chomp;
  push @lines, [unabbrev($_), $_];
  # print "$_: ", unabbrev($_), "\n";
}

# print Dumper \@lines;

for my $line (reverse sort { return $a-&amp;gt;[0] &amp;lt;=&amp;gt; $b-&amp;gt;[0] } @lines) {
  print $line-&amp;gt;[1], "\n";
}

sub unabbrev {
  my $val = shift;
  if ($val =~ m/^\s*(\d+(\.\d+)?)([KMGB]?)/) {
    if ($3 eq 'K') {
      $val = $1 * 1000;
    } elsif ($3 eq 'M') {
      $val = $1 * 1000000;
    } elsif ($3 eq 'G') {
      $val = $1 * 1000000000;
    } else { # B or nothing
      $val = $1;
    }
  }
  return $val;
}&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;It’d be fun to re-write this in ruby—or even better, add it as a feature to GNU sort.&lt;/p&gt;

&lt;p&gt;UPDATE: Reading the documentation for GNU coreutils (which contains sort), I see that sort does have an -h option (for –human-numeric-sort). Strangely, this option is not documented in the man page on Ubuntu 9.10 and is unrecognized by /usr/bin/sort. I guess I’ve got an old version.&lt;/p&gt;

&lt;p&gt;If anyone is looking for a small open source project, sort’s implementation of this option could still be improved. Right now, according to the online docs, “values with different precisions like 6000K and 5M will be sorted incorrectly.” It’d be great if it fully implemented the rules for &lt;a href="http://www.gnu.org/software/coreutils/manual/coreutils.html#Block-size"&gt;block size&lt;/a&gt; used by other coreutils programs.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <id>tag:illuminatedcomputing.com,2009-03-08:/posts/2009/03/rtouch/</id>
    <title type="html">rtouch</title>
    <published>2009-03-08T00:00:00Z</published>
    <updated>2009-03-08T00:00:00Z</updated>
    <link rel="alternate" href="https://illuminatedcomputing.com/posts/2009/03/rtouch/" type="text/html"/>
    <content type="html">
&lt;p&gt;By the way …&lt;/p&gt;

&lt;p&gt;Upgrading Wordpress is annoying! There was lots of “delete this folder–except for file x and folder y.” Because of how I organize things, at one point I found it useful to write a recursive touch script. Here it is:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;#!/usr/bin/perl -w
use strict;
use File::Find;

my @dirs = @ARGV ? @ARGV : ('.');

find sub {
    system("touch", $_);
}, @dirs;&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;It’s pretty simple: for instance, it doesn’t pass along any options to the touch program. But I thought I’d put that off until I can rewrite it in ruby. This Perl version was just because I needed it done quick.&lt;/p&gt;
</content>
  </entry>
</feed>

