修改 amdgpu 脚本

修改 amdgpu 脚本

我是第一次在 Kubuntu 中安装驱动程序。经过一些尝试和错误以及强制安装后,到达了这一点

dan@dan-dan-pc:~/Downloads/amdgpu-pro-19.10-785425-ubuntu-18.04$ sudo apt-get install -f ./amdgpu-core_19.10-785425_all.deb 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
Note, selecting 'amdgpu-core' instead of './amdgpu-core_19.10-785425_all.deb'
The following packages were automatically installed and are no longer required:
  fonts-font-awesome fonts-liberation2 freerdp2-x11 libabw-0.1-1 libadplug-2.2.1-0v5 libaudiofile1 libbinio1v5 libboost-date-time1.67.0 libboost-filesystem1.67.0 libboost-iostreams1.67.0 libboost-locale1.67.0 libboost-system1.67.0 libboost-thread1.67.0 libcdio-cdda2
  libcdio-paranoia2 libcdr-0.1-1 libclucene-contribs1v5 libclucene-core1v5 libcmis-0.5-5v5 libcolamd2 libe-book-0.1-1 libebur128-1 libeot0 libepubgen-0.1-1 libetonyek-0.1-1 libexttextcat-2.0-0 libexttextcat-data libfluidsynth1 libfreecell-solver0 libfreehand-0.1-1
  libfreerdp-client2-2 libfreerdp2-2 libgrantlee-textdocument5 libharfbuzz-icu0 libid3tag0 libjs-sphinxdoc libkf5plotting5 libkf5torrent6 libkf5webkit5 libkgantt2 libkgantt2-l10n libkolabxml1v5 libktorrent-l10n liblangtag-common liblangtag1 libmhash2 libmikmod3 libmms0
  libmodplug1 libmpdclient2 libmspub-0.1-1 libmwaw-0.3-3 libmythes-1.2-0 libodfgen-0.1-1 libopenal-data libopenal1 liborcus-0.14-0 libpagemaker-0.0-0 libphonenumber7 libprotobuf17 libqgpgme7 libqt5networkauth5 libraptor2-0 librasqal3 librdf0 librevenge-0.0-0
  libsdl2-2.0-0 libsidplayfp4 libsuitesparseconfig5 libvisio-0.1-1 libvncclient1 libwildmidi2 libwinpr2-2 libwpd-0.10-10 libwpg-0.3-3 libwps-0.4-4 libxerces-c3.2 libxmlsec1 libxmlsec1-nss libyajl2 libzzip-0-13 lp-solve mariadb-client-core-10.3 mariadb-common
  mariadb-server-core-10.3 paperkey qtgstreamer-plugins-qt5 timgm6mb-soundfont
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
  amdgpu-core
0 upgraded, 1 newly installed, 0 to remove and 168 not upgraded.
46 not fully installed or removed.
After this operation, 12,3 kB of additional disk space will be used.
Get:1 /home/dan/Downloads/amdgpu-pro-19.10-785425-ubuntu-18.04/amdgpu-core_19.10-785425_all.deb amdgpu-core all 19.10-785425 [2.416 B]
(Reading database ... 165481 files and directories currently installed.)
Preparing to unpack .../amdgpu-core_19.10-785425_all.deb ...
ERROR: This package can only be installed on Ubuntu 18.04.
dpkg: error processing archive /home/dan/Downloads/amdgpu-pro-19.10-785425-ubuntu-18.04/amdgpu-core_19.10-785425_all.deb (--unpack):
 new amdgpu-core package pre-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 /home/dan/Downloads/amdgpu-pro-19.10-785425-ubuntu-18.04/amdgpu-core_19.10-785425_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

经过大量搜索我认为我们做到了:

dan@dan-dan-pc:~/Downloads/amdgpu-pro-19.10-785425-ubuntu-18.04$ sudo lshw -c video
  *-display                 
       description: VGA compatible controller
       product: Hawaii PRO [Radeon R9 290/390]
       vendor: Advanced Micro Devices, Inc. [AMD/ATI]
       physical id: 0
       bus info: pci@0000:01:00.0
       version: 80
       width: 64 bits
       clock: 33MHz
       capabilities: pm pciexpress msi vga_controller bus_master cap_list rom
       configuration: driver=radeon latency=0
       resources: irq:41 memory:c0000000-cfffffff memory:d0000000-d07fffff ioport:e000(size=256) memory:fea00000-fea3ffff memory:c0000-dffff

不起作用,我正在切换到 Kubuntu 18.04(全新安装)也许有效。

驱动程序已安装,但重启后出现黑屏。现在我处于安全模式并进行所有更新。如果不能,我希望这能让它再次工作。是时候彻底更换发行版了。

移至 manjaro,其中所有内容均位于名为 bauh 的 aur 管理器中。

提前致谢

答案1

关于:

function os_release() {
[[ -r  /etc/os-release ]] && . /etc/os-release

case "$ID" in
ubuntu|linuxmint|debian)
    :
    ;;
*)
    echo "Unsupported OS" | stderr
    exit 1
    ;;
esac
}

打开终端并执行

 more /etc/os-release

并记住它所说的内容,编辑此文件并添加您找到的内容(假设kubuntu),如下所示:

kubuntu|ubuntu|linuxmint|debian)

关于

#VERSIONLIST_PACKAGE=amdgpu-pro-pin

去除#

然后保存脚本并执行。请注意,不能保证它会正常工作,并且最终可能会导致系统无法启动。准备一个实时 USB,并找出如何删除已安装的与显卡驱动程序相关的软件包,然后您可以从实时会话中重置 ;)


编辑您的发布显示....

 ID=ubuntu

该 ID 是脚本 ($ID) 中所要求的,因此对我来说这似乎没问题,因为ubuntu它在已接受版本的列表中。


Errors were encountered while processing:
/tmp/apt-dpkg-install-mDmBng/044-amdgpu-core_19.10-785425_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

对我来说太模糊了。你省略了行吗?我希望不止这 3 行。

2 个选项:

sudo dpkg --configure -a

重新配置 dpkg 数据库。这可能会修复通知。

cd /tmp/
sudo apt-get install -f apt-dpkg-install-mDmBng/044-amdgpu-core_19.10-785425_all.deb

可用于强制安装。如果 .deb 仍在 /tmp/ 中。

我不会使用这个脚本。下载 deb 并安装。它可能会向您提供有关其遇到的问题的更多信息。

相关内容