[konsole] [Bug 506124] New: Konsole fails to display command prompt after some scripts complete

Tomaz Canabrava tomaz.canabrava at gmail.com
Wed Jun 25 09:42:15 BST 2025


thanks for the detailed bug report, ill do my best to test this, this week,
with other terminal emulators too.


On Tue, 24 Jun 2025 at 20:55 Sergiy <bugzilla_noreply at kde.org> wrote:

> https://bugs.kde.org/show_bug.cgi?id=506124
>
>             Bug ID: 506124
>            Summary: Konsole fails to display command prompt after some
>                     scripts complete
>     Classification: Applications
>            Product: konsole
>       Version First 25.04.2
>        Reported In:
>           Platform: Arch Linux
>                 OS: Linux
>             Status: REPORTED
>           Severity: normal
>           Priority: NOR
>          Component: general
>           Assignee: konsole-devel at kde.org
>           Reporter: dwarf.nordar at gmail.com
>   Target Milestone: ---
>
> == SUMMARY ==
> After a script that produces continuous output to the terminal finishes
> (e.g.,
> using `wget --show-progress` or a simple loop), the Konsole prompt (PS1)
> is not
> rendered automatically. The terminal itself is not frozen: pressing the
> Enter
> key makes the cursor move to a new line, and after that, the prompt may
> appear.
> This indicates a rendering or state issue within Konsole, not a shell or
> process hang.
>
> == STEPS TO REPRODUCE ==
> 1. Create a simple test script named `test_prompt.sh` with the following
> content:
>    #!/bin/bash
>    echo "Starting long output..."
>    for i in {1..50}; do
>        echo "Line $i of 50"
>        sleep 0.02
>    done
>    echo "Script finished."
>    # The prompt should appear here, but it doesn't.
>
> 2. Make it executable: `chmod +x test_prompt.sh`
> 3. Run it in a Konsole tab: `./test_prompt.sh`
>
> == EXPECTED BEHAVIOR ==
> The command prompt (e.g., `user at host:~$`) appears immediately on a new
> line
> after the "Script finished." message is printed.
>
> == ACTUAL BEHAVIOR ==
> A blank line with a blinking cursor appears. The prompt is not rendered.
> If the
> user then presses the Enter key, the prompt appears on the next new line.
> The
> issue is 100% reproducible.
>
> == DEBUGGING STEPS ALREADY TAKEN (IMPORTANT) ==
> We have conducted an extensive debugging session and have ruled out common
> causes. This is NOT a configuration issue.
>
> 1.  **Shell configuration ruled out:** The issue persists with a completely
> empty `~/.bashrc` and a sanitized `/etc/bash.bashrc` (with the window title
> setting block commented out).
> 2.  **It works in a sterile environment:** The command `env -i bash --norc`
> followed by running the script works correctly, proving the issue is
> related to
> the environment loaded by a normal interactive shell.
> 3.  **strace analysis performed:** `strace` logs confirm that the `bash`
> process is NOT hung. It successfully writes the prompt string to the
> terminal
> (via the `write()` syscall) and then correctly enters a `pselect6()` state,
> waiting for user input. This strongly suggests Konsole receives the
> command to
> draw the prompt but fails to render it.
> 4.  **Konsole Profile ruled out:** The issue persists even after creating a
> new, clean user profile within Konsole.
> 5.  **`reset` command workaround failed:** Adding the `reset` command to
> the
> end of the test script does NOT solve the problem.
>
> This appears to be a genuine rendering or state management bug within
> Konsole
> itself.
>
> == SYSTEM INFORMATION ==
> plasmashell 6.4.0
>
> --
> You are receiving this mail because:
> You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/konsole-devel/attachments/20250625/fdc6c3a2/attachment-0001.htm>


More information about the konsole-devel mailing list