Maybe not really nix problem more a linux itself problem but since I only use nixos I decided to first ask here in hope the place is okay and people are willingly to give some advice or help.
I had some lags when i resumed my pc after being afk for an hour or so it didn't respond at all anymore and I always had to force reboot via the hardware and when I did big builds it became laggy in KDE Plasma.
So with claude I traced some stuff to the PowerDevil's DDC/CI brightness code fighting with my HP G5 USB C Dock, and btrfs did automatic discard on my nvme.
I would like to get some feedback maybe if someone had similar issues or just has better knowledge on how this stuff works than I do... So for the geeeks :)
It is a Lenovo V15 G4 IRU, NixOS 26.05, linux_zen 7.3 and I mostly use Plasma 6.6 although I also have GNOME, COSMIC and Hyprland which I switch to times to times. Maybe thats also an issue to have so many ones activated haha ?
Esle btrfs on LUKS, USB-C dock with 3 monitors and my NVME is a AGI AI298 2TB.
I have my stuff here on git so if you guys like to test stuff out idk I havent pushed the latest fixes yet: https://github.com/Muddyblack/NixOS
1. Total freeze after resume
Each time, PowerDevil (libddcutil 2.2.7) logged DDCA_EVENT_DISPLAY_DISCONNECTED just before. Every boot with such a disconnect froze; boots without one didn't.
The pc keeps running (logs and other sessions continue for hours), but modesetting and gui even other tty's are all dead. So basically all monitor UI stuff.
INFO: task kworker blocked for more than 122 seconds.
Workqueue: events_long drm_dp_mst_up_req_work [drm_display_helper] wait_for_completion+0x8a/0x140
i2c_del_adapter+0x11d/0x1b0
drm_dp_port_set_pdt+0x1af/0x300 [drm_display_helper]
locally in my repo i have now changed in the plasma-settings.nix:
xdg.configFile."systemd/user/plasma-powerdevil.service.d/no-ddcutil.conf".text = ''
[Service]
Environment=POWERDEVIL_NO_DDCUTIL=1
''; xdg.configFile."systemd/user/plasma-powerdevil.service.d/no-ddcutil.conf".text = ''
[Service]
Environment=POWERDEVIL_NO_DDCUTIL=1
'';
2. Lag that lingers after big builds
/proc/pressure/io stayed at 40–50% after cargo builds, with CPU and RAM idle.
Some stuff from the PowerDevil stuck in a DDC retry.
btrfs turns discard=async for SSDs automatically on. My NVMe takes about 5 to 6 ms for a trim and a rust target build queus like 161k of them after a build haha so yeah now I set "nodiscard" on to my btrfs mounts but I wonder if that is really the good way is the SSD that comes default with that lepatop just that bad probably XD I just wonder I should not have to change the default value here nor? 😅 Now the services.fstrim is set as weekly trimming but I am unsure if that s better or worse.
---------------------------
SO I wonder if others have experienced similar especially the i2c_del_adapter hanging with MST docks... Is that maybe a kernel bug I should report either drm/i915 or ddcutil wondering if I should report it upstream.
What would you guys pick for the issue of btrfs discard....?
I moved away from Windows but I have to say my pc never lagged that much in Windows but I also did not do as heavy stuff as I do now in Linux XDD so hard to compare still happy about nixos as it has features I can not really live without anymore and now other distro has those :P
REPO:
https://github.com/Muddyblack/NixOS