Skip to content

Instantly share code, notes, and snippets.

View diffficult's full-sized avatar
💽
the big switcharoo

reese diffficult

💽
the big switcharoo
View GitHub Profile
@diffficult
diffficult / try_to_fix_[drm_kms_helper]_in_english.md
Created October 30, 2018 15:55 — forked from i0z0m/[drm_kms_helper]-flip_done-timed-out.md
[drm:drm_atomic_helper_wait_for_dependencies [drm_kms_helper]] *ERROR* [CRTC:37:pipe A] flip_done timed out.

a symptom

I am the Japanese and not good at writng English. I'm sorry to my language ability for you.
I sometimes get the following error when logging out of Xorg. It's a little different to [xf86-video-intel] flip_done timed out, but it's similar.
[drm:drm_atomic_helper_wait_for_dependencies [drm_kms_helper]] ERROR [CRTC:37:pipe A] flip_done timed out.

Using the video=SVIDEO-1:d kernel parameter doesn't work for me.
I'm running Arch Linux (4.17.2-1) on my laptop ThinkPad X220 with xf86-video-intel (my CPU is an i5-2540M).

$ dmesg
$ hwinfo

@diffficult
diffficult / tweaks_x220.md
Last active January 8, 2024 22:10
Thinkpad x220 General Tweaks

Thinkpad x220 general

Power settings (powertop+tlp)

powertop setup

  1. Install powertop
sudo pacman -S powertop
@diffficult
diffficult / statusgit
Created May 16, 2018 02:19 — forked from armeenm/statusgit
Update all git repositories recursively.
#!/bin/bash
declare -a COLORS
j=0
# Default colors are light for dark terminals.
# Use '-l' option for normal (darker) text.
# Red, green, yellow, blue, magenta, cyan.
for i in {91..96}; do COLORS[$j]=$i; let "j++"; done
usage() {
@diffficult
diffficult / gist:ac00c706dda17f114a1f243af4667700
Created April 4, 2018 23:21 — forked from fabiofl/gist:5873100
Clear Mac OS X's icon cache.
sudo find /private/var/folders/ -name com.apple.dock.iconcache -exec rm {} \;
@diffficult
diffficult / installing_virt_manager.md
Last active April 11, 2024 04:10
Easy instructions to get virt-manager qemuv/kvm running on Arch

Easy instructions to get QEMU/KVM and virt-manager up and running on Arch

  1. Make sure your cpu support kvm with below command:

     grep -E "(vmx|svm)" --color=always /proc/cpuinfo
    
  2. Make sure BIOS have enable “Virtualization Technology”.

  3. User access to /dev/kvm so add your account into kvm(78) group:

@diffficult
diffficult / addthisto_i3config.conf
Last active September 4, 2021 00:01
i3 scrot menu
# Screenshot Menu
set $maimode "[S]crot . scrot&[U]pload . scrot2[C]lipboard . scrot[A]rea"
bindsym $mod+Shift+Print mode $maimode
mode $maimode {
bindsym s exec --no-startup-id "mkdir -p ~/Pictures/Screenshots && maim -m 10 ~/Pictures/Screenshots/scrot-$(date +%Y-%m-%d_%H-%M-%S).png", mode "default"
bindsym u exec --no-startup-id "mkdir -p ~/Pictures/Screenshots && maim -m 10 -s ~/Pictures/Screenshots/upload.png && imgur ~/Pictures/Screenshots/upload.png", mode "default"
bindsym c exec --no-startup-id "mkdir -p ~/Pictures/Screenshots && maim -m 10 -s | xclip -selection clipboard -t", mode "default"
bindsym a exec --no-startup-id "mkdir -p ~/Pictures/Screenshots && maim | maim -m 10 -s ~/Pictures/Screenshots/cropped-$(date +%Y-%m-%d_%H-%M-%S).png", mode "default"
bindsym Return mode "default"
bindsym Escape mode "default"
@diffficult
diffficult / .tmux.conf
Created October 26, 2017 23:29
2017-10 working tmux config
#Prefix Key
set -g prefix ^a
set -g status-keys vi
setw -g mode-keys vi
# setw -g mode-mouse on
unbind c
unbind i
unbind l
unbind s
@diffficult
diffficult / ledger_nano_s_on_linux.md
Last active April 6, 2024 10:20
Ledger Nano S on Arch

Ledger Nano S on Linux

Requirement:

  • Ledger Nano
  • Ledger HW1
  • Ledger Nano S
  • Ledger Blue
  • Special Edition

You need to create a set of udev rules to allow access to the device on Linux. This can be done easily by running the following command:

@diffficult
diffficult / .zpreztorc
Last active June 6, 2017 15:47
zsh prezto config file
#
# Sets Prezto options.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
#
# General
#
@diffficult
diffficult / moonphase.sh
Created April 16, 2017 07:43
Moonphase blocklet for i3
#!/bin/bash
moonphase(){
local lp=2551443
local now=$(date -u +"%s")
local newmoon=592500
local phase=$((($now - $newmoon) % $lp))
local phase_number=$((((phase / 86400) + 1)*100000))
# Multiply by 100000 so we can do integer comparison. Go Bash!