Hello. I have MATE 24.04 desktop version installed. And sometimes when I start Viber the system just freezes and I can only turn it off or restart with button. Here is part of kern.log.1 file when last time this happened today:
2025-07-16T17:43:07.444486+02:00 MS-7309 kernel: [UFW BLOCK] IN=enp2s0 OUT= MAC=01:00:5e:00:00:01:ec:08:6b:ea:b8:5c:08:00 SRC=192.168.211.138 DST=224.0.0.1 LEN=32 TOS=0x00 PREC=0xC0 TTL=1 ID=0 DF PROTO=2
2025-07-16T17:44:48.838571+02:00 MS-7309 kernel: kauditd_printk_skb: 1 callbacks suppressed
2025-07-16T17:44:48.838707+02:00 MS-7309 kernel: audit: type=1400 audit(1752680688.833:3152): apparmor="DENIED" operation="open" class="file" profile="snap.telegram-desktop.telegram-desktop" name="/var/lib/snapd/desktop/icons/hicolor/16x16/apps/snap.telegram-desktop..png" pid=22564 comm="telegram-deskto" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
2025-07-16T17:45:04.963565+02:00 MS-7309 kernel: Adding 2097148k swap on /dev/sdb2. Priority:-2 extents:1 across:2097148k SS
2025-07-16T17:45:06.992644+02:00 MS-7309 kernel: Adding 2097148k swap on /dev/sdb2. Priority:-2 extents:1 across:2097148k SS
2025-07-16T17:45:12.445552+02:00 MS-7309 kernel: [UFW BLOCK] IN=enp2s0 OUT= MAC=01:00:5e:00:00:01:ec:08:6b:ea:b8:5c:08:00 SRC=192.168.211.138 DST=224.0.0.1 LEN=32 TOS=0x00 PREC=0xC0 TTL=1 ID=0 DF PROTO=2
2025-07-16T17:45:15.590984+02:00 MS-7309 kernel: audit: type=1400 audit(1752680715.589:3153): apparmor="AUDIT" operation="userns_create" class="namespace" info="Userns create - transitioning profile" profile="unconfined" pid=24732 comm="Viber" requested="userns_create" target="unprivileged_userns"
2025-07-16T17:45:15.597652+02:00 MS-7309 kernel: audit: type=1400 audit(1752680715.596:3154): apparmor="DENIED" operation="capable" class="cap" profile="unprivileged_userns" pid=24756 comm="Viber" capability=21 capname="sys_admin"
2025-07-16T17:45:19.927699+02:00 MS-7309 kernel: nouveau 0000:01:00.0: fifo: DMA_PUSHER - ch 4 [Viber[24732]] get 00008a6000 put 00008a600c ib_get 00000028 ib_put 0000002a state 80000000 (err: INVALID_CMD) push 00406040
2025-07-16T17:45:19.927755+02:00 MS-7309 kernel: nouveau 0000:01:00.0: fifo: DMA_PUSHER - ch 4 [Viber[24732]] get 00008a6100 put 00008a610c ib_get 0000002e ib_put 00000030 state 80000000 (err: INVALID_CMD) push 00406040
2025-07-16T17:45:19.927760+02:00 MS-7309 kernel: nouveau 0000:01:00.0: fifo: DMA_PUSHER - ch 4 [Viber[24732]] get 00008a6200 put 00008a620c ib_get 00000034 ib_put 00000036 state 80000000 (err: INVALID_CMD) push 00406040
2025-07-16T17:45:19.927767+02:00 MS-7309 kernel: nouveau 0000:01:00.0: gr: TRAP_MP_EXEC - TP 1 MP 0: 00000010 [INVALID_OPCODE] at 000000 warp 0, opcode 68363636 68363636
2025-07-16T17:45:19.927771+02:00 MS-7309 kernel: nouveau 0000:01:00.0: gr: 00200000 [] ch 4 [001f794000 Viber[24732]] subc 3 class 8297 mthd 15e0 data 00000000
2025-07-16T17:45:19.927775+02:00 MS-7309 kernel: nouveau 0000:01:00.0: gr: TRAP_MP_EXEC - TP 1 MP 1: 00000010 [INVALID_OPCODE] at 000000 warp 0, opcode 68363636 68363636
2025-07-16T17:45:19.927778+02:00 MS-7309 kernel: nouveau 0000:01:00.0: gr: 00200000 [] ch 4 [001f794000 Viber[24732]] subc 3 class 8297 mthd 15e0 data 00000000
2025-07-16T17:45:19.927782+02:00 MS-7309 kernel: nouveau 0000:01:00.0: gr: TRAP_MP_EXEC - TP 1 MP 0: 00000010 [INVALID_OPCODE] at 000000 warp 0, opcode 68363636 68363636
2025-07-16T17:45:19.927785+02:00 MS-7309 kernel: nouveau 0000:01:00.0: gr: 00200000 [] ch 4 [001f794000 Viber[24732]] subc 3 class 8297 mthd 15e0 data 00000000
2025-07-16T17:45:19.960512+02:00 MS-7309 kernel: nouveau 0000:01:00.0: gr: TRAP_CCACHE 00000001 [FAULT]
2025-07-16T17:45:19.960541+02:00 MS-7309 kernel: nouveau 0000:01:00.0: gr: TRAP_CCACHE 00000080 00000000 00000000 00000000 00000000 00000004 00000000
2025-07-16T17:45:19.960543+02:00 MS-7309 kernel: nouveau 0000:01:00.0: gr: 00200000 [] ch 4 [001f794000 Viber[24732]] subc 3 class 8297 mthd 15e0 data 00000000
2025-07-16T17:45:19.960544+02:00 MS-7309 kernel: nouveau 0000:01:00.0: fb: trapped read at 0000000000 on channel 4 [1f794000 Viber[24732]] engine 00 [PGRAPH] client 05 [CCACHE] subclient 00 [CB] reason 00000002 [PAGE_NOT_PRESENT]
2025-07-16T17:45:19.960545+02:00 MS-7309 kernel: nouveau 0000:01:00.0: gr: TRAP_CCACHE 00000001 [FAULT]
2025-07-16T17:45:19.960547+02:00 MS-7309 kernel: nouveau 0000:01:00.0: gr: TRAP_CCACHE 00000080 00000000 00000000 00000000 00000000 00000004 00000000
2025-07-16T17:45:19.960548+02:00 MS-7309 kernel: nouveau 0000:01:00.0: gr: 00200000 [] ch 4 [001f794000 Viber[24732]] subc 3 class 8297 mthd 15e0 data 00000000
2025-07-16T17:45:19.960550+02:00 MS-7309 kernel: nouveau 0000:01:00.0: fb: trapped read at 0000000000 on channel 4 [1f794000 Viber[24732]] engine 00 [PGRAPH] client 05 [CCACHE] subclient 00 [CB] reason 00000002 [PAGE_NOT_PRESENT]
2025-07-16T17:45:19.960551+02:00 MS-7309 kernel: nouveau 0000:01:00.0: gr: TRAP_MP_EXEC - TP 1 MP 0: 00000010 [INVALID_OPCODE] at 000000 warp 0, opcode 68363636 68363636
2025-07-16T17:45:19.960553+02:00 MS-7309 kernel: nouveau 0000:01:00.0: gr: 00200000 [] ch 4 [001f794000 Viber[24732]] subc 3 class 8297 mthd 15e0 data 00000000
2025-07-16T17:45:20.064547+02:00 MS-7309 kernel: nouveau 0000:01:00.0: Xorg[1956]: nv50cal_space: -16
2025-07-16T17:45:20.125489+02:00 MS-7309 kernel: nouveau 0000:01:00.0: gr: TRAP_MP_EXEC - TP 1 MP 0: 00000008 [TIMEOUT] at 000000 warp 0, opcode 68363636 68363636
2025-07-16T17:45:20.125642+02:00 MS-7309 kernel: nouveau 0000:01:00.0: gr: 00200000 [] ch 4 [001f794000 Viber[24732]] subc 3 class 8297 mthd 15e0 data 00000000
2025-07-16T17:45:20.136947+02:00 MS-7309 kernel: nouveau 0000:01:00.0: Xorg[1956]: nv50cal_space: -16
There was a post from you OCT 2024 about your graphics card.
"Nouveau invalid opcode" in the Linux kernel typically indicates a problem with the Nouveau open-source graphics driver for NVIDIA cards. This error means the driver is attempting to execute an invalid instruction, leading to a kernel crash or instability.
Thats basically what I was thinking. Best bet is to report it to the nouveau bug tracker; or find a way to use an NVIDIA driver compatible with the 9400GT.
From my experience system freezes on Ubuntu/Linux are almost always hardware related issues. Learnt this the hard way with faulty RAM dimms. A faulty GPU is another valid breakage point. Since your card is fairly old, it could very likely be an issue with the card circuitry. There might not be a "bug" at all with the Nouveau driver but a faulty/flakey capacitor on the GPU card that's not responding correctly to a driver instruction sent to the card. There's no maintained Nvidia driver for that card, so your only option is to use the Nouveau driver.
My rule of thumb with Linux is always to troubleshoot the hardware first, especially when it's old, and then move to the actual system. And I use a lot of old 2nd hand and refurbished hardware, so I'm commenting from personal experience. You might need a new GPU. Thankfully, there are cheap gpus on Ebay both 2nd hand & new.
In these types of "edge cases", it's usually the hardware that's the issue. The easiest way to test if it's the gpu or some weird nouveau or viber bug is to plug in a another gpu and run viber. Preferably something in the AMD gpu family or a newer Nvidia gpu that has a maintained nvidia proprietary driver.
If you get the same problem, then it's a weird viber bug. If you don't, then it's the 9400 gt gpu.
I run the nouveau driver on all of my systems that have an old nvidia gpu (haswell/broadwell vintage) instead of the proprietary nvidia driver as the experience is much smoother and more stable than using nvidia's driver. I have a 950 gt card in one of my desktops and the experience is so much smoother with the nouveau driver than the nvidia driver (ie screen tearing, random visual quirks, scrolling issues etc). And that makes sense as the newer drivers from Nvidia are designed to optimise the performance of the newer cards and sometimes that causes quirks & edge cases with the older cards.
I'm generally fairly impressed with how good the nouveau driver is and how good open source drivers are in general, they really do breathe new life into old hardware and in most cases run the hardware better than the proprietary driver. Using the nouveau driver on my laptops has improved battery life signficantly, by at least 50%. But keep in mind that these are just subjective personal experiences & opinions based on using my old systems.
If you play games or do video editing, you definitely need the nvidia proprietary driver, there's no way around that. But I'm not in that category, so I can stick to the nouveau driver
I would not rule out a bug as the log shows its trying to access memory at 0 (i.e. somehow a nullptr access). To me that says driver issue - i guess it could be that hardware is returning a null when it shouldnt and the software then fails as a result.
In any case, I've managed to install the 340 drivers on Debian 11 not that long ago; and there are PPAs with the 340 drivers but they will probably fail on newer kernels (possibly anything from 6.8 onwards if I remember correctly).
I'd start with the NVIDIA drivers - and I would definitely report it to nouveau.
Steve's suggestion is an excellent stop gap measure as the 340 driver is deprecated and hasn't been supported since Linux Kernel 5.10. There are devs still updating that driver to work with newer kernels, so adding the ppa is an great idea especially if you want to use your card with newer Ubuntu Mate distros like 24.04. But you'll have to install the driver manually each time if you do a fresh install of the OS, as Ubuntu Mate won't do that automatically as the standard driver is deprecated.
Here's another dev on github doing the same thing, so you can have a read to get a better idea of your situation, driver wise:
Longer term, it's probably a good idea to get a newer gpu that still has nvidia support and a nvidia maintained driver, ie anything from the 700 series onwards, if you decide to stick with the nvidia driver.
Now you have some food for thought
PS I haven't found a PPA with 340 drivers that are patched to work with newer kernels (6.8+), but I'll keep on looking. So your best bet for now is to download the 340 driver from the github repo in this post to test the theory that it's a nouveau driver bug.