<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Sig-I/O (Posts about linux)</title><link>https://sig-io.nl/</link><description></description><atom:link href="https://sig-io.nl/categories/linux.xml" rel="self" type="application/rss+xml"></atom:link><language>en</language><copyright>Contents © 2024 &lt;a href="mailto:mark@sig-io.nl"&gt;Mark Janssen&lt;/a&gt; </copyright><lastBuildDate>Sat, 27 Jul 2024 16:51:33 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Debian on a Thinkpad T14 AMD Gen5</title><link>https://sig-io.nl/posts/debian-on-thinkpad-t14-amd5/</link><dc:creator>Mark Janssen</dc:creator><description>&lt;section id="intro"&gt;
&lt;h2&gt;Intro&lt;/h2&gt;
&lt;p&gt;Since my previous workhorse laptop was showing it's age, I had been looking for a replacement
for a while. After much deliberation, I got the choice down to 2 options; The Frame.Work 13
with AMD Ryzen and 2.8K display (which is still in pre-order phase), and the Thinkpad T14 AMD
Gen5 which can also be had with a 2.8K OLED display.&lt;/p&gt;
&lt;p&gt;I've always been a Thinkpad user (at least for the last 20 years), and I've tried out the Frame.Work
when some friends had one around, but I keep preferring the Lenovo keyboards and trackpad with
buttons (for the trackpoint). The Lenovo also had the advantage of coming with more ports, as it has
2x USB-C, 2x USB-A and seperate UTP, HDMI and Minijack, where the Frame.Work only has the 4 USB-C ports
with optional modules for other ports. The Thinkpad was also available directly (built-to-order,
but with a 1 week lead-time) and seems to be as repairable as the Frame.Work, and comes with 3-year
warranty and on-site service. So the Thinkpad was my choice again this time.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="specs"&gt;
&lt;h2&gt;Specs&lt;/h2&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Thinkpad T14 AMD Gen 5&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;2.8K Matte OLED&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;AMD Ryzen 7 Pro 8840U&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;8GB Ram, but have upgraded this after-market to 64GB DDR5-5600&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;256GB WD-Black SSD, replaced with a 2TB model after-market (m2.2280)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;No OS, which gets you a $60 discount at Lenovo&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Fingerprint reader, Smartcard reader, both seem to 'work'&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="installation"&gt;
&lt;h2&gt;Installation&lt;/h2&gt;
&lt;p&gt;Installation of debian 12 went reletively smooth, though I did run into some issues downloading
the kernel-package from the updates repository, which seems to have gotten corrupted. This was fixed
by doing the installation from a German mirror first, and changing back to deb.debian.org later.
For better support I've also enabled the bookworm-backports repository and installed the latest bpo
kernel (6.9.7+bpo-amd64) at this time.&lt;/p&gt;
&lt;p&gt;Secure-boot and UEFI didn't give me any issues and running with Luks+LVM+XFS also went smooth.&lt;/p&gt;
&lt;p&gt;The only hardware related issue I've run into at this time, is the occasional amdgpu crashes (hopefully
fixed now) and a hang when connecting to my thunderbolt-dock with attached HDMI monitor. In this case the
AMDGPU driver tries to (and fails/hangs) read the EDID information for the HDMI monitor, and this
pauses/hangs the entire system unill either the dock or the monitor is disconnected. Sometimes the monitor
will be recognised as a 640x480 screen, and the system will continue, but this is quite useless.&lt;/p&gt;
&lt;p&gt;For now I've disconnected the 2nd monitor from the dock, and it's connected directly to the HDMI port
on the laptop, and there it works fine in 4k 60Hz mode (which is all this Acer KG281K can do).&lt;/p&gt;
&lt;/section&gt;
&lt;section id="software-setup"&gt;
&lt;h2&gt;Software setup&lt;/h2&gt;
&lt;p&gt;After 20+ years of using Gnome (and mostly Mate/Gnome-Classic the last few years), I've switched over
to KDE on this laptop. So far I quite like it, but I've had to make some small tweaks here and there to
get it working how I'm used to.&lt;/p&gt;
&lt;p&gt;I quite like the KDE-Connect android app, which lets me control the laptop from the phone, This will be nice
to use for presentations.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="amd-gpu"&gt;
&lt;h2&gt;AMD GPU&lt;/h2&gt;
&lt;p&gt;The amdgpu driver and firmware that came with debian 12 has been giving me some issues, with random crashes of the GPU and wayland drivers, but after a lot off fiddling, it seems to be stable now with the following combination of changes from debian 12 default:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Install latest backport kernel&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Manually install latest amdgpu firmware from kernel.org mirror&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add the 'amdgpu.gpu_recovery=1 rtc_cmos.use_acpi_alarm=1' options to the kernel commandline&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="weirdness"&gt;
&lt;h2&gt;Weirdness&lt;/h2&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;The specsheet/ordersheet from Lenovo claims the display is 60Hz, but KDE's display properties will let me choose 120Hz on the internal display.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Even in idle (with just some browsers running) the fans seem to be running at a quite audible level around 3000rpm, causing a constant wind-noise. For the time being i've propped up the laptop on a stand, which seems to keep it a bit cooler than just standing flat on my desk the entire day.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;</description><category>debian</category><category>laptop</category><category>linux</category><category>thinkpad</category><guid>https://sig-io.nl/posts/debian-on-thinkpad-t14-amd5/</guid><pubDate>Sun, 21 Jul 2024 14:48:22 GMT</pubDate></item><item><title>Linux Leap-Second problem</title><link>https://sig-io.nl/posts/linux-leap-second-problem/</link><dc:creator>Mark Janssen</dc:creator><description>&lt;p&gt;So, this weekend was quite an interesting one, as on July 1st 02:00 local time (00:00 UTC) a leap-second was added via NTP. This caused serious problems for all my Java Virtual Machines and mysql databases.&lt;/p&gt;
&lt;p&gt;If your system has printed the following line (in dmesg), a leap-second has been added recently:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Clock: inserting leap second 23:59:60 UTC&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;On most of my systems, the JVM’s would spike to 100% cpu load over all cores, mysql seems to also do this.&lt;/p&gt;
&lt;p&gt;The work-around/fix at this time is to run:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;date &lt;cite&gt;date +"%m%d%H%M%C%y.%S"&lt;/cite&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hopefully this will be fixed in the kernel before the next leap-second is added. Which could be as soon as 2013/01/01, though probably later.&lt;/p&gt;
&lt;section id="update-2018"&gt;
&lt;h2&gt;Update 2018:&lt;/h2&gt;
&lt;p&gt;It was indeed fixed before the next leap-second, which occurred somewhere not too long after. I haven't encountered this problem since.&lt;/p&gt;
&lt;/section&gt;</description><category>bug</category><category>leap-second</category><category>linux</category><guid>https://sig-io.nl/posts/linux-leap-second-problem/</guid><pubDate>Tue, 03 Jul 2012 21:03:16 GMT</pubDate></item><item><title>Resetting failed drive in linux mdadm raid array</title><link>https://sig-io.nl/posts/resetting-failed-drive-in-linux-mdadm-raid-array/</link><dc:creator>Mark Janssen</dc:creator><description>&lt;p&gt;Today I was greeted with a failed drive in a mdadm raid array. The drive had some transient errors and was kicked out of the array, but testing showed that the drive still seemed to work just fine.&lt;/p&gt;
&lt;figure&gt;
&lt;a class="reference external image-reference" href="https://sig-io.nl/images/harddisks.jpg"&gt;
&lt;img alt="Harddisks" src="https://sig-io.nl/images/harddisks.thumbnail.jpg"&gt;
&lt;/a&gt;
&lt;figcaption&gt;
&lt;p&gt;Image by Martin Abegglen (&lt;a class="reference external" href="https://www.flickr.com/photos/twicepix/3333710952"&gt;https://www.flickr.com/photos/twicepix/3333710952&lt;/a&gt;)&lt;/p&gt;
&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;The following procedure will remove the drive from the array, remove it from the system, re-probe for disks, and then re-add the drive back into the array(s).&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Remove the failed drive from the array, in this case, it was /dev/sdb:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;mdadm --manage --set-faulty /dev/md0 /dev/sdb1&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Make sure nothing on this disk is being used (mounts, other arrays, etc)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Reseat the drive from the system, either physically, or using the following commands:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;echo 1 &amp;gt; /sys/block/sdb/device/delete&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;echo "- - -" &amp;gt; /sys/class/scsi_host/host1/scan&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Check if the drive is found again, and check if it works correctly&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;check dmesg output, or look at /proc/partitions&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;try running: ‘pv &amp;lt; /dev/sdb of=/dev/zero‘&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Re-add the drive to the array(s)&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;mdadm /dev/md0 -a /dev/sdb1&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;cat /proc/mdstat&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That should do the trick…&lt;/p&gt;</description><category>drive</category><category>linux</category><category>mdadm</category><category>raid</category><category>reset</category><category>sata</category><guid>https://sig-io.nl/posts/resetting-failed-drive-in-linux-mdadm-raid-array/</guid><pubDate>Thu, 12 Apr 2012 21:05:19 GMT</pubDate></item><item><title>Run-time editing of limits in Linux</title><link>https://sig-io.nl/posts/run-time-editing-of-limits-in-linux/</link><dc:creator>Mark Janssen</dc:creator><description>&lt;p&gt;On CentOS and RHEL Linux (with kernels &amp;gt;= 2.6.32) you can modify resource-limits (ulimit) run-time. This can be done using the /proc/&amp;lt;pid&amp;gt;/limits functionality. On older kernels this file is read-only and can be used to inspect the limits that are in effect on the process. On newer systems you can modify the limits with echo:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;cat /proc/pid/limits
echo -n "Max open files=soft:hard" &amp;gt; /proc/pid/limits
cat /proc/pid/limits&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;On older systems you will have to modify limits before starting a process.&lt;/p&gt;
&lt;p&gt;(See also the post on &lt;a class="reference external" href="http://serverfault.com/questions/201207/set-max-file-limit-on-a-running-process"&gt;serverfault&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;If you are not running CentOS/RHEL, you can use the ‘prlimit’ command, which does the same thing, but doesn’t rely on a patch that’s no longer present in current kernels.&lt;/p&gt;</description><category>kernel</category><category>limit</category><category>linux</category><category>proc</category><category>resource</category><category>ulimit</category><guid>https://sig-io.nl/posts/run-time-editing-of-limits-in-linux/</guid><pubDate>Tue, 14 Feb 2012 21:24:21 GMT</pubDate></item><item><title>Online resizing of multipath devices in Linux dm-multipath</title><link>https://sig-io.nl/posts/online-resizing-of-multipath-devices-in-linux-dm-multipath/</link><dc:creator>Mark Janssen</dc:creator><description>&lt;p&gt;Linux doesn’t automatically re-size multipath devices, so this procedure must be used to have online re-sizing of multipath.  (Offline re-size is automatic, just remove the mapping and reload)&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;this example will use multipath device /dev/mpath/testdisk, with scsi disks /dev/sdx and /dev/sdy&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Resize the lun on the underlying storage layer (iscsi / san)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Check which sd? devices are relevant, and re-scan these:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;multipath -ll testdisk&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;blockdev –rereadpt /dev/sdx&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;blockdev –rereadpt /dev/sdy&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;blockdev –getsz /dev/sdx&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;blockdev –getsz /dev/sdy&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Take note of the new size returned by getsz.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Dump the dmsetup table to a file (and a backup)&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;dmsetup table testdisk | tee mapping.bak mapping.cur&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Edit the table stored in ‘mapping.cur’&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;vi mapping.cur, replace field 2 (size) with the new size from getsz&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Suspend I/O, reread the table, and resume I/O&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;dmsetup suspend testdisk; dmsetup reload testdisk mapping.cur; dmsetup resume testdisk&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The multipath device should now be resized:&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;multipath -ll&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can now resize the filesystem on the multipath device, or the LVM-PV if you use LVM on the LUN.&lt;/p&gt;</description><category>dmsetup</category><category>iscsi</category><category>linux</category><category>lvm</category><category>multipath</category><category>resize</category><guid>https://sig-io.nl/posts/online-resizing-of-multipath-devices-in-linux-dm-multipath/</guid><pubDate>Thu, 07 Apr 2011 21:26:24 GMT</pubDate></item></channel></rss>