[SOLVED]Need help, dwm is killing itself when clicking URLs or links

Reverzed

New Member
Joined
May 16, 2024
Messages
10
Reaction score
3
Credits
98
Hi basically when i click on some links this happens, Cick the link -> Screen turns black and this error message appears:
Code:
[FAILED] Failed to start casper-md5check Verify Live ISO
-> OS login screen pops up, for now this happened with some links, pywal github, a fonts download page and when i click on any firefox theme i want to download, also im using Linux mint with dwm window manager, but when i switch to the cinnamon desktop i dont have this problem and can open links normally.

OS: Linux Mint
WM: dwm
Web browser: Firefox

--more info about my dwm:

-dwm
-dmenu
-st

Patches:

+attachbelow
+uselessgap
+alwayscenter

i also tried this command:
Code:
sudo systemctl disable casper-md5check.service
but the issue persists, the only difference is that now the error message doesn't prints.
 


The problem is a little unclear to me. Are you experiencing "Screen turns black" when clicking links in firefox when running dwm, but when running cinnamon, firefox runs properly?

Normally the window manager, or desktop environment, will not alter the functioning of a web browser like firefox.
 
yeah basically i click the links and for like .1 seconds i see my programs closing? idk how to explain it but looks similar to running pkill dwm, then screen turns black for a second, and the login screen pops up, and like i said on the cinnamon DE this doesnt happen, also tried different web browsers: vivaldi and brave but its the same.

sorry if my description is not the best, i made this short video showing the issue:
 
Last edited:
Thanks for the video. The click doesn't get a blank screen, but rather a return to the login screen, but the problem is clear.

Before I saw the video I wrote out a proposal to check firefox and dwm, which was the following:

To check whether dwm or firefox is a problem, it may be worth trying something like the following. Best to read all the proposal before running anything.

1. Write the file: .xinitrc in your home directory (i.e. /home/<user>/.xinitrc, where you insert your username for <user>) with the following contents:
Code:
#!/bin/sh
exec xterm
For "xterm" you could use "st" as a terminal if you wish. You can download xterm if you prefer it and don't have it. This should open a terminal on screen in X when called by the xinit command below.

2. Boot to a text prompt and log in. You may need to set systemd to multi-user-target with a command such as:
Code:
systemctl set-default multi-user.target
and reboot to get the machine to boot to a text prompt.

3. Start X with a command like:
Code:
xinit /home/<user>/.xinitrc -- /usr/bin/X :0 vt1
Note that if you don't have the xinit program on your system, you can download it.
If that command doesn't run, try:
Code:
startx

4. On screen there should now be a terminal. In that terminal run the command to start dwm. It is usually:
Code:
dwm &

5. If all's well, dwm should make available the tags and you can start a terminal in any one of them with the default keypress of: alt + shft + enter. Open a terminal like that. The terminal type will be the one configured in the dwm config.h file, which by default is st.

6. In the new terminal just opened, run the firefox command which most likely is:
Code:
firefox &

When firefox is open, test it by using it and see if it behaves properly, or with errors. If it behaves normally, then neither firefox nor dwm is the problem. Any other browser can be checked by running in a terminal as well.

Note that the above is all entirely reversible, and is a "proof of concept" procedure for this case.

Now that I've seen the video, it looks like the display manager is interfering. If the proposal above works out showing no problem with dwm or the browser, then the suspicion returns to the display manager. Display managers can be changed, say from lightdm to sddm, or simply dispensed with altogether with text logins. YMMV.
 
Last edited:
Thanks for the video. The click doesn't get a blank screen, but rather a return to the login screen, but the problem is clear.

Before I saw the video I wrote out a proposal to check firefox and dwm, which was the following:

To check whether dwm or firefox is a problem, it may be worth trying something like the following. Best to read all the proposal before running anything.

1. Write the file: .xinitrc in your home directory (i.e. /home/<user>/.xinitrc, where you insert your username for <user>) with the following contents:
Code:
#!/bin/sh
exec xterm
For "xterm" you could use "st" as a terminal if you wish. You can download xterm if you prefer it and don't have it. This should open a terminal on screen in X when called by the xinit command below.

2. Boot to a text prompt and log in. You may need to set systemd to multi-user-target with a command such as:
Code:
systemctl set-default multi-user.target
and reboot to get the machine to boot to a text prompt.

3. Start X with a command like:
Code:
xinit /home/<user>/.xinitrc -- /usr/bin/X :0 vt1
Note that if you don't have the xinit program on your system, you can download it.
If that command doesn't run, try:
Code:
startx

4. On screen there should now be a terminal. In that terminal run the command to start dwm. It is usually:
Code:
dwm &

5. If all's well, dwm should make available the tags and you can start a terminal in any one of them with the default keypress of: alt + shft + enter. Open a terminal like that. The terminal type will be the one configured in the dwm config.h file, which by default is st.

6. In the new terminal just opened, run the firefox command which most likely is:
Code:
firefox &

When firefox is open, test it by using it and see if it behaves properly, or with errors. If it behaves normally, then neither firefox nor dwm is the problem. Any other browser can be checked by running in a terminal as well.

Note that the above is all entirely reversible, and is a "proof of concept" procedure for this case.

Now that I've seen the video, it looks like the display manager is interfering. If the proposal above works out showing no problem with dwm or the browser, then the suspicion returns to the display manager. Display managers can be changed, say from lightdm to sddm, or simply dispensed with altogether with text logins. YMMV.
hello again sorry for the late response, i followed step by step what you said and when i type startx or xinit, the terminal executes normally but it doesnt recieve any keyboard input, i think the problem is that the "focus" is not set on the new terminal because the "block cursor" is not filled or blinking like i configured it.

im going to try changing the display manager and see how it goes.

here is a pic of what i meant:
 

Attachments

  • IMG_20240517_083532.jpg
    IMG_20240517_083532.jpg
    2.1 MB · Views: 156
Which version of dwm are you using?
Mine’s built and installed from source via the suckless github. So I’m running the latest version.

Patch-wise, I only have the notification tray patch, plus a ton of minor tweaks that I’ve made myself.

And I’m not having any problems with dwm or Firefox. But I’m on Debian 11, not Mint.
 
Which version of dwm are you using?
Mine’s built and installed from source via the suckless github. So I’m running the latest version.

Patch-wise, I only have the notification tray patch, plus a ton of minor tweaks that I’ve made myself.

And I’m not having any problems with dwm or Firefox. But I’m on Debian 11, not Mint.
dwm-6.5 same instalation method
 
hello again sorry for the late response, i followed step by step what you said and when i type startx or xinit, the terminal executes normally but it doesnt recieve any keyboard input, i think the problem is that the "focus" is not set on the new terminal because the "block cursor" is not filled or blinking like i configured it.

im going to try changing the display manager and see how it goes.

here is a pic of what i meant:
No need for sorry ... it's an unusual problem so far as I can see. I wonder if the dwm patches are implicated. It may be worth trying to just build another dwm with no patches and see if that makes a difference. The dwm 6.5 here has no patches and receives focus immediately it's run. Just a thought anyway to try and exclude dwm as the issue.
 
No need for sorry ... it's an unusual problem so far as I can see. I wonder if the dwm patches are implicated. It may be worth trying to just build another dwm with no patches and see if that makes a difference. The dwm 6.5 here has no patches and receives focus immediately it's run. Just a thought anyway to try and exclude dwm as the issue.
quick update, i managed to get terminal to work i just downloaded a bunch of terminals lol and kitty its the one who works fine, so i did everything you said boot to a text prompt and so on, i opened firefox and the links that were causing trouble now works fine, when i opened the pywal link for example i got this prompt on the terminal:


Code:
reverzed@reverzed:~$ dwm &
[1] 1141
reverzed@reverzed:~$ firefox &
[2] 1147
reverzed@reverzed:~$ dwm: fatal error: request code=139, error code=16
X Error of failed request: BadLength (poly request too large or internal Xlib length error)
  Major opcode of failed request: 139 (RENDER)
  Minor opcode of failed request: 20 (RenderAddGlyphs)
  Serial number of failed request: 1210
  Current serial number in output stream:  1215

Also the terminal is unusable, i cant click or type on it, set the focus to that terminal etc...

EDIT: Again i clicked on another link that was causing trouble before [firefox theme] and got this output:

Code:
libva info: VA-API version 1.14.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv-video.so
libva info: Found init function __vaDriverInit_1_14
libva info: va_openDriver() returns 0
 
Last edited:
Looks like a few issues to untangle here. The dwm "fatal error" suggests an investigation of dwm ... as suggested in post #8, might be worth trying a patch-free dwm.

The libva issues looks to be about video acceleration, so it may be worth having that turned off in firefox where the setting is under: Settings -> General -> Performance, to see if it makes a difference.
 
Looks like a few issues to untangle here. The dwm "fatal error" suggests an investigation of dwm ... as suggested in post #8, might be worth trying a patch-free dwm.

The libva issues looks to be about video acceleration, so it may be worth having that turned off in firefox where the setting is under: Settings -> General -> Performance, to see if it makes a difference.
Just tried both of your recommendations, uninstaled and reinstaled dwm with default configs and no patches, issue persists.
Disabled Firefox recommended performance settings and hardware acceleration, issue persists.

I think the problem is aggravating, now i cant watch some youtube videos from channels i actually have interest and i cant run brew upgrade it just closes the terminal.
 
Last edited:
[FAILED] Failed to start casper-md5check Verify Live ISO

sudo systemctl disable casper-md5check.service
Are you running your Mint installation off of a live usb with persistent storage or something like that?
 
Just tried both of your recommendations, uninstaled and reinstaled dwm with default configs and no patches, issue persists.
Disabled Firefox recommended performance settings and hardware acceleration, issue persists.

I think the problem is aggravating, now i cant watch some youtube videos from channels i actually have interest and i cant run brew upgrade it just closes the terminal.
It's not looking good at the moment. You've probably eliminated a few possible causes though with your work.

Now that you've mentioned the homebrew repos, I'm wondering about how they may be implicated. I cannot say though since I've only ever used homebrew on a Macbook some time ago using native MacOS. It was very good, even flawless in that context. I know it's available for linux, but I wonder if anything that you've downloaded from there isn't also available in the default repos for linux mint.

In debian, mixing up repos can lead to what's called a Frakendebian, explained here:
How that may apply to mint is perhaps worth a conjecture.
 
Last edited:
It's not looking good at the moment. You've probably eliminated a few possible causes though with your work.

Now that you've mentioned the homebrew repos, I'm wondering about how they may be implicated. I cannot say though since I've only ever used homebrew on a Macbook some time ago using native MacOS. It was very good, even flawless in that context. I know it's available for linux, but I wonder if anything that you've downloaded from there isn't also available in the default repos for linux mint.

In debian, mixing up repos can lead to what's called a Frakendebian, explained here:
How that may apply to mint is perhaps worth a conjecture.
Thanks for the article, i install almost everything using apt i only really used brew to install fastfetch and the latest release version of neovim because neovim was kinda outdated using apt, But now that you mention debian i got more info that could be useful.

1. I have mint instaled in my pc, im not using live usb or anything like that.

2. some minutes ago i wanted to setup virtual box with some linux distros that i wanted to try, so to get the vbox to work i need to disable secure boot, so i went to the BIOS and saw this:
WhatsApp Image 2024-05-18 at 10.11.44 AM.jpeg

Now, I instaled Mint a like a week ago, BEFORE instaling Mint i was using debian 12 bookworm i think, i only used it for like 3 weeks and decided to came back to Mint because kde was consuming all my ram and i didnt knew i could switch between DEs in that moment, also on debian i was getting some problems with the repos, when i used apt update && apt upgrade it was saying something like "<repo link> debian bookworm security has no header file" something like that so i had to delete that repo link in my sources.list and replace it with another one i found on the debian website, i mention that in case it is helpful.

So i dont know why its debian showing up in the BIOS, when i instaled Mint i choosed the option to delete the disk, because i dont know how to do partitions and well i didnt had any important files, so i just erased the disk, maybe debian didnt "uninstaled" even when i choosed the erase disk option in the Mint instalation, or is that the Wrong way to uninstall debian? Could this be related to the issue with dwm returning to the login screen?

im going to set debian up to boot priority and see what happens, i'll edit this post later with wathever that happens.

[EDIT] Booting debian sends me here:
WhatsApp Image 2024-05-18 at 11.03.43 AM.jpeg
 
Last edited:
Are you running your Mint installation off of a live usb with persistent storage or something like that?
nope, Mint is instaled in my pc, im not using live usb or external devices to boot the os.
 
It looks like there's a clutch of problems @Reverzed. Dealing with one problem at a time is probably the best way to go.

I think you've established that dwm and firefox are okay.

I'm reluctant to make suggestions that could mess around unpredictably to the system. Here are some thoughts though.

The BIOS Boot Priority is incorrect, but it's not clear that that's the problem because basically the BIOS hands control over to the operating system, and it's in the latter that the problems are occurring.

I assume the BIOS is UEFI. If so, then it's possible to see what the system thinks is loadable from the output of the command: efibootmgr. That program can also delete entries that aren't operating for which there are just stubs left over from previous installations.

If the operating systems that are no longer installed on the system are appearing in the grub menu, then run the command: update-grub to get grub's latest view of what's there. Check out this comment in the file:
/etc/default/grub, and see if applies to your system:
Code:
# If your computer has multiple operating systems installed, then you
# probably want to run os-prober. However, if your computer is a host
# for guest OSes installed via LVM or raw disk devices, running
# os-prober can cause damage to those guest OSes as it mounts
# filesystems to look for things.
#GRUB_DISABLE_OS_PROBER=false

Since the problem is in the GUI, perhaps consider reinstalling xorg and the xserver apps.

Since the problem involves the display manager, consider keeping it out of the way by booting to a text terminal to startx until the other problems are repaired.

It's possible to reinstall the operating system, whether it's mint, ubuntu or debian. There's no reason that any of the operating systems should allow KDE to consume all your RAM if you have memory of 4G or more. KDE commonly occupies about 200M but can use upto about 1.5G in RAM. Major desktop environments like KDE and gnome are fairly mature and "just work" these days, so the problems are likely to be elsewhere. Window managers like dwm occupy and consume much less of course. Dwm here occupies around 6M and uses around 12M. (Check the RSS and VSZ outputs from the ps command).

An unpatched dwm is also robust and reliable, and since the problem persists with such a dwm, the problem is elsewhere.

As for partitioning, the easiest way to go on installation is to accept the default. Only if you wish to change the partitions would you select the customising option on installation, but it's unnecessary.

It is possible to install multiple desktop environments (DEs) and multiple window managers, and change between them at will. There is a problem however, at trying to remove a DE from a system because they each set up complex dependencies which involve system files and so trying to delete the DE can lead to deletion of an unexpectedly large number of files and applications which was not intended. So, as long as they are left alone on the system, all should be well. Deleting window managers is simpler because they often just involve just a few files with limited dependencies, but it's no trouble leaving them in place either.

I don't know where to go from here on your system, but hopefully some ideas occur.
 
It looks like there's a clutch of problems @Reverzed. Dealing with one problem at a time is probably the best way to go.
Hi again, its been some time i just wanted to make an update about how i "solved" the problem, not really but its ok:

1. First of all i tried everything, changing the display manager, disabling it, re installing X, tried dwm with defaults and no patches, and a bunch of other stuff, lastly i tried formatting the disk with another pc then re installing Mint BUT the problem was still there.

2. Since nothing of that worked i just switched to Arch idk i wanted to try it anyways, installed dwm with my configs and patches this sunday and everything is ok so far.

3. About debian being in the bootloader well since i was going to format the disk i didnt worried about that and now that its solved and the disk is clean.

4. Maybe its safe to say this is a Mint problem or maybe some problem with my hardware? but idk.

5. And finally thanks for your help and the tips, ill keep them in mind ^_^, i guess ill mark the post as solved if i dont get problems this week.
 
Hi again, its been some time i just wanted to make an update about how i "solved" the problem, not really but its ok:

1. First of all i tried everything, changing the display manager, disabling it, re installing X, tried dwm with defaults and no patches, and a bunch of other stuff, lastly i tried formatting the disk with another pc then re installing Mint BUT the problem was still there.

2. Since nothing of that worked i just switched to Arch idk i wanted to try it anyways, installed dwm with my configs and patches this sunday and everything is ok so far.

3. About debian being in the bootloader well since i was going to format the disk i didnt worried about that and now that its solved and the disk is clean.

4. Maybe its safe to say this is a Mint problem or maybe some problem with my hardware? but idk.

5. And finally thanks for your help and the tips, ill keep them in mind ^_^, i guess ill mark the post as solved if i dont get problems this week.
Not really solved. . .

Was wondering if you might have found out more. Like you, I am having the same problems, and I've done much the same fault finding (other than switching to a new distro).

Situation:
DWM aborts and goes back to the login screen when I do certain things. One repeatable thing is opening specific messages within Thunderbird. Some messages I can open without issues, but other messages cause DWM to close and I end up at the login screen again. I can't find any core files, so I assume they were closed rather than crashed. The same messages do it again each time and it's repeatable.
I'm also running Linux Mint, and this also started in much the same time frames. (About May). Everything was working, and then one day it was not. I was running DWM 6.3 at the time with only the systray patch. I have DWM without the systray patch and it still aborts. I have tried upgrading to DWM latest from GIT with and without the systray patch and it aborts as well.

I am fairly confident it's not specifically DWM, since it started without me making any changes to DWM. I think it must be an unhandled exception caused by changes in Thunderbird (probably related to the Firefox things above) and on Debian based distros. Some combination of functions not handled the way they should be by DWM.

For a while I switched to i3 because I needed to get work done - and now I have some time, I'm trying to get to the bottom of this. Appreciate any suggestions. There is nothing odd in /var/log that I can see. Where should I start?
 
Not really solved. . .

Was wondering if you might have found out more. Like you, I am having the same problems, and I've done much the same fault finding (other than switching to a new distro).

Situation:
DWM aborts and goes back to the login screen when I do certain things. One repeatable thing is opening specific messages within Thunderbird. Some messages I can open without issues, but other messages cause DWM to close and I end up at the login screen again. I can't find any core files, so I assume they were closed rather than crashed. The same messages do it again each time and it's repeatable.
I'm also running Linux Mint, and this also started in much the same time frames. (About May). Everything was working, and then one day it was not. I was running DWM 6.3 at the time with only the systray patch. I have DWM without the systray patch and it still aborts. I have tried upgrading to DWM latest from GIT with and without the systray patch and it aborts as well.

I am fairly confident it's not specifically DWM, since it started without me making any changes to DWM. I think it must be an unhandled exception caused by changes in Thunderbird (probably related to the Firefox things above) and on Debian based distros. Some combination of functions not handled the way they should be by DWM.

For a while I switched to i3 because I needed to get work done - and now I have some time, I'm trying to get to the bottom of this. Appreciate any suggestions. There is nothing odd in /var/log that I can see. Where should I start?
Welcome to the forum. I think you would be better placed to start a new thread for this topic for a few reasons. One is that it is already marked as solved, but you have a problem which evidently is not solved yet. Another reason is that a more relevant title for your specific issue would help readers to start getting a handle on the problem since it appears to be a concern that is different to the title of this thread.

On the actual problem, it sounds like you are using the default linux mint display manager, lightdm. What happens if you take it out of the equation by trying the proposal in post #4 above?
 

Members online


Latest posts

Top