Slow video, no sound

I find this particularly odd because I recall youtube working shortly after the installation, but something may have changed since?

I’ve been testing with mpv running youtube links. it returns no errors, but the video is slow and has no sound.

I wonder if it’s because I’m running external monitors with a dock. (other problems with that forthcoming!)

this is a bit exemplary of my confusion around package installation vs software initiation. I think this lack of understanding comes from the way xmonad and the display manager seem to be installed and initiated in the same config. I guess what I’m learning is that those are a special circumstances. That packages installed in environment.systemPackages are not initiated by default. but then again, if the package is a service or a library, is it then initiated at startup by default?

Does the audio output appear in plasma? Plasma allows you to set default outputs both globally and by application. I would first check those settings.

For the slow video, what is the cpu/gpu hardware and what are the details on the video you are trying to play?

about to reboot into plasma. I’ll let you know.

can’t get lspci running. I installed the unixutils package but the shell says there’s no such command.

Same issues in plasma. The audio outputs do appear in the gui menu, but video plays slow with no audio. I also can’t click on any YouTube links. Other sites are not giving me that issue.

What is your CPU/GPU hardware? I don’t the details from lspci. Something like it is i3 8145u with integrated graphics or if you have a dedicated gpu, which one.

BIOS says:

CPU Type: AMD Ryzen 7 PRO 3700U w/ Radeon Vega Mobile Gfx

Try adding this to configuration.nix if it isn’t there already.

services.xserver.videoDrivers = [ "amdgpu" ];

Although not related to your problem, you probably also want this:

hardware.cpu.amd.updateMicrocode = true;
1 Like

thank you so much for the help. unfortunately that didn’t fix it. :frowning:

Which kernel are you using?

1 Like
uname -rv
5.4.49 #1-NixOS SMP Wed Jun 24 15:50:53 UTC 2020

also, I have this in my config, as recommended by a config on github for T495:

  # see https://github.com/NixOS/nixpkgs/issues/69289
  boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.2") pkgs.linuxPackages_latest;

some sources online seem to differentiate between the software needed for amdgpu and amdgpu pro.

It won’t let me install amdgpu-pro:

sudo nixos-rebuild switch --show-trace                                                                                                                                                                                                                   
building Nix...
building the system configuration...
error: while evaluating the attribute 'activationScript' of the derivation 'nixos-system-nixos-20.03.2411.30fb4e1e206' at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/activation/top-level.nix:103:5:
while evaluating the attribute 'system.activationScripts.script' at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/activation/activation-script.nix:68:9:
while evaluating 'textClosureMap' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/strings-with-deps.nix:70:35, called from /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/activation/activation-script.nix:89:18:
while evaluating 'id' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/trivial.nix:14:5, called from undefined position:
while evaluating the attribute 'text' at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/activation/activation-script.nix:9:5:
while evaluating the attribute 'text' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/strings-with-deps.nix:77:38:
while evaluating the attribute 'sources' of the derivation 'etc' at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/etc/etc.nix:12:5:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/etc/etc.nix:20:20, called from undefined position:
while evaluating the attribute 'source' at undefined position:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:84:45, called from undefined position:
while evaluating the attribute 'value' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:379:9:
while evaluating the option `environment.etc./X11/xorg.conf.d/10-evdev.conf.source':
while evaluating the attribute 'mergedValue' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:411:5:
while evaluating the attribute 'values' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:405:9:
while evaluating the attribute 'values' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:505:7:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:391:28, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:391:17:
while evaluating 'dischargeProperties' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:464:25, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:392:62:
while evaluating the attribute 'value' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:277:44:
while evaluating the attribute 'buildInputs' of the derivation 'xf86-input-evdev-2.10.6' at /nix/var/nix/profiles/per-user/root/channels/nixos/pkgs/servers/x11/xorg/default.nix:1681:5:
while evaluating 'getOutput' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/attrsets.nix:464:23, called from undefined position:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/pkgs/stdenv/generic/make-derivation.nix:142:17, called from undefined position:
while evaluating 'overrideAttrs' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/customisation.nix:85:73, called from /nix/var/nix/profiles/per-user/root/channels/nixos/pkgs/servers/x11/xorg/overrides.nix:552:27:
while evaluating 'overrideResult' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/customisation.nix:79:24, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/customisation.nix:86:13:
while evaluating 'makeOverridable' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/customisation.nix:67:24, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/customisation.nix:79:27:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/customisation.nix:79:54, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/customisation.nix:69:16:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/customisation.nix:86:29, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/customisation.nix:79:60:
while evaluating 'overrideAttrs' at /nix/var/nix/profiles/per-user/root/channels/nixos/pkgs/stdenv/generic/make-derivation.nix:318:28, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/customisation.nix:86:32:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/pkgs/servers/x11/xorg/overrides.nix:552:59, called from /nix/var/nix/profiles/per-user/root/channels/nixos/pkgs/stdenv/generic/make-derivation.nix:318:55:
unsupported xorg abiCompat 1.19 for xorg-server-1.20.8

shell returned 1

I commented out this line and it didn’t seem to change anything.

I don’t think amdgpu pro will help in this situation.

That makes sense. I think that line says use the latest kernel if the kernel is older than 5.2. However, in 20.03, the default kernel is 5.4 which isn’t older than 5.2.

You could try switching to the later kernel to see if it helps but I think that APU is supported by 5.4. On the other hand, I guess it is easy enough to test:

  boot.kernelPackages = pkgs.linuxPackages_latest;

unfortunately that didn’t help. thank you so so much for helping.

DId you run nixos-rebuild switch and reboot? Because, if so, you are fast. :rabbit2:

1 Like

I did! and I am! and so is my new computer. <3 <3

1 Like

If I can’t get this running inside a few days, I’m going to switch to another distribution. I really wish I could stick with this, but I need my computer up and running. As a professional musician I need to be able to listen to music and watch videos for work. :frowning:

I’m not an expert, and don’t have an amdgpu myself, but a few things that might be worth checking. If you’re passing mpv a url, video playback could be slow for a few reasons:

  • The network is struggling to fetch the video data fast enough
  • The hardware accelerated video decoder isn’t working for some reason
  • The GPU driver is struggling with the quantity of pixels (often because it’s failed to load the driver and fallen back to software rendering

Some things you might try in order to narrow down the issue:

  • Download a video and run mpv with the local file to determine whether the network is part of the problem (youtube-dl can download youtube urls).
  • Run something like glmark2 and see how it performs. It should print some driver information in the console and show some animated test graphics in a window.
  • Look in /var/log/xorg.log (I think that’s where it lives on NixOS?), and see if you can determine which driver X actually chose to use.