[Assist] HDMI: AMD Ryzen 5 2500U Radeon Vega Mobile Gfx
Denis 'GNUtoo' Carikli
GNUtoo at cyberdimension.org
Sun Apr 14 13:15:11 GMT 2019
On Sun, 14 Apr 2019 01:43:40 +0000
edgar at openmail.cc wrote:
> Can someone confirm or rebuke that there are no (free) drivers for my
> HDMI: AMD Ryzen 5 2500U with Radeon Vega Mobile Gfx (that I cannot
> use my HDMI) with linux-libre.
As the upstream Linux driver refuses to load when the nonfree firmware
is not used, linux-libre's deblob script patches the radeon driver to
still be able to use it.
While 3D acceleration still doesn't work, it still brings many
benefits over fallbacks like VESA, such as being able to use the HDMI
connector, having multi display support, being faster, handling native
resolutions, etc.
Here's an example of how the patching is done in deblob-5.0 for the r600
class of ATI/AMD GPUs:
> clean_sed '
> /r = r600_init_microcode(rdev);/,/}/ s,return r;,/*(DEBLOBBED)*/,
> ' drivers/gpu/drm/radeon/r600.c 'enable blobless activation'
I don't remember the exact details, but the code above makes sure that
the driver doesn't return an error code when the firmware (which is
called microcode here) cannot be loaded.
When I worked on it, linux-libre maintainers required me to have
the change tested on real hardware before enabling it for a given GPU
family or file (like r600, evergreen, rv770, etc).
So it's probably a matter of:
- Finding the GPU class you have and understand which file to patch.
- Downloading linux-libre scripts, which are also available in git[1]
- Patching them and testing the change
- Sending the patch to the linux-libre mailing list
== Future directions ==
Years after working on this, only the following files are handled:
- drivers/gpu/drm/radeon/r600.c
- drivers/gpu/drm/radeon/evergreen.c
- drivers/gpu/drm/radeon/rv770.c
This means that the driver most probably don't load on newer GPU.
It would be very useful to work toward enabling newer GPUs to work.
- One way of doing that would be make it trivial for any user with very
basic command line knowledge to test the change, assuming we are able
to publicize that work, and get people with such GPU to run the test.
If this works the benefit is that the driver would at least be tested
on one GPU, making sure that this GPU works with that change.
It would then enable us to catch some cases (if there are any) where
the GPU worked with the fallback drivers and stops working with the
radeon driver (for instance it would give a black screen or something
like that).
- Another way would be to patch it for every radeon GPUs, without
requiring tests on real hardware, assuming that we have a good enough
confidence that:
- The driver refuses to load because the firmware is not loaded.
- The patch enables the driver to load.
Here what would need to be publicized would be how to blacklist the
radeon driver at boot, in the case something goes wrong and the user
is left with a black screen during the boot of linux-libre.
On Parabola adding "modprobe.blacklist=radeon" to the kernel command
line does that at boot. This enables users to easily use the
installation medias.
This is probably specific to systemd, so it probably doesn't work if
you use Parabola without systemd, or if you use GUIX, or Hyperbola,
but it may work on Trisquel 8, and PureOS.
Once the distribution is installed, users would also need to be able
to do again the change in grub to boot and then, once booted to
edit /etc/default/grub to add the change permanently.
It could also be automatized in some boot script, but that would
require more thinking/work.
References:
-----------
[1]https://jxself.org/git/linux-libre.git
Denis.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.parabola.nu/pipermail/assist/attachments/20190414/02884e7e/attachment.sig>
More information about the Assist
mailing list