Display bug for only a few applications

Hi there. I have two applications (VS CODE and BITWARDEN) which are not being displayed correctly. These two applications are installed as local clients on my computer. Unlike all other applications, when I launch either one or the other of these 2 apps, the window does not show. I can only see the top bar (with the name of the application) and the menu bar. The rest of the window remains black. I can still see a few icons or some button lines but no text is visible. I have tried to uninstall and install again the applications but the problem is still here.
I would be so grateful if someone would help me fix this bug.

See the following screenshot (with VS CODE window) to illustrate:

Gday @Jerome , Welcome to the community!

Could you tell us about your pc please (Spec's)
Brand/Model:?
CPU:?
RAM:?
Storage size & SSD/HDD:?
Graphic's:?

Also do you wish to dual boot,,What windows are you using if so?

What app did you use to create the bootable drive?

ADDED:
Have you tried

sudo apt update

Then

sudo apt upgrade

You may also try

sudo apt install ubuntu-restricted-extras

"Shutdown"
Restart & try again.

If no luck please show the results of the below:

sudo lshw -C display

1 Like

Have you just installed these two programs or did they used to work before fine?

Lastly,

snap list

flatpak list

and see if there is a correlation of the type of package installed. Are the misbehaving packages all of one format?

Hi Ocka. Thanks for your reply.
My PC is a Hewlett Packard / Pavilion 15"
CPU: AMD Ryzen 7 4700u with radeon graphics x 8
RAM: 15 Gb
Storage size: 1 Tb (i think it is an SSD but not sure)
Graphic's: AMD Renoir

I have a dual boot Linux Zorin / Windows but use almost only Linux.

I am now going to try what you recommend (sudo lines) and then I will come back here.

I have done what you recommended, Ocka. Until "shutdown and restart again". And it does not change VS Code window appearance.

I have been using both programs for almost two years. And Bitwarden started not to show correctly around one or two months ago. I had not used VS Code for about 4 months when I tried to launch it a few days ago. And that is when I realised that I had the same problem with VS code (as with Bitwarden). Surprisingly, Bitwarden started showing properly again yesterday (after uninstalling it and reinstalling it, I believe). I tried to do the same with VS code (uninstall / install) but it dit not change anything at all.

It is a laptop. I have another monitor connected and it is correctly detected. The display issue occurs on either screen (integrated one or additional one).

VS Code ("code") appears on 'flatpak list'. Bitwarden appears on 'snap list'.


Flatpak and Snaps both containerize the apps, disallowing them from communication within the system.
You might try

flatpak update

I cannot remember the snap update command off the top of my head... But it should be an easy Net Search.

Alternatively, as @337harvey points out, remove the Double-Sandboxed apps and install the two as APT packages using apt instead.
This is the route I would go.

2 Likes

Thanks a lot for your help (both Aravisian and 337harvey).
I tried to follow your recommendations: I have removed both Bitwarden and VS Code from my computer (the ones that were installed through snap or flatpak). And then I installed them again using the terminal and sudo apt install commands.

In particular for VS Code, I followed instructions found here: Running Visual Studio Code on Linux

Which means that I did the following:
I downloaded a .deb file (code_1.84.2-1699528352_amd64.deb)
Then I executed the following lines in the terminal

sudo apt install code_1.84.2-1699528352_amd64.deb
sudo apt install apt-transport-https
sudo apt update
sudo apt install code

Unfortunately the problem persists with VS Code (and as previously said I do not have the problem with Bitwarden anymore). :sweat:

I would remove VS Code again, then do sudo apt-get update.

Next, via Terminal, navigate to where you downloaded the .deb package then:

sudo dpkg -i code_1.84.2-1699528352_amd64.deb

Then

sudo apt-get update && sudo apt-get dist-upgrade

The last command doesn't update the distro it looks at what new packages have been installed and installs any additional packages needed for the new package to run correctly.

Then reboot just like that other OS for the changes to take effect.

1 Like

Try to run VSCode from the terminal with --disable-extensions and/or --disable-gpu, see if that helps somewhat.

1 Like

I have found a small improvement, even though I do not consider it as a definite solution.

The display problem disappear when I launch VS code from terminal with the "disable GPU" option: code --disable-gpu rather than with a plain code.

I used the following bug report: [Bug] UI not rendering, only works with "--disable-gpu" · Issue #199693 · microsoft/vscode · GitHub

@zenzen you guessed right!!! as explained in my previous message, running vs code with --disable-gpu worked. Would you be able to infer from that the problem occuring when I do not use the --disable-gpu option? And what could be a more permanent solution?

I am going to try that (and will let you know if it works or not). Thanks also a lot for your help! I am amazed at how helpful you guys are! Really investigating the issue. I would like to thank you all.
THANK YOU ALL so much. It seems that thanks to your help and effort we found the solution...

Oh, what a coincidence! Well I guessed that because both Bitwarden and VSCode are Electron-based applications, so if only one worked there must've been something specific to VSCode. Looking into docs, they suggest this command as a potential fix:

rm -r ~/.config/Code/GPUCache
4 Likes

Another coincidence: I also digged a little bit further into the bug explanation and had found the rm -rf ~/.config/Code/GPUCache. I have just executed it and now a plain code launches VS Code correctly.

3 Likes

Awesome, well done then looks like I've been just one step behind this whole time :smiley: