0
sudo find / -size +5G -ls

listed debug files with more than 8GB size at /sys/kernel/debug/dri/n/amdgpu_vram

(n is the number of GPUs)

These might be useless debug files. Cannot delete them (error "Operation not permited"). How to delete these files?

2
  • n is not the number of GPUs but rather device minors, see here – looking at the code linked there might help.
    – dessert
    Nov 3, 2017 at 17:41
  • I used "n" to say there are "n" files on "n" directories 0, 1, ..., n (in my case is n = 6)
    – cjclm7
    Nov 3, 2017 at 18:12

2 Answers 2

3

These are not files in the traditional sense.

The entire /sys filesystem is a virtual file system, which maps various system functions as files. They are not stored on disk; they're merely mechanisms to access various kernel functions. In this case, the file is the video RAM. The files can serve as a debugging interface, thus the naming.

Removing them does literally not make sense - as they're an representation of a physical feature of your computer system. That's why you're not allowed to remove them.

In short: Do not touch anything inside /sys or /proc unless you know what you are doing. You may crash your system. Reading them is generally safe - worst case will typically garble your terminal with random data.

There's lots of interesting stuff in /sys and /proc, that can tell you a whole lot about how your system operates, both the Linux kernel, and physical parts of your computer.

4
  • 1
    the issue is that these "files" already occupy 52GB on the SSD (each one of them has already 8.5GB size on disk)
    – cjclm7
    Nov 3, 2017 at 20:24
  • No, they don't. The entire /sys file system is a virtual file system. It does not exist on any disk. If you want to verify this, boot with a live USB stick, mount the disk, and look for the files. If you still insist they take up space, please update your question with the output of df -h.
    – vidarlo
    Nov 3, 2017 at 20:58
  • 1
    Yes, agree, these seem to be the temporary files for each GPU (MSI RX 580 8GB) while they operating 100% full capacity
    – cjclm7
    Nov 4, 2017 at 19:59
  • They're not temporary files. They're a virtual file representing the memory of the graphics card.
    – vidarlo
    Nov 4, 2017 at 20:11
0

I have the same problem.

df -Th

command shows 100% Usage on / . Therefore, it is not imaginary problem. It is what did happen in my rig before, too. I solved it by using commands like

sudo apt autoremove
sudo apt autoclean
sudo apt clean
sudo apt autoremove --purge
sudo rm /var/log/kern.log
touch /forcefsck
sudo shutdown -rF now

If I find the full solution, I will post it here. ncdu is a better application for checking disk space usage in command line.

apt install ncdu

After several reboot and using commands like above and

sudo lsof +L1 | grep deleted

to detect processes which hold deleted files, the problem solved.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .