Tips, problem, and a lot of things when using Linux
This file is made for Fedora 35, 36, 37, 38, 39
1 Gnome Extensions Used
2 List of useful website
3 Optimus Nvidia Stuff
4 Linux Battery Saver
5 Android on Linux
6 Wayland Stuff
7 GNOME Stuff
8 Random Small Fix
- Blur My Shell | GitHub
- Burn My Windows | GitHub
- Current screen only in windows switcher | GitHub
- Dash to Panel | GitHub
- Desktop Clock | GitLab
- Gnome 4x UI Improvements GitHub
- gTile | GitHub
- Internet Speed Monitor | GitHub
- Rounded Window Corner | GitHub
- https://linrunner.de/tlp/installation/fedora.html
- https://rpmfusion.org/Howto/Optimus
- https://www.markdownguide.org/basic-syntax/
- https://www.markdownguide.org/cheat-sheet/
- http://wiki.get-good.net/index.php?title=RFactor_Skinning
- https://anooppoommen.medium.com/create-a-wifi-hotspot-on-linux-29349b9c582d
- https://computingforgeeks.com/create-wi-fi-hotspot-on-linux/
- Open up Terminal
$ nano .bashrc
- Add to the bottom the path you want
export PATH = "$PATH:[program-you-want]"
- Refresh Bash to keep changes
$ source .bashrc
- Validate using 'which [programs]'
$ which flutter
/Home/flutter/bin/flutter
nethogs => Network Monitor
gt => TunnelDPI
nm-connection-editor => Connection Settings
dconf-editor => A graphical viewer and editor of applications’ internal settings
intel_gpu_top => Display a top-like summary of Intel GPU usage
Using PrimaryGPU allows to use the NVIDIA driver by default instead of the iGPU. This is also required in order to use external display when internally connected from the NVIDIA hardware. Unfortunately, setting this option automatically when an external display is connected is not supported by NVIDIA at this time. To recover this previous behaviour, you can use:
$ cp -p /usr/share/X11/xorg.conf.d/nvidia.conf /etc/X11/xorg.conf.d/nvidia.conf
And edit the file to use:
Option "PrimaryGPU" "yes"
/!\ SSDM and lightdm display manager users: Please Have a look at the ArchLinux wiki about configuring display manager. In Fedora, Gnome users don't need this change.
For GLX + OpenGL, the environment variable NV_PRIME_RENDER_OFFLOAD_PROVIDER
provides finer-grained control. While NV_PRIME_RENDER_OFFLOAD=1
tells GLX to use the first NVIDIA GPU screen, NV_PRIME_RENDER_OFFLOAD_PROVIDER
can use an RandR provider name to pick a specific NVIDIA GPU screen, using the NVIDIA GPU screen names reported by xrandr --listproviders
.
Examples:
__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia glxgears
__NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0 __GLX_VENDOR_LIBRARY_NAME=nvidia glxgears
The NV_PRIME_RENDER_OFFLOAD
environment variable causes the special Vulkan layer VK_LAYER_NV_optimus
to be loaded. Vulkan applications use the Vulkan API to enumerate the GPUs in the system and select which GPU to use; most Vulkan applications will use the first GPU reported by Vulkan. The VK_LAYER_NV_optimus
layer causes the GPUs to be sorted such that the NVIDIA GPUs are enumerated first. For finer-grained control, the VK_LAYER_NV_optimus
layer looks at the VK_LAYER_NV_optimus
environment variable. The value NVIDIA_only causes VK_LAYER_NV_optimus
to only report NVIDIA GPUs to the Vulkan application. The value non_NVIDIA_only causes VK_LAYER_NV_optimus
to only report non-NVIDIA GPUs to the Vulkan application.
Examples:
__NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only vkcube
To configure a graphics application to be offloaded to the NVIDIA GPU screen, set the environment variable NV_PRIME_RENDER_OFFLOAD
to 1. If the graphics application uses Vulkan, that should be all that is needed. If the graphics application uses GLX, then also set the environment variable GLX_VENDOR_LIBRARY_NAME
to nvidia, so that GLVND loads the NVIDIA GLX driver. NVIDIA's EGL implementation does not yet support PRIME render offload.
Examples:
__NV_PRIME_RENDER_OFFLOAD=1 vkcube
__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia glxinfo | grep vendor __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia ./osu.AppImage
https://download.nvidia.com/XFree86/Linux-x86_64/510.68.02/README/randr14.html
Step by Step
$ sudo dnf install tlp tlp-rdw
$ sudo dnf remove power-profiles-daemon
$ systemctl enable tlp.service
$ systemctl mask systemd-rfkill.service systemd-rfkill.socket
$ sudo tlp start
$ sudo dnf install power-profiles-daemon
$ systemctl disable tlp.service
$ systemctl unmask systemd-rfkill.service systemd-rfkill.socket
https://docs.waydro.id/debugging/troubleshooting
https://copr.fedorainfracloud.org/coprs/aleasto/waydroid/
$ sudo waydroid container restart
$ sudo waydroid init -c https://ota.waydro.id/system -v https://ota.waydro.id/vendor -s GAPPS
- Stop the waydroid-container.service
$ systemctl stop waydroid-container.service
- Cleanup
$ sudo rm -rf /var/lib/waydroid /home/.waydroid ~/waydroid ~/.share/waydroid ~/.local/share/applications/aydroid ~/.local/share/waydroid
- Initialise
$ waydroid init -f or # waydroid init -f -i /usr/share/waydroid-extra/images
Note: Didn't work, see above ## How to install
- Start the service again
$ systemctl start waydroid-container.service
Table of Content
1 Diagonal Split Rendering
2 Force Disable VSYNC
3 Restarting Gnome-Shell in Wayland
4 Using X11 Backend in Wayland
5 Scrcpy window doesn't show up in Fedora 36 Wayland
6 (Unfixed) Wayland screen sharing on Chrome in Google Meet crash the browser
7 Deskreen Black Screen in Wayland
8 Drag and Drop doesn't works most of the times in Wayland
Diagonal split rendering bug / 1 frame lag rendering when FPS below 60
https://www.reddit.com/r/linux_gaming/comments/swljmt/diagonal_tear_line_in_wayland/ https://gitlab.gnome.org/GNOME/mutter/-/issues/2151 https://gitlab.freedesktop.org/xorg/xserver/-/issues/1317 NVIDIA/open-gpu-kernel-modules#187
https://dri.freedesktop.org/wiki/ConfigurationOptions/
$ vblank_mode=0 ./osu.AppImage
https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5634
All apps will crash
-
Go to TTY Use Ctrl + Alt + F2 or Ctrl + Alt + F3
-
Stop GDM
sudo systemctl stop gdm
- Start GDM
sudo systemctl start gdm
in Terminal, do
$ GDK_BACKEND=x11 ./[programs]
$ SDL_VIDEODRIVER=x11 scrcpy
$ SDL_VIDEODRIVER=x11 scrcpy -b 2M --max-fps=15
Affects: Entire Screen, A Window
Version: Version 114.0.5735.133 (Official Build) (64-bit)
My Fix:
Just launch in Terminal
$ google-chrome-stable
Suggested Solutions:
type in address bar
chrome://flags/#enable-webrtc-pipewire-capturer
WebRTC PipeWire support > Enable
Note: Weirdly, this doesn't happen with Chromium and Firefox
Add this parameter to enable PipeWireCapture in wayland session
$ ./Deskreen-1.0.12.AppImage --enable-features=WebRTCPipeWireCapturer
Problem: Mutter Link: https://gitlab.gnome.org/GNOME/mutter/-/issues/2216
Temporary Solution:
- Keeps redraging into the area, will work about 10-20% of the time
- Switch to Xorg
https://forum.manjaro.org/t/disable-gnome-screenshot-sound/13513/2
PATH: /usr/share/sounds/freedesktop/stereo
Just rename camera-shutter.oga to camera-shutter.bak (can be anything other than '.oga')
https://askubuntu.com/questions/1424633/unable-to-connect-with-the-hotspot-created-on-ubuntu
What got things working for me was the disablement of Protected Management Frames
type in CMD
$ nmcli c modify Hotspot 802-11-wireless-security.pmf 1
https://www.cyberciti.biz/howto/how-to-install-and-edit-desktop-files-on-linux-desktop-entries/
Delete the .desktop file on the following path
Description | Location |
---|---|
Default Linux distro specific applications | /usr/share/applications/ |
Third party specific applications | /usr/local/share/applications/ |
User specific applications | ~/.local/share/applications/ |
Table of Content
1 Wifi keep disconnecting
2 Zoom 5.10.4 (2845) Crashing on F36
3 Pressing CTRL+. (Period) will showe
in underscore
4 Cleaning up logs/journal
5 MangoHud OpenGL Fix
6 Video Downloader Change Download Location
7 Convert WEBM to MP4 using FFMPEG
8 Steam (Controller Missmatch Button)
7 Publish New Repo on VSCode default to master
9 Shared Linux Folder in Windows Guest (QEMU/KVM)
10 N-Key Rollover Problem in Linux
11 MikuMikuDance Fixes
12 Setting Env Globally
13 Nautilus on Fedora Spin KDE doesn't have SMB support
14 Skip install a certain package on DNF
15 Remove Splash Screen on Boot in Fedora
16 Fix sleep issue when battery is low
17 Fix resetting MySQL root password managed by systemd
18 Related to video acceleration on chromium
19 Flatpak keep updating old 32-bit nvidia driver package (org.freedesktop.Platform.GL32.nvidia-*)
20 System keep constantly stutter because wifi module restarting
21 Monitor SSD NVME Percentage Usage
- Solution: Disable Wifi Power saving
https://linrunner.de/tlp/settings/network.html
$ sudo nano /etc/tlp.conf
WIFI_PWR_ON_AC=off
WIFI_PWR_ON_BAT=off$ sudo tlp start
- Solution 2: Disable Bluetooth
This is related to the GPU sanbox I think
https://community.zoom.com/t5/Meetings/Version-5-10-0-crashing-at-startup-on-Fedora-35/td-p/51487
This command to disable GPU sanboxing on Zoom works
$ zoom --disable-gpu-sandbox
This is shortcut to Emoji Annotation. you can disabled it by going in terminal
$ ibus-setup
IBus Preferences will show up, go to Emoji Tab, delete Emoji annotation
https://www.linuxuprising.com/2019/10/how-to-clean-up-systemd-journal-logs.html
One time usage
$ sudo journalctl --rotate
$ sudo journalctl --vacuum-time=1s
Configuration location
$ nano /etc/systemd/journald.conf
OpenGL games may also need dlsym hooking. Add --dlsym
or MANGOHUD_DLSYM=1
env var to your command like mangohud --dlsym %command%
for Steam.
Change the download location
$ flatpak run --command=gsettings com.github.unrud.VideoDownloader set com.github.unrud.VideoDownloader download-folder '/mnt/LinuxData/Download'
$ ffmpeg -i input_filename.WebM output_filename.MP4
If there's error related to "can't be divided by 2", use crop function so the width and height is divisible by 2.
$ ffmpeg -i input_filename.webm -vf "crop=trunc(iw/2)*2:trunc(ih/2)*2" output_filename.MP4
https://steamcommunity.com/discussions/forum/1/1621726179577658947/#c1697175413682520103
I found a fix today after looking for weeks. Hopefully it works for you as well.
- Disable all Controller Support Options (IE PS4 Support etc)
- Exit Steam and unplug the controller
- Open the config.vdf file stored on your computer
- By default it is located in
C:\Program Files (x86)\Steam\config\config.vdf
- Search for "SDL_GamepadBind" and delete everything underneath it
- Save the file
- Start Steam and plug in the controller
Change the Git Config in the system
$ git config --global init.defaultBranch main
https://virtio-fs.gitlab.io/howto-windows.html
- Setup the KVM
- Enable shared memory
- Add FileSystem shared
- Setup on the Windows Guest
- Install WinFsp
- Download virtiofs ISO (https://github.com/virtio-win/virtio-win-pkg-scripts/blob/master/README.md)
- Open ISO, and copy virtiofs folder
- Run virtio-win-guest-tools.exe
- Starting the virtiofs service (Run as Admin) so the disk will be mounted starting with Z:\
sc create VirtioFsSvc binpath="C:\virtiofs\virtiofs.exe" start=auto depend="WinFsp.Launcher/ VirtioFsDrv" DisplayName="Virtio FS Service"
https://unix.stackexchange.com/questions/675933/keyboard-input-n-key-rollover
$ cat /proc/bus/input/devices
That file format is explained well here => https://unix.stackexchange.com/a/74907/499581
and here => https://unix.stackexchange.com/a/94329/508931
In the HyperX case, there are five different handlers available (can be more/less in others):
handler for keyboard events, standard mode mouse handler (e.g. remote USB keyboard witch touchpad). I'm assuming it is always there by design just by referring to its name "System Control", it provides events for power, sleep, etc. referring to "Consumer Control", it provides events for multimedia and related special keys handler for NKRO events I can find the "standard mode" keyboard handler easily by looking for EV=120013 (I'm not sure if it is a proper way either). In that particular case I could look for other entries with an identical bitmap of supported keys, but unfortunately in Havit case that bitmap is pretty different. Another pattern that I see and might be useful is to look for sysrq in handlers, However, I don't know what it means.
And that's it.
How can I properly find both standard mode and NKRO handlers for given keyboard?
https://www.devever.net/~hl/usbnkro
- Install All MS fonts using Winetricks + JP fonts
- Set ENV args before launching
$ LANG=ja_JP.UTF-8
- Garbled mess graphics is expected, so click 'view(V)', then 'seperate window(W)'
- Install DXVK (2.2) to fix Garbled Mess Graphics
Issues to Fix:
- Font shifted lower than it should
https://builtin.com/software-engineering-perspectives/how-to-set-environment-variables-linux
$ export GLOBAL_VAR=VALUE
$ unset GLOBAL_VAR
$ echo GLOBAL_VAR
Save the command in .bashrc
$ nano .bashrc
$ export GLOBAL_VAR=VALUE Then reboot
Solution: Install gvfs-smb
$ sudo dnf install gvfs-smb
Then restart nautilus
Use -x to exclude a certain package
$ dnf update -x microsoft-edge-stable
-x <package-file-spec>, --exclude=<package-file-spec>
Exclude packages specified by from the operation.
Use grubby to make persistent change.
$ grubby --remove-args="rhgb quiet" --update-kernel /boot/vmlinuz-[YOUR_KERNEL_VERSION]
or
$ grubby --remove-args="rhgb quiet" --update-kernel DEFAULT
Using the default settings, the sleep is triggerred when reaching 2% of battery level, which is very low. This usually make the device switch off because of lost power before the sleep proses even finished.
On my laptop, this lead to power lost, resetting UEFI to default, and power on immediately when receiving power.
$ nano /etc/UPower/UPower.conf
Change this value
PercentageLow=30
PercentageCritical=25
PercentageAction=20
https://linuxways.net/red-hat/how-to-reset-mysql-root-password-on-red-hat-enterprise-linux-8/
- Stop MySQL
$ sudo systemctl stop mysqld
- Skip MySQL grant tables
$ sudo systemctl set-environment MYSQLD_OPTS="--skip-grant-tables"
- Start MySQL in a minimal environment
$ sudo systemctl start mysqld
- Login to MySQL
$ sudo mysql -u root
- Alter the MySQL root user
mysql> FLUSH PRIVILEGES;
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'NewRootPassw0rd!';
mysql> FLUSH PRIVILEGES;
mysql> QUIT;
- Stop MySQL
$ sudo systemctl stop mysqld
- Unset Option to skip MySQL grant tables
$ sudo systemctl unset-environment MYSQLD_OPTS
- Start MySQL in a normal environment
$ sudo systemctl start mysqld
$ sudo mysql -u root -p
A new chromium build (Snap) is made by collaboration between Canonical and Intel to get video acceleration working (Encoding and Decoding)
To try this version, you will need to switch Chromium to the hwacc branch.
To install hardware accelerated Chromium: snap install chromium --channel=latest/candidate/hwacc
To switch from a previous installation: snap refresh chromium --channel=latest/candidate/hwacc
To go back to the stable channel: snap refresh chromium --channel=latest/stable
$ flatpak list --runtime
$ flatpak remove [insert-unused-nvidia-driver]
$ flatpak update
When uninstalling, heroic game launcher and bottles seems the one that keep the old drivers (only 32-bit NV driver).
https://bbs.archlinux.org/viewtopic.php?id=254766
Event:
Looking at the Logs provided above, ieee80211 phy0 was requested to restart due to iwlwifi (Microcode SW error detected)
Using lspci, my network adapter is using 02:00.0 Network controller: Intel Corporation Wireless 7265 (rev 59)
https://www.intel.com/content/www/us/en/support/articles/000005511/wireless.html Going into intel official website for driver, the intended driver is iwlwifi-7265-ucode-25.30.14.0.tgz
Currently, mine using iwlwifi 0000:02:00.0: Loaded firmware version: 29.4063824552.0 7265D-29.ucode
dnf whatprovides *liblttng-ust.so
$ sudo watch -n 1 nvme smart-log /dev/nvme0n1p6