Alex's Slip-box

These are my org-mode notes in sort of Zettelkasten style

Pop_os

:ID: d5d67aa4-e66e-48de-90d1-051ef3a8df77

# System Information

cat /etc/os-release
Pop!_OS    
VERSION=“22.04 LTS“  
ID=pop    
ID_LIKE=“ubuntu debian“  
PRETTY_NAME=“Pop!_OS 22.04 LTS“
22.04    
https://pop.system76.com    
https://support.system76.com    
https://github.com/pop-os/pop/issues    
https://system76.com/privacy    
VERSION_CODENAME=jammy    
UBUNTU_CODENAME=jammy    
LOGO=distributor-logo-pop-os    

# Trackpad Gestures

  • Swipe four fingers right on the trackpad opens the Applications view
  • Swipe four fingers left opens the Workspaces view
  • Swipe four fingers up or down switches to another workspace
  • Swipe (in any direction) with three fingers switches between open windows

# Shortcuts

See also pop keyboard shortcuts post for a complete list. Here are just a few that I like to use, but always forget.

Shortcut Action
SUPER + HJKL Switch window focus
SUPER + ENTER Window adjustment mode. Use direction keys (HJKL) to move window
SUPER + g Toggle window float
SUPER + CTRL + JK Navigate between work spaces
SUPER + SHIFT + JK Move active window between workspaces.
SUPER + ESC Lock
SUPER + T Open a terminal
ALT + CTRL + SHIFT + R Screen shot selection

# Launcher Shortcuts

SUPER opens the launcher. ? shows all the possible commands.

Shortcut action
/ or ~/ browse filesystem
file filename Search for a file
t: run command in terminal
g search_term search Google (ddg for duck duck go)

# Update packages

Same thing as doing it through popshop, but here at least I can see the logging

sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y && flatpak update -y

If you encounter issues like dependency conflicts, try instead

sudo apt full-upgrade

# APT sources

Sources are found in various files located in /etc/apt/sources.list.d/

# Compiler toolchain

For Pop_Os and Ubuntu install build-essential. Contains things like G++/GCC, GNU Debugger and other packages for compiling C/C++

sudo apt-get install build-essential

# Logs

There are different types of logs and they’re all located in /var/log/. Sometimes applications will write logs here too.

# USB logs

In the kernel logs

tail -f /var/log/kern.log | grep usb

# Wake from suspend on USB device input

The following should work on other Linux distros.

# Gathering Bus and device info

# See which devices are wakeup disabled

grep . /sys/bus/usb/devices/*/power/wakeup
/sys/bus/usb/devices/3-14/power/wakeup:disabled
/sys/bus/usb/devices/3-2/power/wakeup:disabled
/sys/bus/usb/devices/3-4.1/power/wakeup:enabled
/sys/bus/usb/devices/3-4.2/power/wakeup:enabled
/sys/bus/usb/devices/3-4/power/wakeup:disabled
/sys/bus/usb/devices/4-3/power/wakeup:disabled
/sys/bus/usb/devices/4-4/power/wakeup:disabled
/sys/bus/usb/devices/usb1/power/wakeup:disabled
/sys/bus/usb/devices/usb2/power/wakeup:disabled
/sys/bus/usb/devices/usb3/power/wakeup:disabled
/sys/bus/usb/devices/usb4/power/wakeup:disabled

# List devices and Buses

List all your device names, vendor ID, product ID along with the Bus number they are using:

  • vendor ID is left side of the colon
  • product ID is right side of the colon

    lsusb
    

You can list devices by product name. Might be useful in some cases.

grep . /sys/bus/usb/devices/*/product

# Create a udev rule to configure the device for wakeup

# Issues waking up from suspend

Sometimes I am unable to wake the computer up from suspend. There is often a dmesg log indicating something like:

psmouse serio1: elantech: elantech_send_cmd query 0x02 failed.
  • Seems to have something to do with USB peripherals, especially mouse and keyboard (probably mouse?).

# Things to try

  • Disable USB autosuspend: https://unix.stackexchange.com/a/175035. The post is very old, but it illustrates that it should be possible to disable autosuspend for USB devices. They will therefore stay on when the system goes into suspend.

# View the current configuration for usb autosuspend

cat /sys/module/usbcore/parameters/autosuspend

# change usb autosuspend config

sudo kernelstub -a "usbcore.autosuspend=-1"

# Recovery

Boot into the recovery partition by pressing SPACE at splash screen. From here you can do

  1. Clean install
  2. Refresh install (user data is retained but apps not installed in user dir are removed)
  3. Repair something: mount the main partition and do stuff to it

# Unlock and mount the encrypted drive

TIP: use lsblk to list drives and partitions

sudo cryptsetup luksOpen /dev/nvme0n1p3 cryptdata
sudo mount /dev/mapper/data-root /mnt

# chroot

Run commands as root dir set to NEWROOT (as if the existing OS system has been booted). From here can fix issues with packages, etc.

  1. Mount the EFI partition

    sudo mount /dev/nvme0n1p1 /mnt/boot/efi
    
  2. Mount the rest

    for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done
    
  3. Change root to /mnt

    sudo chroot /mnt
    
  4. When done exit and reboot

# Installing

# MacBook Air 2015

Follow the instructions to make a bootable flash drive and install the OS. Takes only a few minutes. The broadcom WiFi adapter will not work out of the box. To get it working, install the broadcom driver:

sudo apt update
sudo apt install bcmwl-kernel-source
sudo modprobe wl
sudo rbboot

See also https://www.linux.org/threads/solved-cannot-get-wifi-recognized-when-installing-popos-22-04-on-2015-macbook-pro.40277/post-183971

# Webcam

This should just work out of the box. Test it with cheese.

# Resources

Search Results