1

I just bought an Acer Nitro 5 (an515-44-r5yz) laptop with a NVIDIA GTX 1650 card. I installed Ubuntu 22.04 on it, and the first thing I did was install Nvidia's recommended driver (520-open). After rebooting, I tried to install FFmpeg, but during the installation of libsdl2-dev package, the computer goes black and never comes back again.

When rebooting, there's no graphical interface, it's a black screen where I can enter commands:

Ubuntu 22.04 LTS pc tty1
pc login:

I have tried the following to escape the black screen, with no luck:

  • reinstall libsdl2-dev
  • purge libsdl2-dev
  • reinstall nvidia driver

After days trying to trace the problem (I reinstalled Ubuntu a couple of times to find out the exact cause and whether it's deterministic), I'd like to hear some recommendation on how to avoid this error. I'm even thinking about returning the computer because I'm afraid this sort of error might randomly occur in the future when I unadvisedly try to install some seemingly innocent thing.

Running sudo ubuntu-drivers autoinstall gives

Traceback (most recent call last):
  File "/usr/bin/ubuntu-drivers", line 513, in <module>
    greet()
  File "/usr/lib/python3/dist-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3/dist-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3/dist-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3/dist-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/decorators.py", line 84, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/usr/bin/ubuntu-drivers", line 432, in autoinstall
    command_install(config)
  File "/usr/bin/ubuntu-drivers", line 187, in command_install
    UbuntuDrivers.detect.nvidia_desktop_pre_installation_hook(to_install)
  File "/usr/lib/python3/dist-packages/UbuntuDrivers/detect.py", line 839, in nvidia_desktop_pre_installation_hook
    with_nvidia_kms = version >= 470
UnboundLocalError: local variable 'version' referenced before assignment

Here's what I did in another reboot: I did not install nvidia drivers, but I did prime-select nvidia (which worked!) and installed Cuda. Then, Nvidia became the default graphic card (checked on Settings > About).

However, if I try to install libsdl2-dev (which is my initial question), the computer crashes anyway! I noticed that during installation it removes cuda without asking.

I just found a project's instructions to install Cuda and libsdl2-dev and it's very straightforward, exactly what I did. That makes me think that the problem is indeed my laptop.

Nmath
  • 12,664
Raphael
  • 179

0 Answers0