Is there a way to force X to use Intel integrated graphics while mining Ethereum on discrete Radeon card?
Update Did some further digging and found out the solution to this problem for the old fglrx driver: https://bitcointalk.org/index.php?topic=170470.60 This however does not work with the AMDGPU drivers, which don’t come with switchlibglx prepackaged as far as I know.
Update 2 — Found this possible solution but it didn’t work. Getting either one of 2 things: A, a black screen when I run systemctl isolate graphical.target
, or B, if I proceed to blacklist the driver, the inability to mine.
Update 3 Opened /var/log/Xorg.0.log
in a VT (with systemd default temporarily set to multi-user.target
while this problem persists) ― extremely bizarre "no screens found" error. Wonder if AMDGPU drivers are actually trying to force X to use them on startup; hopefully not.
Update 4 Found these instructions in the Arch Linux forums when researching the exact message re: not finding any displays — now, instead of exiting abnormally, the system simply hangs when I try to run startx. An improvement, but still doesn’t work.
Update 5 The above hang happens for about 5 minutes, then it exits with a “Connection refused” error. Pulled up ~/.local/share/xorg/Xorg.0.log
— it actually says “Server terminated successfully” despite startx output saying that’s what needs to be consulted.
Update 6 Googling site:bugs.launchpad.net "amdgpu"
turned up this bug report which may be related to this problem. Attempted the workaround there ― nope, didn't work.
Update 7 Running journalctl | grep gdm | grep EE | less
turned up some rather valuable information in helping solve this problem:
(EE) open /dev/fb0: Permission denied
WTF is the AMDGPU driver doing to the permissions on the framebuffer?
Update 8 Still no solution; placing bounty.
Update 9 Tried Wayland too; in fact that's what the live media defaulted to. GNOME does not use Weston, so weston.ini won't work when it comes to forcing use of i915 and ignoring amdgpu.
Original description starts below.
Alright, so I just built a mining rig that has Ubuntu 18.04.1 on it (tried pre-release 18.10 but for some reason AMDGPU fails to build DKMS modules in that case even with known workarounds like version spoofing applied, so had to just downgrade). The card is working fine; mining ETH at between 24.2 and 24.3 MH/s even with just one Sapphire Nitro Radeon RX 480 (which has a much better fan than the stock card and can thus sustain a high hashrate when fan speed is cranked all the way up).
The system also has an Intel Core i5-8400 CPU on it — which not only has six cores but also has on-chip graphics — running on the MSI H310-F Pro motherboard. Before I got the AMDGPU drivers configured to run that card, GNOME Shell was running perfectly fine. After I got the discrete GPU configured for mining, however, suddenly there’s nothing but VTs — no GNOME, no GDM, no X, no nothing. Is there a way, therefore, to force X to use the Intel integrated graphics chip on the i5-8400 in order to be able to both use the desktop and mine at the same time? Any help would be greatly appreciated.
I FINALLY got it to work, via the purge-the-driver-and-reinstall-in-headless-mode method:
cd /home/realkstrawn93/Desktop/amdgpu-pro-18*
amdgpu-pro-uninstall --purge -y
./amdgpu-pro-install --opencl=legacy,rocm --headless
This installs ONLY the OpenCL component of the AMDGPU-Pro driver and not the display component.