Looks like it fixed it! Didn't have any issues with Discord crashing when watching a stream, and was able to stream for 15 minutes with no issues. And hopefully this fixes the issues I was having with random crashes before too. Thanks so much!
Hmm that actually could be it too - would you mind telling me where you discerned that from the logs? Would like to learn a bit more about debugging these issues.
The full system crash is something that's just has been happening with my system for a long time now - never see any relevant output in journalctl so I haven't been able to figure out the root cause. It just seems like sharing screen with Discord can accelerate the issue (also happens if I am recording with OBS).
As for the current issue, perhaps I should rollback electron to an even earlier version then. I'll have to give it a shot.
Yes, I have a 6 GB swap partition that I created when I first installed Arch. Just checked the fstab and for some reason the priority was set to -2 even though I only have one swap partition, so I've removed the priority.
Edit: I added some more details at the end of my post as an edit.
I always wanted to have a cool looking terminal tag, but never got around to learning how to. Decided to try it out tonight, picked up a rudimentary understanding of bash, and now have a neat terminal to show off! This is what's in my .bashrc at the moment:
function prompt_cmd () {
LAST_STATUS=$?
PS1="┌─\`if [ \$(git rev-parse --is-inside-work-tree 2> /dev/null) ]; then echo [\[\e[32m\]git\[\e[0m\]]; else echo ─────; fi\`\[\e[0m\]──[\[\e[1m\]"
if [ $LAST_STATUS = 0 ]; then
PS1+="\[\e[36m\]"
else
PS1+="\[\e[31m\]"
fi
PS1+="\u@Arch\[\e[0m\]]─────[\[\e[1;34m\]\W\[\e[0m\]]─────[\[\e[1;97m\]\D{%r}\e[0m\]]\n└─╼ "
}
export PROMPT_COMMAND=prompt_cmd
When I first started getting into Arch, I learned that the Arch community heavily promotes self-learning and diagnosing. So I've always been careful to really do all the research I can and seeing if I can resolve it myself before asking on the subreddit. Sometimes, however, someone ends up just sending me a link to the wiki and I feel a bit disheartened since it ends up being something I could have found out myself.
Amazing analogy with CS by the way. Thinking about it, I learn a significant amount of programming languages by looking up what I need, and then eventually recognizing patterns among languages and seeing the overall bigger picture. I also noticed one issue I have is that after fixing a problem in my distro, I'll end up forgetting a lot of what I learned if I don't end up needing to apply that knowledge in the future. So setting up a repo for notes sounds like a great way to resolve that issue! Thank you for the advice!
Thanks for the encouragement. I think one thing this thread has made clear to me is that I shouldn't be afraid of breaking things. When I first got started with Arch, a -Syu ended up messing up my i3/KDE setup, and I wasn't able to solve the problem. Since I had just set up Arch, I just redid my Arch installation (which going through twice did end up helping me understand it a bit more). Now that I'm a little further in, I've been a bit afraid of something like that happening since I have a lot of school work on my Arch setup and I spent a lot of time setting it up just the way I'd like. That's why I've been trying to look into backups since that way, I'll feel more at ease trying out new things without worrying that I might mess it up and not fix it in time before assignment deadlines.
It's been pointed out by a few commenters now, but I now recognize that I always thought of my problems as "Arch" difficulties rather than "Linux" difficulties. Thanks for the advice!
It's honestly a way for me to keep myself in check at times. If I'm on Arch, I don't have much of a way to distract myself from work since I don't have any games. Having to reboot makes procrastinating far more intentional, so it'll stop me from just oh so happening to open up Steam. I notice when I get on Arch, my mood switches to an all work mood.
I'm sure you know way more than you let on; that sounds like quite a lot of experience. Sounds like you must be enjoying it though, given the amount of time you've spent on it.
Since I use Arch for productivity only, I haven't tried messing around with gaming. Furthermore, since I dual-boot Windows on the same machine, if I feel like taking a break and gaming, I just reboot.
I've also been trying to set it up so that I can shut off the Nvidia card when I'm on the go to save power. I installed bbswitch, blacklisted nouveau and nvidia in /etc/modprobe.d. I run
$sudo tee /proc/acpi/bbswitch <<< OFF
before running startx in the tty. But when I run startx, the desktop environment pop ups, and I can move my mouse around for about a second or two, and then everything freezes. Can't move the mouse, can't switch to another tty, and I have to reboot by using the power button. I also tried using the module acpi_call to manually shutoff the GPU. But when I run turn_off_gpu.sh, the same issue happens. Any ideas would be appreciated!
Sorry about the long delay; it's been busy the past couple of days. I downloaded optimus-manager and am using it to switch cards. However, I noticed that if I did
$optimus-manager --switch nvidia
And then followed that up with
$optimus-manager --print-mode
It would still output that I was using the intel card. So this ended up being my band-aid fix:
eDP1 is my laptop screen, and the others are the two monitors. I've noticed that recently, however, I have not needed to call the script, and my monitors have been orienting themselves normally.
Oh wow the second method worked great! I ended up creating an sh file that I could run once startx completed so that I could use xrandr to reorient everything. The laptop screen turns black, but I assume this is because the laptop screen uses the Intel card, so if we set the output source to be the Nvidia card, then the laptop screen won't turn on (which is fine, since that's actually what I wanted). However, I'm trying to make it so that I can run startx without using the monitors, but if I unplug the monitors, the laptop screen still stays black. I thought maybe it was the xrandr --setprovideroutputsource modesetting NVIDIA-0 command, so I removed it from .xinitrc and put it in a dual-monitor.sh file that I could run when I wanted to use the monitors. However, even with that removed, startx still attempts to use the Nvidia card. How can I circumvent that? I think maybe it's the xorg.conf file, which contains only what the second link told me to put in it.
I tried unplugging/replugging the monitors while the laptop was running, and one of the monitors now show my mouse and seems to just copy the movements of the mouse as I move it on the laptop screen. So now I have two mice on the screens. I don't know if this tidbit of information helps, but wanted to report it just in case.
I followed the first article with bumblebee, and I think I'm very close. At one point, I managed to get one of the monitors going, but the other one black. I've rebooted since then and things are a bit wonky. I have the background appearing on one monitor, but I can't move my mouse to it. I tried doing xrandr --output VIRTUAL1 --auto --right-of eDP1 to move it to where I wanted it to be, but it doesn't seem to be working just yet.
Here is the new output for xrandr -q:
Screen 0: minimum 8 x 8, current 5339 x 1920, maximum 32767 x 32767
eDP1 connected 1920x1080+1919+419 (normal left inverted right x axis y axis) 340mm x 190mm
1920x1080 144.03*+ 60.08 59.96 59.93
1680x1050 59.95 59.88
1400x1050 74.76 59.98
1600x900 144.00 59.95 59.82
1280x1024 85.02 75.02 60.02
1400x900 59.96 59.88
1280x960 85.00 60.00
1368x768 144.00 59.88 59.85
1280x800 59.81 59.91
1152x864 75.00
1280x720 144.00 59.86 59.74
1024x768 85.00 75.03 70.07 60.00
1024x768i 86.96
1024x576 144.00 59.90 59.82
832x624 74.55
960x540 144.00 59.63 59.82
800x600 85.14 72.19 75.00 60.32 56.25
864x486 144.00 59.92 59.57
640x480 85.01 72.81 75.00 59.94
720x405 144.00 59.51 58.99
720x400 85.04
640x400 85.08
640x360 144.00 59.84 59.32
640x350 85.08
DP1 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 connected 1080x1920+4259+0 right (normal left inverted right x axis y axis) 0mm x 0mm
VIRTUAL1.446-1920x1080 144.00*
VIRTUAL1.447-3840x2160 59.94
VIRTUAL1.448-3840x2160 50.00
VIRTUAL1.449-3840x2160 29.97
VIRTUAL1.450-3840x2160 25.00
VIRTUAL1.451-1920x1080 120.00
VIRTUAL1.452-1920x1080 119.88
VIRTUAL1.453-1920x1080 60.00
VIRTUAL1.454-1920x1080 59.94
VIRTUAL1.455-1920x1080 50.00
VIRTUAL1.456-1920x1080 60.00
VIRTUAL1.457-1920x1080 50.04
1680x1050 59.95
VIRTUAL1.459-1440x900 59.89
1280x1024 75.02 60.02
1280x960 60.00
1280x800 59.81
VIRTUAL1.464-1280x720 60.00
VIRTUAL1.465-1280x720 59.94
VIRTUAL1.466-1280x720 50.00
1152x864 75.00
1024x768 75.03 70.07 60.00
800x600 75.00 72.19 60.32 56.25
VIRTUAL1.475-720x576 50.00
VIRTUAL1.476-720x480 59.94
640x480 75.00 59.94
VIRTUAL1.478-640x480 72.81
VIRTUAL1.480-640x480 59.93
VIRTUAL2 connected primary 1920x1080+0+419 (normal left inverted right x axis y axis) 0mm x 0mm
VIRTUAL2.482-1920x1080 143.85*
VIRTUAL1.452-1920x1080 119.88
VIRTUAL2.483-1920x1080 119.88
VIRTUAL1.453-1920x1080 60.00
VIRTUAL1.454-1920x1080 59.94
VIRTUAL1.455-1920x1080 50.00
1680x1050 59.95
VIRTUAL1.459-1440x900 59.89
1280x1024 75.02 60.02
1280x960 60.00
1280x800 59.81
VIRTUAL1.464-1280x720 60.00
VIRTUAL1.465-1280x720 59.94
VIRTUAL1.466-1280x720 50.00
1152x864 75.00
1024x768 75.03 70.07 60.00
800x600 75.00 72.19 60.32 56.25
VIRTUAL1.475-720x576 50.00
VIRTUAL1.476-720x480 59.94
640x480 75.00 59.94
VIRTUAL1.478-640x480 72.81
VIRTUAL1.480-640x480 59.93
VIRTUAL3 disconnected (normal left inverted right x axis y axis)
VIRTUAL4 disconnected (normal left inverted right x axis y axis)
At the moment, one of my monitors is black, and the other has the correct wallpaper I have. I can move my mouse past the edge of my laptop screen, but then the mouse disappears and I don't know where it is. I'm using i3, and if I switch to a different workspace, it doesn't change anything on my laptop screen, so it appears that the workspace is one one of the other two monitors. Would you happen to have any links that could help me out? I've been looking at the xrandr wiki to figure out how to configure this, but I don't seem to be making any ground.
Looks like the fix from /u/Harzerkas fixed it for me, but thanks for all the help!
Looks like it fixed it! Didn't have any issues with Discord crashing when watching a stream, and was able to stream for 15 minutes with no issues. And hopefully this fixes the issues I was having with random crashes before too. Thanks so much!
Hmm that actually could be it too - would you mind telling me where you discerned that from the logs? Would like to learn a bit more about debugging these issues.
The full system crash is something that's just has been happening with my system for a long time now - never see any relevant output in journalctl so I haven't been able to figure out the root cause. It just seems like sharing screen with Discord can accelerate the issue (also happens if I am recording with OBS).
As for the current issue, perhaps I should rollback electron to an even earlier version then. I'll have to give it a shot.
I saw that the issue was fixed in Electron 11.2.2 - I'm currently on 11.3.0. I'll try downgrading to 11.2.2 and see if that fixes that.
I saw that the reported issue was just a segfault when live streaming, and not a system freeze, but hopefully it fixes the issue. Thanks!
Edit: Unfortunately, that did not work. Discord would still restart.
Yes, I have a 6 GB swap partition that I created when I first installed Arch. Just checked the fstab and for some reason the priority was set to -2 even though I only have one swap partition, so I've removed the priority.
Edit: I added some more details at the end of my post as an edit.
Ooh, that would probably help with the slightly cramped feeling. Thanks for the input!
Inspired by /u/khordes comment from two years ago.
I always wanted to have a cool looking terminal tag, but never got around to learning how to. Decided to try it out tonight, picked up a rudimentary understanding of bash, and now have a neat terminal to show off! This is what's in my .bashrc at the moment:
Oh wow this is cool! I like teaching via games, so this is great for me. Thank you so much
I'll definitely take a look! Thanks for the info
When I first started getting into Arch, I learned that the Arch community heavily promotes self-learning and diagnosing. So I've always been careful to really do all the research I can and seeing if I can resolve it myself before asking on the subreddit. Sometimes, however, someone ends up just sending me a link to the wiki and I feel a bit disheartened since it ends up being something I could have found out myself.
That does sound like quite a good way to integrate learning into my day to day life. Thank you for the recommendation!
Amazing analogy with CS by the way. Thinking about it, I learn a significant amount of programming languages by looking up what I need, and then eventually recognizing patterns among languages and seeing the overall bigger picture. I also noticed one issue I have is that after fixing a problem in my distro, I'll end up forgetting a lot of what I learned if I don't end up needing to apply that knowledge in the future. So setting up a repo for notes sounds like a great way to resolve that issue! Thank you for the advice!
Thanks for the encouragement. I think one thing this thread has made clear to me is that I shouldn't be afraid of breaking things. When I first got started with Arch, a -Syu ended up messing up my i3/KDE setup, and I wasn't able to solve the problem. Since I had just set up Arch, I just redid my Arch installation (which going through twice did end up helping me understand it a bit more). Now that I'm a little further in, I've been a bit afraid of something like that happening since I have a lot of school work on my Arch setup and I spent a lot of time setting it up just the way I'd like. That's why I've been trying to look into backups since that way, I'll feel more at ease trying out new things without worrying that I might mess it up and not fix it in time before assignment deadlines.
Thank you very much for all these resources! It'll be a great help!
It's been pointed out by a few commenters now, but I now recognize that I always thought of my problems as "Arch" difficulties rather than "Linux" difficulties. Thanks for the advice!
Awesome! Thank you very much for the resource.
It's honestly a way for me to keep myself in check at times. If I'm on Arch, I don't have much of a way to distract myself from work since I don't have any games. Having to reboot makes procrastinating far more intentional, so it'll stop me from just oh so happening to open up Steam. I notice when I get on Arch, my mood switches to an all work mood.
I'm sure you know way more than you let on; that sounds like quite a lot of experience. Sounds like you must be enjoying it though, given the amount of time you've spent on it.
Since I use Arch for productivity only, I haven't tried messing around with gaming. Furthermore, since I dual-boot Windows on the same machine, if I feel like taking a break and gaming, I just reboot.
I've also been trying to set it up so that I can shut off the Nvidia card when I'm on the go to save power. I installed bbswitch, blacklisted nouveau and nvidia in /etc/modprobe.d. I run
before running startx in the tty. But when I run startx, the desktop environment pop ups, and I can move my mouse around for about a second or two, and then everything freezes. Can't move the mouse, can't switch to another tty, and I have to reboot by using the power button. I also tried using the module acpi_call to manually shutoff the GPU. But when I run turn_off_gpu.sh, the same issue happens. Any ideas would be appreciated!
Sorry about the long delay; it's been busy the past couple of days. I downloaded optimus-manager and am using it to switch cards. However, I noticed that if I did
And then followed that up with
It would still output that I was using the intel card. So this ended up being my band-aid fix:
The xorg file is just a temporary file I created that contains the following:
Then I would have to reboot (I noticed that if I set-startup and reboot, then doing
shows that I am using the nvidia card.
Then I had another script to switch to Intel for when I want to use my laptop by itself:
And just reboot after executing the script.
To re-orient my monitors, I have a script for that:
eDP1 is my laptop screen, and the others are the two monitors. I've noticed that recently, however, I have not needed to call the script, and my monitors have been orienting themselves normally.
My xinitrc currently just contains:
I'm sure this isn't a proper way of fixing the problem, so it's mostly a temporary fix while I learn more about what I should actually be doing.
Oh wow the second method worked great! I ended up creating an sh file that I could run once startx completed so that I could use xrandr to reorient everything. The laptop screen turns black, but I assume this is because the laptop screen uses the Intel card, so if we set the output source to be the Nvidia card, then the laptop screen won't turn on (which is fine, since that's actually what I wanted). However, I'm trying to make it so that I can run startx without using the monitors, but if I unplug the monitors, the laptop screen still stays black. I thought maybe it was the xrandr --setprovideroutputsource modesetting NVIDIA-0 command, so I removed it from .xinitrc and put it in a dual-monitor.sh file that I could run when I wanted to use the monitors. However, even with that removed, startx still attempts to use the Nvidia card. How can I circumvent that? I think maybe it's the xorg.conf file, which contains only what the second link told me to put in it.
I tried unplugging/replugging the monitors while the laptop was running, and one of the monitors now show my mouse and seems to just copy the movements of the mouse as I move it on the laptop screen. So now I have two mice on the screens. I don't know if this tidbit of information helps, but wanted to report it just in case.
I followed the first article with bumblebee, and I think I'm very close. At one point, I managed to get one of the monitors going, but the other one black. I've rebooted since then and things are a bit wonky. I have the background appearing on one monitor, but I can't move my mouse to it. I tried doing xrandr --output VIRTUAL1 --auto --right-of eDP1 to move it to where I wanted it to be, but it doesn't seem to be working just yet.
Here is the new output for xrandr -q:
At the moment, one of my monitors is black, and the other has the correct wallpaper I have. I can move my mouse past the edge of my laptop screen, but then the mouse disappears and I don't know where it is. I'm using i3, and if I switch to a different workspace, it doesn't change anything on my laptop screen, so it appears that the workspace is one one of the other two monitors. Would you happen to have any links that could help me out? I've been looking at the xrandr wiki to figure out how to configure this, but I don't seem to be making any ground.