discord xdg-mime process eats a lot of CPU, and discord doesn't start unless I kill a xdg process about spotify

Hello

I'm using discord. When I launch it, it gets stuck on a loading splash screen forever, until I kill a process about xdg-mime about discord and spotify [1], and a xdg-mime process [2] regularly eats a lot of CPU power, sends my load to 4, and starts my fans. As soon as I kill that process, I can hear the fans stop, the CPU usage drop, and load slowly fall back.

[1] sh /usr/bin/xdg-mime query default x-scheme-handler/spotify

[2] apparently it's more than just one process, there's a couple others like the one above, and a few others that say sh /usr/bin/xdg-mime query default x-scheme-handler/discord with a number at the end, different everytime.

does anyone know what xdg-mime is used for, if it's supposed to behave like that, and if there is something I should do ? from what I could gather discord uses xdg-mime to open links, which would make sense as that doesn't work anymore, I have to copy and paste urls to the browser. when I forget it creates a process that will stay forever that often says xdg-open url where url is the link I clicked on, but the browser doesn't pick on it.

thank you

https://wiki.archlinux.org/index.php/Xdg-utils

2 Likes

In addition to what @SGS posted, take a look at the man page (man xdg-mime):
https://jlk.fjfi.cvut.cz/arch/manpages/man/extra/xdg-utils/xdg-mime.1.en

The x-scheme-handler/spotify MIME type gets registered by Spotify and is assigned to the spotify.desktop handler. I have no idea what is going on in your system and why xdg-mime is querying/searching for the handler of this specific MIME type.

In a terminal window run

xdg-mime default spotify.desktop x-scheme-handler/spotify

and see if that makes any difference regarding issue [1].


This MIME type didn't get registered in my system after installing Discord. It's obviously related to Discord, but I couldn't reproduce its registration in the shared MIME info database.

It would help if you could post the content of the files

/usr/share/applications/mimeinfo.cache

and

~/.config/mimeapps.list
1 Like

here are the files

I'll add that I don't have spotify installed on my computer.
Where can I find the .desktop files ? I see a couple in my ~/Desktop, I can find /opt/discord/discord.desktop, would xdg-mime be able to find them all around the computer ?

mimeinfo.cache
[MIME Cache]
application/clarisworks=libreoffice-calc.desktop;libreoffice-draw.desktop;libreoffice-writer.desktop;
application/csv=libreoffice-calc.desktop;
application/epub+zip=org.pwmt.zathura-pdf-mupdf.desktop;xarchiver.desktop;
application/excel=libreoffice-calc.desktop;
application/font-woff=org.fontforge.FontForge.desktop;
application/gzip=xarchiver.desktop;
application/macwriteii=libreoffice-writer.desktop;
application/mathml+xml=libreoffice-math.desktop;
application/mpeg4-iod=vlc.desktop;
application/mpeg4-muxcodetable=vlc.desktop;
application/msexcel=libreoffice-calc.desktop;
application/mspowerpoint=libreoffice-impress.desktop;
application/msword=libreoffice-writer.desktop;
application/mxf=mpv.desktop;vlc.desktop;
application/octet-stream=open-fuse-iso.desktop;
application/ogg=mpv.desktop;vlc.desktop;
application/oxps=org.pwmt.zathura-pdf-mupdf.desktop;
application/pdf=epdfview.desktop;gimp.desktop;libreoffice-draw.desktop;org.pwmt.zathura-pdf-mupdf.desktop;
application/pkcs10=gcr-viewer.desktop;
application/pkcs10+pem=gcr-viewer.desktop;
application/pkcs12=gcr-viewer.desktop;
application/pkcs12+pem=gcr-viewer.desktop;
application/pkcs7-mime=gcr-viewer.desktop;
application/pkcs7-mime+pem=gcr-viewer.desktop;
application/pkcs8=gcr-viewer.desktop;
application/pkcs8+pem=gcr-viewer.desktop;
application/pkix-cert=gcr-viewer.desktop;
application/pkix-cert+pem=gcr-viewer.desktop;
application/pkix-crl=gcr-viewer.desktop;
application/pkix-crl+pem=gcr-viewer.desktop;
application/postscript=gimp.desktop;
application/prs.plucker=libreoffice-writer.desktop;
application/ram=vlc.desktop;
application/rdf+xml=palemoon.desktop;
application/rss+xml=palemoon.desktop;
application/rtf=libreoffice-writer.desktop;
application/sdp=mpv.desktop;vlc.desktop;
application/smil=mpv.desktop;
application/streamingmedia=mpv.desktop;
application/tab-separated-values=libreoffice-calc.desktop;
application/vnd.android.package-archive=xarchiver.desktop;
application/vnd.apple.mpegurl=mpv.desktop;vlc.desktop;
application/vnd.comicbook+zip=xarchiver.desktop;
application/vnd.corel-draw=libreoffice-draw.desktop;
application/vnd.debian.binary-package=xarchiver.desktop;
application/vnd.font-fontforge-sfd=org.fontforge.FontForge.desktop;
application/vnd.lotus-1-2-3=libreoffice-calc.desktop;
application/vnd.lotus-wordpro=libreoffice-writer.desktop;
application/vnd.ms-asf=mpv.desktop;vlc.desktop;
application/vnd.ms-excel=libreoffice-calc.desktop;
application/vnd.ms-excel.sheet.binary.macroEnabled.12=libreoffice-calc.desktop;
application/vnd.ms-excel.sheet.macroEnabled.12=libreoffice-calc.desktop;
application/vnd.ms-excel.template.macroEnabled.12=libreoffice-calc.desktop;
application/vnd.ms-powerpoint=libreoffice-impress.desktop;
application/vnd.ms-powerpoint.presentation.macroEnabled.12=libreoffice-impress.desktop;
application/vnd.ms-powerpoint.slideshow.macroEnabled.12=libreoffice-impress.desktop;
application/vnd.ms-powerpoint.template.macroEnabled.12=libreoffice-impress.desktop;
application/vnd.ms-publisher=libreoffice-draw.desktop;
application/vnd.ms-word=libreoffice-writer.desktop;
application/vnd.ms-word.document.macroEnabled.12=libreoffice-writer.desktop;
application/vnd.ms-word.template.macroEnabled.12=libreoffice-writer.desktop;
application/vnd.ms-works=libreoffice-calc.desktop;libreoffice-writer.desktop;
application/vnd.ms-wpl=vlc.desktop;
application/vnd.oasis.opendocument.chart=libreoffice-calc.desktop;
application/vnd.oasis.opendocument.chart-template=libreoffice-calc.desktop;
application/vnd.oasis.opendocument.database=libreoffice-base.desktop;
application/vnd.oasis.opendocument.formula=libreoffice-math.desktop;
application/vnd.oasis.opendocument.formula-template=libreoffice-math.desktop;
application/vnd.oasis.opendocument.graphics=libreoffice-draw.desktop;
application/vnd.oasis.opendocument.graphics-flat-xml=libreoffice-draw.desktop;libreoffice-xsltfilter.desktop;
application/vnd.oasis.opendocument.graphics-template=libreoffice-draw.desktop;
application/vnd.oasis.opendocument.presentation=libreoffice-impress.desktop;
application/vnd.oasis.opendocument.presentation-flat-xml=libreoffice-impress.desktop;libreoffice-xsltfilter.desktop;
application/vnd.oasis.opendocument.presentation-template=libreoffice-impress.desktop;
application/vnd.oasis.opendocument.spreadsheet=libreoffice-calc.desktop;
application/vnd.oasis.opendocument.spreadsheet-flat-xml=libreoffice-calc.desktop;libreoffice-xsltfilter.desktop;
application/vnd.oasis.opendocument.spreadsheet-template=libreoffice-calc.desktop;
application/vnd.oasis.opendocument.text=libreoffice-writer.desktop;
application/vnd.oasis.opendocument.text-flat-xml=libreoffice-writer.desktop;libreoffice-xsltfilter.desktop;
application/vnd.oasis.opendocument.text-master=libreoffice-writer.desktop;
application/vnd.oasis.opendocument.text-master-template=libreoffice-writer.desktop;
application/vnd.oasis.opendocument.text-template=libreoffice-writer.desktop;
application/vnd.oasis.opendocument.text-web=libreoffice-writer.desktop;
application/vnd.openofficeorg.extension=libreoffice-startcenter.desktop;xarchiver.desktop;
application/vnd.openxmlformats-officedocument.presentationml.presentation=libreoffice-impress.desktop;
application/vnd.openxmlformats-officedocument.presentationml.slide=libreoffice-impress.desktop;
application/vnd.openxmlformats-officedocument.presentationml.slideshow=libreoffice-impress.desktop;
application/vnd.openxmlformats-officedocument.presentationml.template=libreoffice-impress.desktop;
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet=libreoffice-calc.desktop;
application/vnd.openxmlformats-officedocument.spreadsheetml.template=libreoffice-calc.desktop;
application/vnd.openxmlformats-officedocument.wordprocessingml.document=libreoffice-writer.desktop;
application/vnd.openxmlformats-officedocument.wordprocessingml.template=libreoffice-writer.desktop;
application/vnd.palm=libreoffice-writer.desktop;
application/vnd.rar=xarchiver.desktop;
application/vnd.rn-realmedia=mpv.desktop;vlc.desktop;
application/vnd.rn-realmedia-vbr=mpv.desktop;vlc.desktop;
application/vnd.stardivision.writer-global=libreoffice-writer.desktop;
application/vnd.sun.xml.base=libreoffice-base.desktop;
application/vnd.sun.xml.calc=libreoffice-calc.desktop;
application/vnd.sun.xml.calc.template=libreoffice-calc.desktop;
application/vnd.sun.xml.draw=libreoffice-draw.desktop;
application/vnd.sun.xml.draw.template=libreoffice-draw.desktop;
application/vnd.sun.xml.impress=libreoffice-impress.desktop;
application/vnd.sun.xml.impress.template=libreoffice-impress.desktop;
application/vnd.sun.xml.math=libreoffice-math.desktop;
application/vnd.sun.xml.writer=libreoffice-writer.desktop;
application/vnd.sun.xml.writer.global=libreoffice-writer.desktop;
application/vnd.sun.xml.writer.template=libreoffice-writer.desktop;
application/vnd.visio=libreoffice-draw.desktop;
application/vnd.wordperfect=libreoffice-writer.desktop;
application/wordperfect=libreoffice-writer.desktop;
application/x-123=libreoffice-calc.desktop;
application/x-7z-compressed=xarchiver.desktop;
application/x-abiword=libreoffice-writer.desktop;
application/x-alpm-package=pamac-installer.desktop;
application/x-aportisdoc=libreoffice-writer.desktop;
application/x-arj=xarchiver.desktop;
application/x-bittorrent=deluge.desktop;
application/x-blender=blender.desktop;
application/x-bzip=xarchiver.desktop;
application/x-bzip-compressed-tar=xarchiver.desktop;
application/x-cd-image=open-fuse-iso.desktop;vlc.desktop;xfburn.desktop;
application/x-cmakecache=cmake-gui.desktop;
application/x-compress=xarchiver.desktop;
application/x-compressed-tar=xarchiver.desktop;
application/x-cpio=xarchiver.desktop;
application/x-cpio-compressed=xarchiver.desktop;
application/x-cue=mpv.desktop;
application/x-dbase=libreoffice-calc.desktop;
application/x-dbf=libreoffice-calc.desktop;
application/x-designer=designer.desktop;
application/x-desktop=lxshortcut.desktop;
application/x-doc=libreoffice-writer.desktop;
application/x-dos_ms_excel=libreoffice-calc.desktop;
application/x-excel=libreoffice-calc.desktop;
application/x-extension-m4a=mpv.desktop;vlc.desktop;
application/x-extension-mp4=mpv.desktop;vlc.desktop;
application/x-extension-txt=libreoffice-writer.desktop;
application/x-fictionbook+xml=libreoffice-writer.desktop;
application/x-flac=vlc.desktop;
application/x-flash-video=vlc.desktop;
application/x-font-bdf=org.fontforge.FontForge.desktop;
application/x-font-otf=org.fontforge.FontForge.desktop;
application/x-font-pcf=org.fontforge.FontForge.desktop;
application/x-font-tex=org.fontforge.FontForge.desktop;
application/x-font-ttf=org.fontforge.FontForge.desktop;
application/x-font-type1=org.fontforge.FontForge.desktop;
application/x-godot-project=godot.desktop;
application/x-hwp=libreoffice-writer.desktop;
application/x-iwork-keynote-sffkey=libreoffice-impress.desktop;
application/x-iwork-numbers-sffnumbers=libreoffice-calc.desktop;
application/x-iwork-pages-sffpages=libreoffice-writer.desktop;
application/x-java-archive=xarchiver.desktop;
application/x-keepass2=keeweb.desktop;
application/x-lha=xarchiver.desktop;
application/x-linguist=linguist.desktop;
application/x-lrzip=xarchiver.desktop;
application/x-lrzip-compressed-tar=xarchiver.desktop;
application/x-lz4=xarchiver.desktop;
application/x-lz4-compressed-tar=xarchiver.desktop;
application/x-lzip=xarchiver.desktop;
application/x-lzip-compressed-tar=xarchiver.desktop;
application/x-lzma=xarchiver.desktop;
application/x-lzma-compressed-tar=xarchiver.desktop;
application/x-lzop=xarchiver.desktop;
application/x-matroska=mpv.desktop;vlc.desktop;
application/x-mpegurl=mpv.desktop;
application/x-ms-dos-executable=wine.desktop;
application/x-ms-excel=libreoffice-calc.desktop;
application/x-ms-shortcut=wine.desktop;
application/x-msexcel=libreoffice-calc.desktop;
application/x-msi=wine.desktop;
application/x-mswrite=libreoffice-writer.desktop;
application/x-ogg=mpv.desktop;vlc.desktop;
application/x-ogm=mpv.desktop;
application/x-ogm-audio=mpv.desktop;
application/x-ogm-video=mpv.desktop;
application/x-pagemaker=libreoffice-draw.desktop;
application/x-pem-file=gcr-viewer.desktop;
application/x-pem-key=gcr-viewer.desktop;
application/x-pkcs12=gcr-viewer.desktop;
application/x-pkcs7-certificates=gcr-viewer.desktop;
application/x-quattropro=libreoffice-calc.desktop;
application/x-quicktime-media-link=vlc.desktop;
application/x-quicktimeplayer=vlc.desktop;
application/x-rar=xarchiver.desktop;
application/x-raw-disk-image=open-fuse-iso.desktop;
application/x-rpm=xarchiver.desktop;
application/x-shellscript=emacs.desktop;nvim-qt.desktop;nvim.desktop;vim.desktop;
application/x-shockwave-flash=vlc.desktop;
application/x-shorten=mpv.desktop;
application/x-smil=mpv.desktop;
application/x-sony-bbeb=libreoffice-writer.desktop;
application/x-source-rpm=xarchiver.desktop;
application/x-spkac=gcr-viewer.desktop;
application/x-spkac+base64=gcr-viewer.desktop;
application/x-starcalc=libreoffice-calc.desktop;
application/x-stardraw=libreoffice-draw.desktop;
application/x-starwriter=libreoffice-writer.desktop;
application/x-streamingmedia=mpv.desktop;
application/x-t602=libreoffice-writer.desktop;
application/x-tar=xarchiver.desktop;
application/x-tarz=xarchiver.desktop;
application/x-tzo=xarchiver.desktop;
application/x-vmware-enc-vm=vmware-player.desktop;vmware-workstation.desktop;
application/x-vmware-team=vmware-workstation.desktop;
application/x-vmware-vm=vmware-player.desktop;vmware-workstation.desktop;
application/x-wpg=libreoffice-draw.desktop;
application/x-x509-ca-cert=gcr-viewer.desktop;
application/x-x509-user-cert=gcr-viewer.desktop;
application/x-xpinstall=firefox.desktop;palemoon.desktop;xarchiver.desktop;
application/x-xz=xarchiver.desktop;
application/x-xz-compressed-tar=xarchiver.desktop;
application/xhtml+xml=firefox.desktop;palemoon.desktop;
application/xml=palemoon.desktop;
application/xspf+xml=vlc.desktop;
application/zip=xarchiver.desktop;
application/zstd=xarchiver.desktop;
audio/3gpp=mpv.desktop;vlc.desktop;
audio/3gpp2=mpv.desktop;vlc.desktop;
audio/AMR=mpv.desktop;vlc.desktop;
audio/AMR-WB=vlc.desktop;
audio/aac=mpv.desktop;vlc.desktop;
audio/ac3=mpv.desktop;vlc.desktop;
audio/aiff=mpv.desktop;
audio/amr-wb=mpv.desktop;
audio/basic=vlc.desktop;
audio/dv=mpv.desktop;vlc.desktop;
audio/eac3=mpv.desktop;vlc.desktop;
audio/flac=mpv.desktop;vlc.desktop;
audio/m3u=mpv.desktop;
audio/m4a=mpv.desktop;vlc.desktop;
audio/midi=vlc.desktop;
audio/mp1=mpv.desktop;vlc.desktop;
audio/mp2=mpv.desktop;vlc.desktop;
audio/mp3=mpv.desktop;vlc.desktop;
audio/mp4=mpv.desktop;vlc.desktop;
audio/mpeg=mpv.desktop;vlc.desktop;
audio/mpeg2=mpv.desktop;
audio/mpeg3=mpv.desktop;
audio/mpegurl=mpv.desktop;vlc.desktop;
audio/mpg=mpv.desktop;vlc.desktop;
audio/musepack=mpv.desktop;
audio/ogg=mpv.desktop;vlc.desktop;
audio/opus=mpv.desktop;vlc.desktop;
audio/rn-mpeg=mpv.desktop;
audio/scpls=mpv.desktop;vlc.desktop;
audio/vnd.dolby.heaac.1=mpv.desktop;vlc.desktop;
audio/vnd.dolby.heaac.2=mpv.desktop;vlc.desktop;
audio/vnd.dolby.mlp=vlc.desktop;
audio/vnd.dts=mpv.desktop;vlc.desktop;
audio/vnd.dts.hd=mpv.desktop;vlc.desktop;
audio/vnd.rn-realaudio=mpv.desktop;vlc.desktop;
audio/vorbis=mpv.desktop;vlc.desktop;
audio/wav=mpv.desktop;vlc.desktop;
audio/webm=mpv.desktop;vlc.desktop;
audio/x-aac=mpv.desktop;vlc.desktop;
audio/x-adpcm=mpv.desktop;vlc.desktop;
audio/x-aiff=mpv.desktop;vlc.desktop;
audio/x-ape=mpv.desktop;vlc.desktop;
audio/x-flac=vlc.desktop;
audio/x-gsm=vlc.desktop;
audio/x-it=vlc.desktop;
audio/x-m4a=mpv.desktop;vlc.desktop;
audio/x-matroska=mpv.desktop;vlc.desktop;
audio/x-mod=vlc.desktop;
audio/x-mp1=mpv.desktop;vlc.desktop;
audio/x-mp2=mpv.desktop;vlc.desktop;
audio/x-mp3=mpv.desktop;vlc.desktop;
audio/x-mpeg=vlc.desktop;
audio/x-mpegurl=mpv.desktop;vlc.desktop;
audio/x-mpg=mpv.desktop;vlc.desktop;
audio/x-ms-asf=mpv.desktop;vlc.desktop;
audio/x-ms-asx=vlc.desktop;
audio/x-ms-wax=vlc.desktop;
audio/x-ms-wma=mpv.desktop;vlc.desktop;
audio/x-musepack=mpv.desktop;vlc.desktop;
audio/x-pls=mpv.desktop;
audio/x-pn-aiff=vlc.desktop;
audio/x-pn-au=mpv.desktop;vlc.desktop;
audio/x-pn-realaudio=mpv.desktop;vlc.desktop;
audio/x-pn-realaudio-plugin=vlc.desktop;
audio/x-pn-wav=mpv.desktop;vlc.desktop;
audio/x-pn-windows-acm=vlc.desktop;
audio/x-pn-windows-pcm=mpv.desktop;
audio/x-real-audio=vlc.desktop;
audio/x-realaudio=mpv.desktop;vlc.desktop;
audio/x-s3m=vlc.desktop;
audio/x-scpls=mpv.desktop;vlc.desktop;
audio/x-shorten=mpv.desktop;vlc.desktop;
audio/x-speex=vlc.desktop;
audio/x-tta=mpv.desktop;vlc.desktop;
audio/x-vorbis=mpv.desktop;vlc.desktop;
audio/x-vorbis+ogg=mpv.desktop;vlc.desktop;
audio/x-wav=mpv.desktop;vlc.desktop;
audio/x-wavpack=mpv.desktop;vlc.desktop;
audio/x-xm=vlc.desktop;
font/otf=org.fontforge.FontForge.desktop;
font/ttf=org.fontforge.FontForge.desktop;
font/woff=org.fontforge.FontForge.desktop;
font/woff2=org.fontforge.FontForge.desktop;
image/bmp=gimp.desktop;viewnior.desktop;
image/g3fax=gimp.desktop;
image/gif=gimp.desktop;palemoon.desktop;viewnior.desktop;
image/heic=gimp.desktop;
image/heif=gimp.desktop;
image/jp2=gimp.desktop;
image/jpeg=gimp.desktop;palemoon.desktop;viewnior.desktop;
image/jpg=viewnior.desktop;
image/pjpeg=viewnior.desktop;
image/png=gimp.desktop;palemoon.desktop;viewnior.desktop;
image/svg+xml=gimp.desktop;viewnior.desktop;
image/svg+xml-compressed=viewnior.desktop;
image/tiff=gimp.desktop;viewnior.desktop;
image/vnd.rn-realpix=vlc.desktop;
image/vnd.wap.wbmp=viewnior.desktop;
image/x-bmp=viewnior.desktop;
image/x-compressed-xcf=gimp.desktop;
image/x-emf=libreoffice-draw.desktop;
image/x-exr=gimp.desktop;
image/x-fits=gimp.desktop;
image/x-freehand=libreoffice-draw.desktop;
image/x-gimp-gbr=gimp.desktop;
image/x-gimp-gih=gimp.desktop;
image/x-gimp-pat=gimp.desktop;
image/x-gray=viewnior.desktop;
image/x-icb=viewnior.desktop;
image/x-ico=viewnior.desktop;
image/x-icon=gimp.desktop;
image/x-pcx=gimp.desktop;viewnior.desktop;
image/x-png=viewnior.desktop;
image/x-portable-anymap=gimp.desktop;viewnior.desktop;
image/x-portable-bitmap=gimp.desktop;viewnior.desktop;
image/x-portable-graymap=gimp.desktop;viewnior.desktop;
image/x-portable-pixmap=gimp.desktop;viewnior.desktop;
image/x-psd=gimp.desktop;
image/x-psp=gimp.desktop;
image/x-sgi=gimp.desktop;
image/x-tga=gimp.desktop;
image/x-webp=gimp.desktop;
image/x-wmf=gimp.desktop;libreoffice-draw.desktop;
image/x-xbitmap=gimp.desktop;viewnior.desktop;
image/x-xcf=gimp.desktop;
image/x-xcursor=gimp.desktop;
image/x-xpixmap=gimp.desktop;viewnior.desktop;
image/x-xwindowdump=gimp.desktop;
inode/directory=pcmanfm.desktop;ranger.desktop;
misc/ultravox=vlc.desktop;
text/comma-separated-values=libreoffice-calc.desktop;
text/csv=libreoffice-calc.desktop;
text/english=emacs.desktop;nvim-qt.desktop;nvim.desktop;vim.desktop;
text/google-video-pointer=vlc.desktop;
text/html=firefox.desktop;palemoon.desktop;
text/markdown=markdown_previewer.desktop;
text/mathml=libreoffice-math.desktop;
text/plain=emacs.desktop;libreoffice-writer.desktop;mousepad.desktop;nvim-qt.desktop;nvim.desktop;vim.desktop;
text/rtf=libreoffice-writer.desktop;
text/spreadsheet=libreoffice-calc.desktop;
text/tab-separated-values=libreoffice-calc.desktop;
text/vnd.trolltech.linguist=linguist.desktop;
text/x-c=emacs.desktop;nvim-qt.desktop;nvim.desktop;vim.desktop;
text/x-c++=emacs.desktop;nvim-qt.desktop;nvim.desktop;vim.desktop;
text/x-c++hdr=emacs.desktop;nvim-qt.desktop;nvim.desktop;vim.desktop;
text/x-c++src=emacs.desktop;nvim-qt.desktop;nvim.desktop;vim.desktop;
text/x-chdr=emacs.desktop;nvim-qt.desktop;nvim.desktop;vim.desktop;
text/x-comma-separated-values=libreoffice-calc.desktop;
text/x-csrc=emacs.desktop;nvim-qt.desktop;nvim.desktop;vim.desktop;
text/x-csv=libreoffice-calc.desktop;
text/x-google-video-pointer=vlc.desktop;
text/x-java=emacs.desktop;nvim-qt.desktop;nvim.desktop;vim.desktop;
text/x-makefile=emacs.desktop;nvim-qt.desktop;nvim.desktop;vim.desktop;
text/x-markdown=markdown_previewer.desktop;
text/x-moc=emacs.desktop;nvim-qt.desktop;nvim.desktop;vim.desktop;
text/x-pascal=emacs.desktop;nvim-qt.desktop;nvim.desktop;vim.desktop;
text/x-tcl=emacs.desktop;nvim-qt.desktop;nvim.desktop;vim.desktop;
text/x-tex=emacs.desktop;nvim-qt.desktop;nvim.desktop;vim.desktop;
text/xml=firefox.desktop;palemoon.desktop;
video/3gp=mpv.desktop;vlc.desktop;
video/3gpp=mpv.desktop;vlc.desktop;
video/3gpp2=mpv.desktop;vlc.desktop;
video/avi=mpv.desktop;vlc.desktop;
video/divx=mpv.desktop;vlc.desktop;
video/dv=mpv.desktop;vlc.desktop;
video/fli=mpv.desktop;vlc.desktop;
video/flv=mpv.desktop;vlc.desktop;
video/mkv=mpv.desktop;
video/mp2t=mpv.desktop;vlc.desktop;
video/mp4=mpv.desktop;vlc.desktop;
video/mp4v-es=mpv.desktop;vlc.desktop;
video/mpeg=mpv.desktop;vlc.desktop;
video/mpeg-system=vlc.desktop;
video/msvideo=mpv.desktop;vlc.desktop;
video/ogg=mpv.desktop;vlc.desktop;
video/quicktime=mpv.desktop;vlc.desktop;
video/vnd.divx=mpv.desktop;vlc.desktop;
video/vnd.mpegurl=mpv.desktop;vlc.desktop;
video/vnd.rn-realvideo=mpv.desktop;vlc.desktop;
video/webm=mpv.desktop;palemoon.desktop;vlc.desktop;
video/x-anim=vlc.desktop;
video/x-avi=mpv.desktop;vlc.desktop;
video/x-flc=mpv.desktop;vlc.desktop;
video/x-fli=vlc.desktop;
video/x-flic=mpv.desktop;
video/x-flv=mpv.desktop;vlc.desktop;
video/x-m4v=mpv.desktop;vlc.desktop;
video/x-matroska=mpv.desktop;vlc.desktop;
video/x-mpeg=vlc.desktop;
video/x-mpeg-system=vlc.desktop;
video/x-mpeg2=mpv.desktop;vlc.desktop;
video/x-mpeg3=mpv.desktop;
video/x-ms-afs=mpv.desktop;
video/x-ms-asf=mpv.desktop;vlc.desktop;
video/x-ms-asf-plugin=vlc.desktop;
video/x-ms-asx=vlc.desktop;
video/x-ms-wm=vlc.desktop;
video/x-ms-wmv=mpv.desktop;vlc.desktop;
video/x-ms-wmx=mpv.desktop;vlc.desktop;
video/x-ms-wvx=vlc.desktop;
video/x-ms-wvxvideo=mpv.desktop;
video/x-msvideo=mpv.desktop;vlc.desktop;
video/x-nsv=vlc.desktop;
video/x-ogm=mpv.desktop;vlc.desktop;
video/x-ogm+ogg=mpv.desktop;vlc.desktop;
video/x-theora=mpv.desktop;vlc.desktop;
video/x-theora+ogg=mpv.desktop;vlc.desktop;
x-content/audio-cdda=vlc.desktop;
x-content/audio-player=vlc.desktop;
x-content/video-dvd=vlc.desktop;
x-content/video-svcd=vlc.desktop;
x-content/video-vcd=vlc.desktop;
x-scheme-handler/chrome=palemoon.desktop;
x-scheme-handler/ftp=palemoon.desktop;
x-scheme-handler/http=firefox.desktop;palemoon.desktop;
x-scheme-handler/https=firefox.desktop;palemoon.desktop;
x-scheme-handler/icy=vlc.desktop;
x-scheme-handler/icyx=vlc.desktop;
x-scheme-handler/irc=io.github.Hexchat.desktop;
x-scheme-handler/ircs=io.github.Hexchat.desktop;
x-scheme-handler/lutris=net.lutris.Lutris.desktop;
x-scheme-handler/magnet=deluge.desktop;
x-scheme-handler/mms=vlc.desktop;
x-scheme-handler/mmsh=vlc.desktop;
x-scheme-handler/rtmp=vlc.desktop;
x-scheme-handler/rtp=vlc.desktop;
x-scheme-handler/rtsp=vlc.desktop;
x-scheme-handler/snap=snap-handle-link.desktop;
x-scheme-handler/steam=steam.desktop;
x-scheme-handler/vmrc=vmware-player.desktop;vmware-workstation.desktop;
x-scheme-handler/vnd.libreoffice.cmis=libreoffice-startcenter.desktop;

mimeapps.list
[Default Applications]
x-scheme-handler/discord-378347429537251328=discord-378347429537251328.desktop
image/jpeg=viewnior.desktop
application/pdf=org.pwmt.zathura.desktop
x-scheme-handler/discord-603355450112737291=discord-603355450112737291.desktop
text/x-python=emacs.desktop
text/plain=mousepad.desktop
x-scheme-handler/discord-360541292578471937=discord-360541292578471937.desktop
x-scheme-handler/spotify=spotify.desktop

[Added Associations]
image/jpeg=viewnior.desktop;
application/pdf=org.pwmt.zathura.desktop;
image/png=viewnior.desktop;feh.desktop;
application/octet-stream=emacs.desktop;
text/x-python=emacs.desktop;
text/plain=mousepad.desktop;

I tested restarting discord right after I ran xdg-mime default spotify.desktop x-scheme-handler/spotify (which, as I don't have spotify installed, I'm not sure how what it's supposed to do), and I still had a xdg-mime process running waiting for spotify. I killed it and discord started properly, and fans starting screaming their lungs out. I took a few screenshots of gotop to show what happens

  1. All CPU maxed out, I think I had a load of 6 and climbing.
    2019-12-07-231738_1920x1080_scrot

  2. I killed xdg-mime once, and we can see a drastic decrease in CPU usage, but still a lot higher than it's supposed to be.
    2019-12-07-231754_1920x1080_scrot

  3. I killed xdg-mime again, and again drastic change, and fans finally calm down. I now have a load of 1.5, which is what I'd expect running discord using vocal and a firefox instance (I suppose ?)
    2019-12-07-231826_1920x1080_scrot

In this case you can safely remove this line from the ~/.config/mimeapps.list file

x-scheme-handler/spotify=spotify.desktop

although I don't think that this will solve your issue. This is for "cleaning" the mimeapps.list file from unnecessary entries.

.desktop files are usually installed in the /usr/share/applications/ directory, but in the case of Discord the installed .desktop file is a symlink that points to the /opt/discord/discord.desktop file.

Yes, xdg-mime uses the shared MIME-info database, so it should be able to locate those files.
I think the problem is related to Discord and Spotify - could be wrong though, since I don't use any of them - as an online search revealed.

Give that second link a try and see how that goes.

1 Like

The guy apparently didn't get annoyed at it and didn't nuke that process out of existence for using all the CPU for no reason like me ^^ It seems to be a Discord issue then

I did, didn't solve any issue though.

That worked. So I guess solved ? That hacky workaround shouldn't need to exist though. Maybe I can send this thread to discord

I agree that this workaround shouldn't be needed at all, that's why I would strongly recommend to report the issue to the Discord development team.

This page might help you in that regard:
https://support.discordapp.com/hc/en-us/articles/115000465492-How-to-Report-Bugs

2 Likes

This is due to the following bug:

which, if you have any *.desktop files containing spaces, may cause xdg-mime to recurse over your entire home directory or filesystem, causing it to consume much CPU and hang. The fix is committed to xdg-utils, it would be good if the Manjaro maintainers packaged it. :wink:

While you wait, you can simply add the missing pair of quotes by editing the xdg-mime script as in the pull request:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by