Skip to main content

Questions tagged [sysfs]

Sysfs is a Linux filesystem, normally mounted on /sys, which provides information about hardware and kernel components.

Filter by
Sorted by
Tagged with
1 vote
1 answer
101 views

System is Linux Mint 21 based. My USBstick was receiving some files and after message "Do not disconnect" had disappeared I unplugged it. This time though waiting whirl remained in Disks GUI ...
Martian2020's user avatar
  • 1,491
0 votes
1 answer
40 views

sysfs is a feature of the Linux kernel that allows kernel code to export information to user processes via an in-memory filesystem. The organization of the filesystem directory hierarchy is strict, ...
Kenzo's user avatar
  • 3
0 votes
1 answer
210 views

I have disabled a USB (2.0) port on a production Linux system with this command: echo 1 > /sys/bus/usb/devices/usb2/2-1/2-1.8/port/disable It successfully disabled the 8th USB port on hub #1. ...
Elisa K. K.'s user avatar
1 vote
0 answers
173 views

Background Information: I'm running Ubuntu 24.04.1 LTS (Noble Numbat, kernel 6.8.0-51-generic) on an AMD Ryzen 9 7950X3D, and I'm investigating some odd behavior where the CPU governor/driver will ...
JimXugle's user avatar
1 vote
1 answer
469 views

This was originally asked on Stack Overflow, but it was closed for being off-topic. Hopefully this is the right forum for the question. I'm writing a character device driver that exposes class and ...
olishmollie's user avatar
0 votes
0 answers
242 views

I'm trying to execute a container based on Ubuntu 20.04 and some additional dependencies. It ended up in an error where the project (something external) is looking for files/programs, as shown below. ...
V B's user avatar
  • 1
1 vote
0 answers
119 views

I am learning RPMSG in Linux, and I found there is a samples/rpmsg_client_sample.c. I built it into a kernel module, but I don't know how to make its probe function to be called? And is there any ...
wangt13's user avatar
  • 651
0 votes
1 answer
199 views

I wrote a driver that exposes I2C registers via an IIO device, this device operates in direct mode (read/write directly to files in sysfs), the files are correctly created in sysfs and work fine. I ...
Pedru's user avatar
  • 101
0 votes
0 answers
63 views

udisks exists for regular users, root must (and is) able to live without it, I need help figuring out how. The goal is to do exactly what udisks power-off /dev/sdX does without udisks. hdparm is out ...
EmErAJID's user avatar
0 votes
1 answer
229 views

I try to count total memory usage in linux via /sys/fs For this I've found /sys/fs/cgroup/memory/0/memory.usage_in_bytes in https://docs.kernel.org/admin-guide/cgroup-v1/memory.html#user-interface i'...
Irina's user avatar
  • 131
0 votes
1 answer
715 views

What is the structure of linux memory via /sys/fs/cgroup/memory.stat? what is the anon memory? What is the file memory? how to get the full used memory via /sys/fs?
Irina's user avatar
  • 131
1 vote
0 answers
329 views

I have a temp/humidity sensor connected to the i2c-0 interface on a Raspberry Pi: Rpi OS ver 'bookworm'. It works fine, and I can read sensor values from the files in /sys/class/hwmon/hwmon2 (or ...
Seamus's user avatar
  • 3,904
2 votes
1 answer
104 views

I have a Raspberry Pi that is running the 'bookworm' version of the OS; the 64-bit version of the OS if that makes any difference. I've installed one of the SHT3X temperature & humidity sensors, ...
Seamus's user avatar
  • 3,904
0 votes
1 answer
487 views

I'm trying to get a systemd service to restart when some ethernet cable gets plugged in, by monitoring changes to the /sys/class/net/eth0/carrier_up_count system file. I tried creating a systemd path ...
Quentin's user avatar
  • 25
0 votes
1 answer
112 views

I am looking at files in sysfs, specifically in /sys/bus/usb/devices The files contains small numbers, expressed as two characters, for example "00" All of the examples that I have contain ...
Peter Du's user avatar
  • 133
2 votes
1 answer
2k views

As the title of my question suggests, I am trying to edit the properties of my cgroup virtual file system - create new directories, edit the resource limits in certain files, etc - but any write ...
user10709800's user avatar
0 votes
0 answers
149 views

How can a user change the scale attribute of a backlight that is exposed in sysfs? On my machine it's located at /sys/class/backlight/amdgpu_bl1/scale. I tried using udev to add write permissions to ...
basilm4r0's user avatar
2 votes
0 answers
311 views

Sometimes I have to replace a PCI Express device, for example a network card (NIC) on a Linux server. I was always wondering if it is possible to do without downtime. I had success with adding new ...
Elisa K. K.'s user avatar
0 votes
1 answer
141 views

I am running a program on kali Linux. The program uses Openssl and some other networking libraries. When I try to run the program I get the output below: Failed to open /sys/kernel/debug/ieee80211/...
umarkaa's user avatar
  • 11
0 votes
2 answers
681 views

What happened to this node/symlink? It used to be there for ages, linking to the primary display adapter, and I cannot find it any longer with Linux 6.7.4. I've not found anything relevant in the ...
Artem S. Tashkinov's user avatar
0 votes
1 answer
261 views

Where is documentation of /sys/block/*/device/type ? I need information about this file . cat /sys/block/*/device/type 0 0 5 what is this numbers meaning ?
mah454's user avatar
  • 318
0 votes
2 answers
1k views

I customized the system using Kernel 6.4.0 and Busybox, but I don't know why the three files starting with phys_ cannot be accessed, and other files in the same folder can. # pwd /sys/class/net/eth0 # ...
just a student's user avatar
1 vote
1 answer
185 views

I'm testing udev rules with a file /etc/udev/rules.d/10-test.rules. This line: DEVPATH=="/devices/system/node/node0", ATTR{hugepages/hugepages-1048576kB/nr_hugepages}="4" makes /...
zwhconst's user avatar
  • 125
1 vote
1 answer
842 views

If you build a custom GNU/Linux system for an embedded device, do you need to execute mount -t proc proc /proc mount -t sysfs sysfs /sys somewhere in init process or is this done automatically by the ...
mrn's user avatar
  • 159
0 votes
1 answer
298 views

I am working on an embedded Linux system (with kernel 5.10.24). I am trying to disable sysfs from kernel, but I found some other stuffs relies on sysfs, so I have to enable sysfs in kernel build. Now ...
wangt13's user avatar
  • 651
0 votes
1 answer
393 views

I am trying to match a device using udev and run a command every time the device is connected (via RUNS). The device (a V4L2 USB camera) is always connected to the same USB port, so I thought I could ...
porst17's user avatar
  • 101
2 votes
2 answers
5k views

I am trying to understand the pcie topology on my system and the output of lspci. My output for lspci and the tree of the pci topology: 00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir/...
shafe's user avatar
  • 200
1 vote
1 answer
1k views

I wanted to check if the multi-generational LRU was active on my desktop, so I looked at the value of /sys/kernel/mm/lru_gen/enabled. It was set to 0x0007. I felt unsure what to make of this value, so ...
Newbyte's user avatar
  • 1,522
0 votes
0 answers
1k views

Normally, in Linux, one can use lsscsi to map disk devices to their SCSI ID: # lsscsi -d [N:0:4:1] disk SAMSUNG MZVLB1T0HBLR-000L7__1 /dev/nvme0n1 [259:0] [N:1:5:1] disk ...
j4nd3r53n's user avatar
  • 779
0 votes
1 answer
251 views

What exactly is under the /sys/module/<module_name>/holders directory? From what I see it's all symlinks. But symlinks representing what?
user555335's user avatar
1 vote
1 answer
126 views

The mount point for debugfs is /sys/kernel/debug, and the mount point for sysfs is /sys/, why can these 2 mount points be overlapped without interference?
tristone's user avatar
0 votes
1 answer
694 views

As far as I know, /sys/ is for sysfs, why debugfs is mounted under the /sys/ directory? Why not just mount it under /debug/ to make it clearer?
tristone's user avatar
1 vote
0 answers
999 views

As part of firewall implementation I am implementing a sysfs device, which attributes are defined by: #define FILE_PERMISSIONS S_IWUSR | S_IRUGO static DEVICE_ATTR(sysfs_att, FILE_PERMISSIONS, display,...
e.ad's user avatar
  • 111
3 votes
2 answers
4k views

I have to write some sysfs parameter files and each reboot. I wonder if there is a way to automatically set those as early as possible, preferably even during initramfs. Is there canonically way to do ...
Wang's user avatar
  • 1,435
1 vote
1 answer
305 views

My assumption is that sysfs is built using ioctl queries, meaning all the information you would want (or at least most of it) is already available by simply reading files on sysfs. I notice some ...
Bob Odenkirk's user avatar
1 vote
1 answer
639 views

I want to know what type of data the notes subdir holds in a specific /sys/module entry, however the man 5 sysfs of /sys/module is not fully documented yet. There must be some documentation around it ...
Daniel Kolom's user avatar
4 votes
1 answer
1k views

AC-adapter unplugged: $ echo power | sudo tee energy_performance_preference power $ echo $? 0 AC-adapter plugged-in: $ echo power | sudo tee energy_performance_preference power tee: ...
mathway's user avatar
  • 141
7 votes
1 answer
12k views

On Linux, the command lsblk -o partlabel will display the partlabel for block devices. I have used gdisk to change a partlabel. After the change, lsblk is still reporting the old value of the ...
mpb's user avatar
  • 1,881
2 votes
1 answer
348 views

I'm trying to make /sys/fs/selinux/enforce always contain "1", and prevent it from being changed. I've been able to do this on /etc/selinux/config by running chattr +i /etc/selinux/config ...
dcom-launch's user avatar
2 votes
1 answer
439 views

I'm looking for good documentation for sysfs; the man page is incomplete and even has one sentence that just stops half way through. I've found the Linux kernel documentation but that's a little bit ...
nohatsatthetable's user avatar
5 votes
4 answers
4k views

How to watch for sysfs file changes (like /sys/class/net/eth0/statistics/operstate) and execute a command on content change? inotify does not work on sysfs I don't want to poll. I want to set a ...
Zeta.Investigator's user avatar
1 vote
0 answers
526 views

Is there a reliable way to find which PCI devices (eg. video card) are connected via a particular Thunderbolt device (eg. eGPU enclosure, Dock) on a Linux system? Context In my particular use-case, I'...
hertg's user avatar
  • 11
3 votes
1 answer
575 views

Having had a bit of an internet-scour, I think the answer may be "No", but: Can I find the USB port description (as per dmidecode) corresponding to the USB device from sysfs? We can ...
andrewf's user avatar
  • 132
1 vote
0 answers
115 views

In sysfs, one can find which driver is handling a device. For example, the following shows that the driver handling the device led0 is called leds-gpio. pi@raspberrypi:/sys/devices/platform/leds/leds/...
Fachu's user avatar
  • 11
0 votes
1 answer
2k views

I am wondering what happens when two processes write to a character device file at the same time. Currently, I am mostly worried about /dev/spidev0.0 on a Raspberry pi. If I assume correctly that it's ...
Daniel D.'s user avatar
  • 175
2 votes
0 answers
399 views

Last time I was responsible for a unix system it was AT&T many years ago. I've finally got unix (linux) at home again. Things have changed. I'm working on understanding udev and /sys. The output ...
Ernie Rael's user avatar
0 votes
1 answer
2k views

I'm running ubuntu linux and I have a bluetooth mouse that I would like to capture evdev events from. The problem is that the event device can potentially be different any time I connect the mouse: ...
shwoseph's user avatar
  • 435
2 votes
5 answers
3k views

I have a brand new i7-1185G7 laptop whose CPU is being heavily throttled on Linux 5.8.0, even though it's thermals are in bounds (albeit a bit high). $ sensors ucsi_source_psy_USBC000:001-isa-0000 ...
thwd's user avatar
  • 203
2 votes
3 answers
6k views

I just unmounted cgroup version 1, leaving just a single cgroup2 mount on my system. $ mount | grep -i cgroup tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,size=4096k,nr_inodes=1024,mode=...
Evan Carroll's user avatar
  • 35.2k
0 votes
1 answer
853 views

Having trouble binding a SPI driver on the BeagleBone Black. The driver in question, ltc2947-spi, is in the linux mainline, but not in the beaglebone kernel tree. When I get this working, I'll submit ...
bluesquall's user avatar