Heuristic42
Blog
Opengl
Meta
Rendering
1
comment
Dec 15 at 4:39
Matrices
Hello! Are you looking to elevate your online business with a p…
–
anonymous
comment
Nov 27 at 0:30
DerBard: Custom Split Mechanical Keyboard Prototype
hello
–
anonymous
comment
Nov 19 at 15:47
Matrices
[deleted]
–
anonymous
created
Oct 20 at 20:30
Iterators: pointers vs cursors
You're already doing both of these by hand. This post emphaisze…
–
pknowles
comment
Oct 10 at 10:27
Matrices
[deleted]
–
anonymous
comment
Oct 4 at 19:12
Matrices
[deleted]
–
anonymous
comment
Sep 30 at 18:51
Matrices
[deleted]
–
anonymous
comment
Sep 23 at 16:15
Matrices
[deleted]
–
anonymous
comment
Sep 21 at 6:52
Contributing
I kind of predicted what was bound to happen when my favourite …
–
anonymous
comment
Sep 7 at 1:21
Route contention when running docker and a VPN
Thank you for this. Between this and the overwriting of iptabl…
–
anonymous
comment
Sep 6 at 17:57
Making a real EMF Reader
Sorry for the random quoted text comments. I am one of those p…
–
anonymous
comment
Sep 6 at 17:48
Making a real EMF Reader
["ove! Play a tone with a buzzer and has 5 LEDs to show the “EM…
–
anonymous
comment
Sep 6 at 17:47
Making a real EMF Reader
["easure direction Measure the magnetic fie"](#q107-644-685)
–
anonymous
comment
Aug 20 at 17:01
Matrices
[deleted]
–
anonymous
comment
Aug 11 at 22:32
Matrices
[deleted]
–
anonymous
edited
Jun 8 at 22:29
Rethinking writing files with memory mapping and C++
This post introduces the motivation behind the [decodless C++ o…
–
admin
created
Jun 8 at 22:16
Rethinking writing files with memory mapping and C++
This post introduces the motivation behind the [decodless C++ o…
–
pknowles
comment
Jun 5 at 13:36
Contributing
[deleted]
–
anonymous
comment
Apr 19 at 11:24
Matrices
[deleted]
–
anonymous
comment
Apr 13 at 0:25
Matrices
[deleted]
–
anonymous
comment
Apr 5 at 9:43
Matrices
[deleted]
–
anonymous
comment
Mar 27 at 17:19
Matrices
[deleted]
–
anonymous
comment
Mar 25 at 4:59
Matrices
[deleted]
–
anonymous
comment
Mar 5 at 15:39
Matrices
[deleted]
–
anonymous
…
View All
Log in
Starting KDE plasma wayland with Fedora 35 and nvidia drivers
leave this field blank to prove your humanity
Article title
*
Article revisions must have a non-empty title
Article body
*
A quick bit of background: X11 is a compositor and Wayland is a protocol for a compositor. Compositors typically take all the windows, the cursor and window decorations (borders, shadow etc.) and combine them into one big image that gets sent to your monitor. There's a few things I'm getting tired of with X11... - No easy per-monitor high DPI support - Screen tearing - e.g. from youtube videos and basically any animation - Dirty regions not updating - e.g. when you drag a window over another it leaves a trail of itself smeard across whatever's behind it - Low framerate - I could swear I'm not getting 60fps - Occasional system hangs while the compositor crashes. This is likely plasma/kwin's fault for all I know. Incidentally, workarounds include disabling HW composition or just restarting things. For me with KDE plasma, that's `kwin --replace` and maybe `killall plasmashell ; kstart plasmashell`. I've never looked at the code and this is entirely hearsay. I think with X11 apps actually share access to a framebuffer. There is just one framebuffer for all monitors. The framebuffer is front-buffered, i.e. no swapchain or flipping on vsync, which is why tearing is inevitable. However, there appears to be double buffering and multiple framebuffer extensions, so this could all be wrong or they're just not used. In contrast, some cleaner limitataions of the wayland protocol and a from-scratch modern compositor implementation might avoid some of the above issues. # akmod-nvidia conflict After upgrading from Fedora 32 to 35 (via 34) I hit the following conflict when installing the nvidia driver. sudo dnf install akmod-nvidia Last metadata expiration check: 0:05:06 ago on Mon 17 Jan 2022 13:16:57 PST. Error: Problem: conflicting requests - package akmod-nvidia-3:470.74-1.fc35.x86_64 requires nvidia-kmod-common >= 3:470.74, but none of the providers can be installed - package akmod-nvidia-3:495.46-1.fc35.x86_64 requires nvidia-kmod-common >= 3:495.46, but none of the providers can be installed - package xorg-x11-drv-nvidia-3:470.74-1.fc35.x86_64 is filtered out by modular filtering - package xorg-x11-drv-nvidia-3:495.46-1.fc35.x86_64 is filtered out by modular filtering (try to add '--skip-broken' to skip uninstallable packages) This was caused by the nvidia cuda-fedora repository. I had just upgraded from fedora 32 and still had the old one installed at /etc/yum.repos.d/cuda-fedora32.repo. Adding the new repo allowed me to install akmod-nvidia, but caused problems for DRM/wayland: sudo dnf config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/fedora35/x86_64/cuda-fedora35.repo sudo dnf config-manager --set-disabled cuda-fedora32-x86_64 The cuda-fedora repository included a newer nvidia driver but I think it did not include the new nvidia_drm kernel module. When I tried to load it with modeset=1 I was getting an error from `sudo modprobe nvidia_drm modeset=1` about a version mismatch. My solution was to remove the repo entirely and reinstall the nvidia driver from the regular fedora repos, which ultimately allowed me to run plasma wayland. To uninstall the cuda-fedora repo and reinstall the nvidia driver from `rpmfusion-nonfree-updates`: sudo dnf repository-packages cuda-fedora35-x86_64 remove sudo dnf config-manager --set-disabled cuda-fedora35-x86_64 # Again I hit the above conflict issue from dnf. The following fixed it but I don't understand why at all. sudo dnf module disable nvidia-driver # This command looks like it should list the above to check if it's already disabled, but doesn't print anything for me sudo dnf module list --disabled # Reinstall the nvidia driver, that the above uninstalled sudo dnf install akmod-nvidia # Enabling Nvidia DRM modeset In order to use the plasma wayland compositor, nvidia's DRM backend is needed. This has to be enabled explicitly with a flag to the kernel module. Once enabled it's possible X11 breaks so remember how to undo it. Add the following to to `/etc/default/grub`: GRUB_CMDLINE_LINUX="nvidia-drm.modeset=1" Re-generate the grub config (if you're using grub2, otherwise drop the 2s): sudo grub2-mkconfig -o /boot/grub2/grub.cfg # Reboot Hopefully that just works. If it doesn't, doing it manually can print some useful error messages: # Stop the greeter, e.g. one of: kdm, sddm, gdm, lightdm # In a virtual terminal (ctrl-alt-f2 for example) sudo service kdm stop # Remove and reinstall the kernel module with the modeset flag sudo modprobe -r nvidia_drm sudo modprobe nvidia_drm modeset=1 sudo service kdm start # Finally in plasma wayland It seems that most greeters automatically filter out wayland backends if they don't see the nvidia DRM module loaded. Typically there will be a "Plasma (Wayland)" option to pick on the login screen. If not it's likely the nvidia kernel module is missing `modeset=1` (see above). Once getting past the above, the "Plasma (Wayland)" option appeared and I could log in. - `ps -e | grep X` gives `Xwayland` and no Xorg :D - My multi-monitor setup with 4k + 1080p JUST WORKS! Font scaling in apps such as google-chrome is a problem, but the desktop looks nice and crisp. - No weird graphics glitches yet that I've noticed. - Performance isn't great. There's a long delay when clicking the launcher button. `kwin_wayland` is chewing up CPU in `top`, especaially when anything is animating, which makes me think there is now HW compositing. Given the performance issues I might head back to X11 for a bit, but still this is really promising. # Per-monitor high DPI with X11 I have a 4k monitor and a little 1080p monitor. I'd recommend to everyone: just buy a monitor that's the same :) X11 has no support for per-monitor high DPI, so a workaround is to make a framebuffer (the composited result) for two 4k monitors and then have it scale the output for the 1080p monitor. # Show the current monitors xrandr # Set up 2x 4k outputs and scale down for the 1080p monitor xrandr \ --fb 7680x2160 \ --output DP-2 --auto --panning 3840x2160+0+0 --scale 1x1 --primary \ --output DP-1 --auto --panning 3840x2160+3840+0 --scale 2x2 --right-of DP-2
Toggle Preview
Edit message
*
A description of the changes made
Discard Draft
Save Draft
leave this field blank to prove your humanity
Flag
the thing you clicked
for moderator attention.
Reason choice:
Spam, promoting, advertising without disclosure
Rude, inappropriate, generally offensive
Too arrogant or demeaning to others
Other
Reason:
The reason for raising the flag
Error