Solution to Microsoft Edge’s blurry, hidpi and ibus problems while switching to Wayland.
Direct Solution:
Add the following flags to Edge (or maybe other chromium based apps) to move it to Wayland:
-enable-features=UseOzonePlatform -ozone-platform=wayland –high-dpi-support=1 –gtk-version=4
In most cases, you can simply run the following script to do it:
#!/bin/bash
desktop_file=”/usr/share/applications/microsoft-edge.desktop”
temp_file=”${desktop_file}.temp”
while IFS= read -r line; do
if [[ $line == Exec=* ]]; then
line=”${line} -enable-features=UseOzonePlatform -ozone-platform=wayland –high-dpi-support=1 –gtk-version=4″
fi
echo “$line” >> “$temp_file”
done < “$desktop_file”
sudo mv “$temp_file” “$desktop_file”
Now restart Edge, and it will go into Wayland with no weird looking and no blurry stuff on XWayland with fractional scaling.
What are These:
-enable-features=UseOzonePlatform -ozone-platform=wayland let Edge use Wayland.
–high-dpi-support=1 let Edge enable HiDPI support for fractional scaling.
–gtk-version=4 let Edge use GTK4, because ibus input methods most likely doesn’t work on Edge with GTK3.
Note:
1. If you’re on Microsoft Edge Dev, simply change the microsoft-edge.desktop to microsoft-edge-dev.desktop
2. This script should be running every time after Edge is updated to a new version, because the update breaks the old .desktop file.
Well tried posting this thing in r/wayland and r/MicrosoftEdge 8 times, and i don’t know why my post immediately got removed after posting 😕
​Direct Solution:Add the following flags to Edge (or maybe other chromium based apps) to move it to Wayland:-enable-features=UseOzonePlatform -ozone-platform=wayland –high-dpi-support=1 –gtk-version=4In most cases, you can simply run the following script to do it:#!/bin/bash
desktop_file=”/usr/share/applications/microsoft-edge.desktop”
temp_file=”${desktop_file}.temp”
while IFS= read -r line; do
if [[ $line == Exec=* ]]; then
line=”${line} -enable-features=UseOzonePlatform -ozone-platform=wayland –high-dpi-support=1 –gtk-version=4″
fi
echo “$line” >> “$temp_file”
done < “$desktop_file”
sudo mv “$temp_file” “$desktop_file”Now restart Edge, and it will go into Wayland with no weird looking and no blurry stuff on XWayland with fractional scaling.What are These:-enable-features=UseOzonePlatform -ozone-platform=wayland let Edge use Wayland.–high-dpi-support=1 let Edge enable HiDPI support for fractional scaling.–gtk-version=4 let Edge use GTK4, because ibus input methods most likely doesn’t work on Edge with GTK3.Note:1. If you’re on Microsoft Edge Dev, simply change the microsoft-edge.desktop to microsoft-edge-dev.desktop2. This script should be running every time after Edge is updated to a new version, because the update breaks the old .desktop file.Well tried posting this thing in r/wayland and r/MicrosoftEdge 8 times, and i don’t know why my post immediately got removed after posting 😕  Read More
​