raspberrypi / linux

Kernel source tree for Raspberry Pi-provided kernel builds. Issues unrelated to the linux kernel should be posted on the community forum at https://forums.raspberrypi.com/
Other
11.03k stars 4.95k forks source link

writing to /sys/class/gpio/export results in write error: Invalid argument #6084

Closed berndporr closed 5 months ago

berndporr commented 5 months ago

Describe the bug

With the current kernel Linux raspberrypi 6.6.20+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.20-1+rpt1 (2024-03-07) aarch64 GNU/Linux it's no longer possible to access gpio pins via sysfs. It works perfectly fine with libgpiod. Not sure if that's a feature or a bug?

Steps to reproduce the behaviour

How to reproduce:

echo 27 >/sys/class/gpio/export

this then gives an error message:

-bash: echo: write error: Invalid argument

This also affects event driven programming. For example: https://github.com/berndporr/gpio-sysfs if you compile it and then run gpio-int-test 27 for example that complains it cannot get a file descriptor for the poll command.

$ sudo ./gpio-int-test 27
gpio/direction: No such file or directory
gpio/set-edge: No such file or directory
gpio/fd_open: No such file or directory
1: timeout
2: timeout
3: ^C

Device (s)

Raspberry Pi 3 Mod. B+, Raspberry Pi 5

System

System Information

Raspberry Pi 3 Model B Rev 1.2 PRETTY_NAME="Debian GNU/Linux 12 (bookworm)" NAME="Debian GNU/Linux" VERSION_ID="12" VERSION="12 (bookworm)"

Raspberry Pi reference 2024-03-15 Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, f19ee211ddafcae300827f953d143de92a5c6624, stage2

Linux raspberrypi 6.6.20+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.20-1+rpt1 (2024-03-07) aarch64 GNU/Linux Revision : a02082 Serial : 00000000e26ad282 Model : Raspberry Pi 3 Model B Rev 1.2 Throttled flag : throttled=0x0 Camera : supported=0 detected=0, libcamera interfaces=0

Videocore information

Feb 29 2024 12:26:47 Copyright (c) 2012 Broadcom version f4e2138c2adc8f3a92a3a65939e458f11d7298ba (clean) (release) (start)

alloc failures: 0 compactions: 0 legacy block fails: 0

Filesystem information

Filesystem 1K-blocks Used Available Use% Mounted on udev 325632 0 325632 0% /dev tmpfs 92912 1008 91904 2% /run /dev/mmcblk0p2 14727944 2953116 11006964 22% / tmpfs 464552 0 464552 0% /dev/shm tmpfs 5120 12 5108 1% /run/lock /dev/mmcblk0p1 522230 63586 458644 13% /boot/firmware tmpfs 92908 4 92904 1% /run/user/1000

Filename Type Size Used Priority /var/swap file 102396 0 -2

Package version information

raspberrypi-ui-mods: Installed: (none) raspberrypi-sys-mods: Installed: 20240129 openbox: Installed: (none) lxpanel: Installed: (none) pcmanfm: Installed: (none) rpd-plym-splash: Installed: (none)

Networking Information

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet x.x.x.x netmask x.x.x.x broadcast x.x.x.x inet6 y::y.y.y.y prefixlen 64 scopeid 0x20 ether m.m.m.m txqueuelen 1000 (Ethernet) RX packets 3758 bytes 803323 (784.4 KiB) RX errors 0 dropped 490 overruns 0 frame 0 TX packets 2829 bytes 1187171 (1.1 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet x.x.x.x netmask x.x.x.x inet6 ::1 prefixlen 128 scopeid 0x10 loop txqueuelen 1000 (Local Loopback) RX packets 2567 bytes 1153124 (1.0 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 2567 bytes 1153124 (1.0 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

wlan0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 ether m.m.m.m txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

USB Information

/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=dwc_otg/1p, 480M | Port 1: Dev 2, If 0, Class=Hub, Driver=hub/5p, 480M | Port 1: Dev 3, If 0, Class=Vendor Specific Class, Driver=smsc95xx, 480M

Display Information

Running (F)KMS, console

/sys/class/drm/card0-HDMI-A-1

/sys/class/drm/card0-Writeback-1

Connector 0 (32) HDMI-A-1 (disconnected) Encoder 0 (31) TMDS

/sys/kernel/debug/dri/0/state: plane[40]: plane-0 crtc=(null) fb=0 crtc-pos=0x0+0+0 src-pos=0.000000x0.000000+0.000000+0.000000 rotation=1 normalized-zpos=0 color-encoding=ITU-R BT.709 YCbCr color-range=YCbCr limited range plane[57]: plane-1 crtc=(null) fb=0 crtc-pos=0x0+0+0 src-pos=0.000000x0.000000+0.000000+0.000000 rotation=1 normalized-zpos=0 color-encoding=ITU-R BT.709 YCbCr color-range=YCbCr limited range plane[68]: plane-2 crtc=(null) fb=0 crtc-pos=0x0+0+0 src-pos=0.000000x0.000000+0.000000+0.000000 rotation=1 normalized-zpos=0 color-encoding=ITU-R BT.709 YCbCr color-range=YCbCr limited range plane[79]: plane-3 crtc=(null) fb=0 crtc-pos=0x0+0+0 src-pos=0.000000x0.000000+0.000000+0.000000 rotation=1 normalized-zpos=0 color-encoding=ITU-R BT.709 YCbCr color-range=YCbCr limited range plane[90]: plane-4 crtc=(null) fb=0 crtc-pos=0x0+0+0 src-pos=0.000000x0.000000+0.000000+0.000000 rotation=1 normalized-zpos=1 color-encoding=ITU-R BT.709 YCbCr color-range=YCbCr limited range plane[100]: plane-5 crtc=(null) fb=0 crtc-pos=0x0+0+0 src-pos=0.000000x0.000000+0.000000+0.000000 rotation=1 normalized-zpos=2 color-encoding=ITU-R BT.709 YCbCr color-range=YCbCr limited range plane[110]: plane-6 crtc=(null) fb=0 crtc-pos=0x0+0+0 src-pos=0.000000x0.000000+0.000000+0.000000 rotation=1 normalized-zpos=3 color-encoding=ITU-R BT.709 YCbCr color-range=YCbCr limited range plane[120]: plane-7 crtc=(null) fb=0 crtc-pos=0x0+0+0 src-pos=0.000000x0.000000+0.000000+0.000000 rotation=1 normalized-zpos=4 color-encoding=ITU-R BT.709 YCbCr color-range=YCbCr limited range plane[130]: plane-8 crtc=(null) fb=0 crtc-pos=0x0+0+0 src-pos=0.000000x0.000000+0.000000+0.000000 rotation=1 normalized-zpos=5 color-encoding=ITU-R BT.709 YCbCr color-range=YCbCr limited range plane[140]: plane-9 crtc=(null) fb=0 crtc-pos=0x0+0+0 src-pos=0.000000x0.000000+0.000000+0.000000 rotation=1 normalized-zpos=6 color-encoding=ITU-R BT.709 YCbCr color-range=YCbCr limited range plane[150]: plane-10 crtc=(null) fb=0 crtc-pos=0x0+0+0 src-pos=0.000000x0.000000+0.000000+0.000000 rotation=1 normalized-zpos=7 color-encoding=ITU-R BT.709 YCbCr color-range=YCbCr limited range plane[160]: plane-11 crtc=(null) fb=0 crtc-pos=0x0+0+0 src-pos=0.000000x0.000000+0.000000+0.000000 rotation=1 normalized-zpos=8 color-encoding=ITU-R BT.709 YCbCr color-range=YCbCr limited range plane[170]: plane-12 crtc=(null) fb=0 crtc-pos=0x0+0+0 src-pos=0.000000x0.000000+0.000000+0.000000 rotation=1 normalized-zpos=9 color-encoding=ITU-R BT.709 YCbCr color-range=YCbCr limited range plane[180]: plane-13 crtc=(null) fb=0 crtc-pos=0x0+0+0 src-pos=0.000000x0.000000+0.000000+0.000000 rotation=1 normalized-zpos=a color-encoding=ITU-R BT.709 YCbCr color-range=YCbCr limited range plane[190]: plane-14 crtc=(null) fb=0 crtc-pos=0x0+0+0 src-pos=0.000000x0.000000+0.000000+0.000000 rotation=1 normalized-zpos=b color-encoding=ITU-R BT.709 YCbCr color-range=YCbCr limited range plane[200]: plane-15 crtc=(null) fb=0 crtc-pos=0x0+0+0 src-pos=0.000000x0.000000+0.000000+0.000000 rotation=1 normalized-zpos=c color-encoding=ITU-R BT.709 YCbCr color-range=YCbCr limited range plane[210]: plane-16 crtc=(null) fb=0 crtc-pos=0x0+0+0 src-pos=0.000000x0.000000+0.000000+0.000000 rotation=1 normalized-zpos=d color-encoding=ITU-R BT.709 YCbCr color-range=YCbCr limited range plane[220]: plane-17 crtc=(null) fb=0 crtc-pos=0x0+0+0 src-pos=0.000000x0.000000+0.000000+0.000000 rotation=1 normalized-zpos=e color-encoding=ITU-R BT.709 YCbCr color-range=YCbCr limited range plane[230]: plane-18 crtc=(null) fb=0 crtc-pos=0x0+0+0 src-pos=0.000000x0.000000+0.000000+0.000000 rotation=1 normalized-zpos=f color-encoding=ITU-R BT.709 YCbCr color-range=YCbCr limited range plane[240]: plane-19 crtc=(null) fb=0 crtc-pos=0x0+0+0 src-pos=0.000000x0.000000+0.000000+0.000000 rotation=1 normalized-zpos=10 color-encoding=ITU-R BT.709 YCbCr color-range=YCbCr limited range plane[250]: plane-20 crtc=(null) fb=0 crtc-pos=0x0+0+0 src-pos=0.000000x0.000000+0.000000+0.000000 rotation=1 normalized-zpos=11 color-encoding=ITU-R BT.709 YCbCr color-range=YCbCr limited range plane[260]: plane-21 crtc=(null) fb=0 crtc-pos=0x0+0+0 src-pos=0.000000x0.000000+0.000000+0.000000 rotation=1 normalized-zpos=11 color-encoding=ITU-R BT.709 YCbCr color-range=YCbCr limited range plane[270]: plane-22 crtc=(null) fb=0 crtc-pos=0x0+0+0 src-pos=0.000000x0.000000+0.000000+0.000000 rotation=1 normalized-zpos=11 color-encoding=ITU-R BT.709 YCbCr color-range=YCbCr limited range plane[280]: plane-23 crtc=(null) fb=0 crtc-pos=0x0+0+0 src-pos=0.000000x0.000000+0.000000+0.000000 rotation=1 normalized-zpos=11 color-encoding=ITU-R BT.709 YCbCr color-range=YCbCr limited range crtc[50]: txp enable=0 active=0 self_refresh_active=0 planes_changed=0 mode_changed=0 active_changed=0 connectors_changed=0 color_mgmt_changed=0 plane_mask=0 connector_mask=0 encoder_mask=0 mode: "": 0 0 0 0 0 0 0 0 0 0 0x0 0x0 crtc[67]: pixelvalve-0 enable=0 active=0 self_refresh_active=0 planes_changed=0 mode_changed=0 active_changed=0 connectors_changed=0 color_mgmt_changed=0 plane_mask=0 connector_mask=0 encoder_mask=0 mode: "": 0 0 0 0 0 0 0 0 0 0 0x0 0x0 crtc[78]: pixelvalve-1 enable=0 active=0 self_refresh_active=0 planes_changed=0 mode_changed=0 active_changed=0 connectors_changed=0 color_mgmt_changed=0 plane_mask=0 connector_mask=0 encoder_mask=0 mode: "": 0 0 0 0 0 0 0 0 0 0 0x0 0x0 crtc[89]: pixelvalve-2 enable=0 active=0 self_refresh_active=0 planes_changed=0 mode_changed=0 active_changed=0 connectors_changed=0 color_mgmt_changed=0 plane_mask=0 connector_mask=0 encoder_mask=0 mode: "": 0 0 0 0 0 0 0 0 0 0 0x0 0x0 connector[32]: HDMI-A-1 crtc=(null) self_refresh_aware=0 max_requested_bpc=8 colorspace=Default connector[56]: Writeback-1 crtc=(null) self_refresh_aware=0 max_requested_bpc=0 colorspace=Default

Audio Information

List of PLAYBACK Hardware Devices card 0: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones] Subdevices: 8/8 Subdevice #0: subdevice #0 Subdevice #1: subdevice #1 Subdevice #2: subdevice #2 Subdevice #3: subdevice #3 Subdevice #4: subdevice #4 Subdevice #5: subdevice #5 Subdevice #6: subdevice #6 Subdevice #7: subdevice #7 card 1: vc4hdmi [vc4-hdmi], device 0: MAI PCM i2s-hifi-0 [MAI PCM i2s-hifi-0] Subdevices: 1/1 Subdevice #0: subdevice #0

null Discard all samples (playback) or generate zero samples (capture) hw:CARD=Headphones,DEV=0 bcm2835 Headphones, bcm2835 Headphones Direct hardware device without any conversions plughw:CARD=Headphones,DEV=0 bcm2835 Headphones, bcm2835 Headphones Hardware device with all software conversions default:CARD=Headphones bcm2835 Headphones, bcm2835 Headphones Default Audio Device sysdefault:CARD=Headphones bcm2835 Headphones, bcm2835 Headphones Default Audio Device dmix:CARD=Headphones,DEV=0 bcm2835 Headphones, bcm2835 Headphones Direct sample mixing device hw:CARD=vc4hdmi,DEV=0 vc4-hdmi, MAI PCM i2s-hifi-0 Direct hardware device without any conversions plughw:CARD=vc4hdmi,DEV=0 vc4-hdmi, MAI PCM i2s-hifi-0 Hardware device with all software conversions default:CARD=vc4hdmi vc4-hdmi, MAI PCM i2s-hifi-0 Default Audio Device sysdefault:CARD=vc4hdmi vc4-hdmi, MAI PCM i2s-hifi-0 Default Audio Device hdmi:CARD=vc4hdmi,DEV=0 vc4-hdmi, MAI PCM i2s-hifi-0 HDMI Audio Output dmix:CARD=vc4hdmi,DEV=0 vc4-hdmi, MAI PCM i2s-hifi-0 Direct sample mixing device

Unit pipewire.socket could not be found. Unit pipewire.service could not be found. Unit pulseaudio.service could not be found. Unit pulseaudio.socket could not be found.

pactl not installed

config.txt

aphy_params_current=819 arm_64bit=1 arm_boost=1 arm_freq=1200 arm_freq_min=600 audio_pwm_mode=514 auto_initramfs=1 camera_auto_detect=1 config_hdmi_boost=5 core_freq=400 desired_osc_freq=0x387520 disable_commandline_tags=2 disable_fw_kms_setup=1 disable_l2cache=1 display_auto_detect=1 display_hdmi_rotate=-1 display_lcd_rotate=-1 dphy_params_current=547 dvfs=3 enable_tvout=1 force_eeprom_read=1 force_pwm_open=1 framebuffer_ignore_alpha=1 framebuffer_swap=1 gpu_freq=300 hdmi_enable_4kp60=-1 init_uart_clock=0x2dc6c00 lcd_framerate=60 mask_gpu_interrupt0=3072 mask_gpu_interrupt1=26370 max_framebuffers=2 over_voltage_avs=0x155cc pause_burst_frames=1 pciex4_reset=1 pmic_turbo_threshold=600 program_serial_random=1 sdram_freq=450 total_mem=1024 hdmi_force_cec_address:0=65535 hdmi_force_cec_address:1=65535 hdmi_pixel_freq_limit:0=0x9a7ec80 device_tree=- overlay_prefix=overlays/ hdmi_cvt:0= hdmi_cvt:1= hdmi_edid_filename:0= hdmi_edid_filename:1= hdmi_timings:0= hdmi_timings:1=

cmdline.txt

coherent_pool=1M 8250.nr_uarts=0 snd_bcm2835.enable_headphones=0 snd_bcm2835.enable_headphones=1 snd_bcm2835.enable_hdmi=1 snd_bcm2835.enable_hdmi=0 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 console=ttyS0,115200 video=HDMI-A-1:1280x720M@60 console=tty1 root=PARTUUID=20ec1e55-02 rootfstype=ext4 fsck.repair=yes rootwait

pin configuration

0: ip -- | hi // ID_SDA/GPIO0 = input 1: ip -- | hi // ID_SCL/GPIO1 = input 2: a0 -- | hi // GPIO2 = SDA1 3: a0 -- | hi // GPIO3 = SCL1 4: ip -- | hi // GPIO4 = input 5: ip -- | hi // GPIO5 = input 6: ip -- | hi // GPIO6 = input 7: ip -- | hi // GPIO7 = input 8: ip -- | hi // GPIO8 = input 9: ip -- | lo // GPIO9 = input 10: ip -- | lo // GPIO10 = input 11: ip -- | lo // GPIO11 = input 12: ip -- | lo // GPIO12 = input 13: ip -- | lo // GPIO13 = input 14: ip -- | lo // GPIO14 = input 15: ip -- | hi // GPIO15 = input 16: ip -- | lo // GPIO16 = input 17: ip -- | lo // GPIO17 = input 18: ip -- | lo // GPIO18 = input 19: ip -- | lo // GPIO19 = input 20: ip -- | lo // GPIO20 = input 21: ip -- | lo // GPIO21 = input 22: ip -- | lo // GPIO22 = input 23: ip -- | lo // GPIO23 = input 24: ip -- | lo // GPIO24 = input 25: ip -- | lo // GPIO25 = input 26: ip -- | lo // GPIO26 = input 27: ip -- | hi // GPIO27 = input 28: ip -- | lo // NC/GPIO28 = input 29: ip -- | hi // LAN_RUN_BOOT/GPIO29 = input 30: ip -- | lo // CTS0/GPIO30 = input 31: ip -- | lo // RTS0/GPIO31 = input 32: a3 -- | hi // TXD0/GPIO32 = TXD0 33: a3 -- | hi // RXD0/GPIO33 = RXD0 34: a3 -- | lo // SD1_CLK/GPIO34 = SD1_CLK 35: a3 -- | hi // SD1_CMD/GPIO35 = SD1_CMD 36: a3 -- | hi // SD1_DATA0/GPIO36 = SD1_DAT0 37: a3 -- | hi // SD1_DATA1/GPIO37 = SD1_DAT1 38: a3 -- | hi // SD1_DATA2/GPIO38 = SD1_DAT2 39: a3 -- | hi // SD1_DATA3/GPIO39 = SD1_DAT3 40: a0 -- | lo // PWM0_OUT/GPIO40 = PWM0 41: a0 -- | lo // PWM1_OUT/GPIO41 = PWM1 42: a0 -- | lo // ETH_CLK/GPIO42 = GPCLK1 43: a0 -- | hi // WIFI_CLK/GPIO43 = GPCLK2 44: ip -- | hi // SDA0/GPIO44 = input 45: ip -- | hi // SCL0/GPIO45 = input 46: ip -- | hi // SMPS_SCL/GPIO46 = input 47: op -- -- | hi // SMPS_SDA/GPIO47 = output 48: a0 -- | lo // SD_CLK_R/GPIO48 = SD0_CLK 49: a0 -- | hi // SD_CMD_R/GPIO49 = SD0_CMD 50: a0 -- | hi // SD_DATA0_R/GPIO50 = SD0_DAT0 51: a0 -- | hi // SD_DATA1_R/GPIO51 = SD0_DAT1 52: a0 -- | hi // SD_DATA2_R/GPIO52 = SD0_DAT2 53: a0 -- | hi // SD_DATA3_R/GPIO53 = SD0_DAT3

vcdbg log messages

001243.527: brfs: File read: /mfs/sd/config.txt 001244.399: brfs: File read: 1214 bytes 001277.399: HDMI0:EDID error reading EDID block 0 attempt 0 001278.665: HDMI0:EDID error reading EDID block 0 attempt 1 001279.931: HDMI0:EDID error reading EDID block 0 attempt 2 001281.195: HDMI0:EDID error reading EDID block 0 attempt 3 001282.461: HDMI0:EDID error reading EDID block 0 attempt 4 001283.726: HDMI0:EDID error reading EDID block 0 attempt 5 001284.992: HDMI0:EDID error reading EDID block 0 attempt 6 001286.256: HDMI0:EDID error reading EDID block 0 attempt 7 001287.522: HDMI0:EDID error reading EDID block 0 attempt 8 001288.787: HDMI0:EDID error reading EDID block 0 attempt 9 001289.811: HDMI0:EDID giving up on reading EDID block 0 001294.976: brfs: File read: /mfs/sd/config.txt 001295.908: gpioman: gpioman_get_pin_num: pin LEDS_PWR_OK not defined 001801.325: gpioman: gpioman_get_pin_num: pin DISPLAY_DSI_PORT not defined 001802.322: gpioman: gpioman_get_pin_num: pin LEDS_PWR_OK not defined 001802.378: *** Restart logging 001802.404: brfs: File read: 1214 bytes 001803.529: hdmi: HDMI0:EDID error reading EDID block 0 attempt 0 001804.798: hdmi: HDMI0:EDID error reading EDID block 0 attempt 1 001806.067: hdmi: HDMI0:EDID error reading EDID block 0 attempt 2 001807.337: hdmi: HDMI0:EDID error reading EDID block 0 attempt 3 001808.605: hdmi: HDMI0:EDID error reading EDID block 0 attempt 4 001809.875: hdmi: HDMI0:EDID error reading EDID block 0 attempt 5 001811.145: hdmi: HDMI0:EDID error reading EDID block 0 attempt 6 001812.414: hdmi: HDMI0:EDID error reading EDID block 0 attempt 7 001813.682: hdmi: HDMI0:EDID error reading EDID block 0 attempt 8 001814.952: hdmi: HDMI0:EDID error reading EDID block 0 attempt 9 001815.979: hdmi: HDMI0:EDID giving up on reading EDID block 0 001816.313: hdmi: HDMI0:EDID error reading EDID block 0 attempt 0 001817.583: hdmi: HDMI0:EDID error reading EDID block 0 attempt 1 001818.852: hdmi: HDMI0:EDID error reading EDID block 0 attempt 2 001820.122: hdmi: HDMI0:EDID error reading EDID block 0 attempt 3 001821.390: hdmi: HDMI0:EDID error reading EDID block 0 attempt 4 001822.660: hdmi: HDMI0:EDID error reading EDID block 0 attempt 5 001823.929: hdmi: HDMI0:EDID error reading EDID block 0 attempt 6 001825.199: hdmi: HDMI0:EDID error reading EDID block 0 attempt 7 001826.467: hdmi: HDMI0:EDID error reading EDID block 0 attempt 8 001827.737: hdmi: HDMI0:EDID error reading EDID block 0 attempt 9 001828.764: hdmi: HDMI0:EDID giving up on reading EDID block 0 001829.065: hdmi: HDMI:hdmi_get_state is deprecated, use hdmi_get_display_state instead 001829.089: HDMI0: hdmi_pixel_encoding: 162000000 001829.355: vec: vec_middleware_power_on: vec_base: 0x7e806000 rev-id 0x00002708 @ vec: 0x7e806100 @ 0x00000420 enc: 0x7e806060 @ 0x00000220 cgmsae: 0x7e80605c @ 0x00000000 002492.014: brfs: File read: /mfs/sd/initramfs8 002492.039: Loaded 'initramfs8' to 0x0 size 0xa94d5a 002504.561: initramfs loaded to 0x2e56b000 (size 0xa94d5a) 002514.310: dtb_file 'bcm2710-rpi-3-b.dtb' 002514.338: brfs: File read: 11095386 bytes 002521.414: brfs: File read: /mfs/sd/bcm2710-rpi-3-b.dtb 002521.439: Loaded 'bcm2710-rpi-3-b.dtb' to 0x100 size 0x8339 002536.346: brfs: File read: 33593 bytes 002551.970: brfs: File read: /mfs/sd/overlays/overlay_map.dtb 002582.737: brfs: File read: 5195 bytes 002588.702: brfs: File read: /mfs/sd/config.txt 002588.818: dtparam: i2c_arm=on 002597.967: dtparam: audio=on 002604.775: brfs: File read: 1214 bytes 002627.512: brfs: File read: /mfs/sd/overlays/vc4-kms-v3d.dtbo 002673.315: Loaded overlay 'vc4-kms-v3d' 002776.164: brfs: File read: 2760 bytes 002780.611: brfs: File read: /mfs/sd/cmdline.txt 002780.669: Read command line from file 'cmdline.txt': 002780.690: 'console=serial0,115200 video=HDMI-A-1:1280x720M@60 console=tty1 root=PARTUUID=20ec1e55-02 rootfstype=ext4 fsck.repair=yes rootwait' 002918.230: gpioman: gpioman_get_pin_num: pin EMMC_ENABLE not defined 002992.557: brfs: File read: 131 bytes 003546.205: brfs: File read: /mfs/sd/kernel8.img 003546.227: Loaded 'kernel8.img' to 0x200000 size 0x8d4b33 005952.889: Device tree loaded to 0x2e562700 (size 0x8872) 005957.570: gpioman: gpioman_get_pin_num: pin SDCARD_CONTROL_POWER not defined 009014.978: vchiq_core: vchiq_init_state: slot_zero = 0xde880000, is_master = 1

dmesg log

[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034] [ 0.000000] Linux version 6.6.20+rpt-rpi-v8 (debian-kernel@lists.debian.org) (gcc-12 (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #1 SMP PREEMPT Debian 1:6.6.20-1+rpt1 (2024-03-07) [ 0.000000] KASLR enabled [ 0.000000] random: crng init done [ 0.000000] Machine model: Raspberry Pi 3 Model B Rev 1.2 [ 0.000000] efi: UEFI not found. [ 0.000000] Reserved memory: created CMA memory pool at 0x000000001e400000, size 256 MiB [ 0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool [ 0.000000] OF: reserved mem: 0x000000001e400000..0x000000002e3fffff (262144 KiB) map reusable linux,cma [ 0.000000] Zone ranges: [ 0.000000] DMA [mem 0x0000000000000000-0x000000003b3fffff] [ 0.000000] DMA32 empty [ 0.000000] Normal empty [ 0.000000] Movable zone start for each node [ 0.000000] Early memory node ranges [ 0.000000] node 0: [mem 0x0000000000000000-0x000000003b3fffff] [ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000003b3fffff] [ 0.000000] On node 0, zone DMA: 19456 pages in unavailable ranges [ 0.000000] percpu: Embedded 30 pages/cpu s85672 r8192 d29016 u122880 [ 0.000000] pcpu-alloc: s85672 r8192 d29016 u122880 alloc=30*4096 [ 0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 [ 0.000000] Detected VIPT I-cache on CPU0 [ 0.000000] CPU features: kernel page table isolation forced ON by KASLR [ 0.000000] CPU features: detected: Kernel page table isolation (KPTI) [ 0.000000] CPU features: detected: ARM erratum 843419 [ 0.000000] CPU features: detected: ARM erratum 845719 [ 0.000000] alternatives: applying boot alternatives [ 0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=0 snd_bcm2835.enable_headphones=0 snd_bcm2835.enable_headphones=1 snd_bcm2835.enable_hdmi=1 snd_bcm2835.enable_hdmi=0 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 console=ttyS0,115200 video=HDMI-A-1:1280x720M@60 console=tty1 root=PARTUUID=20ec1e55-02 rootfstype=ext4 fsck.repair=yes rootwait [ 0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes, linear) [ 0.000000] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes, linear) [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 238896 [ 0.000000] mem auto-init: stack:all(zero), heap alloc:off, heap free:off [ 0.000000] Memory: 651264K/970752K available (13376K kernel code, 2210K rwdata, 4260K rodata, 4864K init, 1083K bss, 57344K reserved, 262144K cma-reserved) [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1 [ 0.000000] ftrace: allocating 43116 entries in 169 pages [ 0.000000] ftrace: allocated 169 pages with 4 groups [ 0.000000] trace event string verifier disabled [ 0.000000] rcu: Preemptible hierarchical RCU implementation. [ 0.000000] rcu: RCU event tracing is enabled. [ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=4. [ 0.000000] Trampoline variant of Tasks RCU enabled. [ 0.000000] Rude variant of Tasks RCU enabled. [ 0.000000] Tracing variant of Tasks RCU enabled. [ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies. [ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4 [ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0 [ 0.000000] Root IRQ handler: bcm2836_arm_irqchip_handle_irq [ 0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention. [ 0.000000] arch_timer: cp15 timer(s) running at 19.20MHz (phys). [ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x46d987e47, max_idle_ns: 440795202767 ns [ 0.000001] sched_clock: 56 bits at 19MHz, resolution 52ns, wraps every 4398046511078ns [ 0.000396] Console: colour dummy device 80x25 [ 0.000414] printk: console [tty1] enabled [ 0.001293] Calibrating delay loop (skipped), value calculated using timer frequency.. 38.40 BogoMIPS (lpj=76800) [ 0.001339] pid_max: default: 32768 minimum: 301 [ 0.001454] LSM: initializing lsm=capability,integrity [ 0.001703] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes, linear) [ 0.001757] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes, linear) [ 0.002764] cgroup: Disabling memory control group subsystem [ 0.004810] RCU Tasks: Setting shift to 2 and lim to 1 rcu_task_cb_adjust=1. [ 0.004959] RCU Tasks Rude: Setting shift to 2 and lim to 1 rcu_task_cb_adjust=1. [ 0.005129] RCU Tasks Trace: Setting shift to 2 and lim to 1 rcu_task_cb_adjust=1. [ 0.005473] rcu: Hierarchical SRCU implementation. [ 0.005499] rcu: Max phase no-delay instances is 1000. [ 0.007601] EFI services will not be available. [ 0.008085] smp: Bringing up secondary CPUs ... [ 0.008876] Detected VIPT I-cache on CPU1 [ 0.009033] CPU1: Booted secondary processor 0x0000000001 [0x410fd034] [ 0.009901] Detected VIPT I-cache on CPU2 [ 0.010006] CPU2: Booted secondary processor 0x0000000002 [0x410fd034] [ 0.010808] Detected VIPT I-cache on CPU3 [ 0.010909] CPU3: Booted secondary processor 0x0000000003 [0x410fd034] [ 0.011019] smp: Brought up 1 node, 4 CPUs [ 0.011149] SMP: Total of 4 processors activated. [ 0.011173] CPU features: detected: 32-bit EL0 Support [ 0.011193] CPU features: detected: 32-bit EL1 Support [ 0.011217] CPU features: detected: CRC32 instructions [ 0.011353] CPU: All CPU(s) started at EL2 [ 0.011388] alternatives: applying system-wide alternatives [ 0.014341] devtmpfs: initialized [ 0.026934] Enabled cp15_barrier support [ 0.026998] Enabled setend support [ 0.027243] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns [ 0.027296] futex hash table entries: 1024 (order: 4, 65536 bytes, linear) [ 0.038938] pinctrl core: initialized pinctrl subsystem [ 0.039733] DMI not present or invalid. [ 0.040419] NET: Registered PF_NETLINK/PF_ROUTE protocol family [ 0.047625] DMA: preallocated 1024 KiB GFP_KERNEL pool for atomic allocations [ 0.048021] DMA: preallocated 1024 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations [ 0.048624] DMA: preallocated 1024 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations [ 0.048753] audit: initializing netlink subsys (disabled) [ 0.049084] audit: type=2000 audit(0.048:1): state=initialized audit_enabled=0 res=1 [ 0.049902] thermal_sys: Registered thermal governor 'step_wise' [ 0.049965] cpuidle: using governor menu [ 0.050305] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers. [ 0.050473] ASID allocator initialised with 32768 entries [ 0.051567] Serial: AMBA PL011 UART driver [ 0.057911] bcm2835-mbox 3f00b880.mailbox: mailbox enabled [ 0.068926] raspberrypi-firmware soc:firmware: Attached to firmware from 2024-02-29T12:26:47, variant start [ 0.072944] raspberrypi-firmware soc:firmware: Firmware hash is f4e2138c2adc8f3a92a3a65939e458f11d7298ba [ 0.080963] Modules: 2G module region forced by RANDOMIZE_MODULE_REGION_FULL [ 0.081000] Modules: 0 pages in range for non-PLT usage [ 0.081007] Modules: 517792 pages in range for PLT usage [ 0.085189] bcm2835-dma 3f007000.dma-controller: DMA legacy API manager, dmachans=0x1 [ 0.086788] iommu: Default domain type: Translated [ 0.086817] iommu: DMA domain TLB invalidation policy: strict mode [ 0.088701] SCSI subsystem initialized [ 0.088989] usbcore: registered new interface driver usbfs [ 0.089062] usbcore: registered new interface driver hub [ 0.089143] usbcore: registered new device driver usb [ 0.089629] pps_core: LinuxPPS API ver. 1 registered [ 0.089656] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti giometti@linux.it [ 0.089711] PTP clock support registered [ 0.091296] vgaarb: loaded [ 0.091951] clocksource: Switched to clocksource arch_sys_counter [ 1.713920] VFS: Disk quotas dquot_6.6.0 [ 1.714018] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes) [ 1.714180] FS-Cache: Loaded [ 1.714485] CacheFiles: Loaded [ 1.725615] NET: Registered PF_INET protocol family [ 1.725942] IP idents hash table entries: 16384 (order: 5, 131072 bytes, linear) [ 1.728154] tcp_listen_portaddr_hash hash table entries: 512 (order: 1, 8192 bytes, linear) [ 1.728218] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear) [ 1.728260] TCP established hash table entries: 8192 (order: 4, 65536 bytes, linear) [ 1.728397] TCP bind hash table entries: 8192 (order: 6, 262144 bytes, linear) [ 1.728782] TCP: Hash tables configured (established 8192 bind 8192) [ 1.729167] MPTCP token hash table entries: 1024 (order: 2, 24576 bytes, linear) [ 1.729277] UDP hash table entries: 512 (order: 2, 16384 bytes, linear) [ 1.729348] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear) [ 1.729583] NET: Registered PF_UNIX/PF_LOCAL protocol family [ 1.730345] RPC: Registered named UNIX socket transport module. [ 1.730379] RPC: Registered udp transport module. [ 1.730400] RPC: Registered tcp transport module. [ 1.730421] RPC: Registered tcp-with-tls transport module. [ 1.730443] RPC: Registered tcp NFSv4.1 backchannel transport module. [ 1.730491] PCI: CLS 0 bytes, default 64 [ 1.731058] Trying to unpack rootfs image as initramfs... [ 1.736184] kvm [1]: IPA Size Limit: 40 bits [ 1.738012] kvm [1]: Hyp mode initialized successfully [ 1.742175] Initialise system trusted keyrings [ 1.742620] workingset: timestamp_bits=46 max_order=18 bucket_order=0 [ 1.742730] zbud: loaded [ 1.743777] NFS: Registering the id_resolver key type [ 1.743891] Key type id_resolver registered [ 1.743915] Key type id_legacy registered [ 1.744030] nfs4filelayout_init: NFSv4 File Layout Driver Registering... [ 1.744062] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering... [ 1.744995] Key type asymmetric registered [ 1.745031] Asymmetric key parser 'x509' registered [ 1.745135] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247) [ 1.745463] io scheduler mq-deadline registered [ 1.745492] io scheduler kyber registered [ 1.745548] io scheduler bfq registered [ 1.754407] simple-framebuffer 3eaf0000.framebuffer: framebuffer at 0x3eaf0000, 0x10a800 bytes [ 1.754482] simple-framebuffer 3eaf0000.framebuffer: format=a8r8g8b8, mode=656x416x32, linelength=2624 [ 1.757670] Console: switching to colour frame buffer device 82x26 [ 1.760420] simple-framebuffer 3eaf0000.framebuffer: fb0: simplefb registered! [ 1.768386] bcm2835-rng 3f104000.rng: hwrng registered [ 1.770482] vc-mem: phys_addr:0x00000000 mem_base=0x3ec00000 mem_size:0x40000000(1024 MiB) [ 1.791618] brd: module loaded [ 1.803765] loop: module loaded [ 1.806258] Loading iSCSI transport class v2.0-870. [ 1.813829] usbcore: registered new device driver r8152-cfgselector [ 1.815541] usbcore: registered new interface driver r8152 [ 1.817217] usbcore: registered new interface driver lan78xx [ 1.818810] usbcore: registered new interface driver smsc95xx [ 1.820686] dwc_otg: version 3.00a 10-AUG-2012 (platform bus) [ 2.550537] Core Release: 2.80a [ 2.551984] Setting default values for core params [ 2.553398] Finished setting default values for core params [ 2.596580] Freeing initrd memory: 10832K [ 2.755170] Using Buffer DMA mode [ 2.756517] Periodic Transfer Interrupt Enhancement - disabled [ 2.757850] Multiprocessor Interrupt Enhancement - disabled [ 2.759158] OTG VER PARAM: 0, OTG VER FLAG: 0 [ 2.760458] Dedicated Tx FIFOs mode

[ 2.763136] WARN::dwc_otg_hcd_init:1072: FIQ DMA bounce buffers: virt = ffffffc080b92000 dma = 0x00000000de800000 len=9024 [ 2.766739] FIQ FSM acceleration enabled for : Non-periodic Split Transactions Periodic Split Transactions High-Speed Isochronous Endpoints Interrupt/Control Split Transaction hack enabled [ 2.772637] dwc_otg: Microframe scheduler enabled

[ 2.772686] WARN::hcd_init_fiq:496: MPHI regs_base at ffffffc08006d000 [ 2.775227] dwc_otg 3f980000.usb: DWC OTG Controller [ 2.776575] dwc_otg 3f980000.usb: new USB bus registered, assigned bus number 1 [ 2.777935] dwc_otg 3f980000.usb: irq 74, io mem 0x00000000 [ 2.779287] Init: Port Power? op_state=1 [ 2.780586] Init: Power Port (0) [ 2.782107] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 6.06 [ 2.784779] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 2.786191] usb usb1: Product: DWC OTG Controller [ 2.787570] usb usb1: Manufacturer: Linux 6.6.20+rpt-rpi-v8 dwc_otg_hcd [ 2.788997] usb usb1: SerialNumber: 3f980000.usb [ 2.791202] hub 1-0:1.0: USB hub found [ 2.792665] hub 1-0:1.0: 1 port detected [ 2.794703] dwc_otg: FIQ enabled [ 2.794713] dwc_otg: NAK holdoff enabled [ 2.794720] dwc_otg: FIQ split-transaction FSM enabled [ 2.794736] Module dwc_common_port init [ 2.795598] usbcore: registered new interface driver uas [ 2.797055] usbcore: registered new interface driver usb-storage [ 2.798897] mousedev: PS/2 mouse device common for all mice [ 2.803213] sdhci: Secure Digital Host Controller Interface driver [ 2.804646] sdhci: Copyright(c) Pierre Ossman [ 2.806228] sdhci-pltfm: SDHCI platform and OF driver helper [ 2.809909] ledtrig-cpu: registered to indicate activity on CPUs [ 2.811699] hid: raw HID events driver (C) Jiri Kosina [ 2.813252] usbcore: registered new interface driver usbhid [ 2.814622] usbhid: USB HID core driver [ 2.821584] hw perfevents: enabled with armv8_cortex_a53 PMU driver, 7 counters available [ 2.825024] NET: Registered PF_PACKET protocol family [ 2.826600] Key type dns_resolver registered [ 2.862763] registered taskstats version 1 [ 2.864431] Loading compiled-in X.509 certificates [ 2.879503] Key type .fscrypt registered [ 2.880868] Key type fscrypt-provisioning registered [ 2.891600] uart-pl011 3f201000.serial: cts_event_workaround enabled [ 2.893499] 3f201000.serial: ttyAMA1 at MMIO 0x3f201000 (irq = 99, base_baud = 0) is a PL011 rev2 [ 2.896573] serial serial0: tty port ttyAMA1 registered [ 2.900796] bcm2835-wdt bcm2835-wdt: Broadcom BCM2835 watchdog timer [ 2.902642] bcm2835-power bcm2835-power: Broadcom BCM2835 power domains driver [ 2.904315] Indeed it is in host mode hprt0 = 00021501 [ 2.909547] mmc-bcm2835 3f300000.mmcnr: mmc_debug:0 mmc_debug2:0 [ 2.911076] mmc-bcm2835 3f300000.mmcnr: DMA channel allocated [ 2.938636] sdhost: log_buf @ 000000003877291a (c2970000) [ 2.990825] mmc0: sdhost-bcm2835 loaded - DMA enabled (>1) [ 2.994496] of_cfs_init [ 2.996160] of_cfs_init: OK [ 2.997896] clk: Disabling unused clocks [ 3.012190] Freeing unused kernel memory: 4864K [ 3.020128] Run /init as init process [ 3.021448] with arguments: [ 3.021455] /init [ 3.021461] with environment: [ 3.021466] HOME=/ [ 3.021472] TERM=linux [ 3.055493] mmc0: host does not support reading read-only switch, assuming write-enable [ 3.062903] mmc0: Host Software Queue enabled [ 3.064461] mmc0: new high speed SDHC card at address aaaa [ 3.067489] mmcblk0: mmc0:aaaa SL16G 14.8 GiB [ 3.075696] mmc1: new high speed SDIO card at address 0001 [ 3.080234] mmcblk0: p1 p2 [ 3.082519] mmcblk0: mmc0:aaaa SL16G 14.8 GiB (quirks 0x00004000) [ 3.092071] usb 1-1: new high-speed USB device number 2 using dwc_otg [ 3.093766] Indeed it is in host mode hprt0 = 00001101 [ 3.304658] usb 1-1: New USB device found, idVendor=0424, idProduct=9514, bcdDevice= 2.00 [ 3.307487] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0 [ 3.310120] hub 1-1:1.0: USB hub found [ 3.312255] hub 1-1:1.0: 5 ports detected [ 3.600058] usb 1-1.1: new high-speed USB device number 3 using dwc_otg [ 3.700844] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00, bcdDevice= 2.00 [ 3.704392] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0 [ 3.709574] smsc95xx v2.0.0 [ 3.869702] SMSC LAN8700 usb-001:003:01: attached PHY driver (mii_bus:phy_addr=usb-001:003:01, irq=184) [ 3.876334] smsc95xx 1-1.1:1.0 eth0: register 'smsc95xx' at usb-3f980000.usb-1.1, smsc95xx USB 2.0 Ethernet, m.m.m.m [ 4.436906] EXT4-fs (mmcblk0p2): mounted filesystem 93c89e92-8f2e-4522-ad32-68faed883d2f ro with ordered data mode. Quota mode: none. [ 5.290362] systemd[1]: System time before build time, advancing clock. [ 5.539400] NET: Registered PF_INET6 protocol family [ 5.542825] Segment Routing with IPv6 [ 5.544516] In-situ OAM (IOAM) with IPv6 [ 5.647147] systemd[1]: systemd 252.22-1~deb12u1 running in system mode (+PAM +AUDIT +SELINUX +APPARMOR +IMA +SMACK +SECCOMP +GCRYPT -GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP +LIBFDISK +PCRE2 -PWQUALITY +P11KIT +QRENCODE +TPM2 +BZIP2 +LZ4 +XZ +ZLIB +ZSTD -BPF_FRAMEWORK -XKBCOMMON +UTMP +SYSVINIT default-hierarchy=unified) [ 5.655273] systemd[1]: Detected architecture arm64. [ 5.671555] systemd[1]: Hostname set to . [ 6.753980] systemd[1]: Queued start job for default target multi-user.target. [ 6.780352] systemd[1]: Created slice system-getty.slice - Slice /system/getty. [ 6.786411] systemd[1]: Created slice system-modprobe.slice - Slice /system/modprobe. [ 6.793963] systemd[1]: Created slice system-systemd\x2dfsck.slice - Slice /system/systemd-fsck. [ 6.800749] systemd[1]: Created slice user.slice - User and Session Slice. [ 6.805237] systemd[1]: Started systemd-ask-password-console.path - Dispatch Password Requests to Console Directory Watch. [ 6.811264] systemd[1]: Started systemd-ask-password-wall.path - Forward Password Requests to Wall Directory Watch. [ 6.818152] systemd[1]: Set up automount proc-sys-fs-binfmt_misc.automount - Arbitrary Executable File Formats File System Automount Point. [ 6.824537] systemd[1]: Expecting device dev-disk-by\x2dpartuuid-20ec1e55\x2d01.device - /dev/disk/by-partuuid/20ec1e55-01... [ 6.830796] systemd[1]: Reached target cryptsetup.target - Local Encrypted Volumes. [ 6.837064] systemd[1]: Reached target integritysetup.target - Local Integrity Protected Volumes. [ 6.843400] systemd[1]: Reached target paths.target - Path Units. [ 6.847755] systemd[1]: Reached target slices.target - Slice Units. [ 6.852105] systemd[1]: Reached target swap.target - Swaps. [ 6.856361] systemd[1]: Reached target veritysetup.target - Local Verity Protected Volumes. [ 6.863160] systemd[1]: Listening on systemd-fsckd.socket - fsck to fsckd communication Socket. [ 6.869681] systemd[1]: Listening on systemd-initctl.socket - initctl Compatibility Named Pipe. [ 6.877379] systemd[1]: Listening on systemd-journald-audit.socket - Journal Audit Socket. [ 6.884443] systemd[1]: Listening on systemd-journald-dev-log.socket - Journal Socket (/dev/log). [ 6.891549] systemd[1]: Listening on systemd-journald.socket - Journal Socket. [ 6.900673] systemd[1]: Listening on systemd-udevd-control.socket - udev Control Socket. [ 6.907704] systemd[1]: Listening on systemd-udevd-kernel.socket - udev Kernel Socket. [ 6.914953] systemd[1]: dev-hugepages.mount - Huge Pages File System was skipped because of an unmet condition check (ConditionPathExists=/sys/kernel/mm/hugepages). [ 6.940430] systemd[1]: Mounting dev-mqueue.mount - POSIX Message Queue File System... [ 6.952860] systemd[1]: Mounting sys-kernel-debug.mount - Kernel Debug File System... [ 6.965473] systemd[1]: Mounting sys-kernel-tracing.mount - Kernel Trace File System... [ 6.972746] systemd[1]: auth-rpcgss-module.service - Kernel Module supporting RPCSEC_GSS was skipped because of an unmet condition check (ConditionPathExists=/etc/krb5.keytab). [ 7.004887] systemd[1]: Starting fake-hwclock.service - Restore / save the current clock... [ 7.017833] systemd[1]: Starting keyboard-setup.service - Set the console keyboard layout... [ 7.031868] systemd[1]: Starting kmod-static-nodes.service - Create List of Static Device Nodes... [ 7.046930] systemd[1]: Starting modprobe@configfs.service - Load Kernel Module configfs... [ 7.061522] systemd[1]: Starting modprobe@dm_mod.service - Load Kernel Module dm_mod... [ 7.075615] systemd[1]: Starting modprobe@drm.service - Load Kernel Module drm... [ 7.094156] systemd[1]: Starting modprobe@efi_pstore.service - Load Kernel Module efi_pstore... [ 7.111203] systemd[1]: Starting modprobe@fuse.service - Load Kernel Module fuse... [ 7.128226] systemd[1]: Starting modprobe@loop.service - Load Kernel Module loop... [ 7.135913] systemd[1]: systemd-fsck-root.service - File System Check on Root Device was skipped because of an unmet condition check (ConditionPathExists=!/run/initramfs/fsck-root). [ 7.155695] systemd[1]: Starting systemd-journald.service - Journal Service... [ 7.172799] device-mapper: ioctl: 4.48.0-ioctl (2023-03-01) initialised: dm-devel@redhat.com [ 7.175879] systemd[1]: Starting systemd-modules-load.service - Load Kernel Modules... [ 7.190855] systemd[1]: Starting systemd-remount-fs.service - Remount Root and Kernel File Systems... [ 7.206653] systemd[1]: Starting systemd-udev-trigger.service - Coldplug All udev Devices... [ 7.213208] fuse: init (API version 7.39) [ 7.241971] systemd[1]: Mounted dev-mqueue.mount - POSIX Message Queue File System. [ 7.255819] systemd[1]: Mounted sys-kernel-debug.mount - Kernel Debug File System. [ 7.269679] systemd[1]: Mounted sys-kernel-tracing.mount - Kernel Trace File System. [ 7.279073] systemd[1]: Finished fake-hwclock.service - Restore / save the current clock. [ 7.300171] systemd[1]: Finished kmod-static-nodes.service - Create List of Static Device Nodes. [ 7.312638] systemd[1]: modprobe@configfs.service: Deactivated successfully. [ 7.320437] systemd[1]: Finished modprobe@configfs.service - Load Kernel Module configfs. [ 7.320519] i2c_dev: i2c /dev entries driver [ 7.332441] EXT4-fs (mmcblk0p2): re-mounted 93c89e92-8f2e-4522-ad32-68faed883d2f r/w. Quota mode: none. [ 7.346077] systemd[1]: modprobe@dm_mod.service: Deactivated successfully. [ 7.350577] systemd[1]: Finished modprobe@dm_mod.service - Load Kernel Module dm_mod. [ 7.363408] systemd[1]: modprobe@efi_pstore.service: Deactivated successfully. [ 7.366910] systemd[1]: Finished modprobe@efi_pstore.service - Load Kernel Module efi_pstore. [ 7.375929] systemd[1]: modprobe@drm.service: Deactivated successfully. [ 7.381476] systemd[1]: Finished modprobe@drm.service - Load Kernel Module drm. [ 7.391025] systemd[1]: modprobe@fuse.service: Deactivated successfully. [ 7.394252] systemd[1]: Finished modprobe@fuse.service - Load Kernel Module fuse. [ 7.402673] systemd[1]: modprobe@loop.service: Deactivated successfully. [ 7.406164] systemd[1]: Finished modprobe@loop.service - Load Kernel Module loop. [ 7.418434] systemd[1]: Finished systemd-modules-load.service - Load Kernel Modules. [ 7.426949] systemd[1]: Finished systemd-remount-fs.service - Remount Root and Kernel File Systems. [ 7.472565] systemd[1]: Mounting sys-fs-fuse-connections.mount - FUSE Control File System... [ 7.488705] systemd[1]: Mounting sys-kernel-config.mount - Kernel Configuration File System... [ 7.498706] systemd[1]: systemd-firstboot.service - First Boot Wizard was skipped because of an unmet condition check (ConditionFirstBoot=yes). [ 7.508329] systemd[1]: systemd-pstore.service - Platform Persistent Storage Archival was skipped because of an unmet condition check (ConditionDirectoryNotEmpty=/sys/fs/pstore). [ 7.549994] systemd[1]: Starting systemd-random-seed.service - Load/Save Random Seed... [ 7.557430] systemd[1]: systemd-repart.service - Repartition Root Disk was skipped because no trigger condition checks were met. [ 7.569500] systemd[1]: Starting systemd-sysctl.service - Apply Kernel Variables... [ 7.589718] systemd[1]: Starting systemd-sysusers.service - Create System Users... [ 7.631812] systemd[1]: Started systemd-journald.service - Journal Service. [ 7.783662] systemd-journald[230]: Received client request to flush runtime journal. [ 7.801425] systemd-journald[230]: File /var/log/journal/fdb75ad1605945d5a8f61bf113c740b9/system.journal corrupted or uncleanly shut down, renaming and replacing. [ 9.202390] vc_sm_cma: module is from the staging directory, the quality is unknown, you have been warned. [ 9.204216] bcm2835_vc_sm_cma_probe: Videocore shared memory driver

[ 9.205225] [vc_sm_connected_init]: installed successfully [ 9.252789] rpi-gpiomem 3f200000.gpiomem: window base 0x3f200000 size 0x00001000 [ 9.254806] rpi-gpiomem 3f200000.gpiomem: initialised 1 regions as /dev/gpiomem [ 9.332272] mc: Linux media interface: v0.10 [ 9.512688] videodev: Linux video capture interface: v2.00 [ 9.558456] snd_bcm2835: module is from the staging directory, the quality is unknown, you have been warned. [ 9.578491] bcm2835_mmal_vchiq: module is from the staging directory, the quality is unknown, you have been warned. [ 9.604911] bcm2835_audio bcm2835_audio: card created with 8 channels [ 9.655840] bcm2835_v4l2: module is from the staging directory, the quality is unknown, you have been warned. [ 9.682076] bcm2835_isp: module is from the staging directory, the quality is unknown, you have been warned. [ 9.707690] bcm2835_codec: module is from the staging directory, the quality is unknown, you have been warned. [ 9.757674] bcm2835-isp bcm2835-isp: Device node output[0] registered as /dev/video13 [ 9.761692] bcm2835-isp bcm2835-isp: Device node capture[0] registered as /dev/video14 [ 9.763009] bcm2835-isp bcm2835-isp: Device node capture[1] registered as /dev/video15 [ 9.763518] bcm2835-isp bcm2835-isp: Device node stats[2] registered as /dev/video16 [ 9.763555] bcm2835-isp bcm2835-isp: Register output node 0 with media controller [ 9.763575] bcm2835-isp bcm2835-isp: Register capture node 1 with media controller [ 9.763591] bcm2835-isp bcm2835-isp: Register capture node 2 with media controller [ 9.763607] bcm2835-isp bcm2835-isp: Register capture node 3 with media controller [ 9.799013] bcm2835-codec bcm2835-codec: Device registered as /dev/video10 [ 9.799082] bcm2835-codec bcm2835-codec: Loaded V4L2 decode [ 9.813610] bcm2835-codec bcm2835-codec: Device registered as /dev/video11 [ 9.813670] bcm2835-codec bcm2835-codec: Loaded V4L2 encode [ 9.815859] bcm2835-isp bcm2835-isp: Device node output[0] registered as /dev/video20 [ 9.820094] bcm2835-isp bcm2835-isp: Device node capture[0] registered as /dev/video21 [ 9.824144] bcm2835-isp bcm2835-isp: Device node capture[1] registered as /dev/video22 [ 9.826415] bcm2835-isp bcm2835-isp: Device node stats[2] registered as /dev/video23 [ 9.826478] bcm2835-isp bcm2835-isp: Register output node 0 with media controller [ 9.826511] bcm2835-isp bcm2835-isp: Register capture node 1 with media controller [ 9.826528] bcm2835-isp bcm2835-isp: Register capture node 2 with media controller [ 9.826555] bcm2835-isp bcm2835-isp: Register capture node 3 with media controller [ 9.826940] bcm2835-isp bcm2835-isp: Loaded V4L2 bcm2835-isp [ 9.828191] bcm2835-codec bcm2835-codec: Device registered as /dev/video12 [ 9.828264] bcm2835-codec bcm2835-codec: Loaded V4L2 isp [ 9.866582] bcm2835-codec bcm2835-codec: Device registered as /dev/video18 [ 9.866652] bcm2835-codec bcm2835-codec: Loaded V4L2 image_fx [ 9.872829] cfg80211: Loading compiled-in X.509 certificates for regulatory database [ 9.879894] bcm2835-codec bcm2835-codec: Device registered as /dev/video31 [ 9.880653] bcm2835-codec bcm2835-codec: Loaded V4L2 encode_image [ 9.940742] Loaded X.509 cert 'benh@debian.org: 577e021cb980e0e820821ba7b54b4961b8b4fadf' [ 9.943203] Loaded X.509 cert 'romain.perier@gmail.com: 3abbc6ec146e09d1b6016ab9d6cf71dd233f0328' [ 9.947684] Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' [ 9.951103] Loaded X.509 cert 'wens: 61c038651aabdcf94bd0ac7ff06c7248db18c600' [ 9.977653] Bluetooth: Core ver 2.22 [ 9.978213] NET: Registered PF_BLUETOOTH protocol family [ 9.978332] Bluetooth: HCI device and connection manager initialized [ 9.978365] Bluetooth: HCI socket layer initialized [ 9.978382] Bluetooth: L2CAP socket layer initialized [ 9.978419] Bluetooth: SCO socket layer initialized [ 10.141303] Bluetooth: HCI UART driver ver 2.3 [ 10.141342] Bluetooth: HCI UART protocol H4 registered [ 10.141515] Bluetooth: HCI UART protocol Three-wire (H5) registered [ 10.142317] Bluetooth: HCI UART protocol Broadcom registered [ 10.143094] hci_uart_bcm serial0-0: supply vbat not found, using dummy regulator [ 10.189577] hci_uart_bcm serial0-0: supply vddio not found, using dummy regulator [ 10.308300] uart-pl011 3f201000.serial: no DMA platform data [ 10.353240] brcmfmac: F1 signature read @0x18000000=0x1541a9a6 [ 10.380906] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1 [ 10.383590] usbcore: registered new interface driver brcmfmac [ 10.552701] Bluetooth: hci0: BCM: chip id 94 [ 10.553314] Bluetooth: hci0: BCM: features 0x2e [ 10.560223] Bluetooth: hci0: BCM43430A1 [ 10.560260] Bluetooth: hci0: BCM43430A1 (001.002.009) build 0000 [ 10.565717] Bluetooth: hci0: BCM43430A1 'brcm/BCM43430A1.raspberrypi,3-model-b.hcd' Patch [ 10.640236] brcmfmac_wcc: brcmf_wcc_attach: executing [ 10.657534] brcmfmac: brcmf_c_process_txcap_blob: no txcap_blob available (err=-2) [ 10.658547] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43430/1 wl0: Jul 19 2021 03:24:18 version 7.45.98 (TOB) (56df937 CY) FWID 01-8e14b897 [ 11.105092] Console: switching to colour dummy device 80x25 [ 11.133916] vc4-drm soc:gpu: bound 3f400000.hvs (ops vc4_hvs_ops [vc4]) [ 11.143408] Registered IR keymap rc-cec [ 11.143715] rc rc0: vc4-hdmi as /devices/platform/soc/3f902000.hdmi/rc/rc0 [ 11.148528] input: vc4-hdmi as /devices/platform/soc/3f902000.hdmi/rc/rc0/input0 [ 11.165357] input: vc4-hdmi HDMI Jack as /devices/platform/soc/3f902000.hdmi/sound/card1/input1 [ 11.166381] vc4-drm soc:gpu: bound 3f902000.hdmi (ops vc4_hdmi_ops [vc4]) [ 11.166974] vc4-drm soc:gpu: bound 3f004000.txp (ops vc4_txp_ops [vc4]) [ 11.167431] vc4-drm soc:gpu: bound 3f206000.pixelvalve (ops vc4_crtc_ops [vc4]) [ 11.167842] vc4-drm soc:gpu: bound 3f207000.pixelvalve (ops vc4_crtc_ops [vc4]) [ 11.172706] vc4-drm soc:gpu: bound 3f807000.pixelvalve (ops vc4_crtc_ops [vc4]) [ 11.173036] vc4-drm soc:gpu: bound 3fc00000.v3d (ops vc4_v3d_ops [vc4]) [ 11.201656] [drm] Initialized vc4 0.0.0 20140616 for soc:gpu on minor 0 [ 11.210032] vc4-drm soc:gpu: [drm] Cannot find any crtc or sizes [ 11.210687] vc4-drm soc:gpu: [drm] Cannot find any crtc or sizes [ 11.358613] Adding 102396k swap on /var/swap. Priority:-2 extents:1 across:102396k SS [ 11.445132] Bluetooth: hci0: BCM: features 0x2e [ 11.450132] Bluetooth: hci0: BCM43438A1 37.4MHz Raspberry Pi 3-0141 [ 11.450156] Bluetooth: hci0: BCM43430A1 (001.002.009) build 0508 [ 12.971891] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [ 12.971913] Bluetooth: BNEP filters: protocol multicast [ 12.971996] Bluetooth: BNEP socket layer initialized [ 12.980158] Bluetooth: MGMT ver 1.22 [ 12.999246] NET: Registered PF_ALG protocol family [ 13.210321] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup [ 13.212911] smsc95xx 1-1.1:1.0 eth0: Link is Up - 100Mbps/Full - flow control off [ 13.267429] brcmfmac: brcmf_cfg80211_set_power_mgmt: power save enabled [ 91.800707] systemd[1046]: memfd_create() called without MFD_EXEC or MFD_NOEXEC_SEAL set [ 165.206237] export_store: invalid GPIO 27 [ 294.397397] export_store: invalid GPIO 27 [ 449.533065] export_store: invalid GPIO 27 [ 462.845137] export_store: invalid GPIO 27 [ 481.076903] export_store: invalid GPIO 27 [ 633.137180] export_store: invalid GPIO 27 [ 902.700198] export_store: invalid GPIO 27

Logs

No response

Additional context

I've been using pigpio for my I/O needs and noticed that its event callback on GPIO pins is no longer firing. I know it uses internally /sys/class/gpio/export to get a filedescriptor for the poll() command. So I 1st thought it must be something with my ADC's data-ready pln so I soldered up a pushbutton to GPIO27. pigpio didn't fire. So I tested with libgpiod and it all worked. This morning I wrote just the pin number with shell commands and noticed it's no longer working. I know /sys is deprecated but would be very cuious if that's been a decision by the RPI team to drop support or just a bug? I haven't seen any official announcement? I would have switched earlier to pigpiod but the doc for event driven gpio has been very poor. Either way I suspect also wiringPI might be affected by this as it's also using sys as far as I know.

pelwell commented 5 months ago

This is essentially a duplicate of #6037, in that the same answers apply.

TL;DR - the Linux maintainers don't want the global GPIO number space starting at 0. cat /sys/kernel/debug/gpio shows you the number assignments for each GPIO. In future, the /sys/class/gpio interface will disappear altogether - I believe Ubuntu/Canonical has already disabled it.

pelwell commented 5 months ago

Closing this to avoid duplication - please use #6037 for further discussion.

berndporr commented 5 months ago

Thanks for the quick reply. I see it's a feature! Well, I've switched to libgpiod yesterday and all good. I'm all for /sys/class/gpio to go away and the event processing there is so much better in libgpiod. I'm teaching realtime embedded coding and it's all about events! Well, that forced me to suss out event handling with it and already in my handout for my students! https://berndporr.github.io/realtime_cpp_coding/node3.html#SECTION00334000000000000000

pelwell commented 5 months ago

The only "gotcha" with libgpiod is the lack of names (or the ability to set the index values) on the gpiochips. On Pi 5, the user-facing GPIOs on the header end up being on gpiochip4, which is not ideal.

berndporr commented 5 months ago

I've noticed. The guys from the Graz computer club who are hacking away at the wiringPI also noticed that: https://github.com/WiringPi/WiringPi/blob/master/wiringPi/wiringPi.c#L2145. Also the accumlated numbering /sys/kernel/debug/gpio will be different between RPI1-4 and 5 isn't it? So there is no escape than detecting which rpi it is I guess. At least the gpiod library is closely developed in sync with the kernel. Anything that's not developed so closely to the kernel will or have now bombed. Or is there an attempt close to RPI to have c API which hides it all nicely away? wiringPI tried that 10 years ago and then created a lot of confusion.

pelwell commented 5 months ago

There are a number of strategies one could use:

Dave Jones at Canonical/Ubuntu has produced rpi-lgpio (https://github.com/waveform80/rpi-lgpio), an RPi.GPIO clone that uses libgpiod for the backend, but that's Python only.