It wasn't exactly copy+paste, but it was something along those lines. I didn't fully think through what was happening. I think I could have answered questions about what was going on but I wasn't confident about understanding it.
With my big accident where I had to restore the system from backup, I had to create partitions and filesystems and copy the contents with cp -a and there was no guide for that.
I think that's fine for the power usage you are seeing there, those 88 Watts. The CPUs nowadays try to get as close to their limits as they can at all times. When you improve cooling, they will react by boosting higher and will end up staying at the same temperatures. You can only get things to actually drop temperatures if the CPU is hitting some other limit first before it reaches the temp limit, like if you would limit things to for example 65 Watts in the BIOS menus.
There's an experimental patch shared there from four months ago. You could do your own kernel with it if you know how that works.
Someone from AMD says there at the end that a patch is close to going into "amd-staging-drm-next" which is the changes they are sending into upstream Linux project for the next version. I think this means it would then show up in kernel version 6.20. Hopefully the required changes are not too big, in that case a fix will also show up in older kernel versions.
In the comments there people were also writing that the mouse set up to run at 500Hz instead of 1000Hz+ doesn't cause the problem.
I think this is a bug with the code path used by X in the kernel to update the hardware mouse pointer. Wayland compositors are using a different system call to update the cursor so there it's not happening. I'm luckily only using X for the login screen, so as a workaround I just enable software cursor with an xorg.conf file like this:
Section "OutputClass"
Identifier "my amdgpu settings"
MatchDriver "amdgpu"
Option "VariableRefresh" "yes"
Option "AsyncFlipSecondaries" "yes"
# software cursor because of a bug with a laggy mouse cursor after monitor suspend
Option "SWcursor" "yes"
EndSection
A software cursor feels crappy to me with 60Hz monitors, I can feel the added latency, but with 120Hz etc. it's okay.
Previously this only happened for me after the monitor was in sleep once, but nowadays it's happening all the time. This is with an RX 9070 XT.
This problem also sometimes showed up in Windows for me with AMD graphics. It happened very rarely there, once every few months. I've seen the problem with an RX 480 and RX 6700 XT in Windows.
There's a bug report about this somewhere on the amdgpu kernel module bug tracker. I remember it had someone sharing an experimental kernel patch. The bug tracker is here:
I found out you can make xwaylandvideobridge work again by starting Discord like this:
env XDG_SESSION_TYPE=x11 discord
This problem is caused by a change in the newest Discord version. It's now trying to do the Wayland screen capture by itself and it's failing to do that correctly. That XDG_SESSION_TYPE=x11 makes it go back to its old X11 capture method.
I found out that you can make xwaylandvideobridge work again by starting Discord like this:
env XDG_SESSION_TYPE=x11 discord
If you never saw xwaylandvideobridge working in Discord, this is how it works:
When you click on screen sharing inside Discord, you will see a source window named "Wayland to X Recording bridge". You need to select that window inside Discord, that's where the xwaylandvideobridge program will shovel the video data into.
I'm not sure as I have no one to ask right now, but it seems to be stuttering madly for me? At least the preview is updating just once a second or so.
About what was going on with Discord:
I found out that the problem with xwaylandvideobridge was caused by a change in Discord. In the newest version it is now trying to access the Wayland screen capture by itself. It's failing to that correctly. That's where those error messages you saw in the terminal came from, these ones here:
'loop->recurse > 0' failed at ../pipewire/src/pipewire/thread-loop.c:426 pw_thread_loop_wait()
It seems to look at that XDG_SESSION_TYPE environment variable to decide between using Wayland capture or its old X11 capture code.
I'm super lazy about managing this. The installation here is many years old and if I don't immediately remove something after trying it, then it only gets removed if it ever happens to cause a problem, so in practice it never gets removed.
$ pacman -Q | wc -l
2883
I once tried researching what packages are never used by looking at the file access times but that experiment went nowhere. There were problems with files in the packages that always get accessed at every boot. I tried to work around that problem a little but never finished. The script I wrote for this is here if anyone wants to try it:
Without argument it lists all packages sorted by last access date. Adding a package name to its command line, it will list the files in the package and their date and show what it ignored.
The script needs the default relatime mount option, it won't do anything useful if noatime is used.
I just tried it right now and it's broken for me as well. I guess it broke at some point with updates? :( I can find people reporting bugs like here: https://bugs.kde.org/show_bug.cgi?id=476846
You have to run Discord like normal for xwaylandvideobridge to work. Discord needs to be an X11 program to use it. That Wayland command line you tried breaks this.
When you try screen sharing in Discord, a window from the xwaylandvideobridge program will show up where you can select what to share. The xwaylandvideobridge program needs to be running in the background for this to work. The package installs an XDG autostart entry, but that only gets activated at login, so directly after installing the package you have to start the program manually. The program shows up as a systray icon in the desktop panel while it's running.
Something else about Discord as the program is weird and you are new to it: you'll want to add ...
"SKIP_HOST_UPDATE": true
... to its ~/.config/discord/settings.json config file. Discord normally refuses to start when there's an upstream update. You are then stuck until the Arch package gets updated. That config file setting disables that behavior. Make sure to add a , comma in the right place when editing the file.
Another thing that might be interesting is, there's an AUR package discord_arch_electron that makes Discord use the newer Electron version from the Arch repos instead of its own, old version.
If you are vaguely interested in ever giving compression a try again, using zstd -T0 -1 as the command line compresses at 2 GB/s on my Ryzen 5800X. It turns a 228 MB sized fallback image into 76 MB and needs 0.1 seconds for that.
Here's how I tested it:
$ unzstd < /boot/initramfs-linux-lts-fallback.img > testfile.img
$ time zstd -T0 -1 < testfile.img > testfile.img.zst
real 0m0.085s
...
$ du -ha *
228M testfile.img
76M testfile.img.zst
The settings to use this in /etc/mkinitcpio.conf would be:
You are probably using X aka. X11 aka. Xorg for your graphical desktop? I would assume the card is there, it's just not getting used as that needs manual intervention. If I remember right, the command to see if the cards are seen by the Xorg machinery is this:
xrandr --listproviders
A more low-level way to check for the cards is lspci -k. This will show if the Linux kernel sees the device and if it has loaded the Nvidia driver module for it.
Instead of fighting with Xorg configuration, I would probably first try to see if Wayland works for you. Maybe Wayland magically makes everything just work with the second card. You can switch between X and Wayland by logging out and then looking for a button somewhere on the login screen that opens a menu to choose the desktop session. The menu should have entries "Plasma X11" and "Plasma Wayland".
If you find out that you can't get Wayland to work nicely with your hardware, or if it does not actually help with the second card, then going back to X, the commands to get the second card to work are one of these here:
I don't remember how they work. I don't know which of the two helps with your problem. The "provider" and "source" parts of the command lines are the card numbers you get from the output of xrandr --listproviders. In the ArchWiki, the relevant article about this is named "PRIME".
I remember Nvidia has pretty extensive documentation for their Linux driver. Maybe one of the chapters has info that's important for this problem here? The documentation is installed in /usr/share/doc/nvidia. There's an index.html file that you can open in your web browser.
You can try to battle with deleting and copying files between the two accounts until you find the one that's causing it. =)
I needed hours to fix my normal user account when Plasma 6 came out. The panel was crashing and restarting when I moused over it. I tried renaming and replacing the whole ~/.config and ~/.local folders and such, and nothing seemed to work. The problem ended up being an environment variable in .xprofile that I had put there years ago, it switched Qt to using Vulkan instead of OpenGL.
I would try creating a second, new user account as an experiment. That user account will start out with an empty home folder. Logging into that second account, you'll get the same experience as if you would have wiped the drive and reinstalled Arch. You can then use that to compare behavior to your main account.
After you've logged into that second user once and your desktop environment has created its config files there, you could try to somehow find out which parts of ~/.config are about audio and steal those to replace the ones in your main user account.
If it's about files in /usr or /etc, you can get those back by reinstalling the packages. You don't need to remove them first, you can just install them again.
You can find packages with missing files with sudo pacman -Qkq.
What happens if you just run yay without argument to let it try to update everything by itself? Or you can do yay -Sua to let it only try to update the AUR packages instead of the normal Arch packages as well.
Yay will search through AUR and will notice if there's an update to any of those packages and then install the update. You don't have to do it yourself.
You can get to a text console login prompt with Ctrl+Alt+F2, F3, F4, etc. You can then log in there and work on fixing the issue. You can disable the services and such, you can do "systemctl status lightdm" or read through "journalctl -b" to see if it maybe has something that points to the problem.
It wasn't exactly copy+paste, but it was something along those lines. I didn't fully think through what was happening. I think I could have answered questions about what was going on but I wasn't confident about understanding it.
With my big accident where I had to restore the system from backup, I had to create partitions and filesystems and copy the contents with
cp -aand there was no guide for that.I think that's fine for the power usage you are seeing there, those 88 Watts. The CPUs nowadays try to get as close to their limits as they can at all times. When you improve cooling, they will react by boosting higher and will end up staying at the same temperatures. You can only get things to actually drop temperatures if the CPU is hitting some other limit first before it reaches the temp limit, like if you would limit things to for example 65 Watts in the BIOS menus.
I found the bug report about this problem, it's here:
https://gitlab.freedesktop.org/drm/amd/-/issues/3709
There's an experimental patch shared there from four months ago. You could do your own kernel with it if you know how that works.
Someone from AMD says there at the end that a patch is close to going into "amd-staging-drm-next" which is the changes they are sending into upstream Linux project for the next version. I think this means it would then show up in kernel version 6.20. Hopefully the required changes are not too big, in that case a fix will also show up in older kernel versions.
In the comments there people were also writing that the mouse set up to run at 500Hz instead of 1000Hz+ doesn't cause the problem.
I think this is a bug with the code path used by X in the kernel to update the hardware mouse pointer. Wayland compositors are using a different system call to update the cursor so there it's not happening. I'm luckily only using X for the login screen, so as a workaround I just enable software cursor with an xorg.conf file like this:
A software cursor feels crappy to me with 60Hz monitors, I can feel the added latency, but with 120Hz etc. it's okay.
Previously this only happened for me after the monitor was in sleep once, but nowadays it's happening all the time. This is with an RX 9070 XT.
This problem also sometimes showed up in Windows for me with AMD graphics. It happened very rarely there, once every few months. I've seen the problem with an RX 480 and RX 6700 XT in Windows.
There's a bug report about this somewhere on the amdgpu kernel module bug tracker. I remember it had someone sharing an experimental kernel patch. The bug tracker is here:
https://gitlab.freedesktop.org/drm/amd/-/issues?scope=all&utf8=%E2%9C%93&state=all
I found out you can make xwaylandvideobridge work again by starting Discord like this:
This problem is caused by a change in the newest Discord version. It's now trying to do the Wayland screen capture by itself and it's failing to do that correctly. That XDG_SESSION_TYPE=x11 makes it go back to its old X11 capture method.
I found out that you can make xwaylandvideobridge work again by starting Discord like this:
If you never saw xwaylandvideobridge working in Discord, this is how it works:
When you click on screen sharing inside Discord, you will see a source window named "Wayland to X Recording bridge". You need to select that window inside Discord, that's where the xwaylandvideobridge program will shovel the video data into.
I'm not sure as I have no one to ask right now, but it seems to be stuttering madly for me? At least the preview is updating just once a second or so.
About what was going on with Discord:
I found out that the problem with xwaylandvideobridge was caused by a change in Discord. In the newest version it is now trying to access the Wayland screen capture by itself. It's failing to that correctly. That's where those error messages you saw in the terminal came from, these ones here:
It seems to look at that
XDG_SESSION_TYPEenvironment variable to decide between using Wayland capture or its old X11 capture code.I'm super lazy about managing this. The installation here is many years old and if I don't immediately remove something after trying it, then it only gets removed if it ever happens to cause a problem, so in practice it never gets removed.
I once tried researching what packages are never used by looking at the file access times but that experiment went nowhere. There were problems with files in the packages that always get accessed at every boot. I tried to work around that problem a little but never finished. The script I wrote for this is here if anyone wants to try it:
https://paste.rs/v2msN
Without argument it lists all packages sorted by last access date. Adding a package name to its command line, it will list the files in the package and their date and show what it ignored.
The script needs the default
relatimemount option, it won't do anything useful ifnoatimeis used.What if you try running it with
sudo? There might be something in/homethat your user isn't allowed to access.(the
-xmakes it sodudoesn't move outside of the filesystem while it's going through sub-directories)I just tried it right now and it's broken for me as well. I guess it broke at some point with updates? :( I can find people reporting bugs like here: https://bugs.kde.org/show_bug.cgi?id=476846
You have to run Discord like normal for xwaylandvideobridge to work. Discord needs to be an X11 program to use it. That Wayland command line you tried breaks this.
When you try screen sharing in Discord, a window from the xwaylandvideobridge program will show up where you can select what to share. The xwaylandvideobridge program needs to be running in the background for this to work. The package installs an XDG autostart entry, but that only gets activated at login, so directly after installing the package you have to start the program manually. The program shows up as a systray icon in the desktop panel while it's running.
Something else about Discord as the program is weird and you are new to it: you'll want to add ...
... to its
~/.config/discord/settings.jsonconfig file. Discord normally refuses to start when there's an upstream update. You are then stuck until the Arch package gets updated. That config file setting disables that behavior. Make sure to add a,comma in the right place when editing the file.Another thing that might be interesting is, there's an AUR package
discord_arch_electronthat makes Discord use the newer Electron version from the Arch repos instead of its own, old version.This will work fine. You can also completely replace cat on your command line with pv, like this:
If you want to add fast compression:
Partitions are
sda1,sda2,sda3. When you look atsda,sdb,sdc, those are different drives.There's a button with a menu somewhere on the login screen where you can choose between Plasma X11 and Plasma Wayland sessions.
If you are vaguely interested in ever giving compression a try again, using
zstd -T0 -1as the command line compresses at 2 GB/s on my Ryzen 5800X. It turns a 228 MB sized fallback image into 76 MB and needs 0.1 seconds for that.Here's how I tested it:
The settings to use this in
/etc/mkinitcpio.confwould be:Make sure you remove an old xorg.conf file if you had created one previously as it might try to force the Nvidia driver.
You are probably using X aka. X11 aka. Xorg for your graphical desktop? I would assume the card is there, it's just not getting used as that needs manual intervention. If I remember right, the command to see if the cards are seen by the Xorg machinery is this:
A more low-level way to check for the cards is
lspci -k. This will show if the Linux kernel sees the device and if it has loaded the Nvidia driver module for it.Instead of fighting with Xorg configuration, I would probably first try to see if Wayland works for you. Maybe Wayland magically makes everything just work with the second card. You can switch between X and Wayland by logging out and then looking for a button somewhere on the login screen that opens a menu to choose the desktop session. The menu should have entries "Plasma X11" and "Plasma Wayland".
If you find out that you can't get Wayland to work nicely with your hardware, or if it does not actually help with the second card, then going back to X, the commands to get the second card to work are one of these here:
I don't remember how they work. I don't know which of the two helps with your problem. The "provider" and "source" parts of the command lines are the card numbers you get from the output of
xrandr --listproviders. In the ArchWiki, the relevant article about this is named "PRIME".I remember Nvidia has pretty extensive documentation for their Linux driver. Maybe one of the chapters has info that's important for this problem here? The documentation is installed in
/usr/share/doc/nvidia. There's anindex.htmlfile that you can open in your web browser.You can try to battle with deleting and copying files between the two accounts until you find the one that's causing it. =)
I needed hours to fix my normal user account when Plasma 6 came out. The panel was crashing and restarting when I moused over it. I tried renaming and replacing the whole ~/.config and ~/.local folders and such, and nothing seemed to work. The problem ended up being an environment variable in .xprofile that I had put there years ago, it switched Qt to using Vulkan instead of OpenGL.
I would try creating a second, new user account as an experiment. That user account will start out with an empty home folder. Logging into that second account, you'll get the same experience as if you would have wiped the drive and reinstalled Arch. You can then use that to compare behavior to your main account.
After you've logged into that second user once and your desktop environment has created its config files there, you could try to somehow find out which parts of ~/.config are about audio and steal those to replace the ones in your main user account.
If it's about files in /usr or /etc, you can get those back by reinstalling the packages. You don't need to remove them first, you can just install them again.
You can find packages with missing files with
sudo pacman -Qkq.What happens if you just run
yaywithout argument to let it try to update everything by itself? Or you can doyay -Suato let it only try to update the AUR packages instead of the normal Arch packages as well.Can you show the error message you are seeing?
Yay will search through AUR and will notice if there's an update to any of those packages and then install the update. You don't have to do it yourself.
You can get to a text console login prompt with Ctrl+Alt+F2, F3, F4, etc. You can then log in there and work on fixing the issue. You can disable the services and such, you can do "systemctl status lightdm" or read through "journalctl -b" to see if it maybe has something that points to the problem.
That
xdg-opencommand is a shell script. Maybe you can find out something useful if you dobash -x xdg-open ...instead ofxdg-open ....Windows will show your local time, don't worry. It will start behaving exactly like what you explain about Linux in b).