Skip to content

Instantly share code, notes, and snippets.

View fulminemizzega's full-sized avatar

fulminemizzega

View GitHub Profile
@fulminemizzega
fulminemizzega / rpmfusion_libdnf5_api.py
Created July 3, 2025 01:19
Example libdnf5 python API, conflict errors and how to avoid them
import libdnf5
import platform
def init_base() -> libdnf5.base.Base:
base = libdnf5.base.Base()
base_config = base.get_config()
base_config.plugins = False
base.load_config()
base.setup()
@fulminemizzega
fulminemizzega / zswap_stat.py
Created December 6, 2018 19:08
Print zswap stats with additional useful info
#!/usr/bin/env python3
# Requires root permissions
import os
import glob
from pprint import pprint
stats = {}
os.chdir('/sys/kernel/debug/zswap')
for filename in os.listdir():
@fulminemizzega
fulminemizzega / rtl8723be-aspm-disable.conf
Created December 4, 2018 23:59
Disable ASPM for rtl8723be wifi PCIe card
# Disabling ASPM for rtl8723be fixes the PCIe bus errors in dmesg:
# [ 4250.186464] pcieport 0000:00:1c.5: can't find device of ID00e5
# [ 4250.186467] pcieport 0000:00:1c.5: AER: Corrected error received: 0000:00:1c.5
# [ 4250.186477] pcieport 0000:00:1c.5: PCIe Bus Error: severity=Corrected, type=Physical Layer, (Receiver ID)
# [ 4250.186481] pcieport 0000:00:1c.5: device [8086:9d15] error status/mask=00000001/00002000
# [ 4250.186489] pcieport 0000:00:1c.5: [ 0] Receiver Error (First)
options rtl8723be aspm=0
# Tested with ubuntu 18.10, uname -a: