Initial commit of OS
This commit is contained in:
parent
9dbd35bce1
commit
b61906e4d7
11 changed files with 402 additions and 0 deletions
76
etc/chromium/chromium.conf
Normal file
76
etc/chromium/chromium.conf
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
# system wide chromium flags
|
||||
|
||||
ARCH="$(arch)"
|
||||
MODE="$(systemd-detect-virt)"
|
||||
|
||||
# GRAPHIC_DRIVER=[amd|intel|nvidia|default]
|
||||
GRAPHIC_DRIVER=intel
|
||||
|
||||
# WEB_DARKMODE=[on|off]
|
||||
WEB_DARKMODE=off
|
||||
|
||||
# NATIVE_WAYLAND=[on|off]
|
||||
# chromium >=141 switched to --ozone-platform-hint=auto
|
||||
if [ ! -z "$WAYLAND_DISPLAY" ]; then
|
||||
NATIVE_WAYLAND=on
|
||||
else
|
||||
NATIVE_WAYLAND=off
|
||||
fi
|
||||
|
||||
DISABLE_FEATURES="LensOverlay,ExtensionManifestV2Unsupported,ExtensionManifestV2Disabled"
|
||||
ENABLE_FEATURES="AllowQt"
|
||||
CHROMIUM_FLAGS=" --enable-chrome-browser-cloud-management"
|
||||
if [ "$NATIVE_WAYLAND" == "on" ] ; then
|
||||
ENABLE_FEATURES+=",WaylandLinuxDrmSyncobj,WaylandPerSurfaceScale,WaylandUiScale"
|
||||
CHROMIUM_FLAGS+=" --ozone-platform=wayland"
|
||||
else
|
||||
CHROMIUM_FLAGS+=" --enable-gpu-memory-buffer-video-frames"
|
||||
CHROMIUM_FLAGS+=" --enable-zero-copy"
|
||||
CHROMIUM_FLAGS+=" --ignore-gpu-blocklist --disable-gpu-driver-bug-workaround"
|
||||
CHROMIUM_FLAGS+=" --enable-gpu-rasterization"
|
||||
fi
|
||||
|
||||
ENABLE_FEATURES+=",AcceleratedVideoDecodeLinuxGL,AcceleratedVideoDecodeLinuxZeroCopyGL"
|
||||
|
||||
case "$GRAPHIC_DRIVER" in
|
||||
amd|intel)
|
||||
# Need new mesa with AMD multi planes support, is supported in fedora >= 40 (mesa-24.1.1 or newer)
|
||||
# see https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26165
|
||||
CHROMIUM_FLAGS+=" --enable-accelerated-video-decode"
|
||||
ENABLE_FEATURES+=",VaapiIgnoreDriverChecks,UseMultiPlaneFormatForHardwareVideo"
|
||||
;;
|
||||
nvidia)
|
||||
# The NVIDIA VaAPI drivers are known to not support Chromium
|
||||
# see https://crbug.com/1492880. This feature switch is
|
||||
# provided for developers to test VaAPI drivers on NVIDIA GPUs
|
||||
ENABLE_FEATURES+=",VaapiOnNvidiaGPUs"
|
||||
export CUDA_DISABLE_PERF_BOOST=1
|
||||
;;
|
||||
*)
|
||||
ENABLE_FEATURES+=",AcceleratedVideoEncoder"
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ "$MODE" != "none" ] ; then
|
||||
# chromium in VM, running with standard setting
|
||||
CHROMIUM_FLAGS=""
|
||||
DISABLE_FEATURES=""
|
||||
ENABLE_FEATURES=""
|
||||
fi
|
||||
|
||||
# Set gtk version to 3 by default
|
||||
# todo: switch to gtk4 in the future
|
||||
CHROMIUM_FLAGS+=" --gtk-version=3"
|
||||
|
||||
# Web Dark mode
|
||||
if [ "$WEB_DARKMODE" == "on" ] ; then
|
||||
darktype="WebContentsForceDark:inversion_method/cielab_based/image_behavior/none/foreground_lightness_threshold/150/background_lightness_threshold/205"
|
||||
if [ -z "$ENABLE_FEATURES" ] ; then
|
||||
ENABLE_FEATURES+="$darktype"
|
||||
else
|
||||
ENABLE_FEATURES+=",$darktype"
|
||||
fi
|
||||
fi
|
||||
|
||||
[ -z "$DISABLE_FEATURES" ] || CHROMIUM_FLAGS+=" --disable-features=$DISABLE_FEATURES"
|
||||
[ -z "$ENABLE_FEATURES" ] || CHROMIUM_FLAGS+=" --enable-features=$ENABLE_FEATURES"
|
||||
12
etc/environment
Normal file
12
etc/environment
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
QT_QPA_PLATFORM=wayland
|
||||
#CLUTTER_PAINT=disable-dynamic-max-render-time
|
||||
#MUTTER_DEBUG_ENABLE_ATOMIC_KMS=0
|
||||
#MUTTER_DEBUG_TRIPLE_BUFFERING=never
|
||||
|
||||
# Nvidia:
|
||||
#__NV_PRIME_RENDER_OFFLOAD=1
|
||||
#__GLX_VENDOR_LIBRARY_NAME=nvidia
|
||||
|
||||
ELECTRON_OZONE_PLATFORM_HINT=wayland
|
||||
|
||||
#GSK_RENDERER=gl
|
||||
9
etc/systemd/zram-generator.conf
Normal file
9
etc/systemd/zram-generator.conf
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
# This config file enables a /dev/zram0 device with the default settings:
|
||||
# — size — same as available RAM or 30GB, whichever is less
|
||||
# — compression — most likely lzo-rle
|
||||
#
|
||||
# To disable, create empty
|
||||
# /etc/systemd/zram-generator.conf file.
|
||||
[zram0]
|
||||
zram-size = min(ram, 30720)
|
||||
compression-algorithm = zstd
|
||||
Loading…
Add table
Add a link
Reference in a new issue