Skip to content

Instantly share code, notes, and snippets.

Dennis E. Mungai Brainiarc7

View GitHub Profile
@Brainiarc7
Brainiarc7 / ubuntu-tweak.sh
Created Apr 22, 2019 — forked from salaros/ubuntu-tweak.sh
My tweaks for Ubuntu + Dell Inspiron 5567
View ubuntu-tweak.sh
#!/usr/bin/env bash
# Require root to run
if [ "$EUID" -ne 0 ]; then
echo "Please run as root"
exit 0
fi
# [PlayOnLinux] - disables protection against the usage of Ptrace
# https://www.playonlinux.com/en/topic-10534-Regarding_ptrace_scope_fatal_error.html
@Brainiarc7
Brainiarc7 / ffmpeg-nvprime-build.md
Last active Apr 8, 2019
FFmpeg build for NVIDIA PRIME-enabled systems on Ubuntu 18.04LTS+. NVENC, QuickSync and VAAPI hwaccels are enabled.
View ffmpeg-nvprime-build.md

FFmpeg build for Optimus and dual-GPU (Intel+NVIDIA) systems on Ubuntu 18.04LTS:

Build platform: Ubuntu 18.04LTS

Goals: Generate an FFmpeg build that can utilize NVENC, QuickSync and VAAPI-based hardware acceleration on NVIDIA-PRIME-based systems on Ubuntu 18.04LTS+.

Ensure the platform is up to date:

sudo apt update && sudo apt -y upgrade && sudo apt -y dist-upgrade

@Brainiarc7
Brainiarc7 / ffmpeg-extract-keyframes.sh
Created Dec 14, 2018 — forked from savvot/ffmpeg-extract-keyframes.sh
Extract only keyframes (I-frames) from video to images with console ffmpeg
View ffmpeg-extract-keyframes.sh
ffmpeg -ss <start_time> -i video.mp4 -t <duration> -q:v 2 -vf select="eq(pict_type\,PICT_TYPE_I)" -vsync 0 frame%03d.jpg
@Brainiarc7
Brainiarc7 / powercfg-win10-more-settings.cmd
Created Nov 12, 2018 — forked from Nt-gm79sp/powercfg-win10-more-settings.cmd
Show/hide hidden settings in Win10 Power Options
View powercfg-win10-more-settings.cmd
@echo on
REM checked for Windows 10
REM fork from https://gist.github.com/theultramage/cbdfdbb733d4a5b7d2669a6255b4b94b
REM you may want full list https://gist.github.com/raspi/203aef3694e34fefebf772c78c37ec2c
REM SET attrib=+ATTRIB_HIDE
SET attrib=-ATTRIB_HIDE
REM Hard disk burst ignore time
powercfg -attributes 0012ee47-9041-4b5d-9b77-535fba8b1442 80e3c60e-bb94-4ad8-bbe0-0d3195efc663 %attrib%
@Brainiarc7
Brainiarc7 / 01-installing-linux-on-asus-gm501gs-xs74.md
Last active Feb 15, 2019
Installing Ubuntu 18.04LTS on the Asus GM501GS-XS74 notebook
View 01-installing-linux-on-asus-gm501gs-xs74.md

Installing Linux on the Asus GM501GS-XS74:

For starters,

If you are dual booting, install Windows first, and partition from there with a tool such as Minitool. You'll only need two partitions, one for root and optionally, a small one for swap (say, 8GB). Partition them as appropriate, and when done, reboot into the UEFI menu and ensure that:

(a). Secure boot is disabled (otherwise you won't be able to load up proprietary drivers needed for the Nvidia GPU).

(b). Confirm that you're booting in UEFI mode ONLY. This is the default. CSM should remain disabled. Here's why.

@Brainiarc7
Brainiarc7 / fix-intel_wifi_aer-avell_g1513_fire_v3
Created Jul 16, 2018 — forked from flisboac/ fix-intel_wifi_aer-avell_g1513_fire_v3
Temporary fix for AER's excessive `severity=Corrected` logging for Intel Wireless (Avell G1513 Fire V3) (Arch Linux)
View fix-intel_wifi_aer-avell_g1513_fire_v3
silly gist hack, why do we need you? :(
@Brainiarc7
Brainiarc7 / C-states.md
Created Jul 14, 2018 — forked from wmealing/C-states.md
What are CPU "C-states" and how to disable them if needed?
View C-states.md

To limit a CPU to a certain C-state, you can pass the processor.max_cstate=X option in the kernel line of /boot/grub/grub.conf.

Here we limit the system to only C-State 1:

    kernel /vmlinuz-2.6.18-371.1.2.el5 ... processor.max_cstate=1

On some systems, the kernel can override the BIOS setting, and the parameter intel_idle.max_cstate=0 may be required to ensure sleep states are not entered:

@Brainiarc7
Brainiarc7 / gist:6f67ea3f09169d13a6388d9625b8bcb8
Created Jul 12, 2018 — forked from luctrudeau/gist:244a87c31bbf8060a6c1d3a198c2d2c4
Libaom on Power Profiling (--limit=10 --cpu-used=1 ducks_take_off_1080p50_60f.y4m)
View gist:6f67ea3f09169d13a6388d9625b8bcb8
# Overhead Command Shared Object Symbol
# ........ ....... ................ .........................................................
#
26.47% aomenc aomenc [.] av1_highbd_jnt_convolve_2d_c
10.76% aomenc aomenc [.] aom_highbd_convolve8_horiz_c
10.44% aomenc aomenc [.] aom_highbd_convolve8_vert_c
10.27% aomenc aomenc [.] av1_highbd_jnt_convolve_y_c
6.68% aomenc aomenc [.] av1_highbd_convolve_2d_sr_c
4.87% aomenc aomenc [.] av1_highbd_jnt_convolve_x_c
3.89% aomenc aomenc [.] av1_idct64_new
@Brainiarc7
Brainiarc7 / libVPXonPower.prof
Created Jul 12, 2018 — forked from luctrudeau/libVPXonPower.prof
[Profiling] LibVPX on Power Youtube-Like Encoding (14 Jun 2018)
View libVPXonPower.prof
# perf record ./vpxenc --good --cpu-used=2 --codec=vp9 --psnr -v -o /dev/null ~/Videos/ducks_take_off_1080p50_60f.y4m
# perf report --stdio > libVPXonPower.prof
#
# Overhead Command Shared Object Symbol
# ........ ....... ................... .......................................................
#
23.35% vpxenc vpxenc [.] vpx_convolve8_vsx
11.09% vpxenc vpxenc [.] vpx_sad16x16x4d_vsx
6.30% vpxenc vpxenc [.] vpx_convolve8_avg_vsx
5.18% vpxenc vpxenc [.] vpx_convolve8_vert_vsx
@Brainiarc7
Brainiarc7 / loadtest.sh
Last active Jul 13, 2018 — forked from luctrudeau/loadtest.sh
Load Test Script (tuned for Kabylake i7 8750H on the Eurocom Q6)
View loadtest.sh
#!/bin/bash
JOBS=(1 3 6 12 24 48 96)
ENCODE_THREADS=(1 3 6)
NUM_CPU_THREADS=12
for NUM_ENCODE_THREADS in ${ENCODE_THREADS[*]}; do
for NUM_JOBS in ${JOBS[*]}; do
You can’t perform that action at this time.