https://bugs.kde.org/show_bug.cgi?id=496738

            Bug ID: 496738
           Summary: kwin_wayland don't release /dev/nvidia0 after sending
                    'remove' to udev event
    Classification: Plasma
           Product: kwin
           Version: unspecified
          Platform: Arch Linux
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: platform-drm
          Assignee: kwin-bugs-n...@kde.org
          Reporter: g311571...@gmail.com
  Target Milestone: ---

SUMMARY
Sending 'remove' to nvidia driver will update screen output, but kwin_wayland
process is still using /dev/nvidia0 so I can't remove nvidia driver.

STEPS TO REPRODUCE
1. echo -n "remove" > /sys/bus/pci/devices/0000:01:00.0/drm/card0/uevent
2. fuser -v /dev/nvidia0

OBSERVED RESULT
                               USER        PID      ACCESS COMMAND
/dev/nvidia0:        heddxh    1354   F...m      kwin_wayland
                               heddxh    13461 F....         electron

Running nvidia-smi show "No running processes found".

So due to there are processes using this device, I can't remove nvidia driver.
If I run `echo "$gpu" > "/sys/bus/pci/devices/$gpu/driver/unbind"` , system
will hang with kernel warning spamming the journal.

EXPECTED RESULT
kwin_wayland will release the nvidia card when receiving remove udev event.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.2.3
KDE Frameworks Version: 6.8.0
Qt Version: 6.8.0
Kernel Version: 6.11.9-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 20 × 12th Gen Intel® Core™ i7-12700H
Memory: 15.3 GiB of RAM
Graphics Processor: Mesa Intel® Graphics
Manufacturer: HP
Product Name: OMEN by HP Laptop 16-b1xxx

ADDITIONAL INFORMATION
My system is hybrid gpu, intel + nvidia, booting gpu in intel. I want to
dynamically binding my nvidia card to vfio-pci, and can also rebind to nvidia
driver when vm is off and I want to use it on host.
I also have
__EGL_VENDOR_IBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/50_mesa.json as env
var to avoid EGL program using nvidia card. And I pass
Environment="KWIN_DRM_DEVICES=/dev/dri/card1:/dev/dri/card0" to kwin_wayland,
card0 is nvidia and card1 is intel.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to