Skip to content

Instantly share code, notes, and snippets.

avr-g++ -mmcu=atmega32 -fno-exceptions -fno-rtti -O2 -o file.elf file.cpp
@xqms
xqms / nouveau loading
Created December 11, 2013 00:00
T440p with GT730M
[ 33.755001] ACPI Warning: \_SB_.PCI0.PEG_.VID_._DSM: Argument #4 type mismatch - Found [Integer], ACPI requires [Package] (20131115/nsarguments-95)
[ 33.755062] ACPI Warning: \_SB_.PCI0.PEG_.VID_._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20131115/nsarguments-95)
[ 33.755233] ACPI Warning: \_SB_.PCI0.PEG_.VID_._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20131115/nsarguments-95)
[ 33.755395] pci 0000:02:00.0: optimus capabilities: enabled, status dynamic power, hda bios codec supported
[ 33.755397] VGA switcheroo: detected Optimus DSM method \_SB_.PCI0.PEG_.VID_ handle
[ 33.755420] nouveau 0000:02:00.0: enabling device (0004 -> 0007)
[ 33.755536] [drm] hdmi device not found 2 0 1
[ 33.755615] nouveau [ DEVICE][0000:02:00.0] BOOT0 : 0x108100a1
[ 33.755616] nouveau [ DEVICE][0000:02:00.0] Chipset: GK208 (NV108)
[ 33.755617] nouveau [ DEVICE][0000:02:00.0] Family : NVE0
@xqms
xqms / gist:7902930
Created December 11, 2013 00:20
T440p with GT730M - complete dmesg log during the crash
Dec 11 01:18:24 xq-nb kernel: [ 705.236351] ACPI Warning: \_SB_.PCI0.PEG_.VID_._DSM: Argument #4 type mismatch - Found [Integer], ACPI requires [Package] (20131115/nsarguments-95)
Dec 11 01:18:24 xq-nb kernel: [ 705.236411] ACPI Warning: \_SB_.PCI0.PEG_.VID_._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20131115/nsarguments-95)
Dec 11 01:18:24 xq-nb kernel: [ 705.236581] ACPI Warning: \_SB_.PCI0.PEG_.VID_._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20131115/nsarguments-95)
Dec 11 01:18:24 xq-nb kernel: [ 705.236743] pci 0000:02:00.0: optimus capabilities: enabled, status dynamic power, hda bios codec supported
Dec 11 01:18:24 xq-nb kernel: [ 705.236745] VGA switcheroo: detected Optimus DSM method \_SB_.PCI0.PEG_.VID_ handle
Dec 11 01:18:24 xq-nb kernel: [ 705.236770] nouveau 0000:02:00.0: enabling device (0004 -> 0007)
Dec 11 01:18:24 xq-nb kernel: [ 705.236870] [drm] hdmi device not found 2 0 1
Dec 11 01:18:24 xq-nb kernel: [ 705.236948] no
@xqms
xqms / System configuration
Created October 2, 2014 10:27
Linux configuration for Intel Graphics and NVIDIA CUDA on Lenovo T440p
This is my current system configuration. I use the intel graphics for graphics, and just keep the NVidia card running for CUDA applications. Note that this setup does not give you 3D acceleration on the NVidia card!
Sometimes (only after suspend) I have to use the attached reload_nvidia.sh script because my CUDA applications complain about a "invalid device ordinal".
BIOS version: 1.17
Linux: Ubuntu 14.04 with kernel 3.17.0-031700rc4-generic
kernel cmdline: "acpi_osi=!Windows 2012"
nvidia driver 340 manually installed from the xorg-edgers PPA:
https://launchpad.net/~xorg-edgers/+archive/ubuntu/ppa
@xqms
xqms / Makefile
Created October 12, 2014 19:04
i2c-rk3x clock rate change tester
ifneq ($(KERNELRELEASE),)
obj-m := i2c-clk-tester.o
i2c-clk-tester-y := tester.o
else
KDIR ?= /lib/modules/`uname -r`/build
@xqms
xqms / after_lspci
Created November 3, 2016 17:17
T440p crash with kernel 4.8.6
[ 130.673600] thinkpad_acpi: EC reports that Thermal Table has changed
[ 130.673657] nouveau 0000:02:00.0: DRM: resuming kernel object tree...
<system freezes, high CPU load>
@xqms
xqms / visdom_video.py
Last active June 25, 2018 12:38
video workaround for visdom
from tqdm import tqdm
import base64
import tempfile
import subprocess
def encode(tensor):
L = tensor.size(0)
H = tensor.size(1)
W = tensor.size(2)
// Compile-time type names
// Author: Max Schwarz <max.schwarz@ais.uni-bonn.de>
#ifndef TYPE_NAME_H
#define TYPE_NAME_H
#include <cstdlib>
#include <boost/hana/string.hpp>
@xqms
xqms / log
Created May 24, 2019 15:09
latexrun bug
hashing latex.out/talk.nav
hashing latex.out/talk.bcf
hashing latex.out/talk.log
hashing latex.out/talk.aux
hashing latex.out/talk.out
hashing latex.out/talk.snm
hashing latex.out/talk.toc
hashing latex.out/talk.run.xml
hashing latex.out/talk.fls
committing database
@xqms
xqms / CMakeLists.txt
Created June 14, 2019 15:12
Corrade::Utility::Debug benchmark
cmake_minimum_required(VERSION 3.0)
project(corrade_benchmark)
find_package(Corrade REQUIRED Utility)
set(CMAKE_CXX_STANDARD 17)
add_executable(corrade_benchmark main.cpp)
target_link_libraries(corrade_benchmark Corrade::Utility)