Skip to content

Instantly share code, notes, and snippets.

View plembo's full-sized avatar

Phil Lembo plembo

View GitHub Profile
@plembo
plembo / fixdockautohide.md
Last active August 21, 2024 16:51
fix dock will not reappear after auto-hide ubuntu 22.04 desktop

Fix dock won't reappear after auto-hide

Running Ubuntu 22.04 LTS with Ubuntu Desktop on X11.

Problem

After setting dock (dash to dock extension) to auto-hide, it won't reappear if any app is full screen.

Solution

Turn off "require-pressure-to-show" in dconf settings for dock.

  1. Open dconf-editor and go to org > gnome > shell > exensions > dash-to-dock
@plembo
plembo / fixphantomdisplayubu.md
Last active September 2, 2024 19:44
phantom unknown display in ubuntu with nvidia

Workaround for "Phantom Unknown Display"

Got bit by Ubuntu Linux bug #2060268 on the latest kernel update for 22.04 LTS (6.8.0-40-generic).

As in the bug report (and many forum posts across the Internet) this appears to be due to a collision between the simpledrm kernel module and NVIDIA drivers. The symptom is a nonexistent display device being assigned as card0. The practical effect is to throw off any previous configuration of the display system (display 1 becoming display 2, display 2 becoming display 3). As a result, customizations like joined or mirrored displays break and need to be reconfigured.

This bug was filed in April 2024 for a 24.04 desktop running the NVIDIA 545 drivers. Since then it has also been reported in 22.04 (my current system, where I am running the NVIDIA 535 drivers with Xorg).

Many solutions have been proposed on the Internet involving passing special flags to the kernel. These have sometimes proved disruptive to

@plembo
plembo / chromeandroidsettings.md
Last active August 19, 2024 16:14
Google Chrome on Android settings

Google Chrome on Android settings

My preferred settings for Google Chrome on Android:

Updated for version 127.0.6533.64

You and Google

  • DO NOT turn on sync, or Disable

Basics

  • Search engine: DuckDuckGo
  • Google Password Manager: Settings - Disable all
@plembo
plembo / chromesetchecklist.md
Last active August 19, 2024 16:13
Google Chrome desktop settings checklist

Google Chrome desktop settings

Following are my preferred settings for Google Chrome desktop (Updated for version 127.0.6533.88):

You and Google

  • User Profile: No change
  • Sync and Google Services: Disable all

Autofill and passwords

  • Google Password Manager: Settings - Disable all
@plembo
plembo / tpmsecbootwinkvm.md
Last active April 25, 2024 14:37
KVM libvirt qemu tpm secure boot Windows install

TPM and Secure Boot for Windows 11 guests on KVM

The latest KVM on Ubuntu Desktop 22.04 supports both TPM2.0 and Secure Boot for Windows 11 guests. To use it you'll need to make sure the ovmf package is installed.

If using Virtual Machine Manager (VMM, or virt-manager) to install Windows 11 from a Microsoft iso, be sure to check "Customize configuration before install" before clicking on the "Finish" button. While VMM will automatically detect the operating system version and customize many things, including TPM, it will not choose the correct setting for Secure Boot.

When you get to the VM's configuration screen in VMM, you'll find that a TPM vNone device has already been added. Setting up Secure Boot properly will require manually selecting the correct firmware. To do that:

  1. Select Overview
@plembo
plembo / virgl3d-ubuntu.md
Last active August 27, 2024 09:21
3d acceleration for Linux guests in KVM on Ubuntu Desktop

VirGL for Linux KVM guests on Ubuntu Desktop

NOTE: Please don't ask for help here, it was a miracle that I got it to work at all. Seek answers in the usual places (yes, even Stackoverflow knows more than I do).

The question: How can I get 3d accelerated graphics for Linux guests in KVM without using PCI passthrough?

The short answer is: Use VirGL. The long answer is more complicated, because the VirGL project has had slow but steady progress towards actually working reliably, but the degree to which any given Linux distribution (or related driver project) is in sync has varied greatly over time. Even if it works right now, today, on your machine, it might not tomorrow. Note that even when it works, graphics performance is mediocre to downright painful.

Tested on Ubuntu Desktop 22.04.04 LTS with qemu-kvm, in an "Ubuntu on Xorg" session (not Wayland). Linux quests must have spice-vdagent installed (Ubuntu installs this by default). The hardware is a AMD 5600G d

@plembo
plembo / newmutternostutter.md
Last active May 25, 2024 16:04
Upgrade mutter to eliminate stutter in Gnome terminal on Ubuntu

Upgrade mutter to eliminate stutter

System impacted is a AMD workstation with NVIDIA graphics, running Gnome desktop on X11. The operating system is Ubuntu Desktop 22.04.4 LTS.

The latest mutter update causes stutter and lagging in Gnome terminal sessions. Switching to xterm relieves the problem, but not a real solution.

The problem was finally identified as a bug in the code to Canonical's latest update for Gnome's mutter window manager and compositor (Bug #2059847). A preliminary workaround PPA from mutter maintainer Daniel Van Vugt (vanvugt) stopped working after a new official update that retained the original bug. In a 15 May 2024 comment to the bug report (#135), Daniel posted links to corrected packages that fix the issue:

You don't really need to enable jammy-proposed. Just download the 3 proposed packages:
@plembo
plembo / shrinkpdfsize.md
Last active March 27, 2024 15:18
Massively shrink PDF size

Massively shrink the size of a PDF file

Use ghostscript:

$ gs -sDEVICE=pdfwrite \
-dCompatibilityLevel=1.4 \
-dPDFSETTINGS=/ebook \
-dNOPAUSE \
-dBATCH \
@plembo
plembo / dellchromelinux.md
Last active September 13, 2024 17:26
Linux on a Dell Chromebook 11

Linux on a Dell Chromebook 11

NOTE: Last time I saw the Dell Chromebook, it was on a pile of electronics bound for the county recycling center. The N3060 CPU's 2 cores were just too sluggish for it to be usable during that overseas trip mentioned below. I leave this gist here mostly out of nostalgia.

My retail (not enterprise) Dell Chromebook 11 (an Inspiron model 3181, not the 3180 or 3189) went EOL shortly after I purchased it new from Best Buy. Since then it saw some hard use in the family kitchen as a recipe lookup device, but was finally retired when replaced by a (relatively) newer Android tablet (that also reached EOL shortly thereafter).

With an overseas trip looming, I decided to look into refurbishing the Chromebook for use as a privacy hardened travel laptop. Frankly, the thought of TSA and Customs manhandling my trusty portable workstation was too much to bear.

I mostly followed the detailed instructions in the Chrultrabook Docs, using the firmware supplied

@plembo
plembo / debiangnome.md
Last active February 16, 2024 16:43
Notes on Debian Gnome Desktop

Notes on Debian Gnome Desktop

Some notes on setting up the Gnome desktop on Debian.

This is only for Debian, not Ubuntu.

Base system is Debian 12 Stable (Bookworm).

No joy installing nvidia drivers. Sorry.