Skip to content

Instantly share code, notes, and snippets.

View cengiz-io's full-sized avatar

Cengiz Can cengiz-io

View GitHub Profile
sun50iw6p1smp_defconfig
arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dtb
arm64/boot/dts/allwinner/sun50i-h6-orangepi-lite2.dtb
arm64/boot/dts/allwinner/sun50i-h6-orangepi-one-plus.dtb
IMAGE_INSTALL += " \
myapp \
bzip2 \
curl \
dosfstools \
file \
findutils \
gdb \
htop \
i2c-tools \
$ LIBGL_DEBUG=verbose glmark2-es2-drm
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 3, (OK)
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 3, (OK)
drmOpenDevice: node name is /dev/dri/card1
drmOpenDevice: open result is 3, (OK)
drmOpenDevice: node name is /dev/dri/card2
drmOpenDevice: open result is -1, (No such device)
drmOpenDevice: open result is -1, (No such device)
root@stm32mp1-disco:~# QT_SCALE_FACTOR=0.5 /usr/share/examples/touch/fingerpaint/fingerpaint
qt.qpa.input: X-less xkbcommon not available, not performing key mapping
Could not queue DRM page flip on screen DSI1 (Device or resource busy)
^Croot@stm32mp1-disco:~# dmesg
[ 502.456661] [drm:drm_stub_open]
WARNING: libdrm-2.4.84.imx-r0 do_fetch: Failed to fetch URL git://source.codeaurora.org/external/imx/libdrm-imx.git;protocol=https;branch=libdrm-imx-2.4.84, attempting MIRRORS if available
ERROR: libdrm-2.4.84.imx-r0 do_fetch: Fetcher failure: Fetch command export PSEUDO_DISABLED=1; export PATH="/build/tmp/sysroots-uninative/x86_64-linux/usr/bin:/yocto/sources/poky/scripts:/build/tmp/work/armv7at2hf-neon-mx6qdl-fslc-linux-gnueabi/libdrm/2.4.84.imx-r0/recipe-sysroot-native/usr/bin/arm-fslc-linux-gnueabi:/build/tmp/work/armv7at2hf-neon-mx6qdl-fslc-linux-gnueabi/libdrm/2.4.84.imx-r0/recipe-sysroot/usr/bin/crossscripts:/build/tmp/work/armv7at2hf-neon-mx6qdl-fslc-linux-gnueabi/libdrm/2.4.84.imx-r0/recipe-sysroot-native/usr/sbin:/build/tmp/work/armv7at2hf-neon-mx6qdl-fslc-linux-gnueabi/libdrm/2.4.84.imx-r0/recipe-sysroot-native/usr/bin:/build/tmp/work/armv7at2hf-neon-mx6qdl-fslc-linux-gnueabi/libdrm/2.4.84.imx-r0/recipe-sysroot-native/sbin:/build/tmp/work/armv7at2hf-neon-mx6qdl-fslc-linux-gnueabi/libdrm/2.4.84.imx-

Disabling GNOME Tracker and Other Info

GNOME's tracker is a CPU and privacy hog. There's a pretty good case as to why it's neither useful nor necessary here: http://lduros.net/posts/tracker-sucks-thanks-tracker/

After discovering it chowing 2 cores, I decided to go about disabling it.

Directories

@cengiz-io
cengiz-io / 99-disable-wireless-when-wired
Last active October 9, 2023 16:36
Script should be placed under `/etc/NetworkManager/dispatcher.d/` with a name like `99-disable-wireless-when-wired`. Make sure 1) root owns it 2) it's mod is 755
#!/bin/sh
IFACE=$1
ACTION=$2
ntfy () {
sudo -u cengiz \
DISPLAY=:0 \
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus \
notify-send "$1" "$2"
@cengiz-io
cengiz-io / generate.c
Created March 5, 2019 10:40 — forked from munificent/generate.c
A random dungeon generator that fits on a business card
#include <time.h> // Robert Nystrom
#include <stdio.h> // @munificentbob
#include <stdlib.h> // for Ginny
#define r return // 2008-2019
#define l(a, b, c, d) for (i y=a;y\
<b; y++) for (int x = c; x < d; x++)
typedef int i;const i H=40;const i W
=80;i m[40][80];i g(i x){r rand()%x;
}void cave(i s){i w=g(10)+5;i h=g(6)
+3;i t=g(W-w-2)+1;i u=g(H-h-2)+1;l(u
@cengiz-io
cengiz-io / side-by-side-diff.pl
Last active January 17, 2019 11:11 — forked from hikiko/side-by-side-diff.pl
Requires: `icdiff` and `Plugin: "AnsiEsc.vim"`
#!/usr/bin/perl
use strict;
use warnings;
use File::Copy qw(copy);
#use X11::Protocol;
my $fname = $ARGV[0];
if(not defined $fname) {
die "No input\n";
}
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.14.79+ (dc4@dc4-XPS13-9333) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g8460611)) #1159 Sun Nov 4 17:28:08 GMT 2018
[ 0.000000] CPU: ARMv6-compatible processor [410fb767] revision 7 (ARMv7), cr=00c5387d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
[ 0.000000] OF: fdt: Machine model: Raspberry Pi Model B Rev 2
[ 0.000000] Memory policy: Data cache writeback
[ 0.000000] cma: Reserved 8 MiB at 0x1b400000
[ 0.000000] On node 0 totalpages: 114688
[ 0.000000] free_area_init_node: node 0, pgdat c09c6650, node_mem_map db010000
[ 0.000000] Normal zone: 1008 pages used for memmap