Mission “wayland on gentoo with nvidia” (failed)

In the evening, around 8 o'clock, it finally occurred to me to look at Wayland. Generally, such thoughts arise periodically, but usually the idea quickly fades away after some time of reading manuals, because nothing is clear. Desktop – gentoo with nvidia. Lately, the graphic part on it is: Xorg, proprietary nvidia drivers, LightDM at the input, WM in the form awesomewm. Before awesomewm were xfce -> i3wm. In general, everything works, suits me, but sometimes I want something new. Needless to say, I hate KDE/Gnome.

I'm turning it on wayland in USE in /etc/portage/make.conf, I'm reassembling everything it can do through emerge -avtN @world . What's interesting is that it rebuilds without errors. As far as I remember, I already tried to enable this flag with the idea that I would try it later, but in the end I turned it off because there were problems with assembling some packages. In parallel, I'm looking for what's going on with WM.

I come across sway. It looks kind of cool, I compile it, try to run it, and immediately get a message similar to – “Go to hell with your proprietary NVIDIA drivers, we only respect newbut if you really want to, you can use the flag --unsupported-gpubut we don't guarantee anything.” I used the flag, set up work with two monitors without any problems, and am trying to work. It is impossible to work. When opening/closing windows, some very ugly artifacts appear that disappear immediately. They hurt my eyes. The idea of ​​switching to newat least for a while, I reject. The core needs to be rebuilt, and it seems that any AI like Stable diffusion it won't work.

At the same time I try to find DM. I stop at greet. As a result, it is possible to quickly launch the tuigreet variant. It looks funny, console windows, login into it, and then the graphics start. But it is also not without jambs, it cannot launch something with its own options (like `sway--unsupported-gpu ), you have to wrap the launch in a bash script and call it.

Since sway didn't work very well, I'm looking for something else. I stumbled upon post on linux.org and I'm going to try hyprland. I also easily set up two monitors, there are menus for launching, a console alacritty works and even with all the niceties and fonts from powerlevel10k. I run into a problem that copying selected text between the console and chrome does not work, I find some wild recipes with writing configs hyprland and key binding using wl-pastebut the solution easier. You need to launch chrome with flags —enable-features=useozoneplatform --ozone-platform=waylan. In this case, go to chrome://flags/ and set “Preferred Ozone platform” to “Wayland” as it is written in one post on reddit Does not help.

And so, in general, there is a launch menu, a console alacritty works, programs launch, there are workspaces. You can try to work. Only autolocker remains (a critical thing for me). I configure the connection hypridle And hyprlock. Quite crookedly, for some reason one monitor is darkened by the background, and on the second all the windows are visible with all the content, only the password and the clock appear at the top. It's 4 am, it's getting light, time to sleep. In the morning I wander to the computer and see a strange picture, the monitors are not turned off, on hyprlock the clock is set and it stopped at 5:05, when trying to log in everything freezes, when passing by it dies hyprlock all monitors are filled with a red background and you can't work, you have to restart hyprlandI see errors in the logs.

июл 10 10:18:19 gals-home kernel: NVRM: GPU at PCI:0000:08:00: GPU-17723284-063f-bf90-53f3-3e750c75b1ca
июл 10 10:18:19 gals-home kernel: NVRM: Xid (PCI:0000:08:00): 13, pid='<unknown>', name=<unknown>, Graphics Exception: Shader Program Header 11 Error
июл 10 10:18:19 gals-home kernel: NVRM: Xid (PCI:0000:08:00): 13, pid='<unknown>', name=<unknown>, Graphics Exception: Shader Program Header 18 Error
июл 10 10:18:19 gals-home kernel: NVRM: Xid (PCI:0000:08:00): 13, pid='<unknown>', name=<unknown>, Graphics Exception: ESR 0x405840=0xa2040800
июл 10 10:18:19 gals-home kernel: NVRM: Xid (PCI:0000:08:00): 13, pid='<unknown>', name=<unknown>, Graphics Exception: ESR 0x405848=0x80000000
июл 10 10:18:19 gals-home kernel: NVRM: Xid (PCI:0000:08:00): 13, pid=2064923, name=hyprlock, Graphics Exception: ChID 0010, Class 0000c797, Offset 00000000, Data 00000000

I understand why the monitors didn't turn off, I wrote it in the config exec-once = hypridl missing the 'e' at the end and it wouldn't start, hyprland didn't say anything about it.

I edit the config, reboot, come back 20 minutes later and see on the monitor screens a console with a message from the kernel that it went to sleep in S3 but immediately returned. At the same time hyprland memory and screen left. In hypridle launch is set systemctl suspend but why the car wakes up right away is not very clear, because the launch systemctl suspend The handles from the console work as they should.

I find doc from hyprland on nvidiaI do as it says, I restart, the problem is withsystemctl suspend remains, so I'm cutting this call out of the config for now. When entering the password hyprlock It doesn't seem to freeze. True, the screen that was filled with a fill when locking, after waking up the monitors from sleep mode, the whole screen is filled with red, for some reason there is no password entry and clock. You can enter the password only on the second screen. Well, and in the end, the nvidia doc didn't help, hyprlock hung after entering the password in this state. The clock stopped, and the input field hung on entering the password. If you kill it, both monitors are filled with a red background and you can no longer work.

Total

It seems that launching WM without root is getting closer, but it's all a bit raw. Although, maybe I'm wrong, and for Gnome and KDE users this future has already arrived. But I don't want to try and will return to Xorg. Again, judging by according to this textupdated 06/27/2024 in sneakers everything is not very rosy either.

I would also like to note the amazing world of configs hyprlock And sway. It would seem that there is yaml, json or toml but their configs are not the same. Well, for example, setting up monitors in sway.

output DP-1 resolution 3440x1440 position 0,0
output HDMI-A-1 resolution 1920x1080 position 3440,0

It should be noted that in sway they write that this is not a config, but commands (A sway configuration file is a list of sway commands that are executed by sway on startup.)

and here is the monitor config in hyprlock

monitor=DP-1, 3440x1440, 0x0, 1
monitor=HDMI-A-1, 1920x1080, 3440x0, 1

For me personally, after json, yaml or all that ini stuff, everything looks very strange.

P.S. asked to draw a chatpgpt Linuxoid who is waiting for a working wayland. The answer exceeded all expectations

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *