Cursor freezing by login screen (lightdm) upgraded to Kernel 5.16.7

I updated the Kernel to 5.16.7 and i have too reboot once or twice, till i can log in.

Bootlog shows:

[  OK  ] Started Command Scheduler.
         Starting Light Display Manager...
         Starting Hold until boot process finishes up...

and then freezes the cursor. With the mouse i can move just i cant click anything on it. Have to reboot and try it again.

Jorunalctl:

Feb 10 17:45:57 fedy audit[1868]: AVC avc:  denied  { open } for  pid=1868 comm="gdb" path="/var/lib/lightdm/.cache/mesa_shader_cache/index" dev="sda3" ino=223612 scontext=system_u:system_r:abrt_t:s0-s0:c0.c1023 tcontext=system_u:object_r:xdm_var_lib_t:s0 tclass=file permissive=0
Feb 10 17:46:01 fedy setroubleshoot[1890]: failed to retrieve rpm info for /var/lib/lightdm/.cache/mesa_shader_cache/index
Feb 10 17:46:02 fedy setroubleshoot[1890]: SELinux is preventing gdb from open access on the file /var/lib/lightdm/.cache/mesa_shader_cache/index. For complete SELinux messages run: sealert -l fea9e318-afa2-4683-97b0-418d26c3693a
Feb 10 17:46:02 fedy setroubleshoot[1890]: SELinux is preventing gdb from open access on the file /var/lib/lightdm/.cache/mesa_shader_cache/index.
$ inxi -Fzx
System:
  Kernel: 5.16.7-200.fc35.x86_64 x86_64 bits: 64 compiler: gcc
    v: 2.37-10.fc35 Desktop: MATE 1.26.0
    Distro: Fedora release 35 (Thirty Five)
Machine:
  Type: Laptop System: CompuLab product: Intense-PC v: 1.x
    serial: <superuser required>
  Mobo: CompuLab model: Intense-PC v: 1.x serial: <superuser required>
    UEFI: Phoenix v: IPC_2.2.400.5 X64 date: 03/15/2018
Battery:
  Device-1: hidpp_battery_0 model: Logitech Wireless Mouse
    charge: 50% (should be ignored) status: Discharging
  Device-2: hidpp_battery_1 model: Logitech Wireless Keyboard
    charge: 55% (should be ignored) status: Discharging
CPU:
  Info: dual core model: Intel Core i7-3517UE bits: 64 type: MT MCP
    arch: Ivy Bridge rev: 9 cache: L1: 128 KiB L2: 512 KiB L3: 4 MiB
  Speed (MHz): avg: 833 high: 941 min/max: 800/2800 cores: 1: 941 2: 798
    3: 798 4: 798 bogomips: 17558
  Flags: avx ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Graphics:
  Device-1: Intel 3rd Gen Core processor Graphics driver: i915 v: kernel
    bus-ID: 00:02.0
  Device-2: Sunplus Innovation FHD Camera Microphone type: USB
    driver: snd-usb-audio,uvcvideo bus-ID: 1-1.5:4
  Display: x11 server: X.Org 1.20.14 driver: loaded: modesetting
    unloaded: fbdev,vesa resolution: 2560x1080~60Hz
  OpenGL: renderer: Mesa Intel HD Graphics 4000 (IVB GT2)
    v: 4.2 Mesa 21.3.5 direct render: Yes
Audio:
  Device-1: Intel 7 Series/C216 Family High Definition Audio
    driver: snd_hda_intel v: kernel bus-ID: 00:1b.0
  Device-2: Sunplus Innovation FHD Camera Microphone type: USB
    driver: snd-usb-audio,uvcvideo bus-ID: 1-1.5:4
  Sound Server-1: ALSA v: k5.16.5-200.fc35.x86_64 running: yes
  Sound Server-2: JACK v: 1.9.19 running: no
  Sound Server-3: PulseAudio v: 15.0 running: no
  Sound Server-4: PipeWire v: 0.3.45 running: yes
Network:
  Device-1: Intel 82579LM Gigabit Network driver: e1000e v: kernel port: 4080
    bus-ID: 00:19.0
  IF: enp0s25 state: up speed: 1000 Mbps duplex: full mac: <filter>
  Device-2: Realtek RTL8188CE 802.11b/g/n WiFi Adapter vendor: AzureWave
    driver: rtl8192ce v: kernel port: 3000 bus-ID: 04:00.0
  IF: wlp4s0 state: down mac: <filter>
  Device-3: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    driver: r8169 v: kernel port: 2000 bus-ID: 06:00.0
  IF: enp6s0 state: down mac: <filter>
  IF-ID-1: virbr0 state: down mac: <filter>
Bluetooth:
  Device-1: IMC Networks type: USB driver: btusb v: 0.8 bus-ID: 1-1.3:3
  Report: rfkill ID: hci0 rfk-id: 1 state: up address: see --recommends
Drives:
  Local Storage: total: 223.58 GiB used: 128.41 GiB (57.4%)
  ID-1: /dev/sda vendor: Western Digital model: WDS240G2G0A-00JH30
    size: 223.58 GiB
Partition:
  ID-1: / size: 221.9 GiB used: 128.21 GiB (57.8%) fs: btrfs dev: /dev/sda3
  ID-2: /boot size: 1007.3 MiB used: 196.3 MiB (19.5%) fs: ext4
    dev: /dev/sda2
  ID-3: /boot/efi size: 574.8 MiB used: 13.8 MiB (2.4%) fs: vfat
    dev: /dev/sda1
  ID-4: /home size: 221.9 GiB used: 128.21 GiB (57.8%) fs: btrfs
    dev: /dev/sda3
Swap:
  ID-1: swap-1 type: zram size: 8 GiB used: 0 KiB (0.0%) dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 45.0 C mobo: 45.0 C
  Fan Speeds (RPM): N/A
Info:
  Processes: 259 Uptime: 39m Memory: 15.04 GiB used: 2.61 GiB (17.4%)
  Init: systemd runlevel: 5 Compilers: gcc: 11.2.1 Packages: N/A
  note: see --pkg Shell: Bash v: 5.1.8 inxi: 3.3.12

Hi, first I have no expert on Selinux, but since after reboot everything is working, look like the problem is resolved (maybe on reboot, Selinux already make relabeling or something else).

Btw I have two links from RetHat related to Selinux on my bookmarks that may be make you interest:

Thanks for your answer.

With Ctrl & Alt F2 i can log in and with fkill i can kill lightdm. So i don’t have to reboot.

But never less … /var/lib/lightdm/.cache/mesa_shader_cache/index. shows that i cant access the cache file anymore. And as the .cache affects mesa it blocks me to log in.
So i’m not so shure if Selinux should interfere here? As with 5.15 kernel this not happened.

If you set selinux to permissive and reboot does it work?

https://docs.fedoraproject.org/en-US/quick-docs/changing-selinux-states-and-modes/

If so you probably want to file a bug.

1 Like
Feb 11 08:56:08 fedy audit[1844]: AVC avc:  denied  { open } for  pid=1844 comm="gdb" path="/var/lib/lightdm/.cache/mesa_shader_cache/index" dev="sda3" ino=223612 scontext=system_u:system_r:abrt_t:s0-s0:c0.c1023 tcontext=system_u:object_r:xdm_var_lib_t:s0 tclass=file permissive=1
Feb 11 08:56:12 fedy setroubleshoot[1866]: failed to retrieve rpm info for /var/lib/lightdm/.cache/mesa_shader_cache/index
Feb 11 08:56:13 fedy setroubleshoot[1866]: SELinux is preventing gdb from open access on the file /var/lib/lightdm/.cache/mesa_shader_cache/index. For complete SELinux messages run: sealert -l fea9e318-afa2-4683-97b0-418d26c3693a
Feb 11 08:56:13 fedy setroubleshoot[1866]: SELinux is preventing gdb from open access on the file /var/lib/lightdm/.cache/mesa_shader_cache/index.

Yes same problem with permissive=1 i did set in /etc/selinux/config:

$ sestatus
SELinux status:                 enabled
SELinuxfs mount:                /sys/fs/selinux
SELinux root directory:         /etc/selinux
Loaded policy name:             targeted
Current mode:                   permissive
Mode from config file:          permissive
Policy MLS status:              enabled
Policy deny_unknown status:     allowed
Memory protection checking:     actual (secure)
Max kernel policy version:      33

I will file a bug then … done
https://bugzilla.redhat.com/show_bug.cgi?id=2053539

1 Like

I just tested with my Fedora i3 spin that have lightdm as display manager:

[rizal@syaifur mesa_shader_cache]$ matchpathcon -V /var/lib/lightdm/.cache/mesa_shader_cache/*
/var/lib/lightdm/.cache/mesa_shader_cache/index verified. 

From link I shared above (Checking the default selinux context), there a way to restore the default selinux context with restorecon:

sudo restorecon /var/lib/lightdm/.cache/mesa_shader_cache/index

Btw, I also tested with deleting folder /var/lib/lightdm/.cache then logout and login again. The system then recreate this .cache directory. Then I tested with matchpathcon and it verified. But I’m not sure if this applicable to your system.

My answer on bugzilla:

I see it so, gdb wants to read something in the mesa_shader_cache and AVC denies and blocks lightdm

Please could you also follow on Cursor freezing by login screen (lightdm) upgraded to Kernel 5.16.7
that i not have to say everything twice. I do have colleagues there who help me to debug.

gdb (GNU gdb (GDB) Fedora 11.2-1.fc35) tryes to access:

Feb 11 08:56:08 fedy audit[1844]: AVC avc: denied { open } for pid=1844 comm=“gdb” path=“/var/lib/lightdm/.cache/mesa_shader_cache/index” dev=“sda3” ino=223612 scontext=system_u:system_r:abrt_t:s0-s0:c0.c1023 tcontext=system_u:object_r:xdm_var_lib_t:s0 tclass=file permissive=1
Feb 11 08:56:12 fedy setroubleshoot[1866]: failed to retrieve rpm info for /var/lib/lightdm/.cache/mesa_shader_cache/index
Feb 11 08:56:13 fedy setroubleshoot[1866]: SELinux is preventing gdb from open access on the file /var/lib/lightdm/.cache/mesa_shader_cache/index. For complete SELinux messages run: sealert -l fea9e318-afa2-4683-97b0-418d26c3693a
Feb 11 08:56:13 fedy setroubleshoot[1866]: SELinux is preventing gdb from open access on the file /var/lib/lightdm/.cache/mesa_shader_cache/index.

@oprizal proposed to follow the redhat links to check the selinux part. everything was fine.
Then i deleted the files/folders under /lib/lightdm/.cache and restarted.

For the moment it is ok.

What more info’s could I give ? Can i check somehow what gdb wants in the /lib/lightdm/.cache folder ?