At wake up graphic glitches and some app won't work anymore

Hello i’m on fedora 40 , brand new install , i’m using mostly this computer for stable diffusion with ComfyUI gui thru Firefox. i am facing a pb at every wake up having glitches on my screen, and if comfyui was on, i can’t use it anymore as i got a cuda error. I’m quite sure it isn’t coming from Comfyui as i installed it twice since i’m facing that pb and it still the same.
Working with comfyui then needs a reboot which is quite annoying .
I don’t know if it’s related but randomly at the computer start wayland option is missing sometimes not
Here is the error message:

!!! Exception during processing!!! CUDA error: unspecified launch failure
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.
Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.

Traceback (most recent call last):
  File "/home/luc/ComfyUI/execution.py", line 151, in recursive_execute
    output_data, output_ui = get_output_data(obj, input_data_all)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/luc/ComfyUI/execution.py", line 81, in get_output_data
    return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/luc/ComfyUI/execution.py", line 74, in map_node_over_list
    results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/luc/ComfyUI/nodes.py", line 1344, in sample
    return common_ksampler(model, seed, steps, cfg, sampler_name, scheduler, positive, negative, latent_image, denoise=denoise)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/luc/ComfyUI/nodes.py", line 1314, in common_ksampler
    samples = comfy.sample.sample(model, noise, steps, cfg, sampler_name, scheduler, positive, negative, latent_image,
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/luc/ComfyUI/custom_nodes/ComfyUI-AnimateDiff-Evolved/animatediff/sampling.py", line 313, in motion_sample
    return orig_comfy_sample(model, noise, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/luc/ComfyUI/custom_nodes/ComfyUI-Advanced-ControlNet/adv_control/control_reference.py", line 47, in refcn_sample
    return orig_comfy_sample(model, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/luc/ComfyUI/custom_nodes/ComfyUI-Advanced-ControlNet/adv_control/utils.py", line 111, in uncond_multiplier_check_cn_sample
    return orig_comfy_sample(model, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/luc/ComfyUI/custom_nodes/ComfyUI-Impact-Pack/modules/impact/sample_error_enhancer.py", line 22, in informative_sample
    raise e
  File "/home/luc/ComfyUI/custom_nodes/ComfyUI-Impact-Pack/modules/impact/sample_error_enhancer.py", line 9, in informative_sample
    return original_sample(*args, **kwargs)  # This code helps interpret error messages that occur within exceptions but does not have any impact on other operations.
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/luc/ComfyUI/comfy/sample.py", line 35, in sample
    sampler = comfy.samplers.KSampler(model, steps=steps, device=model.load_device, sampler=sampler_name, scheduler=scheduler, denoise=denoise, model_options=model.model_options)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/luc/ComfyUI/comfy/samplers.py", line 711, in __init__
    self.set_steps(steps, denoise)
  File "/home/luc/ComfyUI/comfy/samplers.py", line 732, in set_steps
    self.sigmas = self.calculate_sigmas(steps).to(self.device)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/luc/ComfyUI/comfy/samplers.py", line 723, in calculate_sigmas
    sigmas = calculate_sigmas(self.model.get_model_object("model_sampling"), self.scheduler, steps)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/luc/ComfyUI/comfy/samplers.py", line 675, in calculate_sigmas
    sigmas = normal_scheduler(model_sampling, steps)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/luc/ComfyUI/comfy/samplers.py", line 306, in normal_scheduler
    timesteps = torch.linspace(start, end, steps)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: CUDA error: unspecified launch failure
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.
Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.

Added cuda, nvidia, pytorch, workstation

I just assumed you use pytorch?

You have to run it with CUDA_LAUNCH_BLOCKING=1 as far as I understood.

yes i’m using pytorch , just to be sure that’s the actual little script i’m using to run Comfyui:

#!/bin/bash
cd ComfyUI
source .venv/bin/activate
HSA_OVERRIDE_GFX_VERSION=10.3.0 python3 main.py --use-pytorch-cross-attention --highvram --disable-smart-memory --auto-launch 

then i just need to change it for

#!/bin/bash
cd ComfyUI
source .venv/bin/activate
CUDA_LAUNCH_BLOCKING=1 HSA_OVERRIDE_GFX_VERSION=10.3.0 python3 main.py --use-pytorch-cross-attention --highvram --disable-smart-memory --auto-launch 
1 Like

yes and this should give more output that you can post here

i , as i didn’t have the time to test , i decide to disable the suspend on my computer for now, leaving only my screens to sleep. I will let you know when i have time , thanks anyway

1 Like