Bug 172381

Summary: nouveau kernel module leaks memory on hibernate.
Product: Drivers Reporter: Hussam Al-Tayeb (ht990332)
Component: Video(DRI - non Intel)Assignee: drivers_video-dri
Status: NEW ---    
Severity: normal    
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 4.8rc6 Subsystem:
Regression: No Bisected commit-id:

Description Hussam Al-Tayeb 2016-09-20 22:33:23 UTC
On hibernate, it seems that nouveau pushes vram into physical ram instead of swap (possibly on the assumption that it is going to be swaped to disk on hibernation).
In my case, I have 4GB physical ram and vram = 2GB.
   - Hibernate only works if amount of physical ram in use is less than 2G (4 - 2 = 2), otherwise I get an "error -12 creating hibernation image" "PM: Not enough free memory".
   - If hibernate works, on resume, vram is not freed from physical memory. rmmoding nouveau frees 500+ MB of physical ram.
   - So far, I have reproduced this on kernels 4.4 to 4.8rc6 (I have not attempted older kernels).
   - Cards tested are 630GT (fermi) and 730GT (kepler).