-
Notifications
You must be signed in to change notification settings - Fork 4
/
ultra-gaming-setup-wizard.sh
648 lines (626 loc) · 36.6 KB
/
ultra-gaming-setup-wizard.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
#!/usr/bin/env bash
which apt >/dev/null 2>&1
if [ $? -eq 0 ]; then
which apt >/dev/null 2>&1
if [ $? != 0 ]; then
clear
echo -e "╔═══════════════════════════════════════════════════╗"
echo -e "║ THIS SCRIPT ONLY WORKS ON ARCH, UBUNTU AND FEDORA ║"
echo -e "║ ║"
echo -e "╚═══════════════════════════════════════════════════╝"
echo -e ""
exit 1
fi
else
export DEBIAN_FRONTEND=noninteractive
clear
echo -e "╔═══════════════════════════════════════════════════╗"
echo -e "║YURIN's | ultimate-gaming-setup-wizard | greetings!║"
echo -e "║ ║"
echo -e "╚═══════════════════════════════════════════════════╝"
echo -e ""
fi
which pacman >/dev/null 2>&1
if [ $? -eq 0 ]; then
which pacman >/dev/null 2>&1
if [ $? != 0 ]; then
clear
echo -e "╔═══════════════════════════════════════════════════╗"
echo -e "║ THIS SCRIPT ONLY WORKS ON ARCH, UBUNTU AND FEDORA ║"
echo -e "║ ║"
echo -e "╚═══════════════════════════════════════════════════╝"
echo -e ""
exit 1
fi
else
clear
echo -e "╔═══════════════════════════════════════════════════╗"
echo -e "║YURIN's | ultimate-gaming-setup-wizard | greetings!║"
echo -e "║ ║"
echo -e "╚═══════════════════════════════════════════════════╝"
echo -e ""
fi
which dnf >/dev/null 2>&1
if [ $? -eq 0 ]; then
which dnf >/dev/null 2>&1
if [ $? != 0 ]; then
clear
echo -e "╔═══════════════════════════════════════════════════╗"
echo -e "║ THIS SCRIPT ONLY WORKS ON ARCH, UBUNTU AND FEDORA ║"
echo -e "║ ║"
echo -e "╚═══════════════════════════════════════════════════╝"
echo -e ""
exit 1
fi
else
clear
echo -e "╔═══════════════════════════════════════════════════╗"
echo -e "║YURIN's | ultimate-gaming-setup-wizard | greetings!║"
echo -e "║ ║"
echo -e "╚═══════════════════════════════════════════════════╝"
echo -e ""
fi
multilib() {
which apt >/dev/null 2>&1
if [ $? -eq 0 ]; then
sudo add-apt-repository universe -y &&
sudo add-apt-repository multiverse -y
sudo dpkg --add-architecture i386
sudo apt-get update
fi
which pacman >/dev/null 2>&1
if [ $? -eq 0 ]; then
_has_multilib=$(grep -n "\[multilib\]" /etc/pacman.conf | cut -f1 -d:)
if [[ -z $_has_multilib ]]; then
echo -e "\n[lib32]\nInclude = /etc/pacman.d/mirrorlist" | sudo tee -a /etc/pacman.conf
else
sudo sed -i -e "${_has_multilib}s/^#//" /etc/pacman.conf
_has_multilib=$((${_has_multilib} + 1))
sudo sed -i -e "${_has_multilib}s/^#//" /etc/pacman.conf
fi
sudo pacman -Syy
fi
which dnf >/dev/null 2>&1
if [ $? -eq 0 ]; then
sudo dnf install dnf-plugins-core -y
sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm -y
sudo dnf check-update
sudo dnf groupupdate core -y
fi
}
multilib
amd() {
which apt >/dev/null 2>&1
if [ $? -eq 0 ]; then
ubuntu-drivers devices
ubuntu-drivers list
sudo ubuntu-drivers autoinstall
sudo add-apt-repository ppa:kisak/kisak-mesa -y
sudo apt-get update
sudo apt install -f --assume-yes --no-install-recommends libglx-mesa0 libglx-mesa0:i386 libgl1-mesa-dri libgl1-mesa-dri:i386 mesa-vulkan-drivers mesa-vulkan-drivers:i386 mesa-va-drivers mesa-va-drivers:i386 libvulkan-dev libvulkan-dev:i386 mesa-utils vulkan-tools mesa-common-dev mesa-vdpau-drivers &&
echo -e "AMD_VULKAN_ICD=amdvlk" | sudo tee -a /etc/environment &&
echo -e "RADV_PERFTEST=aco,sam,nggc" | sudo tee -a /etc/environment &&
echo -e "RADV_FORCE_VRS=2x2" | sudo tee -a /etc/environment &&
echo -e "RADV_DEBUG=novrsflatshading" | sudo tee -a /etc/environment &&
echo -e "WINEPREFIX=~/.wine" | sudo tee -a /etc/environment &&
echo -e "WINE_LARGE_ADDRESS_AWARE=1" | sudo tee -a /etc/environment &&
echo -e "WINEFSYNC_SPINCOUNT=24" | sudo tee -a /etc/environment &&
echo -e "WINEFSYNC=1" | sudo tee -a /etc/environment &&
echo -e "WINEFSYNC_FUTEX2=1" | sudo tee -a /etc/environment &&
echo -e "WINE_SKIP_GECKO_INSTALLATION=1" | sudo tee -a /etc/environment &&
echo -e "WINE_SKIP_MONO_INSTALLATION=1" | sudo tee -a /etc/environment &&
echo -e "STAGING_WRITECOPY=1" | sudo tee -a /etc/environment &&
echo -e "STAGING_SHARED_MEMORY=1" | sudo tee -a /etc/environment &&
echo -e "STAGING_RT_PRIORITY_SERVER=4" | sudo tee -a /etc/environment &&
echo -e "STAGING_RT_PRIORITY_BASE=2" | sudo tee -a /etc/environment &&
echo -e "STAGING_AUDIO_PERIOD=13333" | sudo tee -a /etc/environment &&
echo -e "WINE_FSR_OVERRIDE=1" | sudo tee -a /etc/environment &&
echo -e "WINE_FULLSCREEN_FSR=1" | sudo tee -a /etc/environment &&
echo -e "WINE_VK_USE_FSR=1" | sudo tee -a /etc/environment &&
echo -e "PROTON_LOG=0" | sudo tee -a /etc/environment &&
echo -e "PROTON_USE_WINED3D=1" | sudo tee -a /etc/environment &&
echo -e "PROTON_FORCE_LARGE_ADDRESS_AWARE=1" | sudo tee -a /etc/environment &&
echo -e "PROTON_NO_ESYNC=1" | sudo tee -a /etc/environment &&
echo -e "ENABLE_VKBASALT=1" | sudo tee -a /etc/environment &&
echo -e "DXVK_ASYNC=1" | sudo tee -a /etc/environment &&
echo -e "DXVK_HUD=compile" | sudo tee -a /etc/environment &&
echo -e "MESA_BACK_BUFFER=ximage" | sudo tee -a /etc/environment &&
echo -e "MESA_NO_DITHER=1" | sudo tee -a /etc/environment &&
echo -e "MESA_NO_ERROR=1" | sudo tee -a /etc/environment &&
echo -e "MESA_GLSL_CACHE_DISABLE=false" | sudo tee -a /etc/environment &&
echo -e "mesa_glthread=true" | sudo tee -a /etc/environment &&
echo -e "ANV_ENABLE_PIPELINE_CACHE=1" | sudo tee -a /etc/environment &&
echo -e "__GLX_VENDOR_LIBRARY_NAME=mesa" | sudo tee -a /etc/environment &&
echo -e "__GLVND_DISALLOW_PATCHING=1" | sudo tee -a /etc/environment &&
echo -e "__GL_THREADED_OPTIMIZATIONS=1" | sudo tee -a /etc/environment &&
echo -e "__GL_SYNC_TO_VBLANK=1" | sudo tee -a /etc/environment &&
echo -e "__GL_MaxFramesAllowed=1" | sudo tee -a /etc/environment &&
echo -e "__GL_SHADER_DISK_CACHE=1" | sudo tee -a /etc/environment &&
echo -e "__GL_SHADER_DISK_CACHE_SKIP_CLEANUP=1" | sudo tee -a /etc/environment &&
echo -e "__GL_YIELD=NOTHING" | sudo tee -a /etc/environment &&
echo -e "__GL_VRR_ALLOWED=0" | sudo tee -a /etc/environment &&
echo -e "LIBGL_DRI3_DISABLE=1" | sudo tee -a /etc/environment &&
echo -e "VKD3D_CONFIG=upload_hvv" | sudo tee -a /etc/environment &&
echo -e "LP_PERF=no_mipmap,no_linear,no_mip_linear,no_tex,no_blend,no_depth,no_alphatest" | sudo tee -a /etc/environment &&
echo -e "STEAM_FRAME_FORCE_CLOSE=0" | sudo tee -a /etc/environment &&
echo -e "STEAM_RUNTIME_HEAVY=1" | sudo tee -a /etc/environment &&
echo -e "GAMEMODE=1" | sudo tee -a /etc/environment &&
echo -e "vblank_mode=1" | sudo tee -a /etc/environment
fi
which pacman >/dev/null 2>&1
if [ $? -eq 0 ]; then
yay -S --needed --noconfirm mesa lib32-mesa xf86-video-ati xf86-video-amdgpu libva-mesa-driver vulkan-radeon lib32-vulkan-radeon vulkan-icd-loader lib32-vulkan-icd-loader vkd3d lib32-vkd3d vulkan-tools vulkan-mesa-layers lib32-vulkan-mesa-layers mesa-vdpau lib32-mesa-vdpau &&
echo -e "AMD_VULKAN_ICD=amdvlk" | sudo tee -a /etc/environment &&
echo -e "RADV_PERFTEST=aco,sam,nggc" | sudo tee -a /etc/environment &&
echo -e "RADV_FORCE_VRS=2x2" | sudo tee -a /etc/environment &&
echo -e "RADV_DEBUG=novrsflatshading" | sudo tee -a /etc/environment &&
echo -e "WINEPREFIX=~/.wine" | sudo tee -a /etc/environment &&
echo -e "WINE_LARGE_ADDRESS_AWARE=1" | sudo tee -a /etc/environment &&
echo -e "WINEFSYNC_SPINCOUNT=24" | sudo tee -a /etc/environment &&
echo -e "WINEFSYNC=1" | sudo tee -a /etc/environment &&
echo -e "WINEFSYNC_FUTEX2=1" | sudo tee -a /etc/environment &&
echo -e "WINE_SKIP_GECKO_INSTALLATION=1" | sudo tee -a /etc/environment &&
echo -e "WINE_SKIP_MONO_INSTALLATION=1" | sudo tee -a /etc/environment &&
echo -e "STAGING_WRITECOPY=1" | sudo tee -a /etc/environment &&
echo -e "STAGING_SHARED_MEMORY=1" | sudo tee -a /etc/environment &&
echo -e "STAGING_RT_PRIORITY_SERVER=4" | sudo tee -a /etc/environment &&
echo -e "STAGING_RT_PRIORITY_BASE=2" | sudo tee -a /etc/environment &&
echo -e "STAGING_AUDIO_PERIOD=13333" | sudo tee -a /etc/environment &&
echo -e "WINE_FSR_OVERRIDE=1" | sudo tee -a /etc/environment &&
echo -e "WINE_FULLSCREEN_FSR=1" | sudo tee -a /etc/environment &&
echo -e "WINE_VK_USE_FSR=1" | sudo tee -a /etc/environment &&
echo -e "PROTON_LOG=0" | sudo tee -a /etc/environment &&
echo -e "PROTON_USE_WINED3D=1" | sudo tee -a /etc/environment &&
echo -e "PROTON_FORCE_LARGE_ADDRESS_AWARE=1" | sudo tee -a /etc/environment &&
echo -e "PROTON_NO_ESYNC=1" | sudo tee -a /etc/environment &&
echo -e "ENABLE_VKBASALT=1" | sudo tee -a /etc/environment &&
echo -e "DXVK_ASYNC=1" | sudo tee -a /etc/environment &&
echo -e "DXVK_HUD=compile" | sudo tee -a /etc/environment &&
echo -e "MESA_BACK_BUFFER=ximage" | sudo tee -a /etc/environment &&
echo -e "MESA_NO_DITHER=1" | sudo tee -a /etc/environment &&
echo -e "MESA_NO_ERROR=1" | sudo tee -a /etc/environment &&
echo -e "MESA_GLSL_CACHE_DISABLE=false" | sudo tee -a /etc/environment &&
echo -e "mesa_glthread=true" | sudo tee -a /etc/environment &&
echo -e "ANV_ENABLE_PIPELINE_CACHE=1" | sudo tee -a /etc/environment &&
echo -e "__GLX_VENDOR_LIBRARY_NAME=mesa" | sudo tee -a /etc/environment &&
echo -e "__GLVND_DISALLOW_PATCHING=1" | sudo tee -a /etc/environment &&
echo -e "__GL_THREADED_OPTIMIZATIONS=1" | sudo tee -a /etc/environment &&
echo -e "__GL_SYNC_TO_VBLANK=1" | sudo tee -a /etc/environment &&
echo -e "__GL_MaxFramesAllowed=1" | sudo tee -a /etc/environment &&
echo -e "__GL_SHADER_DISK_CACHE=1" | sudo tee -a /etc/environment &&
echo -e "__GL_SHADER_DISK_CACHE_SKIP_CLEANUP=1" | sudo tee -a /etc/environment &&
echo -e "__GL_YIELD=NOTHING" | sudo tee -a /etc/environment &&
echo -e "__GL_VRR_ALLOWED=0" | sudo tee -a /etc/environment &&
echo -e "LIBGL_DRI3_DISABLE=1" | sudo tee -a /etc/environment &&
echo -e "VKD3D_CONFIG=upload_hvv" | sudo tee -a /etc/environment &&
echo -e "LP_PERF=no_mipmap,no_linear,no_mip_linear,no_tex,no_blend,no_depth,no_alphatest" | sudo tee -a /etc/environment &&
echo -e "STEAM_FRAME_FORCE_CLOSE=0" | sudo tee -a /etc/environment &&
echo -e "STEAM_RUNTIME_HEAVY=1" | sudo tee -a /etc/environment &&
echo -e "GAMEMODE=1" | sudo tee -a /etc/environment &&
echo -e "vblank_mode=1" | sudo tee -a /etc/environment
fi
which dnf >/dev/null 2>&1
if [ $? -eq 0 ]; then
sudo dnf install vulkan -y &&
echo -e "AMD_VULKAN_ICD=amdvlk" | sudo tee -a /etc/environment &&
echo -e "RADV_PERFTEST=aco,sam,nggc" | sudo tee -a /etc/environment &&
echo -e "RADV_FORCE_VRS=2x2" | sudo tee -a /etc/environment &&
echo -e "RADV_DEBUG=novrsflatshading" | sudo tee -a /etc/environment &&
echo -e "WINEPREFIX=~/.wine" | sudo tee -a /etc/environment &&
echo -e "WINE_LARGE_ADDRESS_AWARE=1" | sudo tee -a /etc/environment &&
echo -e "WINEFSYNC_SPINCOUNT=24" | sudo tee -a /etc/environment &&
echo -e "WINEFSYNC=1" | sudo tee -a /etc/environment &&
echo -e "WINEFSYNC_FUTEX2=1" | sudo tee -a /etc/environment &&
echo -e "WINE_SKIP_GECKO_INSTALLATION=1" | sudo tee -a /etc/environment &&
echo -e "WINE_SKIP_MONO_INSTALLATION=1" | sudo tee -a /etc/environment &&
echo -e "STAGING_WRITECOPY=1" | sudo tee -a /etc/environment &&
echo -e "STAGING_SHARED_MEMORY=1" | sudo tee -a /etc/environment &&
echo -e "STAGING_RT_PRIORITY_SERVER=4" | sudo tee -a /etc/environment &&
echo -e "STAGING_RT_PRIORITY_BASE=2" | sudo tee -a /etc/environment &&
echo -e "STAGING_AUDIO_PERIOD=13333" | sudo tee -a /etc/environment &&
echo -e "WINE_FSR_OVERRIDE=1" | sudo tee -a /etc/environment &&
echo -e "WINE_FULLSCREEN_FSR=1" | sudo tee -a /etc/environment &&
echo -e "WINE_VK_USE_FSR=1" | sudo tee -a /etc/environment &&
echo -e "PROTON_LOG=0" | sudo tee -a /etc/environment &&
echo -e "PROTON_USE_WINED3D=1" | sudo tee -a /etc/environment &&
echo -e "PROTON_FORCE_LARGE_ADDRESS_AWARE=1" | sudo tee -a /etc/environment &&
echo -e "PROTON_NO_ESYNC=1" | sudo tee -a /etc/environment &&
echo -e "ENABLE_VKBASALT=1" | sudo tee -a /etc/environment &&
echo -e "DXVK_ASYNC=1" | sudo tee -a /etc/environment &&
echo -e "DXVK_HUD=compile" | sudo tee -a /etc/environment &&
echo -e "MESA_BACK_BUFFER=ximage" | sudo tee -a /etc/environment &&
echo -e "MESA_NO_DITHER=1" | sudo tee -a /etc/environment &&
echo -e "MESA_NO_ERROR=1" | sudo tee -a /etc/environment &&
echo -e "MESA_GLSL_CACHE_DISABLE=false" | sudo tee -a /etc/environment &&
echo -e "mesa_glthread=true" | sudo tee -a /etc/environment &&
echo -e "ANV_ENABLE_PIPELINE_CACHE=1" | sudo tee -a /etc/environment &&
echo -e "__GLX_VENDOR_LIBRARY_NAME=mesa" | sudo tee -a /etc/environment &&
echo -e "__GLVND_DISALLOW_PATCHING=1" | sudo tee -a /etc/environment &&
echo -e "__GL_THREADED_OPTIMIZATIONS=1" | sudo tee -a /etc/environment &&
echo -e "__GL_SYNC_TO_VBLANK=1" | sudo tee -a /etc/environment &&
echo -e "__GL_MaxFramesAllowed=1" | sudo tee -a /etc/environment &&
echo -e "__GL_SHADER_DISK_CACHE=1" | sudo tee -a /etc/environment &&
echo -e "__GL_SHADER_DISK_CACHE_SKIP_CLEANUP=1" | sudo tee -a /etc/environment &&
echo -e "__GL_YIELD=NOTHING" | sudo tee -a /etc/environment &&
echo -e "__GL_VRR_ALLOWED=0" | sudo tee -a /etc/environment &&
echo -e "LIBGL_DRI3_DISABLE=1" | sudo tee -a /etc/environment &&
echo -e "VKD3D_CONFIG=upload_hvv" | sudo tee -a /etc/environment &&
echo -e "LP_PERF=no_mipmap,no_linear,no_mip_linear,no_tex,no_blend,no_depth,no_alphatest" | sudo tee -a /etc/environment &&
echo -e "STEAM_FRAME_FORCE_CLOSE=0" | sudo tee -a /etc/environment &&
echo -e "STEAM_RUNTIME_HEAVY=1" | sudo tee -a /etc/environment &&
echo -e "GAMEMODE=1" | sudo tee -a /etc/environment &&
echo -e "vblank_mode=1" | sudo tee -a /etc/environment
fi
}
nvidia() {
which apt >/dev/null 2>&1
if [ $? -eq 0 ]; then
ubuntu-drivers devices
ubuntu-drivers list
sudo ubuntu-drivers autoinstall
sudo add-apt-repository ppa:graphics-drivers/ppa -y
sudo apt-get update
sudo apt install -f --assume-yes --no-install-recommends libglx-mesa0 libglx-mesa0:i386 libgl1-mesa-dri libgl1-mesa-dri:i386 libnvidia-gl-510 libnvidia-gl-510:i386 mesa-vulkan-drivers mesa-vulkan-drivers:i386 mesa-va-drivers mesa-va-drivers:i386 libvulkan-dev libvulkan-dev:i386 mesa-utils vulkan-tools mesa-common-dev mesa-vdpau-drivers &&
echo -e "WINEPREFIX=~/.wine" | sudo tee -a /etc/environment &&
echo -e "WINE_LARGE_ADDRESS_AWARE=1" | sudo tee -a /etc/environment &&
echo -e "WINEFSYNC_SPINCOUNT=24" | sudo tee -a /etc/environment &&
echo -e "WINEFSYNC=1" | sudo tee -a /etc/environment &&
echo -e "WINEFSYNC_FUTEX2=1" | sudo tee -a /etc/environment &&
echo -e "WINE_SKIP_GECKO_INSTALLATION=1" | sudo tee -a /etc/environment &&
echo -e "WINE_SKIP_MONO_INSTALLATION=1" | sudo tee -a /etc/environment &&
echo -e "STAGING_WRITECOPY=1" | sudo tee -a /etc/environment &&
echo -e "STAGING_SHARED_MEMORY=1" | sudo tee -a /etc/environment &&
echo -e "STAGING_RT_PRIORITY_SERVER=4" | sudo tee -a /etc/environment &&
echo -e "STAGING_RT_PRIORITY_BASE=2" | sudo tee -a /etc/environment &&
echo -e "STAGING_AUDIO_PERIOD=13333" | sudo tee -a /etc/environment &&
echo -e "PROTON_LOG=0" | sudo tee -a /etc/environment &&
echo -e "PROTON_USE_WINED3D=1" | sudo tee -a /etc/environment &&
echo -e "PROTON_FORCE_LARGE_ADDRESS_AWARE=1" | sudo tee -a /etc/environment &&
echo -e "PROTON_NO_ESYNC=1" | sudo tee -a /etc/environment &&
echo -e "ENABLE_VKBASALT=1" | sudo tee -a /etc/environment &&
echo -e "DXVK_ASYNC=1" | sudo tee -a /etc/environment &&
echo -e "DXVK_HUD=compile" | sudo tee -a /etc/environment &&
echo -e "MESA_BACK_BUFFER=ximage" | sudo tee -a /etc/environment &&
echo -e "MESA_NO_DITHER=1" | sudo tee -a /etc/environment &&
echo -e "MESA_NO_ERROR=1" | sudo tee -a /etc/environment &&
echo -e "MESA_GLSL_CACHE_DISABLE=false" | sudo tee -a /etc/environment &&
echo -e "mesa_glthread=true" | sudo tee -a /etc/environment &&
echo -e "ANV_ENABLE_PIPELINE_CACHE=1" | sudo tee -a /etc/environment &&
echo -e "__NV_PRIME_RENDER_OFFLOAD=1" | sudo tee -a /etc/environment &&
echo -e "__GLX_VENDOR_LIBRARY_NAME=mesa" | sudo tee -a /etc/environment &&
echo -e "__GLVND_DISALLOW_PATCHING=1" | sudo tee -a /etc/environment &&
echo -e "__GL_THREADED_OPTIMIZATIONS=1" | sudo tee -a /etc/environment &&
echo -e "__GL_SYNC_TO_VBLANK=1" | sudo tee -a /etc/environment &&
echo -e "__GL_MaxFramesAllowed=1" | sudo tee -a /etc/environment &&
echo -e "__GL_SHADER_DISK_CACHE=1" | sudo tee -a /etc/environment &&
echo -e "__GL_SHADER_DISK_CACHE_SKIP_CLEANUP=1" | sudo tee -a /etc/environment &&
echo -e "__GL_YIELD=NOTHING" | sudo tee -a /etc/environment &&
echo -e "__GL_VRR_ALLOWED=0" | sudo tee -a /etc/environment &&
echo -e "LIBGL_DRI3_DISABLE=1" | sudo tee -a /etc/environment &&
echo -e "VKD3D_CONFIG=upload_hvv" | sudo tee -a /etc/environment &&
echo -e "LP_PERF=no_mipmap,no_linear,no_mip_linear,no_tex,no_blend,no_depth,no_alphatest" | sudo tee -a /etc/environment &&
echo -e "STEAM_FRAME_FORCE_CLOSE=0" | sudo tee -a /etc/environment &&
echo -e "STEAM_RUNTIME_HEAVY=1" | sudo tee -a /etc/environment &&
echo -e "GAMEMODE=1" | sudo tee -a /etc/environment &&
echo -e "vblank_mode=1" | sudo tee -a /etc/environment
fi
which pacman >/dev/null 2>&1
if [ $? -eq 0 ]; then
yay -S --needed --noconfirm mesa lib32-mesa opencl-nvidia lib32-opencl-nvidia nvidia-utils lib32-nvidia-utils xf86-video-nouveau libva-mesa-driver vkd3d lib32-vkd3d vulkan-tools vulkan-intel lib32-vulkan-intel vulkan-mesa-layers lib32-vulkan-mesa-layers mesa-vdpau lib32-mesa-vdpau &&
echo -e "WINEPREFIX=~/.wine" | sudo tee -a /etc/environment &&
echo -e "WINE_LARGE_ADDRESS_AWARE=1" | sudo tee -a /etc/environment &&
echo -e "WINEFSYNC_SPINCOUNT=24" | sudo tee -a /etc/environment &&
echo -e "WINEFSYNC=1" | sudo tee -a /etc/environment &&
echo -e "WINEFSYNC_FUTEX2=1" | sudo tee -a /etc/environment &&
echo -e "WINE_SKIP_GECKO_INSTALLATION=1" | sudo tee -a /etc/environment &&
echo -e "WINE_SKIP_MONO_INSTALLATION=1" | sudo tee -a /etc/environment &&
echo -e "STAGING_WRITECOPY=1" | sudo tee -a /etc/environment &&
echo -e "STAGING_SHARED_MEMORY=1" | sudo tee -a /etc/environment &&
echo -e "STAGING_RT_PRIORITY_SERVER=4" | sudo tee -a /etc/environment &&
echo -e "STAGING_RT_PRIORITY_BASE=2" | sudo tee -a /etc/environment &&
echo -e "STAGING_AUDIO_PERIOD=13333" | sudo tee -a /etc/environment &&
echo -e "PROTON_LOG=0" | sudo tee -a /etc/environment &&
echo -e "PROTON_USE_WINED3D=1" | sudo tee -a /etc/environment &&
echo -e "PROTON_FORCE_LARGE_ADDRESS_AWARE=1" | sudo tee -a /etc/environment &&
echo -e "PROTON_NO_ESYNC=1" | sudo tee -a /etc/environment &&
echo -e "ENABLE_VKBASALT=1" | sudo tee -a /etc/environment &&
echo -e "DXVK_ASYNC=1" | sudo tee -a /etc/environment &&
echo -e "DXVK_HUD=compile" | sudo tee -a /etc/environment &&
echo -e "MESA_BACK_BUFFER=ximage" | sudo tee -a /etc/environment &&
echo -e "MESA_NO_DITHER=1" | sudo tee -a /etc/environment &&
echo -e "MESA_NO_ERROR=1" | sudo tee -a /etc/environment &&
echo -e "MESA_GLSL_CACHE_DISABLE=false" | sudo tee -a /etc/environment &&
echo -e "mesa_glthread=true" | sudo tee -a /etc/environment &&
echo -e "ANV_ENABLE_PIPELINE_CACHE=1" | sudo tee -a /etc/environment &&
echo -e "__NV_PRIME_RENDER_OFFLOAD=1" | sudo tee -a /etc/environment &&
echo -e "__GLX_VENDOR_LIBRARY_NAME=mesa" | sudo tee -a /etc/environment &&
echo -e "__GLVND_DISALLOW_PATCHING=1" | sudo tee -a /etc/environment &&
echo -e "__GL_THREADED_OPTIMIZATIONS=1" | sudo tee -a /etc/environment &&
echo -e "__GL_SYNC_TO_VBLANK=1" | sudo tee -a /etc/environment &&
echo -e "__GL_MaxFramesAllowed=1" | sudo tee -a /etc/environment &&
echo -e "__GL_SHADER_DISK_CACHE=1" | sudo tee -a /etc/environment &&
echo -e "__GL_SHADER_DISK_CACHE_SKIP_CLEANUP=1" | sudo tee -a /etc/environment &&
echo -e "__GL_YIELD=NOTHING" | sudo tee -a /etc/environment &&
echo -e "__GL_VRR_ALLOWED=0" | sudo tee -a /etc/environment &&
echo -e "LIBGL_DRI3_DISABLE=1" | sudo tee -a /etc/environment &&
echo -e "VKD3D_CONFIG=upload_hvv" | sudo tee -a /etc/environment &&
echo -e "LP_PERF=no_mipmap,no_linear,no_mip_linear,no_tex,no_blend,no_depth,no_alphatest" | sudo tee -a /etc/environment &&
echo -e "STEAM_FRAME_FORCE_CLOSE=0" | sudo tee -a /etc/environment &&
echo -e "STEAM_RUNTIME_HEAVY=1" | sudo tee -a /etc/environment &&
echo -e "GAMEMODE=1" | sudo tee -a /etc/environment &&
echo -e "vblank_mode=1" | sudo tee -a /etc/environment
fi
which dnf >/dev/null 2>&1
if [ $? -eq 0 ]; then
sudo dnf install vulkan akmod-nvidia xorg-x11-drv-nvidia xorg-x11-drv-nvidia-cuda xorg-x11-drv-nvidia-cuda-libs -y &&
echo -e "WINEPREFIX=~/.wine" | sudo tee -a /etc/environment &&
echo -e "WINE_LARGE_ADDRESS_AWARE=1" | sudo tee -a /etc/environment &&
echo -e "WINEFSYNC_SPINCOUNT=24" | sudo tee -a /etc/environment &&
echo -e "WINEFSYNC=1" | sudo tee -a /etc/environment &&
echo -e "WINEFSYNC_FUTEX2=1" | sudo tee -a /etc/environment &&
echo -e "WINE_SKIP_GECKO_INSTALLATION=1" | sudo tee -a /etc/environment &&
echo -e "WINE_SKIP_MONO_INSTALLATION=1" | sudo tee -a /etc/environment &&
echo -e "STAGING_WRITECOPY=1" | sudo tee -a /etc/environment &&
echo -e "STAGING_SHARED_MEMORY=1" | sudo tee -a /etc/environment &&
echo -e "STAGING_RT_PRIORITY_SERVER=4" | sudo tee -a /etc/environment &&
echo -e "STAGING_RT_PRIORITY_BASE=2" | sudo tee -a /etc/environment &&
echo -e "STAGING_AUDIO_PERIOD=13333" | sudo tee -a /etc/environment &&
echo -e "PROTON_LOG=0" | sudo tee -a /etc/environment &&
echo -e "PROTON_USE_WINED3D=1" | sudo tee -a /etc/environment &&
echo -e "PROTON_FORCE_LARGE_ADDRESS_AWARE=1" | sudo tee -a /etc/environment &&
echo -e "PROTON_NO_ESYNC=1" | sudo tee -a /etc/environment &&
echo -e "ENABLE_VKBASALT=1" | sudo tee -a /etc/environment &&
echo -e "DXVK_ASYNC=1" | sudo tee -a /etc/environment &&
echo -e "DXVK_HUD=compile" | sudo tee -a /etc/environment &&
echo -e "MESA_BACK_BUFFER=ximage" | sudo tee -a /etc/environment &&
echo -e "MESA_NO_DITHER=1" | sudo tee -a /etc/environment &&
echo -e "MESA_NO_ERROR=1" | sudo tee -a /etc/environment &&
echo -e "MESA_GLSL_CACHE_DISABLE=false" | sudo tee -a /etc/environment &&
echo -e "mesa_glthread=true" | sudo tee -a /etc/environment &&
echo -e "ANV_ENABLE_PIPELINE_CACHE=1" | sudo tee -a /etc/environment &&
echo -e "__NV_PRIME_RENDER_OFFLOAD=1" | sudo tee -a /etc/environment &&
echo -e "__GLX_VENDOR_LIBRARY_NAME=mesa" | sudo tee -a /etc/environment &&
echo -e "__GLVND_DISALLOW_PATCHING=1" | sudo tee -a /etc/environment &&
echo -e "__GL_THREADED_OPTIMIZATIONS=1" | sudo tee -a /etc/environment &&
echo -e "__GL_SYNC_TO_VBLANK=1" | sudo tee -a /etc/environment &&
echo -e "__GL_MaxFramesAllowed=1" | sudo tee -a /etc/environment &&
echo -e "__GL_SHADER_DISK_CACHE=1" | sudo tee -a /etc/environment &&
echo -e "__GL_SHADER_DISK_CACHE_SKIP_CLEANUP=1" | sudo tee -a /etc/environment &&
echo -e "__GL_YIELD=NOTHING" | sudo tee -a /etc/environment &&
echo -e "__GL_VRR_ALLOWED=0" | sudo tee -a /etc/environment &&
echo -e "LIBGL_DRI3_DISABLE=1" | sudo tee -a /etc/environment &&
echo -e "VKD3D_CONFIG=upload_hvv" | sudo tee -a /etc/environment &&
echo -e "LP_PERF=no_mipmap,no_linear,no_mip_linear,no_tex,no_blend,no_depth,no_alphatest" | sudo tee -a /etc/environment &&
echo -e "STEAM_FRAME_FORCE_CLOSE=0" | sudo tee -a /etc/environment &&
echo -e "STEAM_RUNTIME_HEAVY=1" | sudo tee -a /etc/environment &&
echo -e "GAMEMODE=1" | sudo tee -a /etc/environment &&
echo -e "vblank_mode=1" | sudo tee -a /etc/environment
fi
}
prompt_0() {
echo -e "CHOOSE THE COMPATIBLE WHICH IS IN BELOW WITH YOUR HARDWARE. (RETURN IS: NONE)"
echo -e "1. : AMD"
echo -e "2. : NVIDIA"
read -p $'>_: ' nock
if [[ "$nock" == "1" ]]; then
amd
fi
if [[ "$nock" == "2" ]]; then
nvidia
fi
if [[ "$nock" == "" ]]; then
clear
fi
}
prompt_0
xanmod() {
which apt >/dev/null 2>&1
if [ $? -eq 0 ]; then
echo -e "deb http://deb.xanmod.org releases main" | sudo tee /etc/apt/sources.list.d/xanmod-kernel.list &&
wget -qO - https://dl.xanmod.org/gpg.key | sudo apt-key add -
sudo apt-get update
sudo apt install --assume-yes --install-recommends linux-xanmod-rt -f
echo -e "net.core.default_qdisc = fq_pie
net.ipv4.tcp_congestion_control = bbr" | sudo tee /etc/sysctl.d/90-override.conf
fi
which pacman >/dev/null 2>&1
if [ $? -eq 0 ]; then
yay -S --needed --noconfirm linux-xanmod-rt linux-xanmod-headers
echo -e "net.core.default_qdisc = fq_pie
net.ipv4.tcp_congestion_control = bbr" | sudo tee /etc/sysctl.d/90-override.conf
fi
which dnf >/dev/null 2>&1
if [ $? -eq 0 ]; then
sudo dnf copr enable rmnscnce/kernel-xanmod -y &&
sudo dnf in kernel-xanmod-rt kernel-xanmod-exptl -y
echo -e "net.core.default_qdisc = fq_pie
net.ipv4.tcp_congestion_control = bbr" | sudo tee /etc/sysctl.d/90-override.conf
fi
}
liquarix() {
which apt >/dev/null 2>&1
if [ $? -eq 0 ]; then
sudo add-apt-repository ppa:damentz/liquorix -y &&
sudo apt-get update
sudo apt install --assume-yes --install-recommends linux-image-liquorix-amd64 linux-headers-liquorix-amd64 -f
fi
which pacman >/dev/null 2>&1
if [ $? -eq 0 ]; then
yay -S --needed --noconfirm linux-lqx linux-lqx-headers
fi
which dnf >/dev/null 2>&1
if [ $? -eq 0 ]; then
sudo dnf copr enable rmnscnce/kernel-lqx -y &&
sudo dnf install kernel-lqx kernel-lqx-headers -y
fi
}
zen() {
which pacman >/dev/null 2>&1
if [ $? -eq 0 ]; then
yay -S --needed --noconfirm linux-zen linux-zen-headers
fi
}
linux-tkg() {
which apt >/dev/null 2>&1
if [ $? -eq 0 ]; then
cd /tmp &&
git clone https://github.com/Frogging-Family/linux-tkg.git &&
cd linux-tkg/ &&
./install.sh install &&
cd /tmp
fi
which pacman >/dev/null 2>&1
if [ $? -eq 0 ]; then
cd /tmp &&
git clone https://github.com/Frogging-Family/linux-tkg.git &&
cd linux-tkg/ &&
makepkg -si &&
cd /tmp
fi
which dnf >/dev/null 2>&1
if [ $? -eq 0 ]; then
cd /tmp &&
git clone https://github.com/Frogging-Family/linux-tkg.git &&
cd linux-tkg/ &&
./install.sh install &&
cd /tmp
fi
}
prompt_1() {
echo -e "FIND IN BELOW CUSTOM KERNELS ACROSS OF THEM BENEFITS... (RETURN IS: NONE)"
echo -e "1. : XANMOD(ALL)"
echo -e "2. : LIQUARIX(ALL)"
echo -e "3. : ZEN(ARCHONLY)"
echo -e "4. : LINUX-TKG(ALL)"
read -p $'>_: ' nockl
if [[ "$nockl" == "1" ]]; then
echo -e "INSTALLING ..." &&
xanmod
sudo grub-mkconfig -o /boot/grub/grub.cfg
fi
if [[ "$nockl" == "2" ]]; then
echo -e "INSTALLING ..." &&
liquarix
sudo grub-mkconfig -o /boot/grub/grub.cfg
fi
if [[ "$nockl" == "3" ]]; then
echo -e "INSTALLING ..." &&
zen
sudo grub-mkconfig -o /boot/grub/grub.cfg
fi
if [[ "$nockl" == "4" ]]; then
echo -e "INSTALLING ..." &&
linux-tkg
sudo grub-mkconfig -o /boot/grub/grub.cfg
fi
if [[ "$nockl" == "" ]]; then
clear
fi
}
prompt_1
prompt_2() {
echo -e "NOW YOU GOTTA INSTALL WINE THOUGH. [RETURN]"
read -p $'>_: '
which apt >/dev/null 2>&1
if [ $? -eq 0 ]; then
cd /tmp &&
wget -qnc https://dl.winehq.org/wine-builds/winehq.key &&
sudo mv winehq.key /usr/share/keyrings/winehq-archive.key &&
sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ jammy main' -y &&
sudo add-apt-repository ppa:lutris-team/lutris -y
sudo apt-get update
sudo apt install --assume-yes winehq-staging libgnutls30:i386 libldap-2.4-2:i386 libgpg-error0:i386 libxml2:i386 libasound2-plugins:i386 libsdl2-2.0-0:i386 fontconfig:i386 libfreetype6:i386 libdbus-1-3:i386 libsqlite3-0:i386 -f
sudo apt install -f --assume-yes kubuntu-restricted-extras
sudo apt install -f --assume-yes --no-install-recommends dialog dosbox dxvk speedtest-cli steam hwloc lutris m4 usbutils make zenity winetricks
fi
which pacman >/dev/null 2>&1
if [ $? -eq 0 ]; then
yay -S --needed --noconfirm wine-staging giflib lib32-giflib libpng lib32-libpng libldap lib32-libldap gnutls lib32-gnutls mpg123 lib32-mpg123 openal lib32-openal fontconfig lib32-fontconfig v4l-utils lib32-v4l-utils libpulse lib32-libpulse libgpg-error lib32-libgpg-error alsa-plugins lib32-alsa-plugins alsa-lib lib32-alsa-lib libjpeg-turbo lib32-libjpeg-turbo sqlite lib32-sqlite libxcomposite lib32-libxcomposite libxinerama lib32-libgcrypt libgcrypt lib32-libxinerama ncurses lib32-ncurses opencl-icd-loader lib32-opencl-icd-loader libxslt lib32-libxslt libva lib32-libva gtk3 lib32-gtk3 gst-plugins-base-libs lib32-gst-plugins-base-libs vulkan-icd-loader lib32-vulkan-icd-loader
yay -S --needed --noconfirm dialog dosbox dxvk-bin speedtest-cli steam hwloc lutris m4 usbutils make zenity winetricks gst-editing-services
fi
which dnf >/dev/null 2>&1
if [ $? -eq 0 ]; then
sudo dnf config-manager --add-repo https://dl.winehq.org/wine-builds/fedora/$(rpm -E %fedora)/winehq.repo &&
sudo dnf install vulkan-loader winehq-staging -y
sudo dnf install dialog dosbox speedtest-cli steam hwloc lutris m4 usbutils make zenity gst-editing-services -y
fi
echo -e "abi.vsyscall32 = 0" | sudo tee -a /etc/sysctl.d/99-swappiness.conf
}
prompt_2
prompt_3() {
clear
ulimit -n 1048576
ulimit -Hn
echo -e ""
echo -e "IF THIS ABOVE RETURNS MORE THAN 500,000 THEN ESYNC IS ENABLED!"
read -p $'true/false >_: ' nocklb
if [[ "$nocklb" == "false" ]]; then
echo -e $USER "hard nofile 1048576" | sudo tee /etc/security/limits.conf
sudo sed -i -e 's/^#DefaultLimitNOFILE.*/DefaultLimitNOFILE=1048576/' /etc/systemd/system.conf
else
sudo sed -i -e 's/^#DefaultLimitNOFILE/DefaultLimitNOFILE/' /etc/systemd/system.conf
fi
echo -e "DONE!"
}
prompt_3
prompt_4() {
echo -e "NEXT YOU GOTTA INSTALL A COUPLE OF DAEMON EITHER (gamemode, thermald etc.) AND UPDATE FIRMWARE [HIT RETURN]"
read -p $'>_: '
which apt >/dev/null 2>&1
if [ $? -eq 0 ]; then
sudo apt install --assume-yes --install-recommends schedtool -f
git clone https://github.com/kuche1/minq-ananicy.git
./minq-ananicy/package.sh debian
sudo dpkg -i ./minq-ananicy/*ananicy-*.deb
sudo apt install --assume-yes --install-recommends gamemode -f
sudo apt install --assume-yes --install-recommends thermald -f
sudo apt install --assume-yes --install-recommends tuned -f
sudo systemctl enable ananicy
sudo systemctl start ananicy
sudo tuned-adm profile throughput-performance
fi
which pacman >/dev/null 2>&1
if [ $? -eq 0 ]; then
yay -S --needed --noconfirm schedtool minq-ananicy-git gamemode lib32-gamemode thermald tuned
sudo systemctl enable ananicy
sudo systemctl start ananicy
sudo tuned-adm profile throughput-performance
fi
which dnf >/dev/null 2>&1
if [ $? -eq 0 ]; then
sudo dnf install gamemode -y
sudo dnf install thermald -y
sudo dnf install tuned -y
sudo tuned-adm profile throughput-performance
fi
sudo fwupdmgr get-devices
sudo fwupdmgr refresh --force
sudo fwupdmgr get-updates -y
sudo fwupdmgr update -y
}
prompt_4
extra() {
cd /tmp
curl --tlsv1.2 -fsSL https://raw.githubusercontent.com/YurinDoctrine/secure-linux/master/secure.sh >secure.sh &&
chmod 0755 secure.sh &&
./secure.sh
}
final() {
sleep 0.2 && clear
echo -e "
###############################################################################
# FINAL: DO YOU ALSO WANT TO RUN THE AUTHOR'S secure-linux?
###############################################################################"
read -p $'yes/no >_: ' nocklby
if [[ "$nocklby" == "yes" ]]; then
echo -e "RUNNING ..."
extra
elif [[ "$nocklby" == "no" ]]; then
echo -e "LEAVING ..."
exit 0
else
echo -e "INVALID VALUE!"
final
fi
}
final