<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.steffe.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Steffe</id>
	<title>indicium - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.steffe.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Steffe"/>
	<link rel="alternate" type="text/html" href="https://wiki.steffe.net/index.php/Special:Contributions/Steffe"/>
	<updated>2026-04-28T12:46:48Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://wiki.steffe.net/index.php?title=Proxmox&amp;diff=294</id>
		<title>Proxmox</title>
		<link rel="alternate" type="text/html" href="https://wiki.steffe.net/index.php?title=Proxmox&amp;diff=294"/>
		<updated>2026-01-09T13:12:50Z</updated>

		<summary type="html">&lt;p&gt;Steffe: Created page with &amp;quot;To fix various things (such as enabling the free repository and disable the nag screen):  bash -c &amp;quot;$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/post-pve-install.sh)&amp;quot;&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;To fix various things (such as enabling the free repository and disable the nag screen):&lt;br /&gt;
 bash -c &amp;quot;$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/post-pve-install.sh)&amp;quot;&lt;/div&gt;</summary>
		<author><name>Steffe</name></author>
	</entry>
	<entry>
		<id>https://wiki.steffe.net/index.php?title=Main_Page&amp;diff=293</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.steffe.net/index.php?title=Main_Page&amp;diff=293"/>
		<updated>2026-01-09T13:12:12Z</updated>

		<summary type="html">&lt;p&gt;Steffe: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Indicium - The source of information =&lt;br /&gt;
&lt;br /&gt;
[[Linux kernel]]&lt;br /&gt;
&lt;br /&gt;
[[Linux]]&lt;br /&gt;
&lt;br /&gt;
[[FreeBSD]]&lt;br /&gt;
&lt;br /&gt;
[[Git]]&lt;br /&gt;
&lt;br /&gt;
[[Programming]]&lt;br /&gt;
&lt;br /&gt;
[[Learn programming]]&lt;br /&gt;
&lt;br /&gt;
[[Web]]&lt;br /&gt;
&lt;br /&gt;
[[Pinball]]&lt;br /&gt;
&lt;br /&gt;
[[FreeNAS]]&lt;br /&gt;
&lt;br /&gt;
[[Video Encoding]]&lt;br /&gt;
&lt;br /&gt;
[[Kodi]]&lt;br /&gt;
&lt;br /&gt;
[[Cars]]&lt;br /&gt;
&lt;br /&gt;
[[VmWare]]&lt;br /&gt;
&lt;br /&gt;
[[Windows]]&lt;br /&gt;
&lt;br /&gt;
[[Home Automation]]&lt;br /&gt;
&lt;br /&gt;
[[Raspberry Pi]]&lt;br /&gt;
&lt;br /&gt;
[[Backup]]&lt;br /&gt;
&lt;br /&gt;
[[Boats]]&lt;br /&gt;
&lt;br /&gt;
[[BIOS]]&lt;br /&gt;
&lt;br /&gt;
[[TCPdump]]&lt;br /&gt;
&lt;br /&gt;
[[Printers]]&lt;br /&gt;
&lt;br /&gt;
[[Proxmox]]&lt;/div&gt;</summary>
		<author><name>Steffe</name></author>
	</entry>
	<entry>
		<id>https://wiki.steffe.net/index.php?title=Home_Assistant&amp;diff=292</id>
		<title>Home Assistant</title>
		<link rel="alternate" type="text/html" href="https://wiki.steffe.net/index.php?title=Home_Assistant&amp;diff=292"/>
		<updated>2025-12-16T20:53:58Z</updated>

		<summary type="html">&lt;p&gt;Steffe: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;How to officially get SonOff with default firmware into HA: https://sonoff.tech/product-review/tutorial/how-to-add-your-sonoff-devices-on-home-assistant/, https://github.com/CoolKit-Technologies/ha-addon&lt;br /&gt;
&lt;br /&gt;
How to unofficially get SonOff with default firmware into HA via HACS: https://github.com/AlexxIT/SonoffLAN&lt;br /&gt;
&lt;br /&gt;
How to unofficially get SonOff with default firmware into HA via HACS (seems obsolete): https://github.com/peterbuga/HASS-sonoff-ewelink&lt;br /&gt;
&lt;br /&gt;
How to get Tellstick ZNet loaded with &amp;quot;local plugin&amp;quot; to expose all services via MQTT to Home Assistant: https://github.com/quazzie/tellstick-plugin-mqtt-hass&lt;/div&gt;</summary>
		<author><name>Steffe</name></author>
	</entry>
	<entry>
		<id>https://wiki.steffe.net/index.php?title=Printers&amp;diff=291</id>
		<title>Printers</title>
		<link rel="alternate" type="text/html" href="https://wiki.steffe.net/index.php?title=Printers&amp;diff=291"/>
		<updated>2025-06-22T13:41:16Z</updated>

		<summary type="html">&lt;p&gt;Steffe: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Canon TS6351 ==&lt;br /&gt;
=== Unable to scan, error code &#039;&#039;Code5,157,69&#039;&#039; ===&lt;br /&gt;
I had this printer connected to my Wifi network, and printing was seldom a problem, but when I tried to scan using &amp;quot;IJ Scan Utility&amp;quot; I often got errors such as &amp;quot;Code5,157,69&amp;quot;, &amp;quot;Code5,157,200&amp;quot;, &amp;quot;Code2,157,50&amp;quot; etc. I tried everything such as reinstalling latest drivers, I allowed the applications through the firewall etc, but it would simply not work. I had no issues reaching the printers IP from a web browser to get information on ink levels etc.&lt;br /&gt;
&lt;br /&gt;
The error does indicate that the Wifi connection is bad. I launched my Unifi center to try and fix this. I realized that the printer was connected to the Wifi access point farthest away from the printer itself which was also the weakest one. I rebooted the printer but it still only connected to the same access point. I tried setting the Unifi center to lock the access point to another one, but then the printer failed to connect to Wifi altogether. I re-eanbled the printer to connect to any access point again in Unifi center and started looking at the printer itself.&lt;br /&gt;
&lt;br /&gt;
I realized that when I choose to connect manually to Wifi, and I selected by SSID, the printer stated &amp;quot;There are multiple access points for this Wifi, do you want to connect to all or only a single one?&amp;quot;. I choose to connect to &amp;quot;All&amp;quot; and then the printer AGAIN connected to the weakest access point. There must be some kind of issue in the Wifi roaming implementation of this printer. The solution was to manually check with my phone (using Wifi Analyzer) which access point that had the strongest signal at the location where the printer was, noted down the MAC of that access point, and in the printer Wifi setup, I choose to only connect to one single access point, and choose the MAC for the strongest one. Tada, everything works and I am able to scan without issues again!&lt;/div&gt;</summary>
		<author><name>Steffe</name></author>
	</entry>
	<entry>
		<id>https://wiki.steffe.net/index.php?title=Printers&amp;diff=290</id>
		<title>Printers</title>
		<link rel="alternate" type="text/html" href="https://wiki.steffe.net/index.php?title=Printers&amp;diff=290"/>
		<updated>2025-06-22T13:30:44Z</updated>

		<summary type="html">&lt;p&gt;Steffe: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Canon TS6351 ==&lt;br /&gt;
=== Unable to scan, error code &#039;&#039;Code5,157,69&#039;&#039; ===&lt;br /&gt;
I had this printer connected to my Wifi network, and printing was seldom a problem, but when I tried to scan using &amp;quot;IJ Scan Utility&amp;quot; I often got errors such as &amp;quot;Code5,157,69&amp;quot;, &amp;quot;Code5,157,200&amp;quot; etc. I tried everything such as reinstalling latest drivers, I allowed the applications through the firewall etc, but it would simply not work. I had no issues reaching the printers IP from a web browser to get information on ink levels etc.&lt;br /&gt;
&lt;br /&gt;
The error does indicate that the Wifi connection is bad. I launched my Unifi center to try and fix this. I realized that the printer was connected to the Wifi access point farthest away from the printer itself which was also the weakest one. I rebooted the printer but it still only connected to the same access point. I tried setting the Unifi center to lock the access point to another one, but then the printer failed to connect to Wifi altogether. I re-eanbled the printer to connect to any access point again in Unifi center and started looking at the printer itself.&lt;br /&gt;
&lt;br /&gt;
I realized that when I choose to connect manually to Wifi, and I selected by SSID, the printer stated &amp;quot;There are multiple access points for this Wifi, do you want to connect to all or only a single one?&amp;quot;. I choose to connect to &amp;quot;All&amp;quot; and then the printer AGAIN connected to the weakest access point. There must be some kind of issue in the Wifi roaming implementation of this printer. The solution was to manually check with my phone (using Wifi Analyzer) which access point that had the strongest signal at the location where the printer was, noted down the MAC of that access point, and in the printer Wifi setup, I choose to only connect to one single access point, and choose the MAC for the strongest one. Tada, everything works and I am able to scan without issues again!&lt;/div&gt;</summary>
		<author><name>Steffe</name></author>
	</entry>
	<entry>
		<id>https://wiki.steffe.net/index.php?title=Printers&amp;diff=289</id>
		<title>Printers</title>
		<link rel="alternate" type="text/html" href="https://wiki.steffe.net/index.php?title=Printers&amp;diff=289"/>
		<updated>2025-06-22T13:30:07Z</updated>

		<summary type="html">&lt;p&gt;Steffe: /* Unable to scan, error code _Code5,157,69_ */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Canon TS6351 ==&lt;br /&gt;
=== Unable to scan, error code &#039;Code5,157,69&#039; ===&lt;br /&gt;
I had this printer connected to my Wifi network, and printing was seldom a problem, but when I tried to scan using &amp;quot;IJ Scan Utility&amp;quot; I often got errors such as &amp;quot;Code5,157,69&amp;quot;, &amp;quot;Code5,157,200&amp;quot; etc. I tried everything such as reinstalling latest drivers, I allowed the applications through the firewall etc, but it would simply not work. I had no issues reaching the printers IP from a web browser to get information on ink levels etc.&lt;br /&gt;
&lt;br /&gt;
The error does indicate that the Wifi connection is bad. I launched my Unifi center to try and fix this. I realized that the printer was connected to the Wifi access point farthest away from the printer itself which was also the weakest one. I rebooted the printer but it still only connected to the same access point. I tried setting the Unifi center to lock the access point to another one, but then the printer failed to connect to Wifi altogether. I re-eanbled the printer to connect to any access point again in Unifi center and started looking at the printer itself.&lt;br /&gt;
&lt;br /&gt;
I realized that when I choose to connect manually to Wifi, and I selected by SSID, the printer stated &amp;quot;There are multiple access points for this Wifi, do you want to connect to all or only a single one?&amp;quot;. I choose to connect to &amp;quot;All&amp;quot; and then the printer AGAIN connected to the weakest access point. There must be some kind of issue in the Wifi roaming implementation of this printer. The solution was to manually check with my phone (using Wifi Analyzer) which access point that had the strongest signal at the location where the printer was, noted down the MAC of that access point, and in the printer Wifi setup, I choose to only connect to one single access point, and choose the MAC for the strongest one. Tada, everything works and I am able to scan without issues again!&lt;/div&gt;</summary>
		<author><name>Steffe</name></author>
	</entry>
	<entry>
		<id>https://wiki.steffe.net/index.php?title=Printers&amp;diff=288</id>
		<title>Printers</title>
		<link rel="alternate" type="text/html" href="https://wiki.steffe.net/index.php?title=Printers&amp;diff=288"/>
		<updated>2025-06-22T13:29:57Z</updated>

		<summary type="html">&lt;p&gt;Steffe: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Canon TS6351 ==&lt;br /&gt;
=== Unable to scan, error code _Code5,157,69_ ===&lt;br /&gt;
I had this printer connected to my Wifi network, and printing was seldom a problem, but when I tried to scan using &amp;quot;IJ Scan Utility&amp;quot; I often got errors such as &amp;quot;Code5,157,69&amp;quot;, &amp;quot;Code5,157,200&amp;quot; etc. I tried everything such as reinstalling latest drivers, I allowed the applications through the firewall etc, but it would simply not work. I had no issues reaching the printers IP from a web browser to get information on ink levels etc.&lt;br /&gt;
&lt;br /&gt;
The error does indicate that the Wifi connection is bad. I launched my Unifi center to try and fix this. I realized that the printer was connected to the Wifi access point farthest away from the printer itself which was also the weakest one. I rebooted the printer but it still only connected to the same access point. I tried setting the Unifi center to lock the access point to another one, but then the printer failed to connect to Wifi altogether. I re-eanbled the printer to connect to any access point again in Unifi center and started looking at the printer itself.&lt;br /&gt;
&lt;br /&gt;
I realized that when I choose to connect manually to Wifi, and I selected by SSID, the printer stated &amp;quot;There are multiple access points for this Wifi, do you want to connect to all or only a single one?&amp;quot;. I choose to connect to &amp;quot;All&amp;quot; and then the printer AGAIN connected to the weakest access point. There must be some kind of issue in the Wifi roaming implementation of this printer. The solution was to manually check with my phone (using Wifi Analyzer) which access point that had the strongest signal at the location where the printer was, noted down the MAC of that access point, and in the printer Wifi setup, I choose to only connect to one single access point, and choose the MAC for the strongest one. Tada, everything works and I am able to scan without issues again!&lt;/div&gt;</summary>
		<author><name>Steffe</name></author>
	</entry>
	<entry>
		<id>https://wiki.steffe.net/index.php?title=Printers&amp;diff=287</id>
		<title>Printers</title>
		<link rel="alternate" type="text/html" href="https://wiki.steffe.net/index.php?title=Printers&amp;diff=287"/>
		<updated>2025-06-22T13:29:43Z</updated>

		<summary type="html">&lt;p&gt;Steffe: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Canon TS6351 ==&lt;br /&gt;
=== Unable to scan, error code ode5,157,69 ===&lt;br /&gt;
I had this printer connected to my Wifi network, and printing was seldom a problem, but when I tried to scan using &amp;quot;IJ Scan Utility&amp;quot; I often got errors such as &amp;quot;Code5,157,69&amp;quot;, &amp;quot;Code5,157,200&amp;quot; etc. I tried everything such as reinstalling latest drivers, I allowed the applications through the firewall etc, but it would simply not work. I had no issues reaching the printers IP from a web browser to get information on ink levels etc.&lt;br /&gt;
&lt;br /&gt;
The error does indicate that the Wifi connection is bad. I launched my Unifi center to try and fix this. I realized that the printer was connected to the Wifi access point farthest away from the printer itself which was also the weakest one. I rebooted the printer but it still only connected to the same access point. I tried setting the Unifi center to lock the access point to another one, but then the printer failed to connect to Wifi altogether. I re-eanbled the printer to connect to any access point again in Unifi center and started looking at the printer itself.&lt;br /&gt;
&lt;br /&gt;
I realized that when I choose to connect manually to Wifi, and I selected by SSID, the printer stated &amp;quot;There are multiple access points for this Wifi, do you want to connect to all or only a single one?&amp;quot;. I choose to connect to &amp;quot;All&amp;quot; and then the printer AGAIN connected to the weakest access point. There must be some kind of issue in the Wifi roaming implementation of this printer. The solution was to manually check with my phone (using Wifi Analyzer) which access point that had the strongest signal at the location where the printer was, noted down the MAC of that access point, and in the printer Wifi setup, I choose to only connect to one single access point, and choose the MAC for the strongest one. Tada, everything works and I am able to scan without issues again!&lt;/div&gt;</summary>
		<author><name>Steffe</name></author>
	</entry>
	<entry>
		<id>https://wiki.steffe.net/index.php?title=Printers&amp;diff=286</id>
		<title>Printers</title>
		<link rel="alternate" type="text/html" href="https://wiki.steffe.net/index.php?title=Printers&amp;diff=286"/>
		<updated>2025-06-22T13:28:29Z</updated>

		<summary type="html">&lt;p&gt;Steffe: Created page with &amp;quot;Canon TS6351 I had this printer connected to my Wifi network, and printing was seldom a problem, but when I tried to scan using &amp;quot;IJ Scan Utility&amp;quot; I often got errors such as &amp;quot;Code5,157,69&amp;quot;, &amp;quot;Code5,157,200&amp;quot; etc. I tried everything such as reinstalling latest drivers, I allowed the applications through the firewall etc, but it would simply not work. I had no issues reaching the printers IP from a web browser to get information on ink levels etc.  The error does indicate tha...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Canon TS6351&lt;br /&gt;
I had this printer connected to my Wifi network, and printing was seldom a problem, but when I tried to scan using &amp;quot;IJ Scan Utility&amp;quot; I often got errors such as &amp;quot;Code5,157,69&amp;quot;, &amp;quot;Code5,157,200&amp;quot; etc. I tried everything such as reinstalling latest drivers, I allowed the applications through the firewall etc, but it would simply not work. I had no issues reaching the printers IP from a web browser to get information on ink levels etc.&lt;br /&gt;
&lt;br /&gt;
The error does indicate that the Wifi connection is bad. I launched my Unifi center to try and fix this. I realized that the printer was connected to the Wifi access point farthest away from the printer itself which was also the weakest one. I rebooted the printer but it still only connected to the same access point. I tried setting the Unifi center to lock the access point to another one, but then the printer failed to connect to Wifi altogether. I re-eanbled the printer to connect to any access point again in Unifi center and started looking at the printer itself.&lt;br /&gt;
&lt;br /&gt;
I realized that when I choose to connect manually to Wifi, and I selected by SSID, the printer stated &amp;quot;There are multiple access points for this Wifi, do you want to connect to all or only a single one?&amp;quot;. I choose to connect to &amp;quot;All&amp;quot; and then the printer AGAIN connected to the weakest access point. There must be some kind of issue in the Wifi roaming implementation of this printer. The solution was to manually check with my phone (using Wifi Analyzer) which access point that had the strongest signal at the location where the printer was, noted down the MAC of that access point, and in the printer Wifi setup, I choose to only connect to one single access point, and choose the MAC for the strongest one. Tada, everything works and I am able to scan without issues again!&lt;/div&gt;</summary>
		<author><name>Steffe</name></author>
	</entry>
	<entry>
		<id>https://wiki.steffe.net/index.php?title=Main_Page&amp;diff=285</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.steffe.net/index.php?title=Main_Page&amp;diff=285"/>
		<updated>2025-06-22T13:16:57Z</updated>

		<summary type="html">&lt;p&gt;Steffe: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Indicium - The source of information =&lt;br /&gt;
&lt;br /&gt;
[[Linux kernel]]&lt;br /&gt;
&lt;br /&gt;
[[Linux]]&lt;br /&gt;
&lt;br /&gt;
[[FreeBSD]]&lt;br /&gt;
&lt;br /&gt;
[[Git]]&lt;br /&gt;
&lt;br /&gt;
[[Programming]]&lt;br /&gt;
&lt;br /&gt;
[[Learn programming]]&lt;br /&gt;
&lt;br /&gt;
[[Web]]&lt;br /&gt;
&lt;br /&gt;
[[Pinball]]&lt;br /&gt;
&lt;br /&gt;
[[FreeNAS]]&lt;br /&gt;
&lt;br /&gt;
[[Video Encoding]]&lt;br /&gt;
&lt;br /&gt;
[[Kodi]]&lt;br /&gt;
&lt;br /&gt;
[[Cars]]&lt;br /&gt;
&lt;br /&gt;
[[VmWare]]&lt;br /&gt;
&lt;br /&gt;
[[Windows]]&lt;br /&gt;
&lt;br /&gt;
[[Home Automation]]&lt;br /&gt;
&lt;br /&gt;
[[Raspberry Pi]]&lt;br /&gt;
&lt;br /&gt;
[[Backup]]&lt;br /&gt;
&lt;br /&gt;
[[Boats]]&lt;br /&gt;
&lt;br /&gt;
[[BIOS]]&lt;br /&gt;
&lt;br /&gt;
[[TCPdump]]&lt;br /&gt;
&lt;br /&gt;
[[Printers]]&lt;/div&gt;</summary>
		<author><name>Steffe</name></author>
	</entry>
	<entry>
		<id>https://wiki.steffe.net/index.php?title=Windows&amp;diff=283</id>
		<title>Windows</title>
		<link rel="alternate" type="text/html" href="https://wiki.steffe.net/index.php?title=Windows&amp;diff=283"/>
		<updated>2025-05-08T06:08:29Z</updated>

		<summary type="html">&lt;p&gt;Steffe: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= Energy management =&lt;br /&gt;
&lt;br /&gt;
== Why computer was woken from sleep ==&lt;br /&gt;
To check why computer was woken from suspend:&lt;br /&gt;
 powercfg /lastwake&lt;br /&gt;
to get more details:&lt;br /&gt;
 powercfg /systempowerreport&lt;br /&gt;
&lt;br /&gt;
== To disable Windows Update waking up the computer ==&lt;br /&gt;
Run as Administrator:&lt;br /&gt;
 gpedit.msc&lt;br /&gt;
&lt;br /&gt;
Then go to:&lt;br /&gt;
 Computer Configuration / Administrative Templates / Windows Components / Windows Update / Enabling Windows Update Power Management to automatically wake up the system to install scheduled updates&lt;br /&gt;
and set it to &amp;quot;Disabled&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
For swedish Windows:&lt;br /&gt;
 Datorkonfiguration / Administrativa mallar / Windows-komponenter / Windows Update / Aktivera automatisk väckning via Energisparfunktioner för installation av schemalagda uppdateringar&lt;br /&gt;
and set it to &amp;quot;Inaktiverad&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== To disable hibernation ==&lt;br /&gt;
&lt;br /&gt;
 powercfg.exe /h off&lt;br /&gt;
&lt;br /&gt;
== To uninstall a specific driver ==&lt;br /&gt;
&lt;br /&gt;
In a elevated command prompt:&lt;br /&gt;
 dism /online /get-drivers /format:table &amp;gt; c:\drivers.txt&lt;br /&gt;
Look through the drivers.txt file, and then you can do things like:&lt;br /&gt;
 pnputil.exe /d oem111.inf&lt;br /&gt;
&lt;br /&gt;
== To enable DHCP ==&lt;br /&gt;
&lt;br /&gt;
Install a simple DHCP server like: https://www.hanewin.net/dhcp-e.htm&lt;br /&gt;
&lt;br /&gt;
== To install Windows 11 on an unsupported CPU ==&lt;br /&gt;
&lt;br /&gt;
Don&#039;t know if all of these steps are required, but they worked!&lt;br /&gt;
&lt;br /&gt;
* Download a Windows 11 ISO file.&lt;br /&gt;
* Use [https://rufus.ie Rufus] to write the ISO to a USB drive. After hitting &amp;quot;Start&amp;quot;, select the tick box to skip TPM/CPU verification.&lt;br /&gt;
* In the running Windows x system, add the following register keys:&lt;br /&gt;
 HKEY_LOCAL_MACHINE\SYSTEM\Setup\LabConfig\BypassCPUCheck=1&lt;br /&gt;
 HKEY_LOCAL_MACHINE\SYSTEM\Setup\LabConfig\BypassTPMCheck=1&lt;br /&gt;
* If you want to install Windows 11 from scratch, boot from the USB drive.&lt;br /&gt;
* If you want to upgrade, run setup.exe from the USB drive in the running system.&lt;/div&gt;</summary>
		<author><name>Steffe</name></author>
	</entry>
	<entry>
		<id>https://wiki.steffe.net/index.php?title=FreeBSD&amp;diff=282</id>
		<title>FreeBSD</title>
		<link rel="alternate" type="text/html" href="https://wiki.steffe.net/index.php?title=FreeBSD&amp;diff=282"/>
		<updated>2025-04-16T20:41:08Z</updated>

		<summary type="html">&lt;p&gt;Steffe: Created page with &amp;quot;== Enlarging disk space ==  For full reference: https://docs.freebsd.org/en/books/handbook/disks/#disks-growing  Shut down your VM, make a backup of it and then resize the hard disk drive. Then boot up FreeBSD again and do:  gpart show It will show one of your partitions as CORRUPT. Fix it with something like:  gpart recover vtbd0  gpart show It should now be OK. Note the index number of the partition you want to resize, then do something like:  gpart resize -i 2 vtbd0 N...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Enlarging disk space ==&lt;br /&gt;
&lt;br /&gt;
For full reference: https://docs.freebsd.org/en/books/handbook/disks/#disks-growing&lt;br /&gt;
&lt;br /&gt;
Shut down your VM, make a backup of it and then resize the hard disk drive. Then boot up FreeBSD again and do:&lt;br /&gt;
 gpart show&lt;br /&gt;
It will show one of your partitions as CORRUPT. Fix it with something like:&lt;br /&gt;
 gpart recover vtbd0&lt;br /&gt;
 gpart show&lt;br /&gt;
It should now be OK. Note the index number of the partition you want to resize, then do something like:&lt;br /&gt;
 gpart resize -i 2 vtbd0&lt;br /&gt;
Not specifying any size implies growing the partition to fit the physical size.&lt;br /&gt;
&lt;br /&gt;
Now, for the final step to resize the file system, make sure you have a backup in place, check what the partition device name is and then do something like:&lt;br /&gt;
 sysctl kern.geom.debugflags=16&lt;br /&gt;
 growfs /dev/vtbd0p2&lt;br /&gt;
The first command disables some safety features. This is required to resize a mounted file system &amp;quot;on the fly&amp;quot;. Now reboot your system and all should hopefully be OK!&lt;/div&gt;</summary>
		<author><name>Steffe</name></author>
	</entry>
	<entry>
		<id>https://wiki.steffe.net/index.php?title=Main_Page&amp;diff=281</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.steffe.net/index.php?title=Main_Page&amp;diff=281"/>
		<updated>2025-04-16T20:32:03Z</updated>

		<summary type="html">&lt;p&gt;Steffe: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Indicium - The source of information =&lt;br /&gt;
&lt;br /&gt;
[[Linux kernel]]&lt;br /&gt;
&lt;br /&gt;
[[Linux]]&lt;br /&gt;
&lt;br /&gt;
[[FreeBSD]]&lt;br /&gt;
&lt;br /&gt;
[[Git]]&lt;br /&gt;
&lt;br /&gt;
[[Programming]]&lt;br /&gt;
&lt;br /&gt;
[[Learn programming]]&lt;br /&gt;
&lt;br /&gt;
[[Web]]&lt;br /&gt;
&lt;br /&gt;
[[Pinball]]&lt;br /&gt;
&lt;br /&gt;
[[FreeNAS]]&lt;br /&gt;
&lt;br /&gt;
[[Video Encoding]]&lt;br /&gt;
&lt;br /&gt;
[[Kodi]]&lt;br /&gt;
&lt;br /&gt;
[[Cars]]&lt;br /&gt;
&lt;br /&gt;
[[VmWare]]&lt;br /&gt;
&lt;br /&gt;
[[Windows]]&lt;br /&gt;
&lt;br /&gt;
[[Home Automation]]&lt;br /&gt;
&lt;br /&gt;
[[Raspberry Pi]]&lt;br /&gt;
&lt;br /&gt;
[[Backup]]&lt;br /&gt;
&lt;br /&gt;
[[Boats]]&lt;br /&gt;
&lt;br /&gt;
[[BIOS]]&lt;br /&gt;
&lt;br /&gt;
[[TCPdump]]&lt;/div&gt;</summary>
		<author><name>Steffe</name></author>
	</entry>
	<entry>
		<id>https://wiki.steffe.net/index.php?title=TCPdump&amp;diff=277</id>
		<title>TCPdump</title>
		<link rel="alternate" type="text/html" href="https://wiki.steffe.net/index.php?title=TCPdump&amp;diff=277"/>
		<updated>2025-02-18T11:55:38Z</updated>

		<summary type="html">&lt;p&gt;Steffe: Created page with &amp;quot;== Basic capture == Typical usage to capture network traffic going to a specific host:  sudo tcpdump host xxx.xxx.xxx.xxx -w output.pcap  == TLS capture == In case the traffic is encrypted using TLS or similar, you may be able to use the SSLKEYLOGFILE environment variable when running your client (or server) binary:  SSLKEYLOGFILE=sslkeylogfile.log ./testapplication.py If this produces a sslkeylogfile.log file, you can use that to decrypt the TLS traffic. Open wireshark...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Basic capture ==&lt;br /&gt;
Typical usage to capture network traffic going to a specific host:&lt;br /&gt;
 sudo tcpdump host xxx.xxx.xxx.xxx -w output.pcap&lt;br /&gt;
&lt;br /&gt;
== TLS capture ==&lt;br /&gt;
In case the traffic is encrypted using TLS or similar, you may be able to use the SSLKEYLOGFILE environment variable when running your client (or server) binary:&lt;br /&gt;
 SSLKEYLOGFILE=sslkeylogfile.log ./testapplication.py&lt;br /&gt;
If this produces a sslkeylogfile.log file, you can use that to decrypt the TLS traffic. Open wireshark and go to Edit - Preferences - Protocol - TLS -  (Pre)-Master-Secret log filename and specify your sslkeylogfile.log file. Then open your package dump and it will be decrypted.&lt;/div&gt;</summary>
		<author><name>Steffe</name></author>
	</entry>
	<entry>
		<id>https://wiki.steffe.net/index.php?title=Main_Page&amp;diff=276</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.steffe.net/index.php?title=Main_Page&amp;diff=276"/>
		<updated>2025-02-18T11:39:20Z</updated>

		<summary type="html">&lt;p&gt;Steffe: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Indicium - The source of information =&lt;br /&gt;
&lt;br /&gt;
[[Linux kernel]]&lt;br /&gt;
&lt;br /&gt;
[[Linux]]&lt;br /&gt;
&lt;br /&gt;
[[Git]]&lt;br /&gt;
&lt;br /&gt;
[[Programming]]&lt;br /&gt;
&lt;br /&gt;
[[Learn programming]]&lt;br /&gt;
&lt;br /&gt;
[[Web]]&lt;br /&gt;
&lt;br /&gt;
[[Pinball]]&lt;br /&gt;
&lt;br /&gt;
[[FreeNAS]]&lt;br /&gt;
&lt;br /&gt;
[[Video Encoding]]&lt;br /&gt;
&lt;br /&gt;
[[Kodi]]&lt;br /&gt;
&lt;br /&gt;
[[Cars]]&lt;br /&gt;
&lt;br /&gt;
[[VmWare]]&lt;br /&gt;
&lt;br /&gt;
[[Windows]]&lt;br /&gt;
&lt;br /&gt;
[[Home Automation]]&lt;br /&gt;
&lt;br /&gt;
[[Raspberry Pi]]&lt;br /&gt;
&lt;br /&gt;
[[Backup]]&lt;br /&gt;
&lt;br /&gt;
[[Boats]]&lt;br /&gt;
&lt;br /&gt;
[[BIOS]]&lt;br /&gt;
&lt;br /&gt;
[[TCPdump]]&lt;/div&gt;</summary>
		<author><name>Steffe</name></author>
	</entry>
	<entry>
		<id>https://wiki.steffe.net/index.php?title=Kodi&amp;diff=275</id>
		<title>Kodi</title>
		<link rel="alternate" type="text/html" href="https://wiki.steffe.net/index.php?title=Kodi&amp;diff=275"/>
		<updated>2025-01-02T13:22:12Z</updated>

		<summary type="html">&lt;p&gt;Steffe: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;To get both MCE keyboard and MCE remote to work simultaneously:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 ir-keytable -p mce_kbd -p rc-6&lt;br /&gt;
&lt;br /&gt;
More info here: https://forum.libreelec.tv/thread/12348-mce-keyboard-input-not-detected/&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;To make sure the BACK button stops the video instead of putting it in the background:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
  Add-ons -&amp;gt; Install from Repository -&amp;gt; Kodi Add-on Repository -&amp;gt; Program add-ons -&amp;gt; Keymap Editor -&amp;gt; Install -&amp;gt;Keymap Editor -&amp;gt; Run -&amp;gt; Edit -&amp;gt; Fullscreen Video -&amp;gt; Playback -&amp;gt; Stop - browser_back -&amp;gt; Edit key -&amp;gt;Press the BACK button on your remote&lt;br /&gt;
&lt;br /&gt;
Hit back until you see the SAVE option.&lt;/div&gt;</summary>
		<author><name>Steffe</name></author>
	</entry>
	<entry>
		<id>https://wiki.steffe.net/index.php?title=Python&amp;diff=273</id>
		<title>Python</title>
		<link rel="alternate" type="text/html" href="https://wiki.steffe.net/index.php?title=Python&amp;diff=273"/>
		<updated>2024-10-14T09:30:35Z</updated>

		<summary type="html">&lt;p&gt;Steffe: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Threading ==&lt;br /&gt;
&lt;br /&gt;
http://www.tutorialspoint.com/python/python_multithreading.htm&lt;br /&gt;
&lt;br /&gt;
Note however that threading in python is limited due to the GIL. To achieve &amp;quot;true&amp;quot; threading, use the &amp;quot;[https://docs.python.org/2/library/multiprocessing.html multiprocess]&amp;quot; library (which in fact spawns different processes and uses IPC mechanism for communication etc): https://www.quantstart.com/articles/Parallelising-Python-with-Threading-and-Multiprocessing&lt;br /&gt;
&lt;br /&gt;
== Debugging ==&lt;br /&gt;
&lt;br /&gt;
Python can be debugged using rpdb2: https://pypi.org/project/rpdb2/&lt;br /&gt;
&lt;br /&gt;
Since it is not distributed with any major distributions, you have to install it using pip, preferably in a virtual environment:&lt;br /&gt;
&lt;br /&gt;
 mkdir ~/pyenv&lt;br /&gt;
 mkdir ~/pyenv/rpdb2&lt;br /&gt;
 python -m venv pyenv/rpdb2/&lt;br /&gt;
 ~/pyenv/rpdb2/bin/pip install rpdb2&lt;br /&gt;
&lt;br /&gt;
Now you need to hook into rpdb2 from the python program that you want to debug. Add this line to the python code:&lt;br /&gt;
&lt;br /&gt;
 import rpdb2; rpdb2.start_embedded_debugger(&amp;quot;pass&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
The string &amp;quot;pass&amp;quot; is the password to connect from the debugger. Now start your application (using the same virtual environment so that you can access the rpdb2 library):&lt;br /&gt;
&lt;br /&gt;
 ~/pyenv/rpdb2/bin/python &amp;lt;yourapplication.py&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It will halt at startup and wait for debugger to connect. In another terminal, launch the debugger:&lt;br /&gt;
&lt;br /&gt;
  ~/pyenv/rpdb2/bin/python -m rpdb2&lt;br /&gt;
&lt;br /&gt;
Now issue the following commands to attach to your process and run it:&lt;br /&gt;
&lt;br /&gt;
 password pass&lt;br /&gt;
 attach&lt;br /&gt;
 go&lt;br /&gt;
&lt;br /&gt;
Now you can issue command &amp;quot;help&amp;quot; to get more info. Commands such as &amp;quot;thread&amp;quot; and &amp;quot;stack&amp;quot; might be helpful.&lt;br /&gt;
&lt;br /&gt;
== Tkinter and simple GUI programming ==&lt;br /&gt;
&lt;br /&gt;
 #!/usr/bin/env python&lt;br /&gt;
 &lt;br /&gt;
 from Tkinter import *&lt;br /&gt;
 &lt;br /&gt;
 def drawframe():&lt;br /&gt;
 	c.delete(&amp;quot;all&amp;quot;)&lt;br /&gt;
 	c.create_rectangle(0, 0, 150, 75 + c.steffe_i, fill=&amp;quot;blue&amp;quot;)&lt;br /&gt;
 	c.steffe_i += 1&lt;br /&gt;
 	root.after(10, drawframe)&lt;br /&gt;
 &lt;br /&gt;
 def mouseclick(event):&lt;br /&gt;
 	print &amp;quot;Mouse click at&amp;quot;, event.x, event.y&lt;br /&gt;
 &lt;br /&gt;
 def keyclick(event):&lt;br /&gt;
 	print &amp;quot;Key click&amp;quot;, event.keysym&lt;br /&gt;
 &lt;br /&gt;
 root = Tk()&lt;br /&gt;
 c = Canvas(root, width=640, height=480)&lt;br /&gt;
 c.pack()&lt;br /&gt;
 &lt;br /&gt;
 root.bind(&amp;quot;&amp;lt;Key&amp;gt;&amp;quot;, keyclick)&lt;br /&gt;
 root.bind(&amp;quot;&amp;lt;Button-1&amp;gt;&amp;quot;, mouseclick)&lt;br /&gt;
 &lt;br /&gt;
 c.config(borderwidth = 10)&lt;br /&gt;
 c.config(background = &amp;quot;grey15&amp;quot;)&lt;br /&gt;
 c.steffe_i = 0&lt;br /&gt;
 &lt;br /&gt;
 root.after(10, drawframe)&lt;br /&gt;
 mainloop()&lt;br /&gt;
&lt;br /&gt;
== One function proper hexdump ==&lt;br /&gt;
The following function will convert a byte array to a format like this:&lt;br /&gt;
&lt;br /&gt;
 00000000  69 6d 70 6f 72 74 20 73  74 72 69 6e 67 0d 0a 0d  |import.string... |&lt;br /&gt;
 00000010  0a 64 65 66 20 68 65 78  64 75 6d 70 28 63 76 65  |.def.hexdump(cve |&lt;br /&gt;
 00000020  63 74 6f 72 2c 20 70 72  65 66 69 78 20 3d 20 22  |ctor,.prefix.=.&amp;quot; |&lt;br /&gt;
 00000030  22 29 3a 0d 0a 09 69 20  3d 20 30 0d 0a 09 73 20  |&amp;quot;):...i.=.0...s. |&lt;br /&gt;
 00000040  3d 20 22 22 0d 0a 09 61  63 20 3d 20 5b 5d 0d 0a  |=.&amp;quot;&amp;quot;...ac.=.[].. |&lt;br /&gt;
 00000050  09 66 6f 72 20 63 20 69  6e 20 63 76 65 63 74 6f  |.for.c.in.cvecto |&lt;br /&gt;
 00000060  72 3a 0d 0a 09 09 69 66  20 6e 6f 74 20 69 20 25  |r:....if.not.i.% |&lt;br /&gt;
 00000070  20 31 36 3a 0d 0a 09 09  09 69 66 20 69 20 21 3d  |.16:.....if.i.!= |&lt;br /&gt;
&lt;br /&gt;
The function is not designed to be memory efficient, fast or good looking, just simple to drop in and get some hex output.&lt;br /&gt;
&lt;br /&gt;
 import string&lt;br /&gt;
 &lt;br /&gt;
 def hexdump(cvector, prefix = &amp;quot;&amp;quot;):&lt;br /&gt;
 	i = 0&lt;br /&gt;
 	s = &amp;quot;&amp;quot;&lt;br /&gt;
 	ac = []&lt;br /&gt;
 	for c in cvector:&lt;br /&gt;
 		if not i % 16:&lt;br /&gt;
 			if i != 0:&lt;br /&gt;
 				s += &amp;quot; |&amp;quot;&lt;br /&gt;
 				for cs in ac:&lt;br /&gt;
 					css = chr(cs)&lt;br /&gt;
 					s += css if css in string.printable and not css in string.whitespace else &amp;quot;.&amp;quot;&lt;br /&gt;
 				s += &amp;quot; |&amp;quot;&lt;br /&gt;
 				ac = []&lt;br /&gt;
 			s += &amp;quot;\n%s%s &amp;quot; % (prefix, &amp;quot;%08x &amp;quot; % i)&lt;br /&gt;
 		elif not i % 8:&lt;br /&gt;
 			s += &amp;quot; &amp;quot;&lt;br /&gt;
 		s += &amp;quot;%02x &amp;quot; % c&lt;br /&gt;
 		ac.append(c)&lt;br /&gt;
 		i += 1&lt;br /&gt;
 	if len(ac) &amp;gt; 0:&lt;br /&gt;
 		left = 16 - len(ac)&lt;br /&gt;
 		for k in range(left):&lt;br /&gt;
 			s += &amp;quot;   &amp;quot;&lt;br /&gt;
 		if left &amp;gt;= 8:&lt;br /&gt;
 			s += &amp;quot; &amp;quot;&lt;br /&gt;
 		s += &amp;quot; |&amp;quot;&lt;br /&gt;
 		for cs in ac:&lt;br /&gt;
 			css = chr(cs)&lt;br /&gt;
 			s += css if css in string.printable and not css in string.whitespace else &amp;quot;.&amp;quot;&lt;br /&gt;
 		for k in range(left):&lt;br /&gt;
 			s += &amp;quot; &amp;quot;&lt;br /&gt;
 		s += &amp;quot; |&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 		return s&lt;br /&gt;
 &lt;br /&gt;
 with open(&amp;quot;hexdump.py&amp;quot;, &amp;quot;rb&amp;quot;) as f:&lt;br /&gt;
 	data = f.read()&lt;br /&gt;
 	print(hexdump(data))&lt;/div&gt;</summary>
		<author><name>Steffe</name></author>
	</entry>
	<entry>
		<id>https://wiki.steffe.net/index.php?title=Windows&amp;diff=272</id>
		<title>Windows</title>
		<link rel="alternate" type="text/html" href="https://wiki.steffe.net/index.php?title=Windows&amp;diff=272"/>
		<updated>2024-10-11T12:45:00Z</updated>

		<summary type="html">&lt;p&gt;Steffe: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= Energy management =&lt;br /&gt;
&lt;br /&gt;
== Why computer was woken from sleep ==&lt;br /&gt;
To check why computer was woken from suspend:&lt;br /&gt;
 powercfg /lastwake&lt;br /&gt;
to get more details:&lt;br /&gt;
 powercfg /systempowerreport&lt;br /&gt;
&lt;br /&gt;
== To disable Windows Update waking up the computer ==&lt;br /&gt;
Run as Administrator:&lt;br /&gt;
 gpedit.msc&lt;br /&gt;
&lt;br /&gt;
Then go to:&lt;br /&gt;
 Computer Configuration / Administrative Templates / Windows Components / Windows Update / Enabling Windows Update Power Management to automatically wake up the system to install scheduled updates&lt;br /&gt;
and set it to &amp;quot;Disabled&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
For swedish Windows:&lt;br /&gt;
 Datorkonfiguration / Administrativa mallar / Windows-komponenter / Windows Update / Aktivera automatisk väckning via Energisparfunktioner för installation av schemalagda uppdateringar&lt;br /&gt;
and set it to &amp;quot;Inaktiverad&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== To disable hibernation ==&lt;br /&gt;
&lt;br /&gt;
 powercfg.exe /h off&lt;br /&gt;
&lt;br /&gt;
== To uninstall a specific driver ==&lt;br /&gt;
&lt;br /&gt;
In a elevated command prompt:&lt;br /&gt;
 dism /online /get-drivers /format:table &amp;gt; c:\drivers.txt&lt;br /&gt;
Look through the drivers.txt file, and then you can do things like:&lt;br /&gt;
 pnputil.exe /d oem111.inf&lt;br /&gt;
&lt;br /&gt;
== To enable DHCP ==&lt;br /&gt;
&lt;br /&gt;
Install a simple DHCP server like: https://www.hanewin.net/dhcp-e.htm&lt;/div&gt;</summary>
		<author><name>Steffe</name></author>
	</entry>
	<entry>
		<id>https://wiki.steffe.net/index.php?title=Linux&amp;diff=267</id>
		<title>Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.steffe.net/index.php?title=Linux&amp;diff=267"/>
		<updated>2024-08-06T12:43:51Z</updated>

		<summary type="html">&lt;p&gt;Steffe: /* Set up public key SSH authentication */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Debugging Linux applications ==&lt;br /&gt;
=== LDD ===&lt;br /&gt;
Linux LDD is just a wrapper for:&lt;br /&gt;
 LD_TRACE_LOADED_OBJECTS=1 &amp;lt;cmd&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Core dumps ===&lt;br /&gt;
To check core dump handler:&lt;br /&gt;
 cat /proc/sys/kernel/core_pattern&lt;br /&gt;
 |/usr/sbin/coredump-handler %h_%t_%p.core&lt;br /&gt;
&lt;br /&gt;
=== Valgrind ===&lt;br /&gt;
 valgrind --trace-children=yes --leak-check=full --show-leak-kinds=all &amp;lt;binary&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Dual boot with Windows ==&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
First install Windows as usual, then boot (in UEFI mode) from Debian netinst usb stick and install Debian. Install grub on your primary disk drive.&lt;br /&gt;
&lt;br /&gt;
=== Repair when computer only boots into Windows ===&lt;br /&gt;
&lt;br /&gt;
Download the Debian Live standard ISO from here: https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/&lt;br /&gt;
&lt;br /&gt;
Use Rufus to write it to a bootable USB stick: https://rufus.ie&lt;br /&gt;
&lt;br /&gt;
In Rufus, select your USB drive and the downloaded Debian ISO.&lt;br /&gt;
&lt;br /&gt;
Make sure you select &#039;&#039;Partition schema&#039;&#039; as &#039;&#039;GPT&#039;&#039; and &#039;&#039;Target system&#039;&#039; as &#039;&#039;UEFI (non CSM)&#039;&#039;.&lt;br /&gt;
Hit &amp;quot;Start&amp;quot; and when prompted choose to write the image in &#039;&#039;DD&#039;&#039; mode!&lt;br /&gt;
&lt;br /&gt;
Now insert the USB stick in your broken computer and boot it while hitting a magic key (such as F12) to enter BIOS boot menu. Select to boot your USB stick in &#039;&#039;UEFI mode&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Once Debian Live has started up, follow the instructions here: https://wiki.debian.org/GrubEFIReinstall#Using_A_Live_CD.2FUSB_To_Fix_Your_Current_System&lt;br /&gt;
&lt;br /&gt;
In short, first you need to figure out your target system root and EFI partitions:&lt;br /&gt;
&lt;br /&gt;
 sudo fdisk -l&lt;br /&gt;
 ...&lt;br /&gt;
 Device              Start        End    Sectors   Size Type&lt;br /&gt;
 &#039;&#039;&#039;/dev/nvme0n1p1       2048    1394687    1392640   680M EFI System&#039;&#039;&#039;&lt;br /&gt;
 /dev/nvme0n1p2    1394688    1656831     262144   128M Microsoft reserved&lt;br /&gt;
 /dev/nvme0n1p3    1656832 1764220927 1762564096 840.5G Microsoft basic data&lt;br /&gt;
 /dev/nvme0n1p4 1969020928 1971048447    2027520   990M Windows recovery environment&lt;br /&gt;
 /dev/nvme0n1p5 1971048448 1997713407   26664960  12.7G Windows recovery environment&lt;br /&gt;
 /dev/nvme0n1p6 1997715456 2000408575    2693120   1.3G Windows recovery environment&lt;br /&gt;
 &#039;&#039;&#039;/dev/nvme0n1p7 1764220928 1936101375  171880448    82G Linux filesystem&#039;&#039;&#039;&lt;br /&gt;
 /dev/nvme0n1p8 1936101376 1969020927   32919552  15.7G Linux swap&lt;br /&gt;
&lt;br /&gt;
So in this case our EFI partition is &#039;&#039;/dev/nvme0n1p1&#039;&#039; and our rootfs partition is &#039;&#039;/dev/nvme0n1p7&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Then do something like:&lt;br /&gt;
 sudo mount /dev/nvme0n1p7 /mnt/&lt;br /&gt;
 sudo mount /dev/nvme0n1p1 /mnt/boot/efi&lt;br /&gt;
 for i in /dev /dev/pts /proc /sys /sys/firmware/efi/efivars /run; do sudo mount -B $i /mnt$i; done&lt;br /&gt;
 sudo chroot /mnt&lt;br /&gt;
 sudo grub-install /dev/nvme0n1&lt;br /&gt;
 sudo update-grub&lt;br /&gt;
&lt;br /&gt;
=== Repair when computer only boots into Linux ===&lt;br /&gt;
&lt;br /&gt;
Most probably this is due to that &#039;&#039;os-prober&#039;&#039; was not run during your last &#039;&#039;update-grub&#039;&#039; session.&lt;br /&gt;
&lt;br /&gt;
In Linux, edit the file &#039;&#039;&#039;/etc/default/grub&#039;&#039;&#039; and add the following line:&lt;br /&gt;
 GRUB_DISABLE_OS_PROBER=false&lt;br /&gt;
&lt;br /&gt;
Also make sure you have the os-prober command installed:&lt;br /&gt;
 sudo apt install os-prober&lt;br /&gt;
 sudo os-prober&lt;br /&gt;
&lt;br /&gt;
Then run:&lt;br /&gt;
 sudo update-grub&lt;br /&gt;
&lt;br /&gt;
=== Configure grub to always boot into your last selected OS ===&lt;br /&gt;
&lt;br /&gt;
In Linux, edit the file &#039;&#039;&#039;/etc/default/grub&#039;&#039;&#039; and add the following lines:&lt;br /&gt;
 GRUB_DEFAULT=saved&lt;br /&gt;
 GRUB_SAVEDEFAULT=true&lt;br /&gt;
&lt;br /&gt;
== Configuring Linux ==&lt;br /&gt;
&lt;br /&gt;
=== Users ===&lt;br /&gt;
Add user stefan to group sudo:&lt;br /&gt;
 sudo adduser stefan sudo&lt;br /&gt;
&lt;br /&gt;
=== Change console language to english ===&lt;br /&gt;
 sudo dpkg-reconfigure locales&lt;br /&gt;
Then select en_US.UTF-8 (plus your local language), and then on next screen set the default language.&lt;br /&gt;
&lt;br /&gt;
=== Secure Boot ===&lt;br /&gt;
&lt;br /&gt;
If you want to run Linux, but you also dual boot into Windows and need to have your BIOS set up to boot in Secure Boot (for instance if you play Valorant in Windows), then you have two choices.&lt;br /&gt;
&lt;br /&gt;
# Boot Windows in secure mode but Linux in insecure mode.&lt;br /&gt;
# Boot both Windows and Linux in secure mode.&lt;br /&gt;
&lt;br /&gt;
==== Option 1 ====&lt;br /&gt;
&lt;br /&gt;
To get the first option working, you need to install Fedora/Nobara with UEFI enabled, but secure boot disabled in BIOS. If you at this point enable secure boot, Linux will not boot (complain about shim error).&lt;br /&gt;
&lt;br /&gt;
Boot up with secure boot disabled and do:&lt;br /&gt;
 sudo mokutil --disable-validation&lt;br /&gt;
Follow the instructions and then reboot your PC and choose to &amp;quot;Change Secure boot state&amp;quot; as described here: https://wiki.ubuntu.com/UEFI/SecureBoot/DKMS&lt;br /&gt;
&lt;br /&gt;
If you do this, you can install GRUB2 and enable Secure Boot in your BIOS again. If you now boot into GRUB2, you can select to boot Windows (which will then properly boot up in Secure Mode) or you can choose to boot Linux which will then boot up in insecure mode.&lt;br /&gt;
&lt;br /&gt;
==== Option 2 ====&lt;br /&gt;
&lt;br /&gt;
If you want to have also Linux booting up in secure mode, you can do that as well, but it requires a bit more work. There is a good guide here: https://wiki.archlinux.org/title/Unified_Extensible_Firmware_Interface/Secure_Boot#PreLoader&lt;br /&gt;
&lt;br /&gt;
Basically you need to:&lt;br /&gt;
&lt;br /&gt;
1 Create your own MOK key&lt;br /&gt;
 openssl req -newkey rsa:4096 -nodes -keyout mok.key -new -x509 -sha256 -days 3650 -subj &amp;quot;/CN=my Machine Owner Key/&amp;quot; -out mok.crt&lt;br /&gt;
 openssl x509 -outform DER -in mok.crt -out mok.cer&lt;br /&gt;
2 Sign the vmlinuz file in your /boot/ folder with this key&lt;br /&gt;
 sbsign --key mok.key --cert mok.crt --output /boot/vmlinuz-linux /boot/vmlinuz-linux&lt;br /&gt;
3 Enroll your key into your BIOS with mokutil&lt;br /&gt;
 mokutil --import mok.cer&lt;br /&gt;
&lt;br /&gt;
Then Linux will boot up fine in Secure Mode. You will however have 2 issues:&lt;br /&gt;
&lt;br /&gt;
* Whenever a new kernel is installed on your system, you need to sign it with your own MOK key, otherwise it will not boot.&lt;br /&gt;
* You can not install third party drivers such as the Nvidia graphics drivers unless you sign also them with your own MOK key.&lt;br /&gt;
&lt;br /&gt;
=== Graphics drivers ===&lt;br /&gt;
==== Disable Nvidia drivers and enable Intel embedded HD graphics driver ====&lt;br /&gt;
 sudo apt-get purge nvidia-*&lt;br /&gt;
 dpkg --list | grep nvidia&lt;br /&gt;
Make sure the list of nvidia packages is empty&lt;br /&gt;
 sudo apt-get install --reinstall xserver-xorg-video-intel libgl1-mesa-glx libgl1-mesa-dri mesa-utils xserver-xorg-core&lt;br /&gt;
 sudo dpkg-reconfigure xserver-xorg&lt;br /&gt;
 sudo update-alternatives --remove gl_conf /usr/lib/nvidia-current/ld.so.conf&lt;br /&gt;
 reboot&lt;br /&gt;
==== Disable Nvidia drivers and enable nouveau drivers ====&lt;br /&gt;
 sudo apt-get purge nvidia-*&lt;br /&gt;
 dpkg --list | grep nvidia&lt;br /&gt;
Make sure the list of nvidia packages is empty&lt;br /&gt;
 sudo apt-get install --reinstall xserver-xorg-video-nouveau&lt;br /&gt;
==== Disable nouveau drivers and enable Nvidia drivers ====&lt;br /&gt;
&#039;&#039;&#039;Option 1&#039;&#039;&#039;, using package manager:&lt;br /&gt;
 sudo apt-get install --reinstall nvidia-driver&lt;br /&gt;
or if your graphics card is not supported by the latest drivers (you can install the nvidia-detect package and run it to get this information):&lt;br /&gt;
 sudo apt-get install --reinstall nvidia-legacy-390xx-driver&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Option 2&#039;&#039;&#039;, using latest official NVidia driver:&lt;br /&gt;
* Go to [http://www.geforce.com] and download the latest Linux driver for your system.&lt;br /&gt;
* Switch to console mode (Ctrl+Alt+F1), kill any Xorg process (or mask/stop them with systemctl if you run systemd)&lt;br /&gt;
* Run the NVidia installer as root&lt;br /&gt;
 systemctl mask gdm&lt;br /&gt;
 systemctl stop gdm&lt;br /&gt;
 killall Xorg&lt;br /&gt;
 sudo ./NVIDIA-&amp;lt;driver-version-name&amp;gt;.run&lt;br /&gt;
&lt;br /&gt;
==== Display configuration set in nvidia-settings is not retained after boot ====&lt;br /&gt;
This is a conflict between nvidia-settings and Debians internal settings application.&lt;br /&gt;
* Remove ~/.config/monitors.xml (this is Debians settings)&lt;br /&gt;
* Reboot&lt;br /&gt;
* Set everything up the way you want with nvidia-settings&lt;br /&gt;
* Go to Settings - Display&lt;br /&gt;
* Do some minor change that brings up the &amp;quot;Apply&amp;quot; button and press it&lt;br /&gt;
* Current settings are now saved to ~/.config/monitors.xml and will be used during next boot.&lt;br /&gt;
&lt;br /&gt;
==== Display configuration for gdm3 ====&lt;br /&gt;
After doing the steps above, do:&lt;br /&gt;
 sudo cp /home/stefan/.config/monitors.xml /var/lib/gdm3/.config&lt;br /&gt;
&lt;br /&gt;
=== Restart Gnome ===&lt;br /&gt;
&lt;br /&gt;
Hit ALT+F2, then you get a &amp;quot;gnome run command&amp;quot; thingy. Enter &amp;quot;r&amp;quot; and hit enter!&lt;br /&gt;
&lt;br /&gt;
=== Switch default compiler ===&lt;br /&gt;
&lt;br /&gt;
 (cc --version;c++ --version;gcc --version;g++ --version) | grep Debian&lt;br /&gt;
  cc (Debian 6.1.1-11) 6.1.1 20160802&lt;br /&gt;
  c++ (Debian 6.1.1-11) 6.1.1 20160802&lt;br /&gt;
  gcc (Debian 6.1.1-11) 6.1.1 20160802&lt;br /&gt;
  g++ (Debian 6.1.1-11) 6.1.1 20160802&lt;br /&gt;
 &lt;br /&gt;
 sudo apt-get install gcc-4.9 g++-4.9&lt;br /&gt;
 &lt;br /&gt;
 gcc-4.9 --version&lt;br /&gt;
  gcc-4.9 (Debian 4.9.3-14) 4.9.3&lt;br /&gt;
 &lt;br /&gt;
 g++-4.9 --version&lt;br /&gt;
  g++-4.9 (Debian 4.9.3-14) 4.9.3&lt;br /&gt;
 &lt;br /&gt;
 gcc-5 --version&lt;br /&gt;
  gcc-5 (Debian 5.4.1-1) 5.4.1 20160803&lt;br /&gt;
 &lt;br /&gt;
 g++-5 --version&lt;br /&gt;
  g++-5 (Debian 5.4.1-1) 5.4.1 20160803&lt;br /&gt;
 &lt;br /&gt;
 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 10&lt;br /&gt;
 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 20&lt;br /&gt;
 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 10&lt;br /&gt;
 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 20&lt;br /&gt;
 sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 30&lt;br /&gt;
 sudo update-alternatives --set cc /usr/bin/gcc&lt;br /&gt;
 sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 30&lt;br /&gt;
 sudo update-alternatives --set c++ /usr/bin/g++&lt;br /&gt;
 &lt;br /&gt;
 (cc --version;c++ --version;gcc --version;g++ --version) | grep Debian&lt;br /&gt;
  cc (Debian 4.9.3-14) 4.9.3&lt;br /&gt;
  c++ (Debian 4.9.3-14) 4.9.3&lt;br /&gt;
  gcc (Debian 4.9.3-14) 4.9.3&lt;br /&gt;
  g++ (Debian 4.9.3-14) 4.9.3&lt;br /&gt;
&lt;br /&gt;
To go back:&lt;br /&gt;
 sudo update-alternatives --config gcc&lt;br /&gt;
 sudo update-alternatives --config g++&lt;br /&gt;
&lt;br /&gt;
=== Console is not filling the screen completely ===&lt;br /&gt;
This may be due to that the console thinks it is connected to a different display device than it actually is. This can be fixed by adding kernel command line parameters to disable that specific video mode.&lt;br /&gt;
 ls /sys/class/drm&lt;br /&gt;
 card0@  card0-DisplayPort-1@  card0-DisplayPort-2@  card0-DisplayPort-3@  card0-HDMI Type A-1@  card0-HDMI Type A-2@  card0-LVDS-1@  card0-SVIDEO-1@  card0-VGA-1@  controlD64@  version&lt;br /&gt;
Now check the different &amp;quot;modes&amp;quot; and &amp;quot;connected&amp;quot; and &amp;quot;enabled&amp;quot; nodes under each device to figure out which needs to be disabled. Then add to your kernel command line things such as&lt;br /&gt;
 video=LVDS-1:d video=SVIDEO-1:d video=TV-1:d&lt;br /&gt;
More information: https://bbs.archlinux.org/viewtopic.php?id=94990&lt;br /&gt;
&lt;br /&gt;
=== udev ===&lt;br /&gt;
==== udev rules ====&lt;br /&gt;
Some sample udev rules which might come handy:&lt;br /&gt;
 KERNEL==&amp;quot;tty*&amp;quot;, GROUP=&amp;quot;dialout&amp;quot;, MODE=&amp;quot;0660&amp;quot;&lt;br /&gt;
 SUBSYSTEM==&amp;quot;gpio&amp;quot;, GROUP:=&amp;quot;gpio&amp;quot;, MODE:=&amp;quot;0660&amp;quot;&lt;br /&gt;
 SUBSYSTEMS==&amp;quot;usb&amp;quot;, KERNEL==&amp;quot;ttyUSB*&amp;quot;, ATTRS{idVendor}==&amp;quot;0403&amp;quot;, ATTRS{idProduct}==&amp;quot;6001&amp;quot;, ATTRS{serial}==&amp;quot;XXXXXXXX&amp;quot;, SYMLINK+=&amp;quot;ftdiserial2usb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Use %m for the device number in symlink names.&lt;br /&gt;
&lt;br /&gt;
==== udev info ====&lt;br /&gt;
To query a device about its properties (which can be used in udev rules):&lt;br /&gt;
&lt;br /&gt;
 udevadm info --path=/sys/class/leds/example --query=all --attribute-walk&lt;br /&gt;
 udevadm info --name /dev/sda&lt;br /&gt;
 udevadm info -a /dev/sda&lt;br /&gt;
&lt;br /&gt;
More info: https://linux.die.net/man/7/udev&lt;br /&gt;
&lt;br /&gt;
==== udev debugging ====&lt;br /&gt;
Command to reload udev rules:&lt;br /&gt;
 sudo udevadm control --reload-rules &amp;amp;&amp;amp; sudo udevadm trigger&lt;br /&gt;
&lt;br /&gt;
Command to test udev rules:&lt;br /&gt;
 udevadm test --action=add /class/gpio&lt;br /&gt;
&lt;br /&gt;
=== Screen ===&lt;br /&gt;
&lt;br /&gt;
How to make the scrollback work in screen? Add the following to your .screenrc file:&lt;br /&gt;
 termcapinfo xterm ti@:te@&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== LVM ===&lt;br /&gt;
&lt;br /&gt;
==== How to extend your LVM disk ====&lt;br /&gt;
Investigate your current setup with:&lt;br /&gt;
 lsblk&lt;br /&gt;
&lt;br /&gt;
Then you can perform operations like these (which reduces size of live-root with 50GB and extends size of live-home with 50GB):&lt;br /&gt;
 lvreduce -r -L -50G /dev/mapper/nobara_localhost--live-root&lt;br /&gt;
 lvextend -r -L +50G /dev/mapper/nobara_localhost--live-home&lt;br /&gt;
&lt;br /&gt;
== Linux performance ==&lt;br /&gt;
 [http://www.brendangregg.com/ http://www.brendangregg.com/]&lt;br /&gt;
&lt;br /&gt;
== Kernel ==&lt;br /&gt;
=== Update to newer kernel on Debian ===&lt;br /&gt;
Add the backports repository to apt (/etc/apt/sources.list or something similar). Add these as new lines, do not change the existing ones:&lt;br /&gt;
 deb [arch=amd64] http://debian.lth.se/debian bookworm-backports main contrib non-free non-free-firmware&lt;br /&gt;
 deb-src [arch=amd64] http://debian.lth.se/debian bookworm-backports main contrib non-free non-free-firmware&lt;br /&gt;
Then do:&lt;br /&gt;
 sudo apt update&lt;br /&gt;
Then just install the latest linux-image-amd64, but since backports is lower prioritized, you need to specify that you want the backport version:&lt;br /&gt;
 sudo apt install linux-image-amd64/bookworm-backports&lt;br /&gt;
&lt;br /&gt;
If you then get messages about missing firmware (due to kernel being newer than linux-firmware-nonfree):&lt;br /&gt;
 Possible missing firmware /lib/firmware/i915/mtl_gsc_1.bin for module i915&lt;br /&gt;
 Possible missing firmware /lib/firmware/i915/dg2_huc_gsc.bin for module i915&lt;br /&gt;
 Possible missing firmware /lib/firmware/i915/mtl_huc_gsc.bin for module i915&lt;br /&gt;
 Possible missing firmware /lib/firmware/i915/mtl_guc_70.bin for module i915&lt;br /&gt;
you can manually:&lt;br /&gt;
* Download the missing firmwares from here: https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/&lt;br /&gt;
* Copy them to /lib/firmware/&lt;br /&gt;
* Regenerate initramfs with: &#039;&#039;sudo update-initramfs -u&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Update to newer kernel on Ubuntu ===&lt;br /&gt;
Simply install the correct version of linux-generic-hwe:&lt;br /&gt;
 sudo apt install linux-generic-hwe-20.04&lt;br /&gt;
or&lt;br /&gt;
 sudo apt install linux-generic-hwe-22.04&lt;br /&gt;
&lt;br /&gt;
= Clean out journalctl logs =&lt;br /&gt;
 journalctl --flush --rotate --vacuum-time=30d&lt;br /&gt;
&lt;br /&gt;
= Set up public key SSH authentication =&lt;br /&gt;
On your client PC which you want to connect from, run:&lt;br /&gt;
 ssh-keygen&lt;br /&gt;
Accept all the defaults. Use a passphrase if you want to (not for automated setups).&lt;br /&gt;
&lt;br /&gt;
Then send your key to the server for your account:&lt;br /&gt;
 ssh-copy-id -i .ssh/id_rsa.pub 10.0.0.26&lt;br /&gt;
&lt;br /&gt;
If you can not use ssh-copy-id (such as if adding a key for user root which can not log in using password), then simply cat they key from .ssh/id_rsa.pub on your client to the .ssh/authorized_keys file on your server.&lt;/div&gt;</summary>
		<author><name>Steffe</name></author>
	</entry>
	<entry>
		<id>https://wiki.steffe.net/index.php?title=Linux&amp;diff=266</id>
		<title>Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.steffe.net/index.php?title=Linux&amp;diff=266"/>
		<updated>2024-08-06T12:21:40Z</updated>

		<summary type="html">&lt;p&gt;Steffe: /* Clean out journalctl logs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Debugging Linux applications ==&lt;br /&gt;
=== LDD ===&lt;br /&gt;
Linux LDD is just a wrapper for:&lt;br /&gt;
 LD_TRACE_LOADED_OBJECTS=1 &amp;lt;cmd&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Core dumps ===&lt;br /&gt;
To check core dump handler:&lt;br /&gt;
 cat /proc/sys/kernel/core_pattern&lt;br /&gt;
 |/usr/sbin/coredump-handler %h_%t_%p.core&lt;br /&gt;
&lt;br /&gt;
=== Valgrind ===&lt;br /&gt;
 valgrind --trace-children=yes --leak-check=full --show-leak-kinds=all &amp;lt;binary&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Dual boot with Windows ==&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
First install Windows as usual, then boot (in UEFI mode) from Debian netinst usb stick and install Debian. Install grub on your primary disk drive.&lt;br /&gt;
&lt;br /&gt;
=== Repair when computer only boots into Windows ===&lt;br /&gt;
&lt;br /&gt;
Download the Debian Live standard ISO from here: https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/&lt;br /&gt;
&lt;br /&gt;
Use Rufus to write it to a bootable USB stick: https://rufus.ie&lt;br /&gt;
&lt;br /&gt;
In Rufus, select your USB drive and the downloaded Debian ISO.&lt;br /&gt;
&lt;br /&gt;
Make sure you select &#039;&#039;Partition schema&#039;&#039; as &#039;&#039;GPT&#039;&#039; and &#039;&#039;Target system&#039;&#039; as &#039;&#039;UEFI (non CSM)&#039;&#039;.&lt;br /&gt;
Hit &amp;quot;Start&amp;quot; and when prompted choose to write the image in &#039;&#039;DD&#039;&#039; mode!&lt;br /&gt;
&lt;br /&gt;
Now insert the USB stick in your broken computer and boot it while hitting a magic key (such as F12) to enter BIOS boot menu. Select to boot your USB stick in &#039;&#039;UEFI mode&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Once Debian Live has started up, follow the instructions here: https://wiki.debian.org/GrubEFIReinstall#Using_A_Live_CD.2FUSB_To_Fix_Your_Current_System&lt;br /&gt;
&lt;br /&gt;
In short, first you need to figure out your target system root and EFI partitions:&lt;br /&gt;
&lt;br /&gt;
 sudo fdisk -l&lt;br /&gt;
 ...&lt;br /&gt;
 Device              Start        End    Sectors   Size Type&lt;br /&gt;
 &#039;&#039;&#039;/dev/nvme0n1p1       2048    1394687    1392640   680M EFI System&#039;&#039;&#039;&lt;br /&gt;
 /dev/nvme0n1p2    1394688    1656831     262144   128M Microsoft reserved&lt;br /&gt;
 /dev/nvme0n1p3    1656832 1764220927 1762564096 840.5G Microsoft basic data&lt;br /&gt;
 /dev/nvme0n1p4 1969020928 1971048447    2027520   990M Windows recovery environment&lt;br /&gt;
 /dev/nvme0n1p5 1971048448 1997713407   26664960  12.7G Windows recovery environment&lt;br /&gt;
 /dev/nvme0n1p6 1997715456 2000408575    2693120   1.3G Windows recovery environment&lt;br /&gt;
 &#039;&#039;&#039;/dev/nvme0n1p7 1764220928 1936101375  171880448    82G Linux filesystem&#039;&#039;&#039;&lt;br /&gt;
 /dev/nvme0n1p8 1936101376 1969020927   32919552  15.7G Linux swap&lt;br /&gt;
&lt;br /&gt;
So in this case our EFI partition is &#039;&#039;/dev/nvme0n1p1&#039;&#039; and our rootfs partition is &#039;&#039;/dev/nvme0n1p7&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Then do something like:&lt;br /&gt;
 sudo mount /dev/nvme0n1p7 /mnt/&lt;br /&gt;
 sudo mount /dev/nvme0n1p1 /mnt/boot/efi&lt;br /&gt;
 for i in /dev /dev/pts /proc /sys /sys/firmware/efi/efivars /run; do sudo mount -B $i /mnt$i; done&lt;br /&gt;
 sudo chroot /mnt&lt;br /&gt;
 sudo grub-install /dev/nvme0n1&lt;br /&gt;
 sudo update-grub&lt;br /&gt;
&lt;br /&gt;
=== Repair when computer only boots into Linux ===&lt;br /&gt;
&lt;br /&gt;
Most probably this is due to that &#039;&#039;os-prober&#039;&#039; was not run during your last &#039;&#039;update-grub&#039;&#039; session.&lt;br /&gt;
&lt;br /&gt;
In Linux, edit the file &#039;&#039;&#039;/etc/default/grub&#039;&#039;&#039; and add the following line:&lt;br /&gt;
 GRUB_DISABLE_OS_PROBER=false&lt;br /&gt;
&lt;br /&gt;
Also make sure you have the os-prober command installed:&lt;br /&gt;
 sudo apt install os-prober&lt;br /&gt;
 sudo os-prober&lt;br /&gt;
&lt;br /&gt;
Then run:&lt;br /&gt;
 sudo update-grub&lt;br /&gt;
&lt;br /&gt;
=== Configure grub to always boot into your last selected OS ===&lt;br /&gt;
&lt;br /&gt;
In Linux, edit the file &#039;&#039;&#039;/etc/default/grub&#039;&#039;&#039; and add the following lines:&lt;br /&gt;
 GRUB_DEFAULT=saved&lt;br /&gt;
 GRUB_SAVEDEFAULT=true&lt;br /&gt;
&lt;br /&gt;
== Configuring Linux ==&lt;br /&gt;
&lt;br /&gt;
=== Users ===&lt;br /&gt;
Add user stefan to group sudo:&lt;br /&gt;
 sudo adduser stefan sudo&lt;br /&gt;
&lt;br /&gt;
=== Change console language to english ===&lt;br /&gt;
 sudo dpkg-reconfigure locales&lt;br /&gt;
Then select en_US.UTF-8 (plus your local language), and then on next screen set the default language.&lt;br /&gt;
&lt;br /&gt;
=== Secure Boot ===&lt;br /&gt;
&lt;br /&gt;
If you want to run Linux, but you also dual boot into Windows and need to have your BIOS set up to boot in Secure Boot (for instance if you play Valorant in Windows), then you have two choices.&lt;br /&gt;
&lt;br /&gt;
# Boot Windows in secure mode but Linux in insecure mode.&lt;br /&gt;
# Boot both Windows and Linux in secure mode.&lt;br /&gt;
&lt;br /&gt;
==== Option 1 ====&lt;br /&gt;
&lt;br /&gt;
To get the first option working, you need to install Fedora/Nobara with UEFI enabled, but secure boot disabled in BIOS. If you at this point enable secure boot, Linux will not boot (complain about shim error).&lt;br /&gt;
&lt;br /&gt;
Boot up with secure boot disabled and do:&lt;br /&gt;
 sudo mokutil --disable-validation&lt;br /&gt;
Follow the instructions and then reboot your PC and choose to &amp;quot;Change Secure boot state&amp;quot; as described here: https://wiki.ubuntu.com/UEFI/SecureBoot/DKMS&lt;br /&gt;
&lt;br /&gt;
If you do this, you can install GRUB2 and enable Secure Boot in your BIOS again. If you now boot into GRUB2, you can select to boot Windows (which will then properly boot up in Secure Mode) or you can choose to boot Linux which will then boot up in insecure mode.&lt;br /&gt;
&lt;br /&gt;
==== Option 2 ====&lt;br /&gt;
&lt;br /&gt;
If you want to have also Linux booting up in secure mode, you can do that as well, but it requires a bit more work. There is a good guide here: https://wiki.archlinux.org/title/Unified_Extensible_Firmware_Interface/Secure_Boot#PreLoader&lt;br /&gt;
&lt;br /&gt;
Basically you need to:&lt;br /&gt;
&lt;br /&gt;
1 Create your own MOK key&lt;br /&gt;
 openssl req -newkey rsa:4096 -nodes -keyout mok.key -new -x509 -sha256 -days 3650 -subj &amp;quot;/CN=my Machine Owner Key/&amp;quot; -out mok.crt&lt;br /&gt;
 openssl x509 -outform DER -in mok.crt -out mok.cer&lt;br /&gt;
2 Sign the vmlinuz file in your /boot/ folder with this key&lt;br /&gt;
 sbsign --key mok.key --cert mok.crt --output /boot/vmlinuz-linux /boot/vmlinuz-linux&lt;br /&gt;
3 Enroll your key into your BIOS with mokutil&lt;br /&gt;
 mokutil --import mok.cer&lt;br /&gt;
&lt;br /&gt;
Then Linux will boot up fine in Secure Mode. You will however have 2 issues:&lt;br /&gt;
&lt;br /&gt;
* Whenever a new kernel is installed on your system, you need to sign it with your own MOK key, otherwise it will not boot.&lt;br /&gt;
* You can not install third party drivers such as the Nvidia graphics drivers unless you sign also them with your own MOK key.&lt;br /&gt;
&lt;br /&gt;
=== Graphics drivers ===&lt;br /&gt;
==== Disable Nvidia drivers and enable Intel embedded HD graphics driver ====&lt;br /&gt;
 sudo apt-get purge nvidia-*&lt;br /&gt;
 dpkg --list | grep nvidia&lt;br /&gt;
Make sure the list of nvidia packages is empty&lt;br /&gt;
 sudo apt-get install --reinstall xserver-xorg-video-intel libgl1-mesa-glx libgl1-mesa-dri mesa-utils xserver-xorg-core&lt;br /&gt;
 sudo dpkg-reconfigure xserver-xorg&lt;br /&gt;
 sudo update-alternatives --remove gl_conf /usr/lib/nvidia-current/ld.so.conf&lt;br /&gt;
 reboot&lt;br /&gt;
==== Disable Nvidia drivers and enable nouveau drivers ====&lt;br /&gt;
 sudo apt-get purge nvidia-*&lt;br /&gt;
 dpkg --list | grep nvidia&lt;br /&gt;
Make sure the list of nvidia packages is empty&lt;br /&gt;
 sudo apt-get install --reinstall xserver-xorg-video-nouveau&lt;br /&gt;
==== Disable nouveau drivers and enable Nvidia drivers ====&lt;br /&gt;
&#039;&#039;&#039;Option 1&#039;&#039;&#039;, using package manager:&lt;br /&gt;
 sudo apt-get install --reinstall nvidia-driver&lt;br /&gt;
or if your graphics card is not supported by the latest drivers (you can install the nvidia-detect package and run it to get this information):&lt;br /&gt;
 sudo apt-get install --reinstall nvidia-legacy-390xx-driver&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Option 2&#039;&#039;&#039;, using latest official NVidia driver:&lt;br /&gt;
* Go to [http://www.geforce.com] and download the latest Linux driver for your system.&lt;br /&gt;
* Switch to console mode (Ctrl+Alt+F1), kill any Xorg process (or mask/stop them with systemctl if you run systemd)&lt;br /&gt;
* Run the NVidia installer as root&lt;br /&gt;
 systemctl mask gdm&lt;br /&gt;
 systemctl stop gdm&lt;br /&gt;
 killall Xorg&lt;br /&gt;
 sudo ./NVIDIA-&amp;lt;driver-version-name&amp;gt;.run&lt;br /&gt;
&lt;br /&gt;
==== Display configuration set in nvidia-settings is not retained after boot ====&lt;br /&gt;
This is a conflict between nvidia-settings and Debians internal settings application.&lt;br /&gt;
* Remove ~/.config/monitors.xml (this is Debians settings)&lt;br /&gt;
* Reboot&lt;br /&gt;
* Set everything up the way you want with nvidia-settings&lt;br /&gt;
* Go to Settings - Display&lt;br /&gt;
* Do some minor change that brings up the &amp;quot;Apply&amp;quot; button and press it&lt;br /&gt;
* Current settings are now saved to ~/.config/monitors.xml and will be used during next boot.&lt;br /&gt;
&lt;br /&gt;
==== Display configuration for gdm3 ====&lt;br /&gt;
After doing the steps above, do:&lt;br /&gt;
 sudo cp /home/stefan/.config/monitors.xml /var/lib/gdm3/.config&lt;br /&gt;
&lt;br /&gt;
=== Restart Gnome ===&lt;br /&gt;
&lt;br /&gt;
Hit ALT+F2, then you get a &amp;quot;gnome run command&amp;quot; thingy. Enter &amp;quot;r&amp;quot; and hit enter!&lt;br /&gt;
&lt;br /&gt;
=== Switch default compiler ===&lt;br /&gt;
&lt;br /&gt;
 (cc --version;c++ --version;gcc --version;g++ --version) | grep Debian&lt;br /&gt;
  cc (Debian 6.1.1-11) 6.1.1 20160802&lt;br /&gt;
  c++ (Debian 6.1.1-11) 6.1.1 20160802&lt;br /&gt;
  gcc (Debian 6.1.1-11) 6.1.1 20160802&lt;br /&gt;
  g++ (Debian 6.1.1-11) 6.1.1 20160802&lt;br /&gt;
 &lt;br /&gt;
 sudo apt-get install gcc-4.9 g++-4.9&lt;br /&gt;
 &lt;br /&gt;
 gcc-4.9 --version&lt;br /&gt;
  gcc-4.9 (Debian 4.9.3-14) 4.9.3&lt;br /&gt;
 &lt;br /&gt;
 g++-4.9 --version&lt;br /&gt;
  g++-4.9 (Debian 4.9.3-14) 4.9.3&lt;br /&gt;
 &lt;br /&gt;
 gcc-5 --version&lt;br /&gt;
  gcc-5 (Debian 5.4.1-1) 5.4.1 20160803&lt;br /&gt;
 &lt;br /&gt;
 g++-5 --version&lt;br /&gt;
  g++-5 (Debian 5.4.1-1) 5.4.1 20160803&lt;br /&gt;
 &lt;br /&gt;
 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 10&lt;br /&gt;
 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 20&lt;br /&gt;
 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 10&lt;br /&gt;
 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 20&lt;br /&gt;
 sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 30&lt;br /&gt;
 sudo update-alternatives --set cc /usr/bin/gcc&lt;br /&gt;
 sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 30&lt;br /&gt;
 sudo update-alternatives --set c++ /usr/bin/g++&lt;br /&gt;
 &lt;br /&gt;
 (cc --version;c++ --version;gcc --version;g++ --version) | grep Debian&lt;br /&gt;
  cc (Debian 4.9.3-14) 4.9.3&lt;br /&gt;
  c++ (Debian 4.9.3-14) 4.9.3&lt;br /&gt;
  gcc (Debian 4.9.3-14) 4.9.3&lt;br /&gt;
  g++ (Debian 4.9.3-14) 4.9.3&lt;br /&gt;
&lt;br /&gt;
To go back:&lt;br /&gt;
 sudo update-alternatives --config gcc&lt;br /&gt;
 sudo update-alternatives --config g++&lt;br /&gt;
&lt;br /&gt;
=== Console is not filling the screen completely ===&lt;br /&gt;
This may be due to that the console thinks it is connected to a different display device than it actually is. This can be fixed by adding kernel command line parameters to disable that specific video mode.&lt;br /&gt;
 ls /sys/class/drm&lt;br /&gt;
 card0@  card0-DisplayPort-1@  card0-DisplayPort-2@  card0-DisplayPort-3@  card0-HDMI Type A-1@  card0-HDMI Type A-2@  card0-LVDS-1@  card0-SVIDEO-1@  card0-VGA-1@  controlD64@  version&lt;br /&gt;
Now check the different &amp;quot;modes&amp;quot; and &amp;quot;connected&amp;quot; and &amp;quot;enabled&amp;quot; nodes under each device to figure out which needs to be disabled. Then add to your kernel command line things such as&lt;br /&gt;
 video=LVDS-1:d video=SVIDEO-1:d video=TV-1:d&lt;br /&gt;
More information: https://bbs.archlinux.org/viewtopic.php?id=94990&lt;br /&gt;
&lt;br /&gt;
=== udev ===&lt;br /&gt;
==== udev rules ====&lt;br /&gt;
Some sample udev rules which might come handy:&lt;br /&gt;
 KERNEL==&amp;quot;tty*&amp;quot;, GROUP=&amp;quot;dialout&amp;quot;, MODE=&amp;quot;0660&amp;quot;&lt;br /&gt;
 SUBSYSTEM==&amp;quot;gpio&amp;quot;, GROUP:=&amp;quot;gpio&amp;quot;, MODE:=&amp;quot;0660&amp;quot;&lt;br /&gt;
 SUBSYSTEMS==&amp;quot;usb&amp;quot;, KERNEL==&amp;quot;ttyUSB*&amp;quot;, ATTRS{idVendor}==&amp;quot;0403&amp;quot;, ATTRS{idProduct}==&amp;quot;6001&amp;quot;, ATTRS{serial}==&amp;quot;XXXXXXXX&amp;quot;, SYMLINK+=&amp;quot;ftdiserial2usb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Use %m for the device number in symlink names.&lt;br /&gt;
&lt;br /&gt;
==== udev info ====&lt;br /&gt;
To query a device about its properties (which can be used in udev rules):&lt;br /&gt;
&lt;br /&gt;
 udevadm info --path=/sys/class/leds/example --query=all --attribute-walk&lt;br /&gt;
 udevadm info --name /dev/sda&lt;br /&gt;
 udevadm info -a /dev/sda&lt;br /&gt;
&lt;br /&gt;
More info: https://linux.die.net/man/7/udev&lt;br /&gt;
&lt;br /&gt;
==== udev debugging ====&lt;br /&gt;
Command to reload udev rules:&lt;br /&gt;
 sudo udevadm control --reload-rules &amp;amp;&amp;amp; sudo udevadm trigger&lt;br /&gt;
&lt;br /&gt;
Command to test udev rules:&lt;br /&gt;
 udevadm test --action=add /class/gpio&lt;br /&gt;
&lt;br /&gt;
=== Screen ===&lt;br /&gt;
&lt;br /&gt;
How to make the scrollback work in screen? Add the following to your .screenrc file:&lt;br /&gt;
 termcapinfo xterm ti@:te@&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== LVM ===&lt;br /&gt;
&lt;br /&gt;
==== How to extend your LVM disk ====&lt;br /&gt;
Investigate your current setup with:&lt;br /&gt;
 lsblk&lt;br /&gt;
&lt;br /&gt;
Then you can perform operations like these (which reduces size of live-root with 50GB and extends size of live-home with 50GB):&lt;br /&gt;
 lvreduce -r -L -50G /dev/mapper/nobara_localhost--live-root&lt;br /&gt;
 lvextend -r -L +50G /dev/mapper/nobara_localhost--live-home&lt;br /&gt;
&lt;br /&gt;
== Linux performance ==&lt;br /&gt;
 [http://www.brendangregg.com/ http://www.brendangregg.com/]&lt;br /&gt;
&lt;br /&gt;
== Kernel ==&lt;br /&gt;
=== Update to newer kernel on Debian ===&lt;br /&gt;
Add the backports repository to apt (/etc/apt/sources.list or something similar). Add these as new lines, do not change the existing ones:&lt;br /&gt;
 deb [arch=amd64] http://debian.lth.se/debian bookworm-backports main contrib non-free non-free-firmware&lt;br /&gt;
 deb-src [arch=amd64] http://debian.lth.se/debian bookworm-backports main contrib non-free non-free-firmware&lt;br /&gt;
Then do:&lt;br /&gt;
 sudo apt update&lt;br /&gt;
Then just install the latest linux-image-amd64, but since backports is lower prioritized, you need to specify that you want the backport version:&lt;br /&gt;
 sudo apt install linux-image-amd64/bookworm-backports&lt;br /&gt;
&lt;br /&gt;
If you then get messages about missing firmware (due to kernel being newer than linux-firmware-nonfree):&lt;br /&gt;
 Possible missing firmware /lib/firmware/i915/mtl_gsc_1.bin for module i915&lt;br /&gt;
 Possible missing firmware /lib/firmware/i915/dg2_huc_gsc.bin for module i915&lt;br /&gt;
 Possible missing firmware /lib/firmware/i915/mtl_huc_gsc.bin for module i915&lt;br /&gt;
 Possible missing firmware /lib/firmware/i915/mtl_guc_70.bin for module i915&lt;br /&gt;
you can manually:&lt;br /&gt;
* Download the missing firmwares from here: https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/&lt;br /&gt;
* Copy them to /lib/firmware/&lt;br /&gt;
* Regenerate initramfs with: &#039;&#039;sudo update-initramfs -u&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Update to newer kernel on Ubuntu ===&lt;br /&gt;
Simply install the correct version of linux-generic-hwe:&lt;br /&gt;
 sudo apt install linux-generic-hwe-20.04&lt;br /&gt;
or&lt;br /&gt;
 sudo apt install linux-generic-hwe-22.04&lt;br /&gt;
&lt;br /&gt;
= Clean out journalctl logs =&lt;br /&gt;
 journalctl --flush --rotate --vacuum-time=30d&lt;br /&gt;
&lt;br /&gt;
= Set up public key SSH authentication =&lt;br /&gt;
On your client PC which you want to connect from, run:&lt;br /&gt;
 ssh-keygen&lt;br /&gt;
Accept all the defaults. Use a passphrase if you want to (not for automated setups).&lt;br /&gt;
&lt;br /&gt;
Then send your key to the server for your account:&lt;br /&gt;
 ssh-copy-id -i .ssh/id_rsa.pub 10.0.0.26&lt;/div&gt;</summary>
		<author><name>Steffe</name></author>
	</entry>
	<entry>
		<id>https://wiki.steffe.net/index.php?title=Linux&amp;diff=265</id>
		<title>Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.steffe.net/index.php?title=Linux&amp;diff=265"/>
		<updated>2024-08-06T08:41:57Z</updated>

		<summary type="html">&lt;p&gt;Steffe: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Debugging Linux applications ==&lt;br /&gt;
=== LDD ===&lt;br /&gt;
Linux LDD is just a wrapper for:&lt;br /&gt;
 LD_TRACE_LOADED_OBJECTS=1 &amp;lt;cmd&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Core dumps ===&lt;br /&gt;
To check core dump handler:&lt;br /&gt;
 cat /proc/sys/kernel/core_pattern&lt;br /&gt;
 |/usr/sbin/coredump-handler %h_%t_%p.core&lt;br /&gt;
&lt;br /&gt;
=== Valgrind ===&lt;br /&gt;
 valgrind --trace-children=yes --leak-check=full --show-leak-kinds=all &amp;lt;binary&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Dual boot with Windows ==&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
First install Windows as usual, then boot (in UEFI mode) from Debian netinst usb stick and install Debian. Install grub on your primary disk drive.&lt;br /&gt;
&lt;br /&gt;
=== Repair when computer only boots into Windows ===&lt;br /&gt;
&lt;br /&gt;
Download the Debian Live standard ISO from here: https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/&lt;br /&gt;
&lt;br /&gt;
Use Rufus to write it to a bootable USB stick: https://rufus.ie&lt;br /&gt;
&lt;br /&gt;
In Rufus, select your USB drive and the downloaded Debian ISO.&lt;br /&gt;
&lt;br /&gt;
Make sure you select &#039;&#039;Partition schema&#039;&#039; as &#039;&#039;GPT&#039;&#039; and &#039;&#039;Target system&#039;&#039; as &#039;&#039;UEFI (non CSM)&#039;&#039;.&lt;br /&gt;
Hit &amp;quot;Start&amp;quot; and when prompted choose to write the image in &#039;&#039;DD&#039;&#039; mode!&lt;br /&gt;
&lt;br /&gt;
Now insert the USB stick in your broken computer and boot it while hitting a magic key (such as F12) to enter BIOS boot menu. Select to boot your USB stick in &#039;&#039;UEFI mode&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Once Debian Live has started up, follow the instructions here: https://wiki.debian.org/GrubEFIReinstall#Using_A_Live_CD.2FUSB_To_Fix_Your_Current_System&lt;br /&gt;
&lt;br /&gt;
In short, first you need to figure out your target system root and EFI partitions:&lt;br /&gt;
&lt;br /&gt;
 sudo fdisk -l&lt;br /&gt;
 ...&lt;br /&gt;
 Device              Start        End    Sectors   Size Type&lt;br /&gt;
 &#039;&#039;&#039;/dev/nvme0n1p1       2048    1394687    1392640   680M EFI System&#039;&#039;&#039;&lt;br /&gt;
 /dev/nvme0n1p2    1394688    1656831     262144   128M Microsoft reserved&lt;br /&gt;
 /dev/nvme0n1p3    1656832 1764220927 1762564096 840.5G Microsoft basic data&lt;br /&gt;
 /dev/nvme0n1p4 1969020928 1971048447    2027520   990M Windows recovery environment&lt;br /&gt;
 /dev/nvme0n1p5 1971048448 1997713407   26664960  12.7G Windows recovery environment&lt;br /&gt;
 /dev/nvme0n1p6 1997715456 2000408575    2693120   1.3G Windows recovery environment&lt;br /&gt;
 &#039;&#039;&#039;/dev/nvme0n1p7 1764220928 1936101375  171880448    82G Linux filesystem&#039;&#039;&#039;&lt;br /&gt;
 /dev/nvme0n1p8 1936101376 1969020927   32919552  15.7G Linux swap&lt;br /&gt;
&lt;br /&gt;
So in this case our EFI partition is &#039;&#039;/dev/nvme0n1p1&#039;&#039; and our rootfs partition is &#039;&#039;/dev/nvme0n1p7&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Then do something like:&lt;br /&gt;
 sudo mount /dev/nvme0n1p7 /mnt/&lt;br /&gt;
 sudo mount /dev/nvme0n1p1 /mnt/boot/efi&lt;br /&gt;
 for i in /dev /dev/pts /proc /sys /sys/firmware/efi/efivars /run; do sudo mount -B $i /mnt$i; done&lt;br /&gt;
 sudo chroot /mnt&lt;br /&gt;
 sudo grub-install /dev/nvme0n1&lt;br /&gt;
 sudo update-grub&lt;br /&gt;
&lt;br /&gt;
=== Repair when computer only boots into Linux ===&lt;br /&gt;
&lt;br /&gt;
Most probably this is due to that &#039;&#039;os-prober&#039;&#039; was not run during your last &#039;&#039;update-grub&#039;&#039; session.&lt;br /&gt;
&lt;br /&gt;
In Linux, edit the file &#039;&#039;&#039;/etc/default/grub&#039;&#039;&#039; and add the following line:&lt;br /&gt;
 GRUB_DISABLE_OS_PROBER=false&lt;br /&gt;
&lt;br /&gt;
Also make sure you have the os-prober command installed:&lt;br /&gt;
 sudo apt install os-prober&lt;br /&gt;
 sudo os-prober&lt;br /&gt;
&lt;br /&gt;
Then run:&lt;br /&gt;
 sudo update-grub&lt;br /&gt;
&lt;br /&gt;
=== Configure grub to always boot into your last selected OS ===&lt;br /&gt;
&lt;br /&gt;
In Linux, edit the file &#039;&#039;&#039;/etc/default/grub&#039;&#039;&#039; and add the following lines:&lt;br /&gt;
 GRUB_DEFAULT=saved&lt;br /&gt;
 GRUB_SAVEDEFAULT=true&lt;br /&gt;
&lt;br /&gt;
== Configuring Linux ==&lt;br /&gt;
&lt;br /&gt;
=== Users ===&lt;br /&gt;
Add user stefan to group sudo:&lt;br /&gt;
 sudo adduser stefan sudo&lt;br /&gt;
&lt;br /&gt;
=== Change console language to english ===&lt;br /&gt;
 sudo dpkg-reconfigure locales&lt;br /&gt;
Then select en_US.UTF-8 (plus your local language), and then on next screen set the default language.&lt;br /&gt;
&lt;br /&gt;
=== Secure Boot ===&lt;br /&gt;
&lt;br /&gt;
If you want to run Linux, but you also dual boot into Windows and need to have your BIOS set up to boot in Secure Boot (for instance if you play Valorant in Windows), then you have two choices.&lt;br /&gt;
&lt;br /&gt;
# Boot Windows in secure mode but Linux in insecure mode.&lt;br /&gt;
# Boot both Windows and Linux in secure mode.&lt;br /&gt;
&lt;br /&gt;
==== Option 1 ====&lt;br /&gt;
&lt;br /&gt;
To get the first option working, you need to install Fedora/Nobara with UEFI enabled, but secure boot disabled in BIOS. If you at this point enable secure boot, Linux will not boot (complain about shim error).&lt;br /&gt;
&lt;br /&gt;
Boot up with secure boot disabled and do:&lt;br /&gt;
 sudo mokutil --disable-validation&lt;br /&gt;
Follow the instructions and then reboot your PC and choose to &amp;quot;Change Secure boot state&amp;quot; as described here: https://wiki.ubuntu.com/UEFI/SecureBoot/DKMS&lt;br /&gt;
&lt;br /&gt;
If you do this, you can install GRUB2 and enable Secure Boot in your BIOS again. If you now boot into GRUB2, you can select to boot Windows (which will then properly boot up in Secure Mode) or you can choose to boot Linux which will then boot up in insecure mode.&lt;br /&gt;
&lt;br /&gt;
==== Option 2 ====&lt;br /&gt;
&lt;br /&gt;
If you want to have also Linux booting up in secure mode, you can do that as well, but it requires a bit more work. There is a good guide here: https://wiki.archlinux.org/title/Unified_Extensible_Firmware_Interface/Secure_Boot#PreLoader&lt;br /&gt;
&lt;br /&gt;
Basically you need to:&lt;br /&gt;
&lt;br /&gt;
1 Create your own MOK key&lt;br /&gt;
 openssl req -newkey rsa:4096 -nodes -keyout mok.key -new -x509 -sha256 -days 3650 -subj &amp;quot;/CN=my Machine Owner Key/&amp;quot; -out mok.crt&lt;br /&gt;
 openssl x509 -outform DER -in mok.crt -out mok.cer&lt;br /&gt;
2 Sign the vmlinuz file in your /boot/ folder with this key&lt;br /&gt;
 sbsign --key mok.key --cert mok.crt --output /boot/vmlinuz-linux /boot/vmlinuz-linux&lt;br /&gt;
3 Enroll your key into your BIOS with mokutil&lt;br /&gt;
 mokutil --import mok.cer&lt;br /&gt;
&lt;br /&gt;
Then Linux will boot up fine in Secure Mode. You will however have 2 issues:&lt;br /&gt;
&lt;br /&gt;
* Whenever a new kernel is installed on your system, you need to sign it with your own MOK key, otherwise it will not boot.&lt;br /&gt;
* You can not install third party drivers such as the Nvidia graphics drivers unless you sign also them with your own MOK key.&lt;br /&gt;
&lt;br /&gt;
=== Graphics drivers ===&lt;br /&gt;
==== Disable Nvidia drivers and enable Intel embedded HD graphics driver ====&lt;br /&gt;
 sudo apt-get purge nvidia-*&lt;br /&gt;
 dpkg --list | grep nvidia&lt;br /&gt;
Make sure the list of nvidia packages is empty&lt;br /&gt;
 sudo apt-get install --reinstall xserver-xorg-video-intel libgl1-mesa-glx libgl1-mesa-dri mesa-utils xserver-xorg-core&lt;br /&gt;
 sudo dpkg-reconfigure xserver-xorg&lt;br /&gt;
 sudo update-alternatives --remove gl_conf /usr/lib/nvidia-current/ld.so.conf&lt;br /&gt;
 reboot&lt;br /&gt;
==== Disable Nvidia drivers and enable nouveau drivers ====&lt;br /&gt;
 sudo apt-get purge nvidia-*&lt;br /&gt;
 dpkg --list | grep nvidia&lt;br /&gt;
Make sure the list of nvidia packages is empty&lt;br /&gt;
 sudo apt-get install --reinstall xserver-xorg-video-nouveau&lt;br /&gt;
==== Disable nouveau drivers and enable Nvidia drivers ====&lt;br /&gt;
&#039;&#039;&#039;Option 1&#039;&#039;&#039;, using package manager:&lt;br /&gt;
 sudo apt-get install --reinstall nvidia-driver&lt;br /&gt;
or if your graphics card is not supported by the latest drivers (you can install the nvidia-detect package and run it to get this information):&lt;br /&gt;
 sudo apt-get install --reinstall nvidia-legacy-390xx-driver&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Option 2&#039;&#039;&#039;, using latest official NVidia driver:&lt;br /&gt;
* Go to [http://www.geforce.com] and download the latest Linux driver for your system.&lt;br /&gt;
* Switch to console mode (Ctrl+Alt+F1), kill any Xorg process (or mask/stop them with systemctl if you run systemd)&lt;br /&gt;
* Run the NVidia installer as root&lt;br /&gt;
 systemctl mask gdm&lt;br /&gt;
 systemctl stop gdm&lt;br /&gt;
 killall Xorg&lt;br /&gt;
 sudo ./NVIDIA-&amp;lt;driver-version-name&amp;gt;.run&lt;br /&gt;
&lt;br /&gt;
==== Display configuration set in nvidia-settings is not retained after boot ====&lt;br /&gt;
This is a conflict between nvidia-settings and Debians internal settings application.&lt;br /&gt;
* Remove ~/.config/monitors.xml (this is Debians settings)&lt;br /&gt;
* Reboot&lt;br /&gt;
* Set everything up the way you want with nvidia-settings&lt;br /&gt;
* Go to Settings - Display&lt;br /&gt;
* Do some minor change that brings up the &amp;quot;Apply&amp;quot; button and press it&lt;br /&gt;
* Current settings are now saved to ~/.config/monitors.xml and will be used during next boot.&lt;br /&gt;
&lt;br /&gt;
==== Display configuration for gdm3 ====&lt;br /&gt;
After doing the steps above, do:&lt;br /&gt;
 sudo cp /home/stefan/.config/monitors.xml /var/lib/gdm3/.config&lt;br /&gt;
&lt;br /&gt;
=== Restart Gnome ===&lt;br /&gt;
&lt;br /&gt;
Hit ALT+F2, then you get a &amp;quot;gnome run command&amp;quot; thingy. Enter &amp;quot;r&amp;quot; and hit enter!&lt;br /&gt;
&lt;br /&gt;
=== Switch default compiler ===&lt;br /&gt;
&lt;br /&gt;
 (cc --version;c++ --version;gcc --version;g++ --version) | grep Debian&lt;br /&gt;
  cc (Debian 6.1.1-11) 6.1.1 20160802&lt;br /&gt;
  c++ (Debian 6.1.1-11) 6.1.1 20160802&lt;br /&gt;
  gcc (Debian 6.1.1-11) 6.1.1 20160802&lt;br /&gt;
  g++ (Debian 6.1.1-11) 6.1.1 20160802&lt;br /&gt;
 &lt;br /&gt;
 sudo apt-get install gcc-4.9 g++-4.9&lt;br /&gt;
 &lt;br /&gt;
 gcc-4.9 --version&lt;br /&gt;
  gcc-4.9 (Debian 4.9.3-14) 4.9.3&lt;br /&gt;
 &lt;br /&gt;
 g++-4.9 --version&lt;br /&gt;
  g++-4.9 (Debian 4.9.3-14) 4.9.3&lt;br /&gt;
 &lt;br /&gt;
 gcc-5 --version&lt;br /&gt;
  gcc-5 (Debian 5.4.1-1) 5.4.1 20160803&lt;br /&gt;
 &lt;br /&gt;
 g++-5 --version&lt;br /&gt;
  g++-5 (Debian 5.4.1-1) 5.4.1 20160803&lt;br /&gt;
 &lt;br /&gt;
 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 10&lt;br /&gt;
 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 20&lt;br /&gt;
 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 10&lt;br /&gt;
 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 20&lt;br /&gt;
 sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 30&lt;br /&gt;
 sudo update-alternatives --set cc /usr/bin/gcc&lt;br /&gt;
 sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 30&lt;br /&gt;
 sudo update-alternatives --set c++ /usr/bin/g++&lt;br /&gt;
 &lt;br /&gt;
 (cc --version;c++ --version;gcc --version;g++ --version) | grep Debian&lt;br /&gt;
  cc (Debian 4.9.3-14) 4.9.3&lt;br /&gt;
  c++ (Debian 4.9.3-14) 4.9.3&lt;br /&gt;
  gcc (Debian 4.9.3-14) 4.9.3&lt;br /&gt;
  g++ (Debian 4.9.3-14) 4.9.3&lt;br /&gt;
&lt;br /&gt;
To go back:&lt;br /&gt;
 sudo update-alternatives --config gcc&lt;br /&gt;
 sudo update-alternatives --config g++&lt;br /&gt;
&lt;br /&gt;
=== Console is not filling the screen completely ===&lt;br /&gt;
This may be due to that the console thinks it is connected to a different display device than it actually is. This can be fixed by adding kernel command line parameters to disable that specific video mode.&lt;br /&gt;
 ls /sys/class/drm&lt;br /&gt;
 card0@  card0-DisplayPort-1@  card0-DisplayPort-2@  card0-DisplayPort-3@  card0-HDMI Type A-1@  card0-HDMI Type A-2@  card0-LVDS-1@  card0-SVIDEO-1@  card0-VGA-1@  controlD64@  version&lt;br /&gt;
Now check the different &amp;quot;modes&amp;quot; and &amp;quot;connected&amp;quot; and &amp;quot;enabled&amp;quot; nodes under each device to figure out which needs to be disabled. Then add to your kernel command line things such as&lt;br /&gt;
 video=LVDS-1:d video=SVIDEO-1:d video=TV-1:d&lt;br /&gt;
More information: https://bbs.archlinux.org/viewtopic.php?id=94990&lt;br /&gt;
&lt;br /&gt;
=== udev ===&lt;br /&gt;
==== udev rules ====&lt;br /&gt;
Some sample udev rules which might come handy:&lt;br /&gt;
 KERNEL==&amp;quot;tty*&amp;quot;, GROUP=&amp;quot;dialout&amp;quot;, MODE=&amp;quot;0660&amp;quot;&lt;br /&gt;
 SUBSYSTEM==&amp;quot;gpio&amp;quot;, GROUP:=&amp;quot;gpio&amp;quot;, MODE:=&amp;quot;0660&amp;quot;&lt;br /&gt;
 SUBSYSTEMS==&amp;quot;usb&amp;quot;, KERNEL==&amp;quot;ttyUSB*&amp;quot;, ATTRS{idVendor}==&amp;quot;0403&amp;quot;, ATTRS{idProduct}==&amp;quot;6001&amp;quot;, ATTRS{serial}==&amp;quot;XXXXXXXX&amp;quot;, SYMLINK+=&amp;quot;ftdiserial2usb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Use %m for the device number in symlink names.&lt;br /&gt;
&lt;br /&gt;
==== udev info ====&lt;br /&gt;
To query a device about its properties (which can be used in udev rules):&lt;br /&gt;
&lt;br /&gt;
 udevadm info --path=/sys/class/leds/example --query=all --attribute-walk&lt;br /&gt;
 udevadm info --name /dev/sda&lt;br /&gt;
 udevadm info -a /dev/sda&lt;br /&gt;
&lt;br /&gt;
More info: https://linux.die.net/man/7/udev&lt;br /&gt;
&lt;br /&gt;
==== udev debugging ====&lt;br /&gt;
Command to reload udev rules:&lt;br /&gt;
 sudo udevadm control --reload-rules &amp;amp;&amp;amp; sudo udevadm trigger&lt;br /&gt;
&lt;br /&gt;
Command to test udev rules:&lt;br /&gt;
 udevadm test --action=add /class/gpio&lt;br /&gt;
&lt;br /&gt;
=== Screen ===&lt;br /&gt;
&lt;br /&gt;
How to make the scrollback work in screen? Add the following to your .screenrc file:&lt;br /&gt;
 termcapinfo xterm ti@:te@&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== LVM ===&lt;br /&gt;
&lt;br /&gt;
==== How to extend your LVM disk ====&lt;br /&gt;
Investigate your current setup with:&lt;br /&gt;
 lsblk&lt;br /&gt;
&lt;br /&gt;
Then you can perform operations like these (which reduces size of live-root with 50GB and extends size of live-home with 50GB):&lt;br /&gt;
 lvreduce -r -L -50G /dev/mapper/nobara_localhost--live-root&lt;br /&gt;
 lvextend -r -L +50G /dev/mapper/nobara_localhost--live-home&lt;br /&gt;
&lt;br /&gt;
== Linux performance ==&lt;br /&gt;
 [http://www.brendangregg.com/ http://www.brendangregg.com/]&lt;br /&gt;
&lt;br /&gt;
== Kernel ==&lt;br /&gt;
=== Update to newer kernel on Debian ===&lt;br /&gt;
Add the backports repository to apt (/etc/apt/sources.list or something similar). Add these as new lines, do not change the existing ones:&lt;br /&gt;
 deb [arch=amd64] http://debian.lth.se/debian bookworm-backports main contrib non-free non-free-firmware&lt;br /&gt;
 deb-src [arch=amd64] http://debian.lth.se/debian bookworm-backports main contrib non-free non-free-firmware&lt;br /&gt;
Then do:&lt;br /&gt;
 sudo apt update&lt;br /&gt;
Then just install the latest linux-image-amd64, but since backports is lower prioritized, you need to specify that you want the backport version:&lt;br /&gt;
 sudo apt install linux-image-amd64/bookworm-backports&lt;br /&gt;
&lt;br /&gt;
If you then get messages about missing firmware (due to kernel being newer than linux-firmware-nonfree):&lt;br /&gt;
 Possible missing firmware /lib/firmware/i915/mtl_gsc_1.bin for module i915&lt;br /&gt;
 Possible missing firmware /lib/firmware/i915/dg2_huc_gsc.bin for module i915&lt;br /&gt;
 Possible missing firmware /lib/firmware/i915/mtl_huc_gsc.bin for module i915&lt;br /&gt;
 Possible missing firmware /lib/firmware/i915/mtl_guc_70.bin for module i915&lt;br /&gt;
you can manually:&lt;br /&gt;
* Download the missing firmwares from here: https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/&lt;br /&gt;
* Copy them to /lib/firmware/&lt;br /&gt;
* Regenerate initramfs with: &#039;&#039;sudo update-initramfs -u&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Update to newer kernel on Ubuntu ===&lt;br /&gt;
Simply install the correct version of linux-generic-hwe:&lt;br /&gt;
 sudo apt install linux-generic-hwe-20.04&lt;br /&gt;
or&lt;br /&gt;
 sudo apt install linux-generic-hwe-22.04&lt;br /&gt;
&lt;br /&gt;
= Clean out journalctl logs =&lt;br /&gt;
 journalctl --flush --rotate --vacuum-time=30d&lt;/div&gt;</summary>
		<author><name>Steffe</name></author>
	</entry>
	<entry>
		<id>https://wiki.steffe.net/index.php?title=Linux&amp;diff=264</id>
		<title>Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.steffe.net/index.php?title=Linux&amp;diff=264"/>
		<updated>2024-08-06T08:30:24Z</updated>

		<summary type="html">&lt;p&gt;Steffe: /* Update to newer kernel on Debian */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Debugging Linux applications ==&lt;br /&gt;
=== LDD ===&lt;br /&gt;
Linux LDD is just a wrapper for:&lt;br /&gt;
 LD_TRACE_LOADED_OBJECTS=1 &amp;lt;cmd&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Core dumps ===&lt;br /&gt;
To check core dump handler:&lt;br /&gt;
 cat /proc/sys/kernel/core_pattern&lt;br /&gt;
 |/usr/sbin/coredump-handler %h_%t_%p.core&lt;br /&gt;
&lt;br /&gt;
=== Valgrind ===&lt;br /&gt;
 valgrind --trace-children=yes --leak-check=full --show-leak-kinds=all &amp;lt;binary&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Dual boot with Windows ==&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
First install Windows as usual, then boot (in UEFI mode) from Debian netinst usb stick and install Debian. Install grub on your primary disk drive.&lt;br /&gt;
&lt;br /&gt;
=== Repair when computer only boots into Windows ===&lt;br /&gt;
&lt;br /&gt;
Download the Debian Live standard ISO from here: https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/&lt;br /&gt;
&lt;br /&gt;
Use Rufus to write it to a bootable USB stick: https://rufus.ie&lt;br /&gt;
&lt;br /&gt;
In Rufus, select your USB drive and the downloaded Debian ISO.&lt;br /&gt;
&lt;br /&gt;
Make sure you select &#039;&#039;Partition schema&#039;&#039; as &#039;&#039;GPT&#039;&#039; and &#039;&#039;Target system&#039;&#039; as &#039;&#039;UEFI (non CSM)&#039;&#039;.&lt;br /&gt;
Hit &amp;quot;Start&amp;quot; and when prompted choose to write the image in &#039;&#039;DD&#039;&#039; mode!&lt;br /&gt;
&lt;br /&gt;
Now insert the USB stick in your broken computer and boot it while hitting a magic key (such as F12) to enter BIOS boot menu. Select to boot your USB stick in &#039;&#039;UEFI mode&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Once Debian Live has started up, follow the instructions here: https://wiki.debian.org/GrubEFIReinstall#Using_A_Live_CD.2FUSB_To_Fix_Your_Current_System&lt;br /&gt;
&lt;br /&gt;
In short, first you need to figure out your target system root and EFI partitions:&lt;br /&gt;
&lt;br /&gt;
 sudo fdisk -l&lt;br /&gt;
 ...&lt;br /&gt;
 Device              Start        End    Sectors   Size Type&lt;br /&gt;
 &#039;&#039;&#039;/dev/nvme0n1p1       2048    1394687    1392640   680M EFI System&#039;&#039;&#039;&lt;br /&gt;
 /dev/nvme0n1p2    1394688    1656831     262144   128M Microsoft reserved&lt;br /&gt;
 /dev/nvme0n1p3    1656832 1764220927 1762564096 840.5G Microsoft basic data&lt;br /&gt;
 /dev/nvme0n1p4 1969020928 1971048447    2027520   990M Windows recovery environment&lt;br /&gt;
 /dev/nvme0n1p5 1971048448 1997713407   26664960  12.7G Windows recovery environment&lt;br /&gt;
 /dev/nvme0n1p6 1997715456 2000408575    2693120   1.3G Windows recovery environment&lt;br /&gt;
 &#039;&#039;&#039;/dev/nvme0n1p7 1764220928 1936101375  171880448    82G Linux filesystem&#039;&#039;&#039;&lt;br /&gt;
 /dev/nvme0n1p8 1936101376 1969020927   32919552  15.7G Linux swap&lt;br /&gt;
&lt;br /&gt;
So in this case our EFI partition is &#039;&#039;/dev/nvme0n1p1&#039;&#039; and our rootfs partition is &#039;&#039;/dev/nvme0n1p7&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Then do something like:&lt;br /&gt;
 sudo mount /dev/nvme0n1p7 /mnt/&lt;br /&gt;
 sudo mount /dev/nvme0n1p1 /mnt/boot/efi&lt;br /&gt;
 for i in /dev /dev/pts /proc /sys /sys/firmware/efi/efivars /run; do sudo mount -B $i /mnt$i; done&lt;br /&gt;
 sudo chroot /mnt&lt;br /&gt;
 sudo grub-install /dev/nvme0n1&lt;br /&gt;
 sudo update-grub&lt;br /&gt;
&lt;br /&gt;
=== Repair when computer only boots into Linux ===&lt;br /&gt;
&lt;br /&gt;
Most probably this is due to that &#039;&#039;os-prober&#039;&#039; was not run during your last &#039;&#039;update-grub&#039;&#039; session.&lt;br /&gt;
&lt;br /&gt;
In Linux, edit the file &#039;&#039;&#039;/etc/default/grub&#039;&#039;&#039; and add the following line:&lt;br /&gt;
 GRUB_DISABLE_OS_PROBER=false&lt;br /&gt;
&lt;br /&gt;
Also make sure you have the os-prober command installed:&lt;br /&gt;
 sudo apt install os-prober&lt;br /&gt;
 sudo os-prober&lt;br /&gt;
&lt;br /&gt;
Then run:&lt;br /&gt;
 sudo update-grub&lt;br /&gt;
&lt;br /&gt;
=== Configure grub to always boot into your last selected OS ===&lt;br /&gt;
&lt;br /&gt;
In Linux, edit the file &#039;&#039;&#039;/etc/default/grub&#039;&#039;&#039; and add the following lines:&lt;br /&gt;
 GRUB_DEFAULT=saved&lt;br /&gt;
 GRUB_SAVEDEFAULT=true&lt;br /&gt;
&lt;br /&gt;
== Configuring Linux ==&lt;br /&gt;
&lt;br /&gt;
=== Users ===&lt;br /&gt;
Add user stefan to group sudo:&lt;br /&gt;
 sudo adduser stefan sudo&lt;br /&gt;
&lt;br /&gt;
=== Change console language to english ===&lt;br /&gt;
 sudo dpkg-reconfigure locales&lt;br /&gt;
Then select en_US.UTF-8 (plus your local language), and then on next screen set the default language.&lt;br /&gt;
&lt;br /&gt;
=== Secure Boot ===&lt;br /&gt;
&lt;br /&gt;
If you want to run Linux, but you also dual boot into Windows and need to have your BIOS set up to boot in Secure Boot (for instance if you play Valorant in Windows), then you have two choices.&lt;br /&gt;
&lt;br /&gt;
# Boot Windows in secure mode but Linux in insecure mode.&lt;br /&gt;
# Boot both Windows and Linux in secure mode.&lt;br /&gt;
&lt;br /&gt;
==== Option 1 ====&lt;br /&gt;
&lt;br /&gt;
To get the first option working, you need to install Fedora/Nobara with UEFI enabled, but secure boot disabled in BIOS. If you at this point enable secure boot, Linux will not boot (complain about shim error).&lt;br /&gt;
&lt;br /&gt;
Boot up with secure boot disabled and do:&lt;br /&gt;
 sudo mokutil --disable-validation&lt;br /&gt;
Follow the instructions and then reboot your PC and choose to &amp;quot;Change Secure boot state&amp;quot; as described here: https://wiki.ubuntu.com/UEFI/SecureBoot/DKMS&lt;br /&gt;
&lt;br /&gt;
If you do this, you can install GRUB2 and enable Secure Boot in your BIOS again. If you now boot into GRUB2, you can select to boot Windows (which will then properly boot up in Secure Mode) or you can choose to boot Linux which will then boot up in insecure mode.&lt;br /&gt;
&lt;br /&gt;
==== Option 2 ====&lt;br /&gt;
&lt;br /&gt;
If you want to have also Linux booting up in secure mode, you can do that as well, but it requires a bit more work. There is a good guide here: https://wiki.archlinux.org/title/Unified_Extensible_Firmware_Interface/Secure_Boot#PreLoader&lt;br /&gt;
&lt;br /&gt;
Basically you need to:&lt;br /&gt;
&lt;br /&gt;
1 Create your own MOK key&lt;br /&gt;
 openssl req -newkey rsa:4096 -nodes -keyout mok.key -new -x509 -sha256 -days 3650 -subj &amp;quot;/CN=my Machine Owner Key/&amp;quot; -out mok.crt&lt;br /&gt;
 openssl x509 -outform DER -in mok.crt -out mok.cer&lt;br /&gt;
2 Sign the vmlinuz file in your /boot/ folder with this key&lt;br /&gt;
 sbsign --key mok.key --cert mok.crt --output /boot/vmlinuz-linux /boot/vmlinuz-linux&lt;br /&gt;
3 Enroll your key into your BIOS with mokutil&lt;br /&gt;
 mokutil --import mok.cer&lt;br /&gt;
&lt;br /&gt;
Then Linux will boot up fine in Secure Mode. You will however have 2 issues:&lt;br /&gt;
&lt;br /&gt;
* Whenever a new kernel is installed on your system, you need to sign it with your own MOK key, otherwise it will not boot.&lt;br /&gt;
* You can not install third party drivers such as the Nvidia graphics drivers unless you sign also them with your own MOK key.&lt;br /&gt;
&lt;br /&gt;
=== Graphics drivers ===&lt;br /&gt;
==== Disable Nvidia drivers and enable Intel embedded HD graphics driver ====&lt;br /&gt;
 sudo apt-get purge nvidia-*&lt;br /&gt;
 dpkg --list | grep nvidia&lt;br /&gt;
Make sure the list of nvidia packages is empty&lt;br /&gt;
 sudo apt-get install --reinstall xserver-xorg-video-intel libgl1-mesa-glx libgl1-mesa-dri mesa-utils xserver-xorg-core&lt;br /&gt;
 sudo dpkg-reconfigure xserver-xorg&lt;br /&gt;
 sudo update-alternatives --remove gl_conf /usr/lib/nvidia-current/ld.so.conf&lt;br /&gt;
 reboot&lt;br /&gt;
==== Disable Nvidia drivers and enable nouveau drivers ====&lt;br /&gt;
 sudo apt-get purge nvidia-*&lt;br /&gt;
 dpkg --list | grep nvidia&lt;br /&gt;
Make sure the list of nvidia packages is empty&lt;br /&gt;
 sudo apt-get install --reinstall xserver-xorg-video-nouveau&lt;br /&gt;
==== Disable nouveau drivers and enable Nvidia drivers ====&lt;br /&gt;
&#039;&#039;&#039;Option 1&#039;&#039;&#039;, using package manager:&lt;br /&gt;
 sudo apt-get install --reinstall nvidia-driver&lt;br /&gt;
or if your graphics card is not supported by the latest drivers (you can install the nvidia-detect package and run it to get this information):&lt;br /&gt;
 sudo apt-get install --reinstall nvidia-legacy-390xx-driver&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Option 2&#039;&#039;&#039;, using latest official NVidia driver:&lt;br /&gt;
* Go to [http://www.geforce.com] and download the latest Linux driver for your system.&lt;br /&gt;
* Switch to console mode (Ctrl+Alt+F1), kill any Xorg process (or mask/stop them with systemctl if you run systemd)&lt;br /&gt;
* Run the NVidia installer as root&lt;br /&gt;
 systemctl mask gdm&lt;br /&gt;
 systemctl stop gdm&lt;br /&gt;
 killall Xorg&lt;br /&gt;
 sudo ./NVIDIA-&amp;lt;driver-version-name&amp;gt;.run&lt;br /&gt;
&lt;br /&gt;
==== Display configuration set in nvidia-settings is not retained after boot ====&lt;br /&gt;
This is a conflict between nvidia-settings and Debians internal settings application.&lt;br /&gt;
* Remove ~/.config/monitors.xml (this is Debians settings)&lt;br /&gt;
* Reboot&lt;br /&gt;
* Set everything up the way you want with nvidia-settings&lt;br /&gt;
* Go to Settings - Display&lt;br /&gt;
* Do some minor change that brings up the &amp;quot;Apply&amp;quot; button and press it&lt;br /&gt;
* Current settings are now saved to ~/.config/monitors.xml and will be used during next boot.&lt;br /&gt;
&lt;br /&gt;
==== Display configuration for gdm3 ====&lt;br /&gt;
After doing the steps above, do:&lt;br /&gt;
 sudo cp /home/stefan/.config/monitors.xml /var/lib/gdm3/.config&lt;br /&gt;
&lt;br /&gt;
=== Restart Gnome ===&lt;br /&gt;
&lt;br /&gt;
Hit ALT+F2, then you get a &amp;quot;gnome run command&amp;quot; thingy. Enter &amp;quot;r&amp;quot; and hit enter!&lt;br /&gt;
&lt;br /&gt;
=== Switch default compiler ===&lt;br /&gt;
&lt;br /&gt;
 (cc --version;c++ --version;gcc --version;g++ --version) | grep Debian&lt;br /&gt;
  cc (Debian 6.1.1-11) 6.1.1 20160802&lt;br /&gt;
  c++ (Debian 6.1.1-11) 6.1.1 20160802&lt;br /&gt;
  gcc (Debian 6.1.1-11) 6.1.1 20160802&lt;br /&gt;
  g++ (Debian 6.1.1-11) 6.1.1 20160802&lt;br /&gt;
 &lt;br /&gt;
 sudo apt-get install gcc-4.9 g++-4.9&lt;br /&gt;
 &lt;br /&gt;
 gcc-4.9 --version&lt;br /&gt;
  gcc-4.9 (Debian 4.9.3-14) 4.9.3&lt;br /&gt;
 &lt;br /&gt;
 g++-4.9 --version&lt;br /&gt;
  g++-4.9 (Debian 4.9.3-14) 4.9.3&lt;br /&gt;
 &lt;br /&gt;
 gcc-5 --version&lt;br /&gt;
  gcc-5 (Debian 5.4.1-1) 5.4.1 20160803&lt;br /&gt;
 &lt;br /&gt;
 g++-5 --version&lt;br /&gt;
  g++-5 (Debian 5.4.1-1) 5.4.1 20160803&lt;br /&gt;
 &lt;br /&gt;
 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 10&lt;br /&gt;
 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 20&lt;br /&gt;
 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 10&lt;br /&gt;
 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 20&lt;br /&gt;
 sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 30&lt;br /&gt;
 sudo update-alternatives --set cc /usr/bin/gcc&lt;br /&gt;
 sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 30&lt;br /&gt;
 sudo update-alternatives --set c++ /usr/bin/g++&lt;br /&gt;
 &lt;br /&gt;
 (cc --version;c++ --version;gcc --version;g++ --version) | grep Debian&lt;br /&gt;
  cc (Debian 4.9.3-14) 4.9.3&lt;br /&gt;
  c++ (Debian 4.9.3-14) 4.9.3&lt;br /&gt;
  gcc (Debian 4.9.3-14) 4.9.3&lt;br /&gt;
  g++ (Debian 4.9.3-14) 4.9.3&lt;br /&gt;
&lt;br /&gt;
To go back:&lt;br /&gt;
 sudo update-alternatives --config gcc&lt;br /&gt;
 sudo update-alternatives --config g++&lt;br /&gt;
&lt;br /&gt;
=== Console is not filling the screen completely ===&lt;br /&gt;
This may be due to that the console thinks it is connected to a different display device than it actually is. This can be fixed by adding kernel command line parameters to disable that specific video mode.&lt;br /&gt;
 ls /sys/class/drm&lt;br /&gt;
 card0@  card0-DisplayPort-1@  card0-DisplayPort-2@  card0-DisplayPort-3@  card0-HDMI Type A-1@  card0-HDMI Type A-2@  card0-LVDS-1@  card0-SVIDEO-1@  card0-VGA-1@  controlD64@  version&lt;br /&gt;
Now check the different &amp;quot;modes&amp;quot; and &amp;quot;connected&amp;quot; and &amp;quot;enabled&amp;quot; nodes under each device to figure out which needs to be disabled. Then add to your kernel command line things such as&lt;br /&gt;
 video=LVDS-1:d video=SVIDEO-1:d video=TV-1:d&lt;br /&gt;
More information: https://bbs.archlinux.org/viewtopic.php?id=94990&lt;br /&gt;
&lt;br /&gt;
=== udev ===&lt;br /&gt;
==== udev rules ====&lt;br /&gt;
Some sample udev rules which might come handy:&lt;br /&gt;
 KERNEL==&amp;quot;tty*&amp;quot;, GROUP=&amp;quot;dialout&amp;quot;, MODE=&amp;quot;0660&amp;quot;&lt;br /&gt;
 SUBSYSTEM==&amp;quot;gpio&amp;quot;, GROUP:=&amp;quot;gpio&amp;quot;, MODE:=&amp;quot;0660&amp;quot;&lt;br /&gt;
 SUBSYSTEMS==&amp;quot;usb&amp;quot;, KERNEL==&amp;quot;ttyUSB*&amp;quot;, ATTRS{idVendor}==&amp;quot;0403&amp;quot;, ATTRS{idProduct}==&amp;quot;6001&amp;quot;, ATTRS{serial}==&amp;quot;XXXXXXXX&amp;quot;, SYMLINK+=&amp;quot;ftdiserial2usb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Use %m for the device number in symlink names.&lt;br /&gt;
&lt;br /&gt;
==== udev info ====&lt;br /&gt;
To query a device about its properties (which can be used in udev rules):&lt;br /&gt;
&lt;br /&gt;
 udevadm info --path=/sys/class/leds/example --query=all --attribute-walk&lt;br /&gt;
 udevadm info --name /dev/sda&lt;br /&gt;
 udevadm info -a /dev/sda&lt;br /&gt;
&lt;br /&gt;
More info: https://linux.die.net/man/7/udev&lt;br /&gt;
&lt;br /&gt;
==== udev debugging ====&lt;br /&gt;
Command to reload udev rules:&lt;br /&gt;
 sudo udevadm control --reload-rules &amp;amp;&amp;amp; sudo udevadm trigger&lt;br /&gt;
&lt;br /&gt;
Command to test udev rules:&lt;br /&gt;
 udevadm test --action=add /class/gpio&lt;br /&gt;
&lt;br /&gt;
=== Screen ===&lt;br /&gt;
&lt;br /&gt;
How to make the scrollback work in screen? Add the following to your .screenrc file:&lt;br /&gt;
 termcapinfo xterm ti@:te@&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== LVM ===&lt;br /&gt;
&lt;br /&gt;
==== How to extend your LVM disk ====&lt;br /&gt;
Investigate your current setup with:&lt;br /&gt;
 lsblk&lt;br /&gt;
&lt;br /&gt;
Then you can perform operations like these (which reduces size of live-root with 50GB and extends size of live-home with 50GB):&lt;br /&gt;
 lvreduce -r -L -50G /dev/mapper/nobara_localhost--live-root&lt;br /&gt;
 lvextend -r -L +50G /dev/mapper/nobara_localhost--live-home&lt;br /&gt;
&lt;br /&gt;
== Linux performance ==&lt;br /&gt;
 [http://www.brendangregg.com/ http://www.brendangregg.com/]&lt;br /&gt;
&lt;br /&gt;
== Kernel ==&lt;br /&gt;
=== Update to newer kernel on Debian ===&lt;br /&gt;
Add the backports repository to apt (/etc/apt/sources.list or something similar). Add these as new lines, do not change the existing ones:&lt;br /&gt;
 deb [arch=amd64] http://debian.lth.se/debian bookworm-backports main contrib non-free non-free-firmware&lt;br /&gt;
 deb-src [arch=amd64] http://debian.lth.se/debian bookworm-backports main contrib non-free non-free-firmware&lt;br /&gt;
Then do:&lt;br /&gt;
 sudo apt update&lt;br /&gt;
Then just install the latest linux-image-amd64, but since backports is lower prioritized, you need to specify that you want the backport version:&lt;br /&gt;
 sudo apt install linux-image-amd64/bookworm-backports&lt;br /&gt;
&lt;br /&gt;
If you then get messages about missing firmware (due to kernel being newer than linux-firmware-nonfree):&lt;br /&gt;
 Possible missing firmware /lib/firmware/i915/mtl_gsc_1.bin for module i915&lt;br /&gt;
 Possible missing firmware /lib/firmware/i915/dg2_huc_gsc.bin for module i915&lt;br /&gt;
 Possible missing firmware /lib/firmware/i915/mtl_huc_gsc.bin for module i915&lt;br /&gt;
 Possible missing firmware /lib/firmware/i915/mtl_guc_70.bin for module i915&lt;br /&gt;
you can manually:&lt;br /&gt;
* Download the missing firmwares from here: https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/&lt;br /&gt;
* Copy them to /lib/firmware/&lt;br /&gt;
* Regenerate initramfs with: &#039;&#039;sudo update-initramfs -u&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Update to newer kernel on Ubuntu ===&lt;br /&gt;
Simply install the correct version of linux-generic-hwe:&lt;br /&gt;
 sudo apt install linux-generic-hwe-20.04&lt;br /&gt;
or&lt;br /&gt;
 sudo apt install linux-generic-hwe-22.04&lt;/div&gt;</summary>
		<author><name>Steffe</name></author>
	</entry>
	<entry>
		<id>https://wiki.steffe.net/index.php?title=BIOS&amp;diff=263</id>
		<title>BIOS</title>
		<link rel="alternate" type="text/html" href="https://wiki.steffe.net/index.php?title=BIOS&amp;diff=263"/>
		<updated>2024-08-06T08:11:32Z</updated>

		<summary type="html">&lt;p&gt;Steffe: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;BIOS are generally a bit trickier to configure after the upgrade to DDR5.&lt;br /&gt;
&lt;br /&gt;
= AMD EXPO and Context Memory Restore =&lt;br /&gt;
&lt;br /&gt;
Once a newly installed computer boots up, expect it to stay black for ~1-2 minutes during boot while DDR is trained.&lt;br /&gt;
&lt;br /&gt;
To avoid this, you can enable &#039;&#039;Memory Context Restore&#039;&#039; and &#039;&#039;DDR Power Down&#039;&#039; found here on the ASUS B650E-F:&lt;br /&gt;
* Advanced - Ai Tweaker - DRAM Timing Control - Memory Context Restore - Enabled&lt;br /&gt;
* Advanced - Ai Tweaker - DRAM Timing Control - Power Down Enable - Enabled&lt;br /&gt;
* Advanced - AMD CBS - UMC Common Options - DDR options - DDR memory features - Memory Context Restore - Enabled&lt;br /&gt;
* Advanced - AMD CBS - UMC Common Options - DDR options - DDR Controller Configuration - DDR Power Options - Power Down Enabled - Enabled&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039; that you &#039;&#039;&#039;HAVE&#039;&#039;&#039; to change it in &#039;&#039;&#039;ALL&#039;&#039;&#039; places! I have no idea why ASUS have done it this way. When you save and exit, it will show only 2 changed settings (even though you have changed 4), but if you do not change it in ALL places, your computer WILL not run stable!&lt;br /&gt;
&lt;br /&gt;
By enabling this, the computer will then do one training on the next reboot, and then reuse that data for upcoming boots, giving the same kind of boot behavior as DDR4 and below.&lt;br /&gt;
&lt;br /&gt;
You can also enable AMD EXPO to automatically overclock your DDR based on settings stored in your DDR memories.&lt;br /&gt;
&lt;br /&gt;
= No display =&lt;br /&gt;
Sometimes a Displayport connector for the monitor can not be used while configuring BIOS. This is the case on the ASUS B650E-F in conjunction with a RTX 3070 graphics card. You have to connect the HDMI to see the BIOS screen every time.&lt;br /&gt;
&lt;br /&gt;
= Method for BIOS updating for ASUS Rog Strix B650E =&lt;br /&gt;
* Connect HDMI to monitor&lt;br /&gt;
* Disconnect Displayport to monitor&lt;br /&gt;
* Put BIOS CAP file on USB stick and reboot into bios (DEL after DDR5 training)&lt;br /&gt;
* Advanced - Tools - EZ Flasher, update BIOS&lt;br /&gt;
* After full update, hit F1 to enter BIOS, do a &amp;quot;Load Optimized Defaults&amp;quot; and reboot again&lt;br /&gt;
* Go into BIOS and change the following to clock up DDR speed from DDR-4800 to DDR-6000 and boot Windows in proper UEFI mode:&lt;br /&gt;
** Advanced - Ai Tweaker - Ai Overclock Tuner: EXPO I&lt;br /&gt;
** Advanced - Boot - Secure Boot - OS Type: Windows UEFI Mode&lt;br /&gt;
** Advanced - Boot - Secure Boot - Secure Boot Mode: Standard&lt;br /&gt;
* Save and reboot, verify that Windows boots and is stable. Verify DDR frequency is 3GHz (DDR-6000).&lt;br /&gt;
* Reboot again, hit DEL (after DDR training) to enter BIOS and change (&#039;&#039;&#039;MUST set ALL of them&#039;&#039;&#039;, and they have to be set to &#039;&#039;Enabled&#039;&#039;, not &#039;&#039;Auto&#039;&#039;!):&lt;br /&gt;
** Advanced - Ai Tweaker - DRAM Timing Control - Memory Context Restore: Enabled&lt;br /&gt;
** Advanced - Ai Tweaker - DRAM Timing Control - Power Down Enable: Enabled&lt;br /&gt;
** Advanced - AMD CBS - UMC Common Options - DDR options - DDR memory features - Memory Context Restore: Enabled&lt;br /&gt;
** Advanced - AMD CBS - UMC Common Options - DDR options - DDR Controller Configuration - DDR Power Options - Power Down Enabled: Enabled&lt;br /&gt;
* Save and reboot (DDR training will happen one final time)&lt;br /&gt;
* Verify that Windows boots and is stable.&lt;br /&gt;
* Reboot, DDR training should now be much faster. Verify that Windows is stable. Verify DDR frequency is 3GHz (DDR-6000)&lt;br /&gt;
* Finally disconnect HDMI and reconnect Displayport.&lt;/div&gt;</summary>
		<author><name>Steffe</name></author>
	</entry>
	<entry>
		<id>https://wiki.steffe.net/index.php?title=BIOS&amp;diff=262</id>
		<title>BIOS</title>
		<link rel="alternate" type="text/html" href="https://wiki.steffe.net/index.php?title=BIOS&amp;diff=262"/>
		<updated>2024-08-06T08:09:09Z</updated>

		<summary type="html">&lt;p&gt;Steffe: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;BIOS are generally a bit trickier to configure after the upgrade to DDR5.&lt;br /&gt;
&lt;br /&gt;
= Context Memory Restore =&lt;br /&gt;
&lt;br /&gt;
Once a newly installed computer boots up, expect it to stay black for ~1-2 minutes during boot while DDR is trained.&lt;br /&gt;
&lt;br /&gt;
To avoid this, you can enable &#039;&#039;Memory Context Restore&#039;&#039; and &#039;&#039;DDR Power Down&#039;&#039; found here on the ASUS B650E-F:&lt;br /&gt;
* Advanced - Ai Tweaker - DRAM Timing Control - Memory Context Restore - Enabled&lt;br /&gt;
* Advanced - Ai Tweaker - DRAM Timing Control - Power Down Enable - Enabled&lt;br /&gt;
* Advanced - AMD CBS - UMC Common Options - DDR options - DDR memory features - Memory Context Restore - Enabled&lt;br /&gt;
* Advanced - AMD CBS - UMC Common Options - DDR options - DDR Controller Configuration - DDR Power Options - Power Down Enabled - Enabled&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039; that you &#039;&#039;&#039;HAVE&#039;&#039;&#039; to change it in &#039;&#039;&#039;ALL&#039;&#039;&#039; places! I have no idea why ASUS have done it this way. When you save and exit, it will show only 2 changed settings (even though you have changed 4), but if you do not change it in ALL places, your computer WILL not run stable!&lt;br /&gt;
&lt;br /&gt;
By enabling this, the computer will then do one training on the next reboot, and then reuse that data for upcoming boots, giving the same kind of boot behavior as DDR4 and below.&lt;br /&gt;
&lt;br /&gt;
= AMD EXPO =&lt;br /&gt;
&lt;br /&gt;
This allows for auto overclocking according to your DDR5 memory. This may increase DDR training time.&lt;br /&gt;
&lt;br /&gt;
Enabling both AMD EXPO and Context Memory Restore should work well, but sometimes it gives stability issues, and you have to refrain from using one of them.&lt;br /&gt;
&lt;br /&gt;
For me, it worked fine with the 1807 BIOS, but not with the 2616 or 3014 BIOS.&lt;br /&gt;
&lt;br /&gt;
= No display =&lt;br /&gt;
Sometimes the displayport can not be used while configuring BIOS. This is the case on the ASUS B650E-F in conjunction with a RTX 3070 graphics card. You have to connect the HDMI to see the BIOS screen every time.&lt;br /&gt;
&lt;br /&gt;
= Method for BIOS updating for ASUS Rog Strix B650E =&lt;br /&gt;
* Connect HDMI to monitor&lt;br /&gt;
* Disconnect Displayport to monitor&lt;br /&gt;
* Put BIOS CAP file on USB stick and reboot into bios (DEL after DDR5 training)&lt;br /&gt;
* Advanced - Tools - EZ Flasher, update BIOS&lt;br /&gt;
* After full update, hit F1 to enter BIOS, do a &amp;quot;Load Optimized Defaults&amp;quot; and reboot again&lt;br /&gt;
* Go into BIOS and change the following to clock up DDR speed from DDR-4800 to DDR-6000 and boot Windows in proper UEFI mode:&lt;br /&gt;
** Advanced - Ai Tweaker - Ai Overclock Tuner: EXPO I&lt;br /&gt;
** Advanced - Boot - Secure Boot - OS Type: Windows UEFI Mode&lt;br /&gt;
** Advanced - Boot - Secure Boot - Secure Boot Mode: Standard&lt;br /&gt;
* Save and reboot, verify that Windows boots and is stable. Verify DDR frequency is 3GHz (DDR-6000).&lt;br /&gt;
* Reboot again, hit DEL (after DDR training) to enter BIOS and change (&#039;&#039;&#039;MUST set ALL of them&#039;&#039;&#039;, and they have to be set to &#039;&#039;Enabled&#039;&#039;, not &#039;&#039;Auto&#039;&#039;!):&lt;br /&gt;
** Advanced - Ai Tweaker - DRAM Timing Control - Memory Context Restore: Enabled&lt;br /&gt;
** Advanced - Ai Tweaker - DRAM Timing Control - Power Down Enable: Enabled&lt;br /&gt;
** Advanced - AMD CBS - UMC Common Options - DDR options - DDR memory features - Memory Context Restore: Enabled&lt;br /&gt;
** Advanced - AMD CBS - UMC Common Options - DDR options - DDR Controller Configuration - DDR Power Options - Power Down Enabled: Enabled&lt;br /&gt;
* Save and reboot (DDR training will happen one final time)&lt;br /&gt;
* Verify that Windows boots and is stable.&lt;br /&gt;
* Reboot, DDR training should now be much faster. Verify that Windows is stable. Verify DDR frequency is 3GHz (DDR-6000)&lt;br /&gt;
* Finally disconnect HDMI and reconnect Displayport.&lt;/div&gt;</summary>
		<author><name>Steffe</name></author>
	</entry>
	<entry>
		<id>https://wiki.steffe.net/index.php?title=BIOS&amp;diff=261</id>
		<title>BIOS</title>
		<link rel="alternate" type="text/html" href="https://wiki.steffe.net/index.php?title=BIOS&amp;diff=261"/>
		<updated>2024-08-06T08:08:40Z</updated>

		<summary type="html">&lt;p&gt;Steffe: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;BIOS are generally a bit trickier to configure after the upgrade to DDR5.&lt;br /&gt;
&lt;br /&gt;
= Context Memory Restore =&lt;br /&gt;
&lt;br /&gt;
Once a newly installed computer boots up, expect it to stay black for ~1-2 minutes during boot while DDR is trained.&lt;br /&gt;
&lt;br /&gt;
To avoid this, you can enable &#039;&#039;Memory Context Restore&#039;&#039; and &#039;&#039;DDR Power Down&#039;&#039; found here on the ASUS B650E-F:&lt;br /&gt;
* Advanced - Ai Tweaker - DRAM Timing Control - Memory Context Restore - Enabled&lt;br /&gt;
* Advanced - Ai Tweaker - DRAM Timing Control - Power Down Enable - Enabled&lt;br /&gt;
* Advanced - AMD CBS - UMC Common Options - DDR options - DDR memory features - Memory Context Restore - Enabled&lt;br /&gt;
* Advanced - AMD CBS - UMC Common Options - DDR options - DDR Controller Configuration - DDR Power Options - Power Down Enabled - Enabled&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039; that you &#039;&#039;&#039;HAVE&#039;&#039;&#039; to change it in &#039;&#039;&#039;ALL&#039;&#039;&#039; places! I have no idea why ASUS have done it this way. When you save and exit, it will show only 2 changed settings (even though you have changed 4), but if you do not change it in ALL places, your computer WILL not run stable!&lt;br /&gt;
&lt;br /&gt;
By enabling this, the computer will then do one training on the next reboot, and then reuse that data for upcoming boots, giving the same kind of boot behavior as DDR4 and below.&lt;br /&gt;
&lt;br /&gt;
= AMD EXPO =&lt;br /&gt;
&lt;br /&gt;
This allows for auto overclocking according to your DDR5 memory. This may increase DDR training time.&lt;br /&gt;
&lt;br /&gt;
Enabling both AMD EXPO and Context Memory Restore should work well, but sometimes it gives stability issues, and you have to refrain from using one of them.&lt;br /&gt;
&lt;br /&gt;
For me, it worked fine with the 1807 BIOS, but not with the 2616 or 3014 BIOS.&lt;br /&gt;
&lt;br /&gt;
= No display =&lt;br /&gt;
Sometimes the displayport can not be used while configuring BIOS. This is the case on the ASUS B650E-F in conjunction with a RTX 3070 graphics card. You have to connect the HDMI to see the BIOS screen every time.&lt;br /&gt;
&lt;br /&gt;
= Method for BIOS updating for ASUS Rog Strix B650E =&lt;br /&gt;
* Connect HDMI to monitor&lt;br /&gt;
* Disconnect Displayport to monitor&lt;br /&gt;
* Put BIOS CAP file on USB stick and reboot into bios (DEL after DDR5 training)&lt;br /&gt;
* Advanced - Tools - EZ Flasher, update BIOS&lt;br /&gt;
* After full update, hit F1 to enter BIOS, do a &amp;quot;Load Optimized Defaults&amp;quot; and reboot again&lt;br /&gt;
* Go into BIOS and change the following to clock up DDR speed from DDR-4800 to DDR-6000 and boot Windows in proper UEFI mode:&lt;br /&gt;
** Advanced - Ai Tweaker - Ai Overclock Tuner: EXPO I&lt;br /&gt;
** Advanced - Boot - Secure Boot - OS Type: Windows UEFI Mode&lt;br /&gt;
** Advanced - Boot - Secure Boot - Secure Boot Mode: Standard&lt;br /&gt;
* Save and reboot, verify that Windows boots and is stable. Verify DDR frequency is 3GHz (DDR-6000).&lt;br /&gt;
** Reboot again, hit DEL (after DDR training) to enter BIOS and change (&#039;&#039;&#039;MUST set ALL of them&#039;&#039;&#039;, and they have to be set to &#039;&#039;Enabled&#039;&#039;, not &#039;&#039;Auto&#039;&#039;!):&lt;br /&gt;
*** Advanced - Ai Tweaker - DRAM Timing Control - Memory Context Restore: Enabled&lt;br /&gt;
*** Advanced - Ai Tweaker - DRAM Timing Control - Power Down Enable: Enabled&lt;br /&gt;
*** Advanced - AMD CBS - UMC Common Options - DDR options - DDR memory features - Memory Context Restore: Enabled&lt;br /&gt;
*** Advanced - AMD CBS - UMC Common Options - DDR options - DDR Controller Configuration - DDR Power Options - Power Down Enabled: Enabled&lt;br /&gt;
** Save and reboot (DDR training will happen one final time)&lt;br /&gt;
** Verify that Windows boots and is stable.&lt;br /&gt;
** Reboot, DDR training should now be much faster. Verify that Windows is stable. Verify DDR frequency is 3GHz (DDR-6000)&lt;br /&gt;
* Finally disconnect HDMI and reconnect Displayport.&lt;/div&gt;</summary>
		<author><name>Steffe</name></author>
	</entry>
	<entry>
		<id>https://wiki.steffe.net/index.php?title=Windows&amp;diff=254</id>
		<title>Windows</title>
		<link rel="alternate" type="text/html" href="https://wiki.steffe.net/index.php?title=Windows&amp;diff=254"/>
		<updated>2024-07-23T06:15:38Z</updated>

		<summary type="html">&lt;p&gt;Steffe: /* Why computer was woken from sleep */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= Energy management =&lt;br /&gt;
&lt;br /&gt;
== Why computer was woken from sleep ==&lt;br /&gt;
To check why computer was woken from suspend:&lt;br /&gt;
 powercfg /lastwake&lt;br /&gt;
to get more details:&lt;br /&gt;
 powercfg /systempowerreport&lt;br /&gt;
&lt;br /&gt;
== To disable Windows Update waking up the computer ==&lt;br /&gt;
Run as Administrator:&lt;br /&gt;
 gpedit.msc&lt;br /&gt;
&lt;br /&gt;
Then go to:&lt;br /&gt;
 Computer Configuration / Administrative Templates / Windows Components / Windows Update / Enabling Windows Update Power Management to automatically wake up the system to install scheduled updates&lt;br /&gt;
and set it to &amp;quot;Disabled&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
For swedish Windows:&lt;br /&gt;
 Datorkonfiguration / Administrativa mallar / Windows-komponenter / Windows Update / Aktivera automatisk väckning via Energisparfunktioner för installation av schemalagda uppdateringar&lt;br /&gt;
and set it to &amp;quot;Inaktiverad&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== To disable hibernation ==&lt;br /&gt;
&lt;br /&gt;
 powercfg.exe /h off&lt;br /&gt;
&lt;br /&gt;
== To uninstall a specific driver ==&lt;br /&gt;
&lt;br /&gt;
In a elevated command prompt:&lt;br /&gt;
 dism /online /get-drivers /format:table &amp;gt; c:\drivers.txt&lt;br /&gt;
Look through the drivers.txt file, and then you can do things like:&lt;br /&gt;
 pnputil.exe /d oem111.inf&lt;/div&gt;</summary>
		<author><name>Steffe</name></author>
	</entry>
	<entry>
		<id>https://wiki.steffe.net/index.php?title=BIOS&amp;diff=253</id>
		<title>BIOS</title>
		<link rel="alternate" type="text/html" href="https://wiki.steffe.net/index.php?title=BIOS&amp;diff=253"/>
		<updated>2024-07-06T17:54:02Z</updated>

		<summary type="html">&lt;p&gt;Steffe: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;BIOS are generally a bit trickier to configure after the upgrade to DDR5.&lt;br /&gt;
&lt;br /&gt;
= Context Memory Restore =&lt;br /&gt;
&lt;br /&gt;
Once a newly installed computer boots up, expect it to stay black for ~1-2 minutes during boot while DDR is trained.&lt;br /&gt;
&lt;br /&gt;
To avoid this, you can enable _Memory Context Restore_ found here on the ASUS B650E-F:&lt;br /&gt;
 Advanced - AMD CBS - UMC Common Options - DDR options - DDR memory features - Memory Context Restore&lt;br /&gt;
By enabling this, the computer will then do one training on the next reboot, and then reuse that data for upcoming boots, giving the same kind of boot behavior as DDR4 and below.&lt;br /&gt;
&lt;br /&gt;
= AMD EXPO =&lt;br /&gt;
&lt;br /&gt;
This allows for auto overclocking according to your DDR5 memory. This may increase DDR training time.&lt;br /&gt;
&lt;br /&gt;
Enabling both AMD EXPO and Context Memory Restore should work well, but sometimes it gives stability issues, and you have to refrain from using one of them.&lt;br /&gt;
&lt;br /&gt;
For me, it worked fine with the 1807 BIOS, but not with the 2616 BIOS.&lt;br /&gt;
&lt;br /&gt;
= No display =&lt;br /&gt;
Sometimes the displayport can not be used while configuring BIOS. This is the case on the ASUS B650E-F in conjunction with a RTX 3070 graphics card. You have to connect the HDMI to see the BIOS screen every time.&lt;/div&gt;</summary>
		<author><name>Steffe</name></author>
	</entry>
	<entry>
		<id>https://wiki.steffe.net/index.php?title=BIOS&amp;diff=252</id>
		<title>BIOS</title>
		<link rel="alternate" type="text/html" href="https://wiki.steffe.net/index.php?title=BIOS&amp;diff=252"/>
		<updated>2024-07-06T17:52:40Z</updated>

		<summary type="html">&lt;p&gt;Steffe: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;BIOS are generally a bit trickier to configure after the upgrade to DDR5.&lt;br /&gt;
&lt;br /&gt;
= Context Memory Restore =&lt;br /&gt;
&lt;br /&gt;
Once a newly installed computer boots up, expect it to stay black for ~1-2 minutes during boot while DDR is trained.&lt;br /&gt;
&lt;br /&gt;
To avoid this, you can enable _Memory Context Restore_ found here on the ASUS B650E-F:&lt;br /&gt;
 Advanced - AMD CBS - UMC Common Options - DDR options - DDR memory features - Memory Context Restore&lt;br /&gt;
By enabling this, the computer will then do one training on the next reboot, and then reuse that data for upcoming boots, giving the same kind of boot behavior as DDR4 and below.&lt;br /&gt;
&lt;br /&gt;
= AMD EXPO =&lt;br /&gt;
&lt;br /&gt;
This allows for auto overclocking according to your DDR5 memory. This may increase DDR training time.&lt;br /&gt;
&lt;br /&gt;
Enabling both options should work well, but sometimes it gives stability issues, and you have to refrain from using one of them.&lt;br /&gt;
&lt;br /&gt;
= No display =&lt;br /&gt;
Sometimes the displayport can not be used while configuring BIOS. This is the case on the ASUS B650E-F in conjunction with a RTX 3070 graphics card. You have to connect the HDMI to see the BIOS screen every time.&lt;/div&gt;</summary>
		<author><name>Steffe</name></author>
	</entry>
	<entry>
		<id>https://wiki.steffe.net/index.php?title=BIOS&amp;diff=251</id>
		<title>BIOS</title>
		<link rel="alternate" type="text/html" href="https://wiki.steffe.net/index.php?title=BIOS&amp;diff=251"/>
		<updated>2024-07-06T17:50:37Z</updated>

		<summary type="html">&lt;p&gt;Steffe: Created page with &amp;quot;BIOS are generally a bit trickier to configure after the upgrade to DDR5.  Context Memory Restore  Once a newly installed computer boots up, expect it to stay black for ~1-2 minutes during boot while DDR is trained.  To avoid this, you can enable _Memory Context Restore_ found here on the ASUS B650E-F:  Advanced - AMD CBS - UMC Common Options - DDR options - DDR memory features - Memory Context Restore By enabling this, the computer will then do one training on the next...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;BIOS are generally a bit trickier to configure after the upgrade to DDR5.&lt;br /&gt;
&lt;br /&gt;
Context Memory Restore&lt;br /&gt;
&lt;br /&gt;
Once a newly installed computer boots up, expect it to stay black for ~1-2 minutes during boot while DDR is trained.&lt;br /&gt;
&lt;br /&gt;
To avoid this, you can enable _Memory Context Restore_ found here on the ASUS B650E-F:&lt;br /&gt;
 Advanced - AMD CBS - UMC Common Options - DDR options - DDR memory features - Memory Context Restore&lt;br /&gt;
By enabling this, the computer will then do one training on the next reboot, and then reuse that data for upcoming boots, giving the same kind of boot behavior as DDR4 and below.&lt;br /&gt;
&lt;br /&gt;
AMD EXPO&lt;br /&gt;
&lt;br /&gt;
This allows for auto overclocking according to your DDR5 memory. This may increase DDR training time.&lt;br /&gt;
&lt;br /&gt;
Enabling both options should work well, but sometimes it gives stability issues, and you have to refrain from using one of them.&lt;/div&gt;</summary>
		<author><name>Steffe</name></author>
	</entry>
	<entry>
		<id>https://wiki.steffe.net/index.php?title=Main_Page&amp;diff=250</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.steffe.net/index.php?title=Main_Page&amp;diff=250"/>
		<updated>2024-07-06T17:45:26Z</updated>

		<summary type="html">&lt;p&gt;Steffe: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Indicium - The source of information =&lt;br /&gt;
&lt;br /&gt;
[[Linux kernel]]&lt;br /&gt;
&lt;br /&gt;
[[Linux]]&lt;br /&gt;
&lt;br /&gt;
[[Git]]&lt;br /&gt;
&lt;br /&gt;
[[Programming]]&lt;br /&gt;
&lt;br /&gt;
[[Learn programming]]&lt;br /&gt;
&lt;br /&gt;
[[Web]]&lt;br /&gt;
&lt;br /&gt;
[[Pinball]]&lt;br /&gt;
&lt;br /&gt;
[[FreeNAS]]&lt;br /&gt;
&lt;br /&gt;
[[Video Encoding]]&lt;br /&gt;
&lt;br /&gt;
[[Kodi]]&lt;br /&gt;
&lt;br /&gt;
[[Cars]]&lt;br /&gt;
&lt;br /&gt;
[[VmWare]]&lt;br /&gt;
&lt;br /&gt;
[[Windows]]&lt;br /&gt;
&lt;br /&gt;
[[Home Automation]]&lt;br /&gt;
&lt;br /&gt;
[[Raspberry Pi]]&lt;br /&gt;
&lt;br /&gt;
[[Backup]]&lt;br /&gt;
&lt;br /&gt;
[[Boats]]&lt;br /&gt;
&lt;br /&gt;
[[BIOS]]&lt;/div&gt;</summary>
		<author><name>Steffe</name></author>
	</entry>
	<entry>
		<id>https://wiki.steffe.net/index.php?title=Touareg&amp;diff=249</id>
		<title>Touareg</title>
		<link rel="alternate" type="text/html" href="https://wiki.steffe.net/index.php?title=Touareg&amp;diff=249"/>
		<updated>2024-05-15T19:05:38Z</updated>

		<summary type="html">&lt;p&gt;Steffe: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Oil change tradtitional way: https://www.youtube.com/watch?v=MFMzZk-YIt8&lt;br /&gt;
&lt;br /&gt;
Oil change using pump: https://www.youtube.com/watch?v=Nl7EzuL9Ddg&lt;br /&gt;
&lt;br /&gt;
Adaptive Front Light System: https://www.youtube.com/watch?v=-hw2Sb-cb5E&lt;br /&gt;
&lt;br /&gt;
Key battery replacement: https://www.youtube.com/watch?v=GtBVV3zRsOg&lt;br /&gt;
&lt;br /&gt;
Cabin Air filter replacement: https://www.youtube.com/watch?v=M6Xr9-erxJE&lt;br /&gt;
&lt;br /&gt;
Battery: https://www.bildelaronline24.se/varta/7623154#&lt;br /&gt;
Battery replacement: https://www.youtube.com/watch?v=THOuw0Lc0po&lt;br /&gt;
Battery adaptation: https://forums.ross-tech.com/index.php?threads/14636/&lt;br /&gt;
&lt;br /&gt;
General info: https://www.youtube.com/watch?v=_VVIi56nO_k&lt;br /&gt;
&lt;br /&gt;
ATF fluid change: https://www.clubtouareg.com/threads/diy-transmission-fluid-change-pics-atf.82168/&lt;br /&gt;
&lt;br /&gt;
Good video on ATF fluid change: https://www.youtube.com/watch?v=baEYViOHzAY&lt;br /&gt;
&lt;br /&gt;
ATF fluid change on previous model including flush: https://www.youtube.com/watch?v=FFglJVcmF6o&lt;br /&gt;
&lt;br /&gt;
Interesting idea on ATF flush on T3: https://www.clubtouareg.com/threads/t3-transmission-flush-idea-with-wonderful-drawings.173138/&lt;br /&gt;
&lt;br /&gt;
Overview of parts: https://volkswagen.7zap.com/en/za/touareg/toua/2012-693/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Blauparts tutorials:&lt;br /&gt;
* Engine oil change: https://www.blauparts.com/blog/how-to-change-vw-touareg-engine-oil-30l-tdi.html&lt;br /&gt;
* ATF fluid change: https://www.blauparts.com/blog/how-to-change-vw-touareg-transmission-fluid-8-speed.html&lt;br /&gt;
* Front differential fluid change: https://www.blauparts.com/blog/how-to-change-vw-touareg-front-differential-fluid.html&lt;br /&gt;
* Rear differential fluid change: https://www.blauparts.com/blog/how-to-change-vw-touareg-rear-differential-fluid.html&lt;br /&gt;
* Transfer case fluid change: https://www.blauparts.com/blog/how-to-change-vw-touareg-transfer-case-fluid.html&lt;br /&gt;
&lt;br /&gt;
Oils from Ravenol for this car: https://oilguide.ravenol.de/?lang=en&amp;amp;selectedType=a2f5270d56e7c629e95c2c9e9ffec442&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Låda: VW G 055 540 A2                                  https://www.oljemagasinet.se/index.php?route=product/product&amp;amp;product_id=2004 alt https://www.bildelaronline24.se/ravenol/7743948&lt;br /&gt;
* Front:   G 052 145 S2                                  https://www.oljemagasinet.se/index.php?route=product/product&amp;amp;product_id=9559 alt https://www.bildelaronline24.se/ravenol/7669060&lt;br /&gt;
* Bak:     G 052 145 S2                                  https://www.oljemagasinet.se/index.php?route=product/product&amp;amp;product_id=9559 alt https://www.bildelaronline24.se/ravenol/7669060&lt;br /&gt;
* Trans:   G 055 515 A2 / G 052 515 A2 / G 052 536 A2    https://www.ravenol.de/en/product-range/atf-transmission-fluids-for-automatic-transmissions-1/ravenol-transfer-fluid-dtf-1/ which is probably this: https://www.bildelaronline24.se/ravenol/12992621&lt;br /&gt;
&lt;br /&gt;
Filter: https://www.bildelaronline24.se/mahle-original/13892265&lt;br /&gt;
&lt;br /&gt;
Alternativ med pluggar: https://www.bildelaronline24.se/meyle/17408386&lt;br /&gt;
&lt;br /&gt;
Fill adapter: https://www.blauparts.com/audi-vw-transmission-fluid-pump-tool-vas-6262-2-vag-1924.html&lt;br /&gt;
&lt;br /&gt;
This seems to be a VAS6262/2 adapter. Seem to be orderable from here: https://www.ebay.ca/sch/i.html?_nkw=vas+6262%2F2&lt;br /&gt;
&lt;br /&gt;
The fill adapter is ATF105 a which can be bought here:&lt;br /&gt;
* https://www.amazon.com/HZ-MONSTAR-Transmission-Compatible-VAS6262-2-Automatic/dp/B08Z7565MW/ref=psdc_15719641_t1_B07HB21V75&lt;br /&gt;
* https://www.amazon.se/BGS-9992-4-V%C3%A4xell%C3%A5da-oljep%C3%A5fyllningsadaptersats-delar/dp/B07ZS686J3/ref=sr_1_2?dchild=1&amp;amp;keywords=atf105&amp;amp;qid=1632046739&amp;amp;sr=8-2&amp;amp;th=1&lt;br /&gt;
* https://www.xxl-automotive.de/spezialwerkzeug/oeldienst/befuellen/getriebeoel/860/adapter-atf105-m10x1-fuer-mini-und-vag-zu-verw.-wie-vag-6262/2&lt;br /&gt;
Kan det vara samma som i den här: https://www.biltema.se/bil---mc/bilverktyg/oljeverktyg/adapterset-till-vaxelladspafyllare/adapterset-till-vaxelladspafyllare-3-delar-2000024070 ?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Complete engine service: https://www.youtube.com/watch?v=zUu-k5TTKAA&lt;br /&gt;
&lt;br /&gt;
Diesel injector removal: https://www.youtube.com/watch?v=QDcUt_5Bkec&lt;br /&gt;
&lt;br /&gt;
Diesel injector rebuild: https://www.youtube.com/watch?v=0vM3jNzUPoM&lt;br /&gt;
&lt;br /&gt;
Diesel injector rebuild2: https://www.youtube.com/watch?v=zv_gJzoObxQ&lt;br /&gt;
&lt;br /&gt;
Using VCDS to diagnose fuel leaks: https://www.youtube.com/watch?v=k50Z5JLfuJs&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
Alternator replacement: https://www.youtube.com/watch?v=5pZ2qGftfYU&lt;br /&gt;
&lt;br /&gt;
Alternator rebuild part 1 - brushes: https://www.youtube.com/watch?v=aVvPzwtxdrM&lt;br /&gt;
&lt;br /&gt;
Alternator rebuild part 2 - slip rings: https://www.youtube.com/watch?v=f56-26I6idc&lt;/div&gt;</summary>
		<author><name>Steffe</name></author>
	</entry>
	<entry>
		<id>https://wiki.steffe.net/index.php?title=Touareg&amp;diff=248</id>
		<title>Touareg</title>
		<link rel="alternate" type="text/html" href="https://wiki.steffe.net/index.php?title=Touareg&amp;diff=248"/>
		<updated>2024-05-15T19:05:25Z</updated>

		<summary type="html">&lt;p&gt;Steffe: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Oil change tradtitional way: https://www.youtube.com/watch?v=MFMzZk-YIt8&lt;br /&gt;
&lt;br /&gt;
Oil change using pump: https://www.youtube.com/watch?v=Nl7EzuL9Ddg&lt;br /&gt;
&lt;br /&gt;
Adaptive Front Light System: https://www.youtube.com/watch?v=-hw2Sb-cb5E&lt;br /&gt;
&lt;br /&gt;
Key battery replacement: https://www.youtube.com/watch?v=GtBVV3zRsOg&lt;br /&gt;
&lt;br /&gt;
Cabin Air filter replacement: https://www.youtube.com/watch?v=M6Xr9-erxJE&lt;br /&gt;
&lt;br /&gt;
Battery: https://www.bildelaronline24.se/varta/7623154#&lt;br /&gt;
Battery replacement: https://www.youtube.com/watch?v=THOuw0Lc0po&lt;br /&gt;
Battery adaptation: https://forums.ross-tech.com/index.php?threads/14636/&lt;br /&gt;
&lt;br /&gt;
General info: https://www.youtube.com/watch?v=_VVIi56nO_k&lt;br /&gt;
&lt;br /&gt;
ATF fluid change: https://www.clubtouareg.com/threads/diy-transmission-fluid-change-pics-atf.82168/&lt;br /&gt;
&lt;br /&gt;
Good video on ATF fluid change: https://www.youtube.com/watch?v=baEYViOHzAY&lt;br /&gt;
&lt;br /&gt;
ATF fluid change on previous model including flush: https://www.youtube.com/watch?v=FFglJVcmF6o&lt;br /&gt;
&lt;br /&gt;
Interesting idea on ATF flush on T3: https://www.clubtouareg.com/threads/t3-transmission-flush-idea-with-wonderful-drawings.173138/&lt;br /&gt;
&lt;br /&gt;
Overview of parts: https://volkswagen.7zap.com/en/za/touareg/toua/2012-693/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Blauparts tutorials:&lt;br /&gt;
* Engine oil change: https://www.blauparts.com/blog/how-to-change-vw-touareg-engine-oil-30l-tdi.html&lt;br /&gt;
* ATF fluid change: https://www.blauparts.com/blog/how-to-change-vw-touareg-transmission-fluid-8-speed.html&lt;br /&gt;
* Front differential fluid change: https://www.blauparts.com/blog/how-to-change-vw-touareg-front-differential-fluid.html&lt;br /&gt;
* Rear differential fluid change: https://www.blauparts.com/blog/how-to-change-vw-touareg-rear-differential-fluid.html&lt;br /&gt;
* Transfer case fluid change: https://www.blauparts.com/blog/how-to-change-vw-touareg-transfer-case-fluid.html&lt;br /&gt;
&lt;br /&gt;
Oils from Ravenol for this car: https://oilguide.ravenol.de/?lang=en&amp;amp;selectedType=a2f5270d56e7c629e95c2c9e9ffec442&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Låda: VW G 055 540 A2                                  https://www.oljemagasinet.se/index.php?route=product/product&amp;amp;product_id=2004 alt https://www.bildelaronline24.se/ravenol/7743948&lt;br /&gt;
* Front:   G 052 145 S2                                  https://www.oljemagasinet.se/index.php?route=product/product&amp;amp;product_id=9559 alt https://www.bildelaronline24.se/ravenol/7669060&lt;br /&gt;
* Bak:     G 052 145 S2                                  https://www.oljemagasinet.se/index.php?route=product/product&amp;amp;product_id=9559 alt https://www.bildelaronline24.se/ravenol/7669060&lt;br /&gt;
* Trans:   G 055 515 A2 / G 052 515 A2 / G 052 536 A2    https://www.ravenol.de/en/product-range/atf-transmission-fluids-for-automatic-transmissions-1/ravenol-transfer-fluid-dtf-1/ which is probably this: https://www.bildelaronline24.se/ravenol/12992621&lt;br /&gt;
&lt;br /&gt;
Filter: https://www.bildelaronline24.se/mahle-original/13892265&lt;br /&gt;
&lt;br /&gt;
Alternativ med pluggar: https://www.bildelaronline24.se/meyle/17408386&lt;br /&gt;
&lt;br /&gt;
Fill adapter: https://www.blauparts.com/audi-vw-transmission-fluid-pump-tool-vas-6262-2-vag-1924.html&lt;br /&gt;
&lt;br /&gt;
This seems to be a VAS6262/2 adapter. Seem to be orderable from here: https://www.ebay.ca/sch/i.html?_nkw=vas+6262%2F2&lt;br /&gt;
&lt;br /&gt;
The fill adapter is ATF105 a which can be bought here:&lt;br /&gt;
* https://www.amazon.com/HZ-MONSTAR-Transmission-Compatible-VAS6262-2-Automatic/dp/B08Z7565MW/ref=psdc_15719641_t1_B07HB21V75&lt;br /&gt;
* https://www.amazon.se/BGS-9992-4-V%C3%A4xell%C3%A5da-oljep%C3%A5fyllningsadaptersats-delar/dp/B07ZS686J3/ref=sr_1_2?dchild=1&amp;amp;keywords=atf105&amp;amp;qid=1632046739&amp;amp;sr=8-2&amp;amp;th=1&lt;br /&gt;
* https://www.xxl-automotive.de/spezialwerkzeug/oeldienst/befuellen/getriebeoel/860/adapter-atf105-m10x1-fuer-mini-und-vag-zu-verw.-wie-vag-6262/2&lt;br /&gt;
Kan det vara samma som i den här: https://www.biltema.se/bil---mc/bilverktyg/oljeverktyg/adapterset-till-vaxelladspafyllare/adapterset-till-vaxelladspafyllare-3-delar-2000024070 ?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Complete engine service: https://www.youtube.com/watch?v=zUu-k5TTKAA&lt;br /&gt;
&lt;br /&gt;
Diesel injector removal: https://www.youtube.com/watch?v=QDcUt_5Bkec&lt;br /&gt;
&lt;br /&gt;
Diesel injector rebuild: https://www.youtube.com/watch?v=0vM3jNzUPoM&lt;br /&gt;
&lt;br /&gt;
Diesel injector rebuild2: https://www.youtube.com/watch?v=zv_gJzoObxQ&lt;br /&gt;
&lt;br /&gt;
Using VCDS to diagnose fuel leaks: https://www.youtube.com/watch?v=k50Z5JLfuJs&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
Alternator replacement: https://www.youtube.com/watch?v=5pZ2qGftfYU&lt;br /&gt;
&lt;br /&gt;
Alternator rebuild part 1 - brushes: https://www.youtube.com/watch?v=aVvPzwtxdrM&lt;br /&gt;
Alternator rebuild part 2 - slip rings: https://www.youtube.com/watch?v=f56-26I6idc&lt;/div&gt;</summary>
		<author><name>Steffe</name></author>
	</entry>
	<entry>
		<id>https://wiki.steffe.net/index.php?title=Touareg&amp;diff=247</id>
		<title>Touareg</title>
		<link rel="alternate" type="text/html" href="https://wiki.steffe.net/index.php?title=Touareg&amp;diff=247"/>
		<updated>2024-05-15T18:55:09Z</updated>

		<summary type="html">&lt;p&gt;Steffe: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Oil change tradtitional way: https://www.youtube.com/watch?v=MFMzZk-YIt8&lt;br /&gt;
&lt;br /&gt;
Oil change using pump: https://www.youtube.com/watch?v=Nl7EzuL9Ddg&lt;br /&gt;
&lt;br /&gt;
Adaptive Front Light System: https://www.youtube.com/watch?v=-hw2Sb-cb5E&lt;br /&gt;
&lt;br /&gt;
Key battery replacement: https://www.youtube.com/watch?v=GtBVV3zRsOg&lt;br /&gt;
&lt;br /&gt;
Cabin Air filter replacement: https://www.youtube.com/watch?v=M6Xr9-erxJE&lt;br /&gt;
&lt;br /&gt;
Battery: https://www.bildelaronline24.se/varta/7623154#&lt;br /&gt;
Battery replacement: https://www.youtube.com/watch?v=THOuw0Lc0po&lt;br /&gt;
Battery adaptation: https://forums.ross-tech.com/index.php?threads/14636/&lt;br /&gt;
&lt;br /&gt;
General info: https://www.youtube.com/watch?v=_VVIi56nO_k&lt;br /&gt;
&lt;br /&gt;
ATF fluid change: https://www.clubtouareg.com/threads/diy-transmission-fluid-change-pics-atf.82168/&lt;br /&gt;
&lt;br /&gt;
Good video on ATF fluid change: https://www.youtube.com/watch?v=baEYViOHzAY&lt;br /&gt;
&lt;br /&gt;
ATF fluid change on previous model including flush: https://www.youtube.com/watch?v=FFglJVcmF6o&lt;br /&gt;
&lt;br /&gt;
Interesting idea on ATF flush on T3: https://www.clubtouareg.com/threads/t3-transmission-flush-idea-with-wonderful-drawings.173138/&lt;br /&gt;
&lt;br /&gt;
Overview of parts: https://volkswagen.7zap.com/en/za/touareg/toua/2012-693/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Blauparts tutorials:&lt;br /&gt;
* Engine oil change: https://www.blauparts.com/blog/how-to-change-vw-touareg-engine-oil-30l-tdi.html&lt;br /&gt;
* ATF fluid change: https://www.blauparts.com/blog/how-to-change-vw-touareg-transmission-fluid-8-speed.html&lt;br /&gt;
* Front differential fluid change: https://www.blauparts.com/blog/how-to-change-vw-touareg-front-differential-fluid.html&lt;br /&gt;
* Rear differential fluid change: https://www.blauparts.com/blog/how-to-change-vw-touareg-rear-differential-fluid.html&lt;br /&gt;
* Transfer case fluid change: https://www.blauparts.com/blog/how-to-change-vw-touareg-transfer-case-fluid.html&lt;br /&gt;
&lt;br /&gt;
Oils from Ravenol for this car: https://oilguide.ravenol.de/?lang=en&amp;amp;selectedType=a2f5270d56e7c629e95c2c9e9ffec442&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Låda: VW G 055 540 A2                                  https://www.oljemagasinet.se/index.php?route=product/product&amp;amp;product_id=2004 alt https://www.bildelaronline24.se/ravenol/7743948&lt;br /&gt;
* Front:   G 052 145 S2                                  https://www.oljemagasinet.se/index.php?route=product/product&amp;amp;product_id=9559 alt https://www.bildelaronline24.se/ravenol/7669060&lt;br /&gt;
* Bak:     G 052 145 S2                                  https://www.oljemagasinet.se/index.php?route=product/product&amp;amp;product_id=9559 alt https://www.bildelaronline24.se/ravenol/7669060&lt;br /&gt;
* Trans:   G 055 515 A2 / G 052 515 A2 / G 052 536 A2    https://www.ravenol.de/en/product-range/atf-transmission-fluids-for-automatic-transmissions-1/ravenol-transfer-fluid-dtf-1/ which is probably this: https://www.bildelaronline24.se/ravenol/12992621&lt;br /&gt;
&lt;br /&gt;
Filter: https://www.bildelaronline24.se/mahle-original/13892265&lt;br /&gt;
&lt;br /&gt;
Alternativ med pluggar: https://www.bildelaronline24.se/meyle/17408386&lt;br /&gt;
&lt;br /&gt;
Fill adapter: https://www.blauparts.com/audi-vw-transmission-fluid-pump-tool-vas-6262-2-vag-1924.html&lt;br /&gt;
&lt;br /&gt;
This seems to be a VAS6262/2 adapter. Seem to be orderable from here: https://www.ebay.ca/sch/i.html?_nkw=vas+6262%2F2&lt;br /&gt;
&lt;br /&gt;
The fill adapter is ATF105 a which can be bought here:&lt;br /&gt;
* https://www.amazon.com/HZ-MONSTAR-Transmission-Compatible-VAS6262-2-Automatic/dp/B08Z7565MW/ref=psdc_15719641_t1_B07HB21V75&lt;br /&gt;
* https://www.amazon.se/BGS-9992-4-V%C3%A4xell%C3%A5da-oljep%C3%A5fyllningsadaptersats-delar/dp/B07ZS686J3/ref=sr_1_2?dchild=1&amp;amp;keywords=atf105&amp;amp;qid=1632046739&amp;amp;sr=8-2&amp;amp;th=1&lt;br /&gt;
* https://www.xxl-automotive.de/spezialwerkzeug/oeldienst/befuellen/getriebeoel/860/adapter-atf105-m10x1-fuer-mini-und-vag-zu-verw.-wie-vag-6262/2&lt;br /&gt;
Kan det vara samma som i den här: https://www.biltema.se/bil---mc/bilverktyg/oljeverktyg/adapterset-till-vaxelladspafyllare/adapterset-till-vaxelladspafyllare-3-delar-2000024070 ?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Complete engine service: https://www.youtube.com/watch?v=zUu-k5TTKAA&lt;br /&gt;
&lt;br /&gt;
Diesel injector removal: https://www.youtube.com/watch?v=QDcUt_5Bkec&lt;br /&gt;
&lt;br /&gt;
Diesel injector rebuild: https://www.youtube.com/watch?v=0vM3jNzUPoM&lt;br /&gt;
&lt;br /&gt;
Diesel injector rebuild2: https://www.youtube.com/watch?v=zv_gJzoObxQ&lt;br /&gt;
&lt;br /&gt;
Using VCDS to diagnose fuel leaks: https://www.youtube.com/watch?v=k50Z5JLfuJs&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
Alternator replacement: https://www.youtube.com/watch?v=5pZ2qGftfYU&lt;br /&gt;
&lt;br /&gt;
Alternator rebuild: https://www.youtube.com/watch?v=aVvPzwtxdrM&lt;/div&gt;</summary>
		<author><name>Steffe</name></author>
	</entry>
	<entry>
		<id>https://wiki.steffe.net/index.php?title=Touareg&amp;diff=246</id>
		<title>Touareg</title>
		<link rel="alternate" type="text/html" href="https://wiki.steffe.net/index.php?title=Touareg&amp;diff=246"/>
		<updated>2024-05-14T20:25:25Z</updated>

		<summary type="html">&lt;p&gt;Steffe: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Oil change tradtitional way: https://www.youtube.com/watch?v=MFMzZk-YIt8&lt;br /&gt;
&lt;br /&gt;
Oil change using pump: https://www.youtube.com/watch?v=Nl7EzuL9Ddg&lt;br /&gt;
&lt;br /&gt;
Adaptive Front Light System: https://www.youtube.com/watch?v=-hw2Sb-cb5E&lt;br /&gt;
&lt;br /&gt;
Key battery replacement: https://www.youtube.com/watch?v=GtBVV3zRsOg&lt;br /&gt;
&lt;br /&gt;
Cabin Air filter replacement: https://www.youtube.com/watch?v=M6Xr9-erxJE&lt;br /&gt;
&lt;br /&gt;
Battery: https://www.bildelaronline24.se/varta/7623154#&lt;br /&gt;
Battery replacement: https://www.youtube.com/watch?v=THOuw0Lc0po&lt;br /&gt;
Battery adaptation: https://forums.ross-tech.com/index.php?threads/14636/&lt;br /&gt;
&lt;br /&gt;
General info: https://www.youtube.com/watch?v=_VVIi56nO_k&lt;br /&gt;
&lt;br /&gt;
ATF fluid change: https://www.clubtouareg.com/threads/diy-transmission-fluid-change-pics-atf.82168/&lt;br /&gt;
&lt;br /&gt;
Good video on ATF fluid change: https://www.youtube.com/watch?v=baEYViOHzAY&lt;br /&gt;
&lt;br /&gt;
ATF fluid change on previous model including flush: https://www.youtube.com/watch?v=FFglJVcmF6o&lt;br /&gt;
&lt;br /&gt;
Interesting idea on ATF flush on T3: https://www.clubtouareg.com/threads/t3-transmission-flush-idea-with-wonderful-drawings.173138/&lt;br /&gt;
&lt;br /&gt;
Overview of parts: https://volkswagen.7zap.com/en/za/touareg/toua/2012-693/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Blauparts tutorials:&lt;br /&gt;
* Engine oil change: https://www.blauparts.com/blog/how-to-change-vw-touareg-engine-oil-30l-tdi.html&lt;br /&gt;
* ATF fluid change: https://www.blauparts.com/blog/how-to-change-vw-touareg-transmission-fluid-8-speed.html&lt;br /&gt;
* Front differential fluid change: https://www.blauparts.com/blog/how-to-change-vw-touareg-front-differential-fluid.html&lt;br /&gt;
* Rear differential fluid change: https://www.blauparts.com/blog/how-to-change-vw-touareg-rear-differential-fluid.html&lt;br /&gt;
* Transfer case fluid change: https://www.blauparts.com/blog/how-to-change-vw-touareg-transfer-case-fluid.html&lt;br /&gt;
&lt;br /&gt;
Oils from Ravenol for this car: https://oilguide.ravenol.de/?lang=en&amp;amp;selectedType=a2f5270d56e7c629e95c2c9e9ffec442&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Låda: VW G 055 540 A2                                  https://www.oljemagasinet.se/index.php?route=product/product&amp;amp;product_id=2004 alt https://www.bildelaronline24.se/ravenol/7743948&lt;br /&gt;
* Front:   G 052 145 S2                                  https://www.oljemagasinet.se/index.php?route=product/product&amp;amp;product_id=9559 alt https://www.bildelaronline24.se/ravenol/7669060&lt;br /&gt;
* Bak:     G 052 145 S2                                  https://www.oljemagasinet.se/index.php?route=product/product&amp;amp;product_id=9559 alt https://www.bildelaronline24.se/ravenol/7669060&lt;br /&gt;
* Trans:   G 055 515 A2 / G 052 515 A2 / G 052 536 A2    https://www.ravenol.de/en/product-range/atf-transmission-fluids-for-automatic-transmissions-1/ravenol-transfer-fluid-dtf-1/ which is probably this: https://www.bildelaronline24.se/ravenol/12992621&lt;br /&gt;
&lt;br /&gt;
Filter: https://www.bildelaronline24.se/mahle-original/13892265&lt;br /&gt;
&lt;br /&gt;
Alternativ med pluggar: https://www.bildelaronline24.se/meyle/17408386&lt;br /&gt;
&lt;br /&gt;
Fill adapter: https://www.blauparts.com/audi-vw-transmission-fluid-pump-tool-vas-6262-2-vag-1924.html&lt;br /&gt;
&lt;br /&gt;
This seems to be a VAS6262/2 adapter. Seem to be orderable from here: https://www.ebay.ca/sch/i.html?_nkw=vas+6262%2F2&lt;br /&gt;
&lt;br /&gt;
The fill adapter is ATF105 a which can be bought here:&lt;br /&gt;
* https://www.amazon.com/HZ-MONSTAR-Transmission-Compatible-VAS6262-2-Automatic/dp/B08Z7565MW/ref=psdc_15719641_t1_B07HB21V75&lt;br /&gt;
* https://www.amazon.se/BGS-9992-4-V%C3%A4xell%C3%A5da-oljep%C3%A5fyllningsadaptersats-delar/dp/B07ZS686J3/ref=sr_1_2?dchild=1&amp;amp;keywords=atf105&amp;amp;qid=1632046739&amp;amp;sr=8-2&amp;amp;th=1&lt;br /&gt;
* https://www.xxl-automotive.de/spezialwerkzeug/oeldienst/befuellen/getriebeoel/860/adapter-atf105-m10x1-fuer-mini-und-vag-zu-verw.-wie-vag-6262/2&lt;br /&gt;
Kan det vara samma som i den här: https://www.biltema.se/bil---mc/bilverktyg/oljeverktyg/adapterset-till-vaxelladspafyllare/adapterset-till-vaxelladspafyllare-3-delar-2000024070 ?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Complete engine service: https://www.youtube.com/watch?v=zUu-k5TTKAA&lt;br /&gt;
&lt;br /&gt;
Diesel injector removal: https://www.youtube.com/watch?v=QDcUt_5Bkec&lt;br /&gt;
&lt;br /&gt;
Diesel injector rebuild: https://www.youtube.com/watch?v=0vM3jNzUPoM&lt;br /&gt;
&lt;br /&gt;
Diesel injector rebuild2: https://www.youtube.com/watch?v=zv_gJzoObxQ&lt;br /&gt;
&lt;br /&gt;
Using VCDS to diagnose fuel leaks: https://www.youtube.com/watch?v=k50Z5JLfuJs&lt;br /&gt;
&lt;br /&gt;
Alternator replacement: https://www.youtube.com/watch?v=5pZ2qGftfYU&lt;/div&gt;</summary>
		<author><name>Steffe</name></author>
	</entry>
	<entry>
		<id>https://wiki.steffe.net/index.php?title=Saab&amp;diff=243</id>
		<title>Saab</title>
		<link rel="alternate" type="text/html" href="https://wiki.steffe.net/index.php?title=Saab&amp;diff=243"/>
		<updated>2024-04-29T21:20:37Z</updated>

		<summary type="html">&lt;p&gt;Steffe: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Gråkletig olja: http://forum.saabturboclub.com/showthread.php/129665-Majon%C3%A4s-p%C3%A5-oljesticka-samt-i-oljef%C3%A4llan-p%C3%A5-OG9-5&lt;br /&gt;
&lt;br /&gt;
Byta topplockspackning: https://www.facebook.com/groups/saabtuboclub/posts/10156971846276755/&lt;br /&gt;
&lt;br /&gt;
Efterdra toppen: http://forum.saabturboclub.com/showthread.php/4960-FAQ-Dragning-Efterdragning-av-topplock&lt;br /&gt;
&lt;br /&gt;
Vevhusventilation: https://shop.speedparts.se/sv/prod/saab/9-5-98-10/motor/vevhusventilation/9-5-04-10/&lt;br /&gt;
&lt;br /&gt;
Vevhusventilationssats: https://folkraceshop.se/vevhusventilation-saab-9-5-2004-2010&lt;br /&gt;
&lt;br /&gt;
Rengöra tråg: http://forum.saabturboclub.com/showthread.php/100780-Guide-Reng%C3%B6ra-tr%C3%A5g-OG9-5-(B2X5)-g%C3%A4ller-delvis-%C3%A4ven-OG9-3&lt;br /&gt;
&lt;br /&gt;
Video byta ventilkåpspackning: https://www.youtube.com/watch?v=Kw7Ssyf66Wc&lt;br /&gt;
&lt;br /&gt;
Renovering vevhusventilation: https://www.youtube.com/watch?v=Uk-Vg-szcyc&lt;br /&gt;
&lt;br /&gt;
Byta turbo: https://saabinfo.se/og9-5/gor-det-sjalv/byte-av-turbo/&lt;br /&gt;
&lt;br /&gt;
Byta turbo: https://www.garaget.org/forum/viewtopic.php?id=287480&amp;amp;p=2&lt;/div&gt;</summary>
		<author><name>Steffe</name></author>
	</entry>
	<entry>
		<id>https://wiki.steffe.net/index.php?title=Linux&amp;diff=160</id>
		<title>Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.steffe.net/index.php?title=Linux&amp;diff=160"/>
		<updated>2020-09-08T08:42:12Z</updated>

		<summary type="html">&lt;p&gt;Steffe: /* udev debugging */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Debugging Linux applications ==&lt;br /&gt;
==== LDD ====&lt;br /&gt;
Linux LDD is just a wrapper for:&lt;br /&gt;
 LD_TRACE_LOADED_OBJECTS=1 &amp;lt;cmd&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Core dumps ====&lt;br /&gt;
To check core dump handler:&lt;br /&gt;
 cat /proc/sys/kernel/core_pattern&lt;br /&gt;
 |/usr/sbin/coredump-handler %h_%t_%p.core&lt;br /&gt;
&lt;br /&gt;
==== Valgrind ====&lt;br /&gt;
 valgrind --trace-children=yes --leak-check=full --show-leak-kinds=all &amp;lt;binary&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuring Linux ==&lt;br /&gt;
&lt;br /&gt;
==== Graphics drivers ====&lt;br /&gt;
===== Disable Nvidia drivers and enable Intel embedded HD graphics driver =====&lt;br /&gt;
 sudo apt-get purge nvidia-*&lt;br /&gt;
 dpkg --list | grep nvidia&lt;br /&gt;
Make sure the list of nvidia packages is empty&lt;br /&gt;
 sudo apt-get install --reinstall xserver-xorg-video-intel libgl1-mesa-glx libgl1-mesa-dri mesa-utils xserver-xorg-core&lt;br /&gt;
 sudo dpkg-reconfigure xserver-xorg&lt;br /&gt;
 sudo update-alternatives --remove gl_conf /usr/lib/nvidia-current/ld.so.conf&lt;br /&gt;
 reboot&lt;br /&gt;
===== Disable Nvidia drivers and enable nouveau drivers =====&lt;br /&gt;
 sudo apt-get purge nvidia-*&lt;br /&gt;
 dpkg --list | grep nvidia&lt;br /&gt;
Make sure the list of nvidia packages is empty&lt;br /&gt;
 sudo apt-get install --reinstall xserver-xorg-video-nouveau&lt;br /&gt;
===== Disable nouveau drivers and enable Nvidia drivers =====&lt;br /&gt;
&#039;&#039;&#039;Option 1&#039;&#039;&#039;, using package manager:&lt;br /&gt;
 sudo apt-get install --reinstall nvidia-driver&lt;br /&gt;
or if your graphics card is not supported by the latest drivers (you can install the nvidia-detect package and run it to get this information):&lt;br /&gt;
 sudo apt-get install --reinstall nvidia-legacy-390xx-driver&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Option 2&#039;&#039;&#039;, using latest official NVidia driver:&lt;br /&gt;
* Go to [http://www.geforce.com] and download the latest Linux driver for your system.&lt;br /&gt;
* Switch to console mode (Ctrl+Alt+F1), kill any Xorg process (or mask/stop them with systemctl if you run systemd)&lt;br /&gt;
* Run the NVidia installer as root&lt;br /&gt;
 systemctl mask gdm&lt;br /&gt;
 systemctl stop gdm&lt;br /&gt;
 killall Xorg&lt;br /&gt;
 sudo ./NVIDIA-&amp;lt;driver-version-name&amp;gt;.run&lt;br /&gt;
&lt;br /&gt;
==== Switch default compiler ====&lt;br /&gt;
&lt;br /&gt;
 (cc --version;c++ --version;gcc --version;g++ --version) | grep Debian&lt;br /&gt;
  cc (Debian 6.1.1-11) 6.1.1 20160802&lt;br /&gt;
  c++ (Debian 6.1.1-11) 6.1.1 20160802&lt;br /&gt;
  gcc (Debian 6.1.1-11) 6.1.1 20160802&lt;br /&gt;
  g++ (Debian 6.1.1-11) 6.1.1 20160802&lt;br /&gt;
 &lt;br /&gt;
 sudo apt-get install gcc-4.9 g++-4.9&lt;br /&gt;
 &lt;br /&gt;
 gcc-4.9 --version&lt;br /&gt;
  gcc-4.9 (Debian 4.9.3-14) 4.9.3&lt;br /&gt;
 &lt;br /&gt;
 g++-4.9 --version&lt;br /&gt;
  g++-4.9 (Debian 4.9.3-14) 4.9.3&lt;br /&gt;
 &lt;br /&gt;
 gcc-5 --version&lt;br /&gt;
  gcc-5 (Debian 5.4.1-1) 5.4.1 20160803&lt;br /&gt;
 &lt;br /&gt;
 g++-5 --version&lt;br /&gt;
  g++-5 (Debian 5.4.1-1) 5.4.1 20160803&lt;br /&gt;
 &lt;br /&gt;
 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 10&lt;br /&gt;
 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 20&lt;br /&gt;
 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 10&lt;br /&gt;
 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 20&lt;br /&gt;
 sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 30&lt;br /&gt;
 sudo update-alternatives --set cc /usr/bin/gcc&lt;br /&gt;
 sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 30&lt;br /&gt;
 sudo update-alternatives --set c++ /usr/bin/g++&lt;br /&gt;
 &lt;br /&gt;
 (cc --version;c++ --version;gcc --version;g++ --version) | grep Debian&lt;br /&gt;
  cc (Debian 4.9.3-14) 4.9.3&lt;br /&gt;
  c++ (Debian 4.9.3-14) 4.9.3&lt;br /&gt;
  gcc (Debian 4.9.3-14) 4.9.3&lt;br /&gt;
  g++ (Debian 4.9.3-14) 4.9.3&lt;br /&gt;
&lt;br /&gt;
To go back:&lt;br /&gt;
 sudo update-alternatives --config gcc&lt;br /&gt;
 sudo update-alternatives --config g++&lt;br /&gt;
&lt;br /&gt;
==== Console is not filling the screen completely ====&lt;br /&gt;
This may be due to that the console thinks it is connected to a different display device than it actually is. This can be fixed by adding kernel command line parameters to disable that specific video mode.&lt;br /&gt;
 ls /sys/class/drm&lt;br /&gt;
 card0@  card0-DisplayPort-1@  card0-DisplayPort-2@  card0-DisplayPort-3@  card0-HDMI Type A-1@  card0-HDMI Type A-2@  card0-LVDS-1@  card0-SVIDEO-1@  card0-VGA-1@  controlD64@  version&lt;br /&gt;
Now check the different &amp;quot;modes&amp;quot; and &amp;quot;connected&amp;quot; and &amp;quot;enabled&amp;quot; nodes under each device to figure out which needs to be disabled. Then add to your kernel command line things such as&lt;br /&gt;
 video=LVDS-1:d video=SVIDEO-1:d video=TV-1:d&lt;br /&gt;
More information: https://bbs.archlinux.org/viewtopic.php?id=94990&lt;br /&gt;
&lt;br /&gt;
=== udev ===&lt;br /&gt;
==== udev rules ====&lt;br /&gt;
Some sample udev rules which might come handy:&lt;br /&gt;
 KERNEL==&amp;quot;tty*&amp;quot;, GROUP=&amp;quot;dialout&amp;quot;, MODE=&amp;quot;0660&amp;quot;&lt;br /&gt;
 SUBSYSTEM==&amp;quot;gpio&amp;quot;, GROUP:=&amp;quot;gpio&amp;quot;, MODE:=&amp;quot;0660&amp;quot;&lt;br /&gt;
 SUBSYSTEMS==&amp;quot;usb&amp;quot;, KERNEL==&amp;quot;ttyUSB*&amp;quot;, ATTRS{idVendor}==&amp;quot;0403&amp;quot;, ATTRS{idProduct}==&amp;quot;6001&amp;quot;, ATTRS{serial}==&amp;quot;XXXXXXXX&amp;quot;, SYMLINK+=&amp;quot;ftdiserial2usb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Use %m for the device number in symlink names.&lt;br /&gt;
&lt;br /&gt;
==== udev info ====&lt;br /&gt;
To query a device about its properties (which can be used in udev rules):&lt;br /&gt;
&lt;br /&gt;
 udevadm info --path=/sys/class/leds/example --query=all --attribute-walk&lt;br /&gt;
 udevadm info --name /dev/sda&lt;br /&gt;
 udevadm info -a /dev/sda&lt;br /&gt;
&lt;br /&gt;
More info: https://linux.die.net/man/7/udev&lt;br /&gt;
&lt;br /&gt;
==== udev debugging ====&lt;br /&gt;
Command to reload udev rules:&lt;br /&gt;
 sudo udevadm control --reload-rules &amp;amp;&amp;amp; sudo udevadm trigger&lt;br /&gt;
&lt;br /&gt;
Command to test udev rules:&lt;br /&gt;
 udevadm test --action=add /class/gpio&lt;br /&gt;
&lt;br /&gt;
=== Screen ===&lt;br /&gt;
&lt;br /&gt;
How to make the scrollback work in screen? Add the following to your .screenrc file:&lt;br /&gt;
 termcapinfo xterm ti@:te@&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== LVM ===&lt;br /&gt;
&lt;br /&gt;
==== How to extend your LVM disk ====&lt;br /&gt;
Investigate your current setup with:&lt;br /&gt;
 lsblk&lt;br /&gt;
 sudo vgdisplay&lt;br /&gt;
Then do something like:&lt;br /&gt;
 sudo lvextend -L +10G /dev/vg0/local &lt;br /&gt;
 sudo resize2fs /dev/vg0/local&lt;br /&gt;
&lt;br /&gt;
== Linux performance ==&lt;br /&gt;
 [http://www.brendangregg.com/ http://www.brendangregg.com/]&lt;/div&gt;</summary>
		<author><name>Steffe</name></author>
	</entry>
	<entry>
		<id>https://wiki.steffe.net/index.php?title=Pinball&amp;diff=118</id>
		<title>Pinball</title>
		<link rel="alternate" type="text/html" href="https://wiki.steffe.net/index.php?title=Pinball&amp;diff=118"/>
		<updated>2019-09-02T09:39:57Z</updated>

		<summary type="html">&lt;p&gt;Steffe: /* Interesting DMD hacks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Williams/Bally WPC ==&lt;br /&gt;
&lt;br /&gt;
PinWiki: http://pinwiki.com/wiki/index.php?title=Williams_WPC&lt;br /&gt;
&lt;br /&gt;
FlipperWinkel pinball repair: http://techniek.flipperwinkel.nl/wpc/ (fixed version at steffes stuff)&lt;br /&gt;
&lt;br /&gt;
Pinball Rehab: http://pinballrehab.com/&lt;br /&gt;
&lt;br /&gt;
=== Interesting DMD hacks ===&lt;br /&gt;
&lt;br /&gt;
https://pinside.com/pinball/forum/topic/de-jurassic-park-with-lcd-dmd-replacement#post-1102230&lt;br /&gt;
&lt;br /&gt;
http://pin2dmd.com/ (http://vpuniverse.com/forums/topic/2219-pin2dmd-color-pindmd-compatible-interface-with-led-rgb-color-dmd/) (https://github.com/lucky01/PIN2DMD)&lt;br /&gt;
&lt;br /&gt;
https://pinside.com/pinball/forum/topic/williamsbally-dmd-to-hdmi-raspberry-pi-b-project-with-source-code#post-2563487&lt;br /&gt;
&lt;br /&gt;
https://pinside.com/pinball/forum/topic/diy-rgb-led-dmd-4-wpc (https://github.com/hawkulous)&lt;br /&gt;
&lt;br /&gt;
http://adampreble.net/blog/2009/12/arduino-pinball-dmd/ (https://gist.github.com/preble/250458)&lt;br /&gt;
&lt;br /&gt;
http://poormanspinball.blogspot.se/&lt;br /&gt;
&lt;br /&gt;
https://github.com/hawkulous/RPI-WPC-RGB-LED-MATRIX-240hz&lt;br /&gt;
&lt;br /&gt;
http://docs.missionpinball.org/en/latest/hardware/rpi_dmd/&lt;br /&gt;
&lt;br /&gt;
=== Interesting Virtual Pinball links ===&lt;br /&gt;
&lt;br /&gt;
It seems like VPX is currently on top: https://vpinball.com/&lt;br /&gt;
&lt;br /&gt;
It now also supports BAM via Kinect: https://www.youtube.com/watch?v=g-EpTp_3wKo&amp;amp;feature=youtu.be&amp;amp;app=desktop https://www.ravarcade.pl/&lt;br /&gt;
&lt;br /&gt;
And has some legendary tables: https://vpinball.com/bb_project/gilligans-island-3d-vpx-wip/&lt;br /&gt;
&lt;br /&gt;
Pinscape controller: https://os.mbed.com/users/mjr/code/Pinscape_Controller_V2/ or http://mjrnet.org/pinscape/&lt;br /&gt;
&lt;br /&gt;
Pinscape controller build guide: http://mjrnet.org/pinscape/BuildGuideV2/BuildGuide.php?custom=EN.SS.CY.NY.PO.PP.PA.PV.PcY.BY.OY.TvW&amp;amp;expver=R3.201602xx&amp;amp;sid=toc&lt;/div&gt;</summary>
		<author><name>Steffe</name></author>
	</entry>
	<entry>
		<id>https://wiki.steffe.net/index.php?title=Linux&amp;diff=117</id>
		<title>Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.steffe.net/index.php?title=Linux&amp;diff=117"/>
		<updated>2019-08-29T12:01:02Z</updated>

		<summary type="html">&lt;p&gt;Steffe: /* Disable nouveau drivers and enable Nvidia drivers */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Debugging Linux applications ==&lt;br /&gt;
==== LDD ====&lt;br /&gt;
Linux LDD is just a wrapper for:&lt;br /&gt;
 LD_TRACE_LOADED_OBJECTS=1 &amp;lt;cmd&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Core dumps ====&lt;br /&gt;
To check core dump handler:&lt;br /&gt;
 cat /proc/sys/kernel/core_pattern&lt;br /&gt;
 |/usr/sbin/coredump-handler %h_%t_%p.core&lt;br /&gt;
&lt;br /&gt;
==== Valgrind ====&lt;br /&gt;
 valgrind --trace-children=yes --leak-check=full --show-leak-kinds=all &amp;lt;binary&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuring Linux ==&lt;br /&gt;
&lt;br /&gt;
==== Graphics drivers ====&lt;br /&gt;
===== Disable Nvidia drivers and enable Intel embedded HD graphics driver =====&lt;br /&gt;
 sudo apt-get purge nvidia-*&lt;br /&gt;
 dpkg --list | grep nvidia&lt;br /&gt;
Make sure the list of nvidia packages is empty&lt;br /&gt;
 sudo apt-get install --reinstall xserver-xorg-video-intel libgl1-mesa-glx libgl1-mesa-dri mesa-utils xserver-xorg-core&lt;br /&gt;
 sudo dpkg-reconfigure xserver-xorg&lt;br /&gt;
 sudo update-alternatives --remove gl_conf /usr/lib/nvidia-current/ld.so.conf&lt;br /&gt;
 reboot&lt;br /&gt;
===== Disable Nvidia drivers and enable nouveau drivers =====&lt;br /&gt;
 sudo apt-get purge nvidia-*&lt;br /&gt;
 dpkg --list | grep nvidia&lt;br /&gt;
Make sure the list of nvidia packages is empty&lt;br /&gt;
 sudo apt-get install --reinstall xserver-xorg-video-nouveau&lt;br /&gt;
===== Disable nouveau drivers and enable Nvidia drivers =====&lt;br /&gt;
&#039;&#039;&#039;Option 1&#039;&#039;&#039;, using package manager:&lt;br /&gt;
 sudo apt-get install --reinstall nvidia-driver&lt;br /&gt;
or if your graphics card is not supported by the latest drivers (you can install the nvidia-detect package and run it to get this information):&lt;br /&gt;
 sudo apt-get install --reinstall nvidia-legacy-390xx-driver&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Option 2&#039;&#039;&#039;, using latest official NVidia driver:&lt;br /&gt;
* Go to [http://www.geforce.com] and download the latest Linux driver for your system.&lt;br /&gt;
* Switch to console mode (Ctrl+Alt+F1), kill any Xorg process (or mask/stop them with systemctl if you run systemd)&lt;br /&gt;
* Run the NVidia installer as root&lt;br /&gt;
 systemctl mask gdm&lt;br /&gt;
 systemctl stop gdm&lt;br /&gt;
 killall Xorg&lt;br /&gt;
 sudo ./NVIDIA-&amp;lt;driver-version-name&amp;gt;.run&lt;br /&gt;
&lt;br /&gt;
==== Switch default compiler ====&lt;br /&gt;
&lt;br /&gt;
 (cc --version;c++ --version;gcc --version;g++ --version) | grep Debian&lt;br /&gt;
  cc (Debian 6.1.1-11) 6.1.1 20160802&lt;br /&gt;
  c++ (Debian 6.1.1-11) 6.1.1 20160802&lt;br /&gt;
  gcc (Debian 6.1.1-11) 6.1.1 20160802&lt;br /&gt;
  g++ (Debian 6.1.1-11) 6.1.1 20160802&lt;br /&gt;
 &lt;br /&gt;
 sudo apt-get install gcc-4.9 g++-4.9&lt;br /&gt;
 &lt;br /&gt;
 gcc-4.9 --version&lt;br /&gt;
  gcc-4.9 (Debian 4.9.3-14) 4.9.3&lt;br /&gt;
 &lt;br /&gt;
 g++-4.9 --version&lt;br /&gt;
  g++-4.9 (Debian 4.9.3-14) 4.9.3&lt;br /&gt;
 &lt;br /&gt;
 gcc-5 --version&lt;br /&gt;
  gcc-5 (Debian 5.4.1-1) 5.4.1 20160803&lt;br /&gt;
 &lt;br /&gt;
 g++-5 --version&lt;br /&gt;
  g++-5 (Debian 5.4.1-1) 5.4.1 20160803&lt;br /&gt;
 &lt;br /&gt;
 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 10&lt;br /&gt;
 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 20&lt;br /&gt;
 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 10&lt;br /&gt;
 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 20&lt;br /&gt;
 sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 30&lt;br /&gt;
 sudo update-alternatives --set cc /usr/bin/gcc&lt;br /&gt;
 sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 30&lt;br /&gt;
 sudo update-alternatives --set c++ /usr/bin/g++&lt;br /&gt;
 &lt;br /&gt;
 (cc --version;c++ --version;gcc --version;g++ --version) | grep Debian&lt;br /&gt;
  cc (Debian 4.9.3-14) 4.9.3&lt;br /&gt;
  c++ (Debian 4.9.3-14) 4.9.3&lt;br /&gt;
  gcc (Debian 4.9.3-14) 4.9.3&lt;br /&gt;
  g++ (Debian 4.9.3-14) 4.9.3&lt;br /&gt;
&lt;br /&gt;
To go back:&lt;br /&gt;
 sudo update-alternatives --config gcc&lt;br /&gt;
 sudo update-alternatives --config g++&lt;br /&gt;
&lt;br /&gt;
==== Console is not filling the screen completely ====&lt;br /&gt;
This may be due to that the console thinks it is connected to a different display device than it actually is. This can be fixed by adding kernel command line parameters to disable that specific video mode.&lt;br /&gt;
 ls /sys/class/drm&lt;br /&gt;
 card0@  card0-DisplayPort-1@  card0-DisplayPort-2@  card0-DisplayPort-3@  card0-HDMI Type A-1@  card0-HDMI Type A-2@  card0-LVDS-1@  card0-SVIDEO-1@  card0-VGA-1@  controlD64@  version&lt;br /&gt;
Now check the different &amp;quot;modes&amp;quot; and &amp;quot;connected&amp;quot; and &amp;quot;enabled&amp;quot; nodes under each device to figure out which needs to be disabled. Then add to your kernel command line things such as&lt;br /&gt;
 video=LVDS-1:d video=SVIDEO-1:d video=TV-1:d&lt;br /&gt;
More information: https://bbs.archlinux.org/viewtopic.php?id=94990&lt;br /&gt;
&lt;br /&gt;
=== udev ===&lt;br /&gt;
==== udev rules ====&lt;br /&gt;
Some sample udev rules which might come handy:&lt;br /&gt;
 KERNEL==&amp;quot;tty*&amp;quot;, GROUP=&amp;quot;dialout&amp;quot;, MODE=&amp;quot;0660&amp;quot;&lt;br /&gt;
 SUBSYSTEM==&amp;quot;gpio&amp;quot;, GROUP:=&amp;quot;gpio&amp;quot;, MODE:=&amp;quot;0660&amp;quot;&lt;br /&gt;
 SUBSYSTEMS==&amp;quot;usb&amp;quot;, KERNEL==&amp;quot;ttyUSB*&amp;quot;, ATTRS{idVendor}==&amp;quot;0403&amp;quot;, ATTRS{idProduct}==&amp;quot;6001&amp;quot;, ATTRS{serial}==&amp;quot;XXXXXXXX&amp;quot;, SYMLINK+=&amp;quot;ftdiserial2usb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== udev debugging ====&lt;br /&gt;
Command to reload udev rules:&lt;br /&gt;
 sudo udevadm control --reload-rules &amp;amp;&amp;amp; udevadm trigger&lt;br /&gt;
&lt;br /&gt;
Command to test udev rules:&lt;br /&gt;
 udevadm test --action=add /class/gpio&lt;br /&gt;
&lt;br /&gt;
=== Screen ===&lt;br /&gt;
&lt;br /&gt;
How to make the scrollback work in screen? Add the following to your .screenrc file:&lt;br /&gt;
 termcapinfo xterm ti@:te@&lt;br /&gt;
&lt;br /&gt;
== Linux performance ==&lt;br /&gt;
 [http://www.brendangregg.com/ http://www.brendangregg.com/]&lt;/div&gt;</summary>
		<author><name>Steffe</name></author>
	</entry>
	<entry>
		<id>https://wiki.steffe.net/index.php?title=Linux&amp;diff=116</id>
		<title>Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.steffe.net/index.php?title=Linux&amp;diff=116"/>
		<updated>2019-08-29T11:59:14Z</updated>

		<summary type="html">&lt;p&gt;Steffe: /* Disable nouveau drivers and enable Nvidia drivers */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Debugging Linux applications ==&lt;br /&gt;
==== LDD ====&lt;br /&gt;
Linux LDD is just a wrapper for:&lt;br /&gt;
 LD_TRACE_LOADED_OBJECTS=1 &amp;lt;cmd&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Core dumps ====&lt;br /&gt;
To check core dump handler:&lt;br /&gt;
 cat /proc/sys/kernel/core_pattern&lt;br /&gt;
 |/usr/sbin/coredump-handler %h_%t_%p.core&lt;br /&gt;
&lt;br /&gt;
==== Valgrind ====&lt;br /&gt;
 valgrind --trace-children=yes --leak-check=full --show-leak-kinds=all &amp;lt;binary&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuring Linux ==&lt;br /&gt;
&lt;br /&gt;
==== Graphics drivers ====&lt;br /&gt;
===== Disable Nvidia drivers and enable Intel embedded HD graphics driver =====&lt;br /&gt;
 sudo apt-get purge nvidia-*&lt;br /&gt;
 dpkg --list | grep nvidia&lt;br /&gt;
Make sure the list of nvidia packages is empty&lt;br /&gt;
 sudo apt-get install --reinstall xserver-xorg-video-intel libgl1-mesa-glx libgl1-mesa-dri mesa-utils xserver-xorg-core&lt;br /&gt;
 sudo dpkg-reconfigure xserver-xorg&lt;br /&gt;
 sudo update-alternatives --remove gl_conf /usr/lib/nvidia-current/ld.so.conf&lt;br /&gt;
 reboot&lt;br /&gt;
===== Disable Nvidia drivers and enable nouveau drivers =====&lt;br /&gt;
 sudo apt-get purge nvidia-*&lt;br /&gt;
 dpkg --list | grep nvidia&lt;br /&gt;
Make sure the list of nvidia packages is empty&lt;br /&gt;
 sudo apt-get install --reinstall xserver-xorg-video-nouveau&lt;br /&gt;
===== Disable nouveau drivers and enable Nvidia drivers =====&lt;br /&gt;
&#039;&#039;&#039;Option 1&#039;&#039;&#039;, using package manager:&lt;br /&gt;
 sudo apt-get install --reinstall nvidia-driver&lt;br /&gt;
or if your graphics card is not supported by the latest drivers (they will tell you):&lt;br /&gt;
 sudo apt-get install --reinstall nvidia-legacy-390xx-driver&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Option 2&#039;&#039;&#039;, using latest official NVidia driver:&lt;br /&gt;
* Go to [http://www.geforce.com] and download the latest Linux driver for your system.&lt;br /&gt;
* Switch to console mode (Ctrl+Alt+F1), kill any Xorg process (or mask/stop them with systemctl if you run systemd)&lt;br /&gt;
* Run the NVidia installer as root&lt;br /&gt;
 systemctl mask gdm&lt;br /&gt;
 systemctl stop gdm&lt;br /&gt;
 killall Xorg&lt;br /&gt;
 sudo ./NVIDIA-&amp;lt;driver-version-name&amp;gt;.run&lt;br /&gt;
&lt;br /&gt;
==== Switch default compiler ====&lt;br /&gt;
&lt;br /&gt;
 (cc --version;c++ --version;gcc --version;g++ --version) | grep Debian&lt;br /&gt;
  cc (Debian 6.1.1-11) 6.1.1 20160802&lt;br /&gt;
  c++ (Debian 6.1.1-11) 6.1.1 20160802&lt;br /&gt;
  gcc (Debian 6.1.1-11) 6.1.1 20160802&lt;br /&gt;
  g++ (Debian 6.1.1-11) 6.1.1 20160802&lt;br /&gt;
 &lt;br /&gt;
 sudo apt-get install gcc-4.9 g++-4.9&lt;br /&gt;
 &lt;br /&gt;
 gcc-4.9 --version&lt;br /&gt;
  gcc-4.9 (Debian 4.9.3-14) 4.9.3&lt;br /&gt;
 &lt;br /&gt;
 g++-4.9 --version&lt;br /&gt;
  g++-4.9 (Debian 4.9.3-14) 4.9.3&lt;br /&gt;
 &lt;br /&gt;
 gcc-5 --version&lt;br /&gt;
  gcc-5 (Debian 5.4.1-1) 5.4.1 20160803&lt;br /&gt;
 &lt;br /&gt;
 g++-5 --version&lt;br /&gt;
  g++-5 (Debian 5.4.1-1) 5.4.1 20160803&lt;br /&gt;
 &lt;br /&gt;
 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 10&lt;br /&gt;
 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 20&lt;br /&gt;
 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 10&lt;br /&gt;
 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 20&lt;br /&gt;
 sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 30&lt;br /&gt;
 sudo update-alternatives --set cc /usr/bin/gcc&lt;br /&gt;
 sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 30&lt;br /&gt;
 sudo update-alternatives --set c++ /usr/bin/g++&lt;br /&gt;
 &lt;br /&gt;
 (cc --version;c++ --version;gcc --version;g++ --version) | grep Debian&lt;br /&gt;
  cc (Debian 4.9.3-14) 4.9.3&lt;br /&gt;
  c++ (Debian 4.9.3-14) 4.9.3&lt;br /&gt;
  gcc (Debian 4.9.3-14) 4.9.3&lt;br /&gt;
  g++ (Debian 4.9.3-14) 4.9.3&lt;br /&gt;
&lt;br /&gt;
To go back:&lt;br /&gt;
 sudo update-alternatives --config gcc&lt;br /&gt;
 sudo update-alternatives --config g++&lt;br /&gt;
&lt;br /&gt;
==== Console is not filling the screen completely ====&lt;br /&gt;
This may be due to that the console thinks it is connected to a different display device than it actually is. This can be fixed by adding kernel command line parameters to disable that specific video mode.&lt;br /&gt;
 ls /sys/class/drm&lt;br /&gt;
 card0@  card0-DisplayPort-1@  card0-DisplayPort-2@  card0-DisplayPort-3@  card0-HDMI Type A-1@  card0-HDMI Type A-2@  card0-LVDS-1@  card0-SVIDEO-1@  card0-VGA-1@  controlD64@  version&lt;br /&gt;
Now check the different &amp;quot;modes&amp;quot; and &amp;quot;connected&amp;quot; and &amp;quot;enabled&amp;quot; nodes under each device to figure out which needs to be disabled. Then add to your kernel command line things such as&lt;br /&gt;
 video=LVDS-1:d video=SVIDEO-1:d video=TV-1:d&lt;br /&gt;
More information: https://bbs.archlinux.org/viewtopic.php?id=94990&lt;br /&gt;
&lt;br /&gt;
=== udev ===&lt;br /&gt;
==== udev rules ====&lt;br /&gt;
Some sample udev rules which might come handy:&lt;br /&gt;
 KERNEL==&amp;quot;tty*&amp;quot;, GROUP=&amp;quot;dialout&amp;quot;, MODE=&amp;quot;0660&amp;quot;&lt;br /&gt;
 SUBSYSTEM==&amp;quot;gpio&amp;quot;, GROUP:=&amp;quot;gpio&amp;quot;, MODE:=&amp;quot;0660&amp;quot;&lt;br /&gt;
 SUBSYSTEMS==&amp;quot;usb&amp;quot;, KERNEL==&amp;quot;ttyUSB*&amp;quot;, ATTRS{idVendor}==&amp;quot;0403&amp;quot;, ATTRS{idProduct}==&amp;quot;6001&amp;quot;, ATTRS{serial}==&amp;quot;XXXXXXXX&amp;quot;, SYMLINK+=&amp;quot;ftdiserial2usb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== udev debugging ====&lt;br /&gt;
Command to reload udev rules:&lt;br /&gt;
 sudo udevadm control --reload-rules &amp;amp;&amp;amp; udevadm trigger&lt;br /&gt;
&lt;br /&gt;
Command to test udev rules:&lt;br /&gt;
 udevadm test --action=add /class/gpio&lt;br /&gt;
&lt;br /&gt;
=== Screen ===&lt;br /&gt;
&lt;br /&gt;
How to make the scrollback work in screen? Add the following to your .screenrc file:&lt;br /&gt;
 termcapinfo xterm ti@:te@&lt;br /&gt;
&lt;br /&gt;
== Linux performance ==&lt;br /&gt;
 [http://www.brendangregg.com/ http://www.brendangregg.com/]&lt;/div&gt;</summary>
		<author><name>Steffe</name></author>
	</entry>
</feed>