Skip to content

Instantly share code, notes, and snippets.

View gulafaran's full-sized avatar

Tom Englund gulafaran

View GitHub Profile
diff --git a/kernel/common/inc/nv-retpoline.h b/kernel/common/inc/nv-retpoline.h
index 2495503..ee45e57 100644
--- a/kernel/common/inc/nv-retpoline.h
+++ b/kernel/common/inc/nv-retpoline.h
@@ -29,7 +29,7 @@
#if (NV_SPECTRE_V2 == 0)
#define NV_RETPOLINE_THUNK NV_SPEC_THUNK
#else
-#define NV_RETPOLINE_THUNK NV_NOSPEC_THUNK
+#define NV_RETPOLINE_THUNK NV_SPEC_THUNK
┌┤tom-legion->tom dev ~/dev/pyside-setup/examples/samplebinding
└➤ mkdir build
┌┤tom-legion->tom dev ~/dev/pyside-setup/examples/samplebinding
└➤ cd build/
┌┤tom-legion->tom dev ~/dev/pyside-setup/examples/samplebinding/build
└➤ cmake -H.. -B. -G Ninja -DCMAKE_BUILD_TYPE=Release
-- The C compiler identification is GNU 13.2.1
-- The CXX compiler identification is GNU 13.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
--- /etc/portage/package.use/00cpu-flags 2024-03-14 12:58:35.020576949 +0100
+++ /etc/portage/package.use/._cfg0001_00cpu-flags 2024-03-14 14:41:47.966808304 +0100
@@ -1 +1,5 @@
*/* CPU_FLAGS_X86: aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sha sse sse2 sse3 sse4_1 sse4_2 ssse3 vpclmulqdq
+# required by dev-libs/libayatana-appindicator-0.5.92::gentoo
+# required by net-im/discord-0.0.45::gentoo[appindicator]
+# required by discord (argument)
+>=dev-libs/libdbusmenu-16.04.0-r2 gtk3
>> (1 of 2) -- /etc/portage/package.use/00cpu-flags
* Messages for package dev-qt/qtwebengine-5.15.12_p20240122:
* This version of Qt WebEngine is based on Chromium version 87.0.4280.144,
* with additional security fixes from newer versions. Extensive as it is, the
* list of backports is impossible to evaluate, but always bound to be behind
* Chromium's release schedule.
* In addition, various online services may deny service based on an outdated
* user agent version (and/or other checks). Google is already known to do so.
*
* tldr: Your web browsing experience will be compromised.
[ 5480.448173] WARNING: CPU: 4 PID: 4992 at drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c:192 r535_gsp_rpc_send+0x1ec/0x290 [nouveau]
[ 5480.448288] Modules linked in: ccm rfcomm snd_seq_dummy snd_hrtimer snd_seq snd_seq_device cmac algif_hash algif_skcipher af_alg bnep mousedev hid_multitouch intel_uncore_frequency intel_uncore_frequency_common snd_sof_pci_intel_tgl intel_tcc_cooling x86_pkg_temp_thermal snd_sof_intel_hda_common intel_powerclamp snd_hda_codec_hdmi snd_sof_intel_hda soundwire_intel coretemp snd_sof_intel_hda_mlink soundwire_cadence snd_sof_pci kvm_intel snd_sof_xtensa_dsp snd_sof iwlmvm kvm snd_sof_utils snd_soc_hdac_hda snd_hda_codec_realtek snd_hda_ext_core snd_hda_codec_generic snd_soc_acpi_intel_match irqbypass snd_soc_acpi mac80211 crct10dif_pclmul soundwire_generic_allocation uvcvideo btusb crc32_pclmul soundwire_bus polyval_clmulni btrtl uvc polyval_generic videobuf2_vmalloc btmtk gf128mul snd_hda_intel snd_hda_scodec_tas2781_i2c btbcm ghash_clmulni_intel videobuf2_memops snd_soc_tas2
#!/bin/bash
file=`realpath "$1"`
echo $file
if [ -f $file ]; then
curl -F file=@"$file" https://0x0.st
fi
#!/bin/bash
file=`realpath "$1"`
echo $file
if [ -f $file ]; then
curl -F file=@"$filedir" https://0x0.st
fi
[AC][Display]
DisplayBrightness=100
UseProfileSpecificDisplayBrightness=true
[AC][Keyboard]
KeyboardBrightness=0
[AC][Performance]
PowerProfile=performance

Disclaimer: Please read this being aware of the fact that I'm not an expert regarding the things outlined below, however I made my best attempt.

Linux is in general defaulting to values and settings for a server workload with security/hardening in mind, distros usually tweak those a bit towards a more desktop based workload. thought id list a few things ive found out that can be tweaked a bit depending on your own hardware and personal preferences.

My Hardware

Lenovo Legion 7i 2023:

  • 13th Gen Intel(R) Core(TM) i9-13900HX
diff --git a/daemon/src/priority.rs b/daemon/src/priority.rs
index df9a4b9..12da9fc 100644
--- a/daemon/src/priority.rs
+++ b/daemon/src/priority.rs
@@ -29,7 +29,9 @@ pub fn set(buffer: &mut Buffer, process: u32, profile: &Profile) {
if let Some(nice) = profile.nice {
unsafe {
- libc::setpriority(libc::PRIO_PROCESS, process, libc::c_int::from(nice.get()));
+ let _pid_t = process as libc::pid_t;