Ubuntu, VLC, RX580 and HEVC playback?

Discussion in 'Other Operating Systems' started by Dave, Mar 14, 2020.

  1. Dave

    Dave Member

    Joined:
    Jun 26, 2001
    Messages:
    339
    Location:
    Morayfield (4506)
    I've had enough of Windows 10 changing my settings with each update, and I'm looking at making the switch to Linux.
    I'm dual booting Ubuntu 18.04/Win10 (tried 19.10 as well), have managed to find Linux versions of most of the software I require, I've loaded the latest AMD GPU drivers, have enabled hardware acceleration in VLC, but VLC is still jerky playing even 1080P HEVC, and is just terrible playing 4K HEVC.

    System is running on a 2700x, 16GB 3300mhz ram, NVME SSD, same system plays everything perfectly in Windows 10, even if I disable GPU hardware decoding.

    So I'm wondering if HEVC hardware playback is even possible in Ubuntu with the RX580?
     
  2. elvis

    elvis Old school old fool

    Joined:
    Jun 27, 2001
    Messages:
    44,048
    Location:
    Brisbane
    It is. Some questions:

    1) What version of VLC do you have? How did you install it?

    2) What kernel do you have running? You can find out by typing "uname -a" at a command prompt.

    3) What drivers are your GUI running? You can find out by typing "grep LoadModule /var/log/Xorg.0.log" at a command prompt.

    How did you do this, and where did you get the drivers from? AMD have deprecated their downloadable drivers from their site, and now package the latest accellerated drivers with kernels and Xorg. If you've downloaded something, they're likely to be out of date.
     
  3. OP
    OP
    Dave

    Dave Member

    Joined:
    Jun 26, 2001
    Messages:
    339
    Location:
    Morayfield (4506)
    3.0.8 Vetinari, installed via Ubuntu Software Updater

    Linux LinuxMain 5.3.0-40-generic #32~18.04.1-Ubuntu SMP Mon Feb 3 14:05:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

    All i get from that is:
    grep: /var/log/Xorg.0.log: No such file or directory

    Downloaded from the AMD site,
    Radeon™ Software for Linux® Driver for Ubuntu 18.04.3 Revision Number 19.50 Release Date 12/19/2019

    I uninstalled the above drivers, 1080p seems to be playing fine now, but it's still not using GPU hardware decoding, and 4k is still choppy.
    I've tried several different ways to find current GPU driver and "amdgpu" is what keeps showing for driver.
     
  4. elvis

    elvis Old school old fool

    Joined:
    Jun 27, 2001
    Messages:
    44,048
    Location:
    Brisbane
    Definitely don't install those. With Linux, try as much as possible to avoid downloading third party drivers. The volume of hardware that requires that is typically quite low, and drivers from outside of the open source ecosystem typically cause more drama than they are worth (there are exceptions, but AMD are an excellent open source citizen).

    Looks like you've got the HWE (Hardware Enablement) kernel (kernel 5.3.X) which is good. That's the newer kernel backported to Ubuntu LTS with stuff you need in it for your hardware.

    At this point I'd uninstall the drivers you downloaded, which should fall back to the open source ones - these are far better. There's two major branches: "radeon" and "amdgpu". The "amdgpu" drivers are more modern and aimed at newer cards, which should give the best performance.

    Once you've uninstalled the downloaded drivers and rebooted, try VLC again. In particular ensure you're running either OpenGL or Vulkan (preferred) output.

    If you're running Ubuntu 18.04 LTS you should definitely be running Xorg and not Wayland. What do the output of these two commands say:

    dpkg -l | grep ^ii | grep -i xorg

    dpkg -l | grep ^ii | grep -i xorg | grep -i hwe

    From there we can check (a) if you've got Xorg, and (b) if we need to bump you up to the HWE version with newer software.
     
  5. OP
    OP
    Dave

    Dave Member

    Joined:
    Jun 26, 2001
    Messages:
    339
    Location:
    Morayfield (4506)
    I've tried OpenGL, There is no Vulkan to choose, still the same choppy playback in 4K

    ii python3-xkit 0.5.0ubuntu2 all library for the manipulation of xorg.conf files (Python 3)
    ii xorg 1:7.7+19ubuntu7.1 amd64 X.Org X Window System
    ii xorg-docs-core 1:1.7.1-1.1 all Core documentation for the X.org X Window System
    ii xserver-xorg-core-hwe-18.04 2:1.20.5+git20191008-0ubuntu1~18.04.1 amd64 Xorg X server - core server
    ii xserver-xorg-hwe-18.04 1:7.7+19ubuntu8~18.04.3 amd64 X.Org X server
    ii xserver-xorg-input-all-hwe-18.04 1:7.7+19ubuntu8~18.04.3 amd64 X.Org X server -- input driver metapackage
    ii xserver-xorg-input-libinput-hwe-18.04 0.28.1-1~18.04.1 amd64 X.Org X server -- libinput input driver
    ii xserver-xorg-input-wacom-hwe-18.04 1:0.36.1-0ubuntu1~18.04.1 amd64 X.Org X server -- Wacom input driver
    ii xserver-xorg-legacy-hwe-18.04 2:1.20.5+git20191008-0ubuntu1~18.04.1 amd64 setuid root Xorg server wrapper
    ii xserver-xorg-video-all-hwe-18.04 1:7.7+19ubuntu8~18.04.3 amd64 X.Org X server -- output driver metapackage
    ii xserver-xorg-video-amdgpu-hwe-18.04 19.0.1-1ubuntu1~18.04.1 amd64 X.Org X server -- AMDGPU display driver
    ii xserver-xorg-video-ati-hwe-18.04 1:19.0.1-1ubuntu1~18.04.1 amd64 X.Org X server -- AMD/ATI display driver wrapper
    ii xserver-xorg-video-fbdev-hwe-18.04 1:0.5.0-1ubuntu1~18.04.1 amd64 X.Org X server -- fbdev display driver
    ii xserver-xorg-video-intel-hwe-18.04 2:2.99.917+git20171229-1ubuntu1~18.04.1 amd64 X.Org X server -- Intel i8xx, i9xx display driver
    ii xserver-xorg-video-nouveau-hwe-18.04 1:1.0.16-1~18.04.1 amd64 X.Org X server -- Nouveau display driver
    ii xserver-xorg-video-qxl-hwe-18.04 0.1.5-2build2~18.04.1 amd64 X.Org X server -- QXL display driver
    ii xserver-xorg-video-radeon-hwe-18.04 1:19.0.1-1ubuntu1~18.04.1 amd64 X.Org X server -- AMD/ATI Radeon display driver
    ii xserver-xorg-video-vesa-hwe-18.04 1:2.4.0-1~18.04.1 amd64 X.Org X server -- VESA display driver
    ii xserver-xorg-video-vmware-hwe-18.04 1:13.3.0-2build1~18.04.1 amd64 X.Org X server -- VMware display driver


    ii xserver-xorg-core-hwe-18.04 2:1.20.5+git20191008-0ubuntu1~18.04.1 amd64 Xorg X server - core server
    ii xserver-xorg-hwe-18.04 1:7.7+19ubuntu8~18.04.3 amd64 X.Org X server
    ii xserver-xorg-input-all-hwe-18.04 1:7.7+19ubuntu8~18.04.3 amd64 X.Org X server -- input driver metapackage
    ii xserver-xorg-input-libinput-hwe-18.04 0.28.1-1~18.04.1 amd64 X.Org X server -- libinput input driver
    ii xserver-xorg-input-wacom-hwe-18.04 1:0.36.1-0ubuntu1~18.04.1 amd64 X.Org X server -- Wacom input driver
    ii xserver-xorg-legacy-hwe-18.04 2:1.20.5+git20191008-0ubuntu1~18.04.1 amd64 setuid root Xorg server wrapper
    ii xserver-xorg-video-all-hwe-18.04 1:7.7+19ubuntu8~18.04.3 amd64 X.Org X server -- output driver metapackage
    ii xserver-xorg-video-amdgpu-hwe-18.04 19.0.1-1ubuntu1~18.04.1 amd64 X.Org X server -- AMDGPU display driver
    ii xserver-xorg-video-ati-hwe-18.04 1:19.0.1-1ubuntu1~18.04.1 amd64 X.Org X server -- AMD/ATI display driver wrapper
    ii xserver-xorg-video-fbdev-hwe-18.04 1:0.5.0-1ubuntu1~18.04.1 amd64 X.Org X server -- fbdev display driver
    ii xserver-xorg-video-intel-hwe-18.04 2:2.99.917+git20171229-1ubuntu1~18.04.1 amd64 X.Org X server -- Intel i8xx, i9xx display driver
    ii xserver-xorg-video-nouveau-hwe-18.04 1:1.0.16-1~18.04.1 amd64 X.Org X server -- Nouveau display driver
    ii xserver-xorg-video-qxl-hwe-18.04 0.1.5-2build2~18.04.1 amd64 X.Org X server -- QXL display driver
    ii xserver-xorg-video-radeon-hwe-18.04 1:19.0.1-1ubuntu1~18.04.1 amd64 X.Org X server -- AMD/ATI Radeon display driver
    ii xserver-xorg-video-vesa-hwe-18.04 1:2.4.0-1~18.04.1 amd64 X.Org X server -- VESA display driver
    ii xserver-xorg-video-vmware-hwe-18.04 1:13.3.0-2build1~18.04.1 amd64 X.Org X server -- VMware display driver


     
  6. elvis

    elvis Old school old fool

    Joined:
    Jun 27, 2001
    Messages:
    44,048
    Location:
    Brisbane
    So all the dpkg output is good, you've got the HWE Xorg stuff.

    Did you successfully uninstall the downloaded drivers?

    I'm trying to figure out why you've got no Xorg log files though. That's a bit weird. How about the following:

    grep LoadModule /var/log/X*

    (Including the asterisk at the end there).

    [edit]

    For your output driver, also try VA-API and VDPAU if they're present. I forget which is which for AMD hardware, but one of those could kick the hardware decoding in as well.
     
    Last edited: Mar 14, 2020
  7. OP
    OP
    Dave

    Dave Member

    Joined:
    Jun 26, 2001
    Messages:
    339
    Location:
    Morayfield (4506)
    grep: /var/log/X*: No such file or directory
     
  8. OP
    OP
    Dave

    Dave Member

    Joined:
    Jun 26, 2001
    Messages:
    339
    Location:
    Morayfield (4506)
    OK, found it in /.local/share/xorg
     

    Attached Files:

  9. OP
    OP
    Dave

    Dave Member

    Joined:
    Jun 26, 2001
    Messages:
    339
    Location:
    Morayfield (4506)
    OK, we have some success, VDPAU gives me hardware GPU decoding, with HEVC 1080P content, but no image with 4k HEVC.

    Thanks for the help so far mate. :)
     
  10. OP
    OP
    Dave

    Dave Member

    Joined:
    Jun 26, 2001
    Messages:
    339
    Location:
    Morayfield (4506)
    Looks like it s a 10 bit HEVC problem, none of the 10 bit HEVC files will play, 1080P or 4K.
    Unfortunately, a third of the files on my media server are encoded in HEVC 10 bit. I tried several other media players, but couldn't get hardware GPU decoding working with any of them either.
     
  11. elvis

    elvis Old school old fool

    Joined:
    Jun 27, 2001
    Messages:
    44,048
    Location:
    Brisbane
    That's got it narrowed down a bit though. VLC claims 10bit HEVC 4K support as of 3.0.0, but it might be an issue with either the video driver or ffmpeg (the software codec engine behind VLC).

    I'll do some reading on the ffmpeg commits and maybe the Doom9 forums and see if anyone's talking about it there.
     
  12. waltermitty

    waltermitty Member

    Joined:
    Feb 19, 2016
    Messages:
    1,455
    Location:
    BRISBANE
    Can you run vainfo? I think it's part of the libva-utils package.

    I've got a Ryzen with an APU (2400G) with amdgpu sand I can play 4k with mpv.

    Code:
    vainfo: VA-API version: 1.6 (libva 2.6.0.0)
    vainfo: Driver version: Mesa Gallium driver 20.0.1 for AMD RAVEN (DRM 3.36.0, 5.5.8_1, LLVM 9.0.1)
    vainfo: Supported profile and entrypoints
          VAProfileMPEG2Simple            :    VAEntrypointVLD
          VAProfileMPEG2Main              :    VAEntrypointVLD
          VAProfileVC1Simple              :    VAEntrypointVLD
          VAProfileVC1Main                :    VAEntrypointVLD
          VAProfileVC1Advanced            :    VAEntrypointVLD
          VAProfileH264ConstrainedBaseline:    VAEntrypointVLD
          VAProfileH264ConstrainedBaseline:    VAEntrypointEncSlice
          VAProfileH264Main               :    VAEntrypointVLD
          VAProfileH264Main               :    VAEntrypointEncSlice
          VAProfileH264High               :    VAEntrypointVLD
          VAProfileH264High               :    VAEntrypointEncSlice
          VAProfileHEVCMain               :    VAEntrypointVLD
          VAProfileHEVCMain               :    VAEntrypointEncSlice
          VAProfileHEVCMain10             :    VAEntrypointVLD
          VAProfileJPEGBaseline           :    VAEntrypointVLD
          VAProfileVP9Profile0            :    VAEntrypointVLD
          VAProfileVP9Profile2            :    VAEntrypointVLD
          VAProfileNone                   :    VAEntrypointVideoProc
    
     
  13. OP
    OP
    Dave

    Dave Member

    Joined:
    Jun 26, 2001
    Messages:
    339
    Location:
    Morayfield (4506)
    OK, installed MPV, it would install via Ubuntu Software Installer, but it wouldn't run, I had to add the 3rd party repository and it install the latest version from it. But, it played the 10 bit HEVC files in both 1080P and 4K using GPU hardware decoding. :)

    Unfortunately, after a week of use, I don't think Ubuntu is going to work out for me, on my Desktop PC, there are just to many annoying little things to deal with.

    If you Enable Automatic logon, you have to supply a password to chrome every session.
    If you disable Automatic Logon , the Logon window appears on secondary monitor at boot, not the primary.
    Programs just start on whatever monitor they choose, and even if the program starts on the primary monitor, the settings window might just pop up on the secondary monitor, then another pop up window might pop back up on the primary monitor.
    Programs sometimes remember the last monitor they where closed on, but then all of the sudden decide to change monitors again.
    Programs installed via the Ubuntu Software Installer, sometimes just don't work, so far I've found TOR, MPV, I'm running a stable release, and installing via their own repository.
    The default file manager Nautilus, is terrible, try doing something as basic as dragging and dropping a file from your Downloads folder to a second SSD in the system, it's a desktop system with a mouse, and I'm finding myself using the Terminal to move files around.
    There is no right click, create txt file, option in Ubuntu 18.04
    Audio quality is a lot worse then in Windows, most likely a driver issue.
    Video quality, is worse then in Windows, even just the desktop is washed out, again, most likely a driver issue.

    Don't take this as a Linux bashing post, I run three servers, two run Debian, one runs Unraid, they do their jobs extremely well. It's just at this point in time, Ubuntu's stable release, is not able to do what I require it to do, with out a large amount of work.
    I'll try a couple of other distros and see if they are any better for me.

    Thanks for all the help fellas, much appreciated.
     
  14. OP
    OP
    Dave

    Dave Member

    Joined:
    Jun 26, 2001
    Messages:
    339
    Location:
    Morayfield (4506)
    OK, replaced Ubuntu with Linux Mint, much better, crossed about 50% of the issues off the above list straight away.
     
  15. elvis

    elvis Old school old fool

    Joined:
    Jun 27, 2001
    Messages:
    44,048
    Location:
    Brisbane
    Can you please report:

    VLC version
    Kernel - "uname -a"
    Kernel driver being used - "lsmod | grep -i drm"
    Xorg driver being used - "grep LoadModule /var/log/X*" and "grep -i kms /var/log/X*"

    These would be really helpful to find out what's different. Mint and Ubuntu are nearly identical under the GUI. At this point I'm suspecting the proprietary driver install in your previous tests might have been the culprit, and the clean install ensured the open source drivers were running cleanly. Either that, or a newer kernel/Xorg combo gave you newer drivers.
     
  16. OP
    OP
    Dave

    Dave Member

    Joined:
    Jun 26, 2001
    Messages:
    339
    Location:
    Morayfield (4506)
    Sorry elvis, That wasn't one of the issues that was fixed. Even in Mint, I can't get VLC to do GPU hardware decoding of 10 Bit HEVC files.

    Linux Mint comes with Celluloid preinstalled, which does do GPU hardware decoding of 10 Bit HEVC files just fine.
     
  17. OP
    OP
    Dave

    Dave Member

    Joined:
    Jun 26, 2001
    Messages:
    339
    Location:
    Morayfield (4506)
    The list is getting sorted slowly.
    I got auto logon working with Chrome.
    Linux Mint lets you choose which monitor you want to log in on.
    Haven't sorted the programs starting on different monitors yet, will get to that later.
    From what I've found so far, I'd have to agree, better to download from the authors site, over the app manager, I've had a lot less problems since doing that
    There seems to be plenty of file managers available, so i'm sure I'll find something I like.
    Linux Mint also has right click, create new document.
    Audio quality is still bad, I'm using on board audio, SupremeFX S1220, which is actually very good under Windows, but I expected to have some hardware issues.
    Video Quality is much better with Linux Mint.
    Also Linux Mint is much snappier then Ubuntu was.
     
  18. elvis

    elvis Old school old fool

    Joined:
    Jun 27, 2001
    Messages:
    44,048
    Location:
    Brisbane
    Celluloid is a GUI frontend to mpv, and mpv is built on ffmpeg (just like VLC).

    I suspect you're just using newer code. I don't know any active media player on Linux not based on ffmpeg.

    I'm glad you got something working though. Hardware accelerated media stuff is tricky for distros to keep up with, just because of the sheer speed of it all.
     
  19. flu!d

    flu!d Never perfect, always genuine

    Joined:
    Jun 27, 2001
    Messages:
    19,333
    I can't get YouTube links to play in VLC anymore. I go to Media > Open network stream > Paste URL and hit play and....

    ...Nothing.

    Anyone else experiencing this?
     
  20. waltermitty

    waltermitty Member

    Joined:
    Feb 19, 2016
    Messages:
    1,455
    Location:
    BRISBANE

Share This Page

Advertisement: