Skip to content

Instantly share code, notes, and snippets.

@sbng
sbng / amdgpu-workaround.md
Last active April 11, 2024 06:33
amdgpu cause external display to go blank after suspend - workaround

wayland

admgpu experiences a bug where external dispaly goes black coming back from suspend. The build-in display (eDP) does not experience this issue. The workaound is to toggle the external display manually or via scripts. Depending on the compositor used (sway or hyperland). The approach adopted to fix this issue is illustrated below:

sway

Create a script to force the following command (chvt x) to toggle from graphical display back to graphical mode. This is a workaround to get the external display working again. The script is called by systemd in the POST resume operation. The location of the script is /usr/lib/systemd/system-sleep/reset-external-display.sh

@sbng
sbng / mutt_gmail.md
Last active April 12, 2024 06:46
Using mutt with Gmail and Oauth2

mutt

mutt is a console/terminal base Email client. it is fast and flexible with many option for customization. It works well with any editor of choice. Vim, emacs and neovim are common editor that are used in mutt for composing and replying to email.

Gmail

Gmail despite a wonderful webui but lack the flexibility to manipulate email using key binding. Fortunely, Gmail does provides imap service to allow the usage of email services from third party email client. Console Email client (mutt) is an excellent alternative to read Email from console/terminal.

Using mutt to read Gmail

  1. Install mutt and downlad mutt_oauth2.py script
  2. Enable Gmail imap service with Oauth2