-
-
Save ShawnHuang/2268781b9fab93d7579c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
sudo /usr/share/ati/amd-uninstall.sh --force | |
cd /etc | |
sudo rm -rf ati | |
cd /usr/share | |
sudo rm -rf ati |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Get the directory this script is in | |
AMD=`pwd` | |
# Ask AMD/ATI for the 12.4 drivers | |
if [ ! -f "amd-driver-installer-12-4-x86.x86_64.run" ]; then | |
wget --referer='http://support.amd.com' http://www2.ati.com/drivers/linux/amd-driver-installer-12-4-x86.x86_64.run | |
chmod +x amd-driver-installer-12-4-x86.x86_64.run | |
fi | |
# Extract them, so we can fiddle with the insides | |
if [ ! -d "fglrx-12.4" ]; then | |
fakeroot ./amd-driver-installer-12-4-x86.x86_64.run --extract fglrx-12.4 | |
# Patch the module code | |
cd fglrx-12.4/common/lib/modules/fglrx/build_mod | |
patch -p0 < $AMD/ati_patch.txt | |
fi | |
# Run AMD's installer script | |
cd $AMD/fglrx-12.4 | |
sudo ./ati-installer.sh 8.961 --install --force | |
# Set up an initial xorg.conf file | |
if [ ! -f "/etc/X11/xorg.conf" ]; then | |
sudo aticonfig --initial -f | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Gianluca Gennari <[email protected]> | |
--- | |
--- firegl_public.c | |
+++ firegl_public.c | |
@@ -5797,10 +5797,16 @@ void ATI_API_CALL KCL_fpu_begin(void) | |
#ifdef CONFIG_X86_64 | |
kernel_fpu_begin(); | |
#else | |
+#ifndef TS_USEDFPU | |
+ preempt_disable(); | |
+ if (__thread_has_fpu(current)) | |
+ __save_init_fpu(current); | |
+#else | |
struct thread_info *cur_task = current_thread_info(); | |
preempt_disable(); | |
if (cur_task->status & TS_USEDFPU) | |
__save_init_fpu(cur_task->task); | |
+#endif | |
else | |
clts(); | |
#endif |
sudo add-apt-repository ppa:linrunner/tlp
sudo apt-get update
sudo apt-get install --no-install-recommends tlp tlp-rdw tp-smapi-dkms smartmontools ethtool
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
显卡切换:
1、查看当前显卡
aticonfig --pxl
2、切换独显
sudo aticonfig --px-dgpu
3、切换集显
sudo aticonfig --px-igpu