Bug 29032 - Installation of kazam : microphone not recognized. Depreciated function in a script.py .Solution found on Internet
Summary: Installation of kazam : microphone not recognized. Depreciated function in a ...
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 8
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: MGA8-64-OK
Keywords: advisory, validated_update
Depends on:
Blocks:
 
Reported: 2021-05-29 23:32 CEST by Benoît Boudaud
Modified: 2023-01-24 09:00 CET (History)
7 users (show)

See Also:
Source RPM: kazam-1.4.5-12.mga8.src.rpm
CVE:
Status comment:


Attachments

Description Benoît Boudaud 2021-05-29 23:32:44 CEST
Description of problem:

Hi there, 

First of all, this is the first time that I report a bug. Maybe this is not the right place to report a bug about Kazam. Please, I ask you to be comprehensive if I made a mistake.
I installed Kazam and no microphone was recognized. I found the solution on the internet. This is caused by a depreciated function in a python script.

- location : /usr/lib/python3/dist-packages/kazam/pulseaudio/pulseaudio.py
- FIX : Update the function time.clock() in pulseaudio.py file with 
  time.perf_counter()
- time.clock() is deprecated from Python V3.3 and removed from Python v3.8


Version-Release number of selected component (if applicable): Mageia 8


How reproducible: Just install Kazam and run it


Steps to Reproduce:
1.
2.
3.
Comment 1 Lewis Smith 2021-05-30 21:46:37 CEST
Thank you for the report, and the fix. The file you mention is actually:
  /usr/lib/python3.8/site-packages/kazam/pulseaudio/pulseaudio.py
[There is another module of the same name elsewhere:
python3-x2go:/usr/lib/python3.8/site-packages/x2go/pulseaudio.py]

Assigning this to DavidG, because it seems as if the fix is already in Cauldron:
Fri Feb 19 2021 by daviddavid:
- add debian patch to use time.perf_counter() instead of time.clock() to
  fix errors with Python 3.8
  * https://bugs.launchpad.net/kazam/+bug/1875530/

Assignee: bugsquad => geiger.david68210
Source RPM: kazam => kazam-1.4.5-12.mga8.src.rpm

Comment 2 Benoît Boudaud 2021-05-30 21:57:14 CEST
(In reply to Lewis Smith from comment #1)
> Thank you for the report, and the fix. The file you mention is actually:
>   /usr/lib/python3.8/site-packages/kazam/pulseaudio/pulseaudio.py
> [There is another module of the same name elsewhere:
> python3-x2go:/usr/lib/python3.8/site-packages/x2go/pulseaudio.py]
> 
> Assigning this to DavidG, because it seems as if the fix is already in
> Cauldron:
> Fri Feb 19 2021 by daviddavid:
> - add debian patch to use time.perf_counter() instead of time.clock() to
>   fix errors with Python 3.8
>   * https://bugs.launchpad.net/kazam/+bug/1875530/

Hi Lewis,
That's right, the file is: 
/usr/lib/python3.8/site-packages/kazam/pulseaudio/pulseaudio.py

Sorry, I forgot to change the file path by copying and pasting it
Comment 3 David GEIGER 2021-06-01 07:18:25 CEST
Fixed with kazam-1.4.5-12.1.mga8 in Core/Updates_testing repo!
Comment 4 Maat 2021-07-05 16:17:52 CEST
Hello,

Confirmed for me on Asus ZenBook 14

And foudn also this : https://askubuntu.com/questions/1237885/kazam-microphone-unknown

seems the pâtch is the way to go...

Regards,
Maât

CC: (none) => maat-ml

Comment 5 Jose Manuel López 2021-08-18 16:38:32 CEST
Hi!, I confirm that this issue is here still.

I have applicated the solution and now works fine.

I have found solution in: https://cambiatealinux.com/kazam-no-detecta-ni-microfono-ni-altavoces-en-ubuntu-20.04-y-derivados

Greetings!!

CC: (none) => joselp

Comment 6 papoteur 2023-01-11 18:53:11 CET
I think that the bug report should be assigned to QA.

Assignee: geiger.david68210 => qa-bugs
CC: (none) => yves.brungard_mageia

Comment 7 Morgan Leijström 2023-01-11 21:25:06 CET
OOPs good you found it, neo.
Yes it have been left one and a half year here in testing repo...
This version 1.4.5 is still the latest stable upstream.

CC: (none) => fri

Comment 8 Thomas Andrews 2023-01-12 23:12:35 CET
I finally have a laptop with a built-in microphone, so I'm trying this with that. HP Pavilion 15, AMD A8-4555 processor, AMD HD 7600 graphics, MGA8-64 Plasma system.

Installed kazam and confirmed that it does not detect the microphone. Updated the package, and the microphone is now detected.

BUT, when I went to use the app to capture a video from the screen, I couldn't get it to produce anything that could be shown with vlc. 

I'm a neophyte with this app, so I sought guidance on Youtube. The videos I saw showed an app that worked differently from what is on my laptop. I can start a capture, and it will act like it's saving something to the Videos folder, but there is no option in the panel menu to "finish recording" as there was on Youtube. In addition, there wasn't any countdown before the capture started. 

And, in preferences, there were options for RAW(AVI), HUFFY(AVI), and Lossless JPEG(AVI), but nothing for mp4 or webm, as I saw on Youtube. I tried all three, with the same results - files in Videos with 0 bytes.

Before I start recording, the popup from the panel has "start Recording," "Pause recording," and "finish recording.," with the last two greyed out. If I click on "start recording," "finish recording" changes to "Cancel Countdown," and that is the only option that isn't greyed out.

I suppose what I'm seeing could be user error because of my inexperience, but this just isn't a particularly complicated app. I shouldn't be having this much trouble.

The "fix" does do what it is supposed to do, but the rest of the app doesn't work for me. I can't send it on this way.

CC: (none) => andrewsfarm

Comment 9 Thomas Andrews 2023-01-12 23:40:18 CET
Definitely a regression, and a huge one. 

I tried the old Kazam on other hardware, also a MGA8-64 Plasma system on AMD hardware (but no microphone available), and functions other than using a microphone worked perfectly. I was able to capture video and save it as an mp4 file, then play it afterward.
Comment 10 Thomas Andrews 2023-01-13 00:13:22 CET
It's working OK in Cauldron on the same hardware as Comment 8.

This MGA8 update was built 18 months ago. Could it need to be rebuilt in light of the many other updates that there have been in that time?
Thomas Andrews 2023-01-13 00:17:48 CET

Keywords: (none) => feedback

Comment 11 Thomas Andrews 2023-01-17 21:02:58 CET
Revisiting this. 

I updated the install from Comment 9, and Kazam still worked as it should. So, I went back to the problem install, removed Kazam (including the conf file). 

Then I installed the old version again. The microphone was still undetected, and I still wasn't offered a codec for mp4. I updated once more, and checked the preferences again, with the same results. But this time, when I went to capture the screen, it worked. Another trial of just a window also worked. Oh, and the microphone was capturing sound from the TV set I had playing in the room.

Still no mp4, but then I thought to check, and it seems that somehow this install didn't have the x264 package from tainted installed. I corrected that, and then I had the option of using mp4. Another capture showed that is working, as well.

So it seems that it DOES work after all. Why it didn't work for me on that first trial I may never know. Removing the feedback tag, giving this an OK, and validating.

Keywords: feedback => validated_update
Whiteboard: (none) => MGA8-64-OK
CC: (none) => sysadmin-bugs

Dave Hodgins 2023-01-24 02:21:33 CET

Keywords: (none) => advisory
CC: (none) => davidwhodgins

Comment 12 Mageia Robot 2023-01-24 09:00:01 CET
An update for this issue has been pushed to the Mageia Updates repository.

https://advisories.mageia.org/MGAA-2023-0006.html

Status: NEW => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.