The officially official Devuan Forum!

You are not logged in.

#1 2023-04-04 15:24:31

bigrat
Member
Registered: 2018-08-25
Posts: 9  

Daedalus and amdgpu, gaming, and lessons learned

I recently bought a Radeon RX 6700XT and went through some shenanigans getting things working correctly, and thought maybe my pain could be your gain.

I had most games running after installing the AMDGPU drivers from AMD's site, but Cyberpunk 2077 was eluding me - it would hang on startup, and nothing I could do would get it running, no version of wine or proton fixed it. I decided that my frankenbuild chimaera/daedalus hash probably wasn't helping, so I decided to rebuild everything, clean.

I also decided to cleanly update to daedalus from a thumbstick install of chimaera.

1. Install chimaera. I specifically did not network install or provide a network mirror.
2. Modified /etc/apt/sources.list to point to daedalus (main contrib non-free), and did a dist-upgrade. The upgrade happened to include kernel 6.1.0-7.

Upon reboot, the machine hung up, with the last messages indicating the following:
Waiting for /dev/to be fully populated...

Usually, this occurs because we're missing some firmware somewhere. I had tried repeatedly to install the usual firmware-linux-nonfree and firmware-amd-graphics, but neither of these fixed the problem. I even tried getting the firmware from the Linux kernel git repo and putting it in /lib/firmware/amdgpu/updates, but this didn't fix it either. In the end after many hours of swearing and throwing things, the only fix for it was to frankenbuild it, and download the following debs from Debian bookworm:

firmware-amd-graphics_20230210-4_all.deb
firmware-linux_20230210-4_all.deb
firmware-linux-free_20200122-1_all.deb
firmware-linux-nonfree_20230210-4_all.deb
firmware-misc-nonfree_20230210-4_all.deb

3. Now here is where I screwed up, repeatedly: I tried to install the amdgpu drivers from AMD. If you try this, you'll find that:
a. You have to modify the amdcpu-install script because AMD doesn't know about devuan, only Debian
b. The installer tries to download lots of packages not in the devuan or debian testing branches (the installer assumes you have Ubuntu jammy)
You can screw around with this and make it sort of work, but in the end you end up with an even worse frankenbuild than can ever be fixed.

AMD recently got a number of updates merged into the kernel as of 6.1. This means that as long as you have recent firmware, you don't *need* to install any out-of-tree packages - you've already got the driver! So, on daedalus, do not install amdgpu packages from AMD.

4. Getting games to run - this was the whole point of this new card. In addition to OpenGL, many games use an API called Vulkan to provide 3D acceleration. The Mesa team in particular has their own implementation called RADV. While a generic Vulkan install and RADV can technically co-exist on the same machine, switching between the two requires setting environment variables and other tweaks, and recent RADV versions from Mesa perform quite well, so I'm sticking with that.
In general, I installed the following packages:

sudo apt-get install libgl1-mesa-glx \
libegl1-mesa \
mesa-va-drivers \
mesa-vdpau-drivers \
mesa-vulkan-drivers \
xserver-xorg-video-amdgpu \
libdrm-amdgpu1 \
libegl1-mesa \
mesa-va-drivers \
mesa-vdpau-drivers \
mesa-amdgpu-va-drivers \
vulkan-tools

Reboot when done.
This install will provide a tool called vkcube, which is a Vulkan test program something like glxgears. If you see a spinning cube when you run it, things are working.

5. The most frustrating problem I had is the one that took me the longest to figure out. At this point, I had working 3D acceleration, and Steam installed, but Cyberpunk 2077 still would not start! Additionally, Youtube videos (or any videos, for that matter) would not play at all. I messed with various packages for hours, thinking I had screwed up hardware video decoding, only to eventually find out that the problem was a sound issue.

Daedalus seems to include the new pipewire sound architecture. I hear lots of great things about this package, but as it turns out, this was the problem - I found it accidentally by switching my sound output - then videos started playing! Unfortunately, I had to switch the output every time I started a new video. I happen to be running the Cinnamon desktop environment, so perhaps there's some issue there, but in any case, I ran the following commands:

sudo apt-get remove pipewire* libpipewire*
sudo apt-get install pavucontrol pulseaudio

After this, Cyberpunk started normally, and played well with video settings on High, and all my pornh^H^H^HYoutube videos started playing again. I was also able to play DOOM 2016 and War Thunder without any issue, and at very good frame rates.

Daedalus is still in testing, so this sort of thing is to be expected, but hopefully this helps someone else struggling with AMD gpus.

Offline

Board footer